-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b27376
commit 218c27f
Showing
4 changed files
with
238 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,3 +66,6 @@ dist/ | |
|
||
# Jetbrains | ||
.idea | ||
|
||
#mac files | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from panther_iocs import CRYPTO_MINING_DOMAINS | ||
|
||
|
||
def rule(event): | ||
query_name = event.get("query_name") | ||
for domain in CRYPTO_MINING_DOMAINS: | ||
if query_name.rstrip(".").endswith(domain): | ||
return True | ||
return False | ||
|
||
|
||
def title(event): | ||
return ( | ||
f"[{event.get('srcaddr')}:{event.get('srcport')}] " | ||
"made a DNS query for crypto mining domain: " | ||
f"[{event.get('query_name')}]." | ||
) | ||
|
||
|
||
def dedup(event): | ||
return f"{event.get('srcaddr')}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
AnalysisType: rule | ||
Description: Identifies clients that may be performing DNS lookups associated with common currency mining pools. | ||
DisplayName: AWS DNS Crypto Domain | ||
Enabled: true | ||
Filename: aws_dns_crypto_domain.py | ||
Reports: | ||
MITRE ATT&CK: | ||
- TA0040:T1496 | ||
Severity: High | ||
Tests: | ||
- ExpectedResult: false | ||
Log: | ||
account_id: "0123456789" | ||
answers: | ||
- Class: IN | ||
Rdata: 1.2.3.4 | ||
Type: A | ||
query_class: IN | ||
query_name: dynamodb.us-west-2.amazonaws.com | ||
query_timestamp: "2022-06-25 00:27:53" | ||
query_type: A | ||
rcode: NOERROR | ||
region: us-west-2 | ||
srcaddr: 5.6.7.8 | ||
srcids: | ||
instance: i-0abc234 | ||
srcport: "8888" | ||
transport: UDP | ||
version: "1.100000" | ||
vpc_id: vpc-abc123 | ||
Name: Non Crypto Query | ||
- ExpectedResult: false | ||
Log: | ||
account_id: "0123456789" | ||
answers: | ||
- Class: IN | ||
Rdata: 1.2.3.4 | ||
Type: A | ||
query_class: IN | ||
query_name: dynamodb.us-west-2.amazonaws.com. | ||
query_timestamp: "2022-06-25 00:27:53" | ||
query_type: A | ||
rcode: NOERROR | ||
region: us-west-2 | ||
srcaddr: 5.6.7.8 | ||
srcids: | ||
instance: i-0abc234 | ||
srcport: "8888" | ||
transport: UDP | ||
version: "1.100000" | ||
vpc_id: vpc-abc123 | ||
Name: Non Crypto Query Trailing Period | ||
- ExpectedResult: true | ||
Log: | ||
account_id: "0123456789" | ||
answers: | ||
- Class: IN | ||
Rdata: 1.2.3.4 | ||
Type: A | ||
query_class: IN | ||
query_name: moneropool.ru | ||
query_timestamp: "2022-06-25 00:27:53" | ||
query_type: A | ||
rcode: NOERROR | ||
region: us-west-2 | ||
srcaddr: 5.6.7.8 | ||
srcids: | ||
instance: i-0abc234 | ||
srcport: "8888" | ||
transport: UDP | ||
version: "1.100000" | ||
vpc_id: vpc-abc123 | ||
Name: Crypto Query | ||
- ExpectedResult: true | ||
Log: | ||
account_id: "0123456789" | ||
answers: | ||
- Class: IN | ||
Rdata: 1.2.3.4 | ||
Type: A | ||
query_class: IN | ||
query_name: abc.abc.moneropool.ru | ||
query_timestamp: "2022-06-25 00:27:53" | ||
query_type: A | ||
rcode: NOERROR | ||
region: us-west-2 | ||
srcaddr: 5.6.7.8 | ||
srcids: | ||
instance: i-0abc234 | ||
srcport: "8888" | ||
transport: UDP | ||
version: "1.100000" | ||
vpc_id: vpc-abc123 | ||
Name: Crypto Query Subdomain | ||
- ExpectedResult: true | ||
Log: | ||
account_id: "0123456789" | ||
answers: | ||
- Class: IN | ||
Rdata: 1.2.3.4 | ||
Type: A | ||
query_class: IN | ||
query_name: moneropool.ru. | ||
query_timestamp: "2022-06-25 00:27:53" | ||
query_type: A | ||
rcode: NOERROR | ||
region: us-west-2 | ||
srcaddr: 5.6.7.8 | ||
srcids: | ||
instance: i-0abc234 | ||
srcport: "8888" | ||
transport: UDP | ||
version: "1.100000" | ||
vpc_id: vpc-abc123 | ||
Name: Crypto Query Trailing Period | ||
- ExpectedResult: true | ||
Log: | ||
account_id: "0123456789" | ||
answers: | ||
- Class: IN | ||
Rdata: 1.2.3.4 | ||
Type: A | ||
query_class: IN | ||
query_name: abc.abc.moneropool.ru. | ||
query_timestamp: "2022-06-25 00:27:53" | ||
query_type: A | ||
rcode: NOERROR | ||
region: us-west-2 | ||
srcaddr: 5.6.7.8 | ||
srcids: | ||
instance: i-0abc234 | ||
srcport: "8888" | ||
transport: UDP | ||
version: "1.100000" | ||
vpc_id: vpc-abc123 | ||
Name: Crypto Query Subdomain Trailing Period | ||
DedupPeriodMinutes: 60 | ||
LogTypes: | ||
- AWS.VPCDns | ||
RuleID: AWS.DNS.Crypto.Domain | ||
Threshold: 1 |