detecting-cryptomining-in-cloud
它能做什么
这个工具可以帮你找出云端系统中可疑的加密货币挖矿活动。它会留意一些迹象,比如意外的费用支出、异常的网络流量,以及不明的进程在运行。
适用场景
- ✓当你的云账单费用突然大幅上涨时。
- ✓当某个警报提示存在加密货币挖矿活动时。
- ✓当你需要排查访问凭据是否被滥用时。
技能链接
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-cryptomining-in-cloud/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“帮我检查云账户里是否有未经授权的加密货币挖矿行为。”
每周 5 个新技能,1 分钟读完。
工作原理
它会监控计算和网络等资源的使用情况,并将其与已知的挖矿模式进行比对。一旦发现可疑情况,它就会向你发出提醒。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Detecting Cryptomining in Cloud
When to Use
- When cloud billing alerts indicate unexpected compute cost spikes
- When GuardDuty generates CryptoCurrency or Impact finding types
- When investigating compromised IAM credentials that may be used to launch mining instances
- When monitoring container workloads for unauthorized process execution
- When establishing proactive detection controls against resource hijacking attacks
Do not use for legitimate cryptocurrency mining operations, for non-cloud mining detection on physical hardware, or for general malware analysis unrelated to mining activity.
Prerequisites
- Amazon GuardDuty enabled with Runtime Monitoring for EC2, ECS, and EKS
- CloudWatch or Azure Monitor configured for compute utilization alerting
- VPC Flow Logs enabled for network traffic analysis to mining pool IPs
- AWS Cost Anomaly Detection or Azure Cost Management alerts configured
Workflow
Step 1: Establish Detection Through Multiple Signals
Deploy detection across four signal categories: cost anomalies, compute utilization, network traffic, and runtime processes.
# AWS Cost Anomaly Detection
aws ce create-anomaly-monitor \
--anomaly-monitor '{
"MonitorName": "EC2CostSpike",
"MonitorType": "DIMENSIONAL",
"MonitorDimension": "SERVICE"
}'
aws ce create-anomaly-subscription \
--anomaly-subscription '{
"SubscriptionName": "CryptoMiningAlert",
"MonitorArnList": ["arn:aws:ce::123456789012:anomalymonitor/monitor-id"],
"Subscribers": [{"Address": "security@company.com", "Type": "EMAIL"}],
"Threshold": 50.0,
"Frequency": "IMMEDIATE"
}'
# CloudWatch alarm for CPU utilization spike
aws cloudwatch put-metric-alarm \
--alarm-name HighCPUUtilization \
--namespace AWS/EC2 \
--metric-name CPUUtilization \
--statistic Average \
--period 300 \
--threshold 90 \
--comparison-operator GreaterThanThreshold \
--evaluation-periods 3 \
--alarm-actions "arn:aws:sns:us-east-1:123456789012:security-alerts"
Step 2: Monitor GuardDuty CryptoCurrency Findings
Configure alerting for GuardDuty findings specific to cryptocurrency mining activity on EC2, ECS, and EKS workloads.
Key GuardDuty finding types for cryptomining:
CryptoCurrency:EC2/BitcoinTool.B- Network connections to crypto-related domainsCryptoCurrency:Runtime/BitcoinTool.B- Runtime detection of mining process executionImpact:EC2/BitcoinTool.B- EC2 instance communicating with known Bitcoin mining poolsImpact:Runtime/CryptoMinerExecuted- Crypto mining binary execution detected by runtime agent
# EventBridge rule for cryptocurrency findings
aws events put-rule \
--name CryptoMiningDetection \
--event-pattern '{
"source": ["aws.guardduty"],
"detail-type": ["GuardDuty Finding"],
"detail": {
"type": [
{"prefix": "CryptoCurrency:"},
{"prefix": "Impact:EC2/BitcoinTool"},
{"prefix": "Impact:Runtime/CryptoMiner"}
]
}
}'
# Auto-remediation Lambda for crypto findings
aws events put-targets \
--rule CryptoMiningDetection \
--targets '[{
"Id": "CryptoAutoRemediate",
"Arn": "arn:aws:lambda:us-east-1:123456789012:function/crypto-remediate"
}]'
Step 3: Analyze Network Traffic for Mining Pool Connections
Monitor VPC Flow Logs and DNS queries for connections to known cryptocurrency mining pools operating on common ports (3333, 4444, 5555, 8333, 9999, 14444).
// Sentinel KQL query for mining pool connections
AzureNetworkAnalytics_CL
| where TimeGenerated > ago(24h)
| where DestPort_d in (3333, 4444, 5555, 8333, 9999, 14444, 14433, 45700)
| summarize ConnectionCount = count(), BytesSent = sum(BytesSent_d)
by SrcIP_s, DestIP_s, DestPort_d, bin(TimeGenerated, 1h)
| where ConnectionCount > 10
| project TimeGenerated, SrcIP_s, DestIP_s, DestPort_d, ConnectionCount, BytesSent
# AWS Athena query for VPC Flow Logs mining pool detection
cat << 'EOF' > mining-detection.sql
SELECT srcaddr, dstaddr, dstport, protocol,
COUNT(*) as connection_count,
SUM(bytes) as total_bytes
FROM vpc_flow_logs
WHERE dstport IN (3333, 4444, 5555, 8333, 9999, 14444)
AND action = 'ACCEPT'
AND start >= date_add('hour', -24, now())
GROUP BY srcaddr, dstaddr, dstport, protocol
HAVING COUNT(*) > 10
ORDER BY connection_count DESC
EOF
Step 4: Detect Mining in Container Environments
…
常见问题
什么是加密货币挖矿?
加密货币挖矿是指利用计算机解决复杂的数学问题,以验证加密货币交易并因此获得奖励。但如果在别人的系统上未经允许进行挖矿,就属于违规行为。
为什么未经授权的挖矿是个问题?
它会在未经许可的情况下占用计算资源(电力、算力),从而增加成本,还可能导致系统变慢或不稳定。
我需要是安全专家才能使用这个工具吗?
不需要。这个工具的设计目标就是,即使没有深厚的计算机安全经验,也能看懂并使用。
详情
作者的原始描述
This skill teaches security teams how to detect and respond to unauthorized cryptocurrency mining operations in cloud environments. It covers identifying cryptomining indicators through compute usage anomalies, network traffic patterns to mining pools, GuardDuty CryptoCurrency findings, and runtime process monitoring on EC2, ECS, EKS, and Azure Automation workloads. '
热度
- GitHub 星标
- 35k
- 排名
- #7817
- 许可证
- Apache-2.0
- 更新时间
- 2026/8/31
评论
- …
同一仓库的更多技能
abusing-dpapi-for-credential-access
35k为你的 AI 智能体提供针对特定任务的现成指令,让它完成得更好、更快。
abusing-shadow-credentials-for-privesc
35k教你的 AI 智能体写出清晰、结构良好的文本。
achieving-cmmc-level-2-compliance
35k帮助你的智能体搭建符合 CMMC Level 2 合规要求的环境。它会落实安全要求,并管理必要的文档。
acquiring-disk-image-with-dd-and-dcfldd
35k帮助你的智能体创建硬盘的精确副本。这能确保调查过程中信息不丢失、不被篡改。