attackmap 0.6.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- attackmap/__init__.py +2 -0
- attackmap/analyzer.py +449 -0
- attackmap/analyzer_contracts.py +194 -0
- attackmap/analyzers.py +1003 -0
- attackmap/anomalies.py +612 -0
- attackmap/asset_model.py +245 -0
- attackmap/attack_taxonomy.py +133 -0
- attackmap/auth_protocol.py +702 -0
- attackmap/authz.py +1695 -0
- attackmap/bench.py +467 -0
- attackmap/cli.py +1474 -0
- attackmap/config_scanner.py +389 -0
- attackmap/context_pack.py +82 -0
- attackmap/contracts.py +201 -0
- attackmap/control_model.py +280 -0
- attackmap/crossrepo.py +356 -0
- attackmap/crypto.py +240 -0
- attackmap/cve.py +717 -0
- attackmap/defensive_review.py +647 -0
- attackmap/detection_opportunities.py +1221 -0
- attackmap/detections/__init__.py +491 -0
- attackmap/detections/bola.yml +57 -0
- attackmap/detections/cloud.yml +609 -0
- attackmap/detections/injection.yml +167 -0
- attackmap/detections/secrets.yml +48 -0
- attackmap/detections/sigma.py +511 -0
- attackmap/detections/ssrf.yml +98 -0
- attackmap/detections/weakness.yml +62 -0
- attackmap/detections/webhook.yml +45 -0
- attackmap/detections/workflow.yml +121 -0
- attackmap/diagrams.py +237 -0
- attackmap/diff.py +301 -0
- attackmap/exploitability.py +493 -0
- attackmap/fingerprint.py +91 -0
- attackmap/fleet.py +370 -0
- attackmap/gitref.py +129 -0
- attackmap/graph.py +26 -0
- attackmap/handler_auth.py +639 -0
- attackmap/handler_span.py +62 -0
- attackmap/hunt_harness.py +505 -0
- attackmap/insights.py +701 -0
- attackmap/llm_review.py +846 -0
- attackmap/lockfiles.py +521 -0
- attackmap/mass_assignment.py +543 -0
- attackmap/md.py +175 -0
- attackmap/merge.py +333 -0
- attackmap/models.py +1284 -0
- attackmap/plugins_lock.py +114 -0
- attackmap/popular_packages.py +193 -0
- attackmap/progress.py +258 -0
- attackmap/recon_models.py +31 -0
- attackmap/recon_to_analysis.py +149 -0
- attackmap/redact.py +220 -0
- attackmap/report.py +424 -0
- attackmap/review_eval.py +335 -0
- attackmap/review_json.py +308 -0
- attackmap/review_prompts.py +796 -0
- attackmap/route_auth_fusion.py +474 -0
- attackmap/safe_fs.py +285 -0
- attackmap/sarif.py +373 -0
- attackmap/sbom.py +418 -0
- attackmap/scanner.py +1379 -0
- attackmap/sdk/__init__.py +278 -0
- attackmap/sdk/contracts.py +17 -0
- attackmap/sdk/fs.py +156 -0
- attackmap/sdk/models.py +59 -0
- attackmap/secrets_history.py +161 -0
- attackmap/security_overlay.py +71 -0
- attackmap/srcpaths.py +301 -0
- attackmap/suggest.py +394 -0
- attackmap/supply_chain.py +688 -0
- attackmap/suppress.py +740 -0
- attackmap/taint.py +1540 -0
- attackmap/taint_flow.py +1419 -0
- attackmap/taint_sinks.py +431 -0
- attackmap/taint_sinks.yaml +308 -0
- attackmap/taint_sources.py +396 -0
- attackmap/taxonomy.py +465 -0
- attackmap/threat_model.py +3441 -0
- attackmap/topology.py +316 -0
- attackmap/triage.py +151 -0
- attackmap/weaknesses.py +365 -0
- attackmap/webhardening.py +479 -0
- attackmap/webhook_verification.py +1067 -0
- attackmap/workflow_scanner.py +964 -0
- attackmap-0.6.4.dist-info/METADATA +226 -0
- attackmap-0.6.4.dist-info/RECORD +91 -0
- attackmap-0.6.4.dist-info/WHEEL +5 -0
- attackmap-0.6.4.dist-info/entry_points.txt +2 -0
- attackmap-0.6.4.dist-info/licenses/LICENSE +21 -0
- attackmap-0.6.4.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# Route-scoped request-payload rules (#251) for taint findings: injection
|
|
2
|
+
# sinks, path traversal, SSRF, open redirect. One Sigma rule per
|
|
3
|
+
# (rule id, method, route), on the web server access log.
|
|
4
|
+
#
|
|
5
|
+
# Placeholders are `${name}`; the generator fills them (route glob, method,
|
|
6
|
+
# the payload field and values, the sample events). A key whose value
|
|
7
|
+
# renders to null is dropped (e.g. `cs-method` when the route accepts any
|
|
8
|
+
# verb). Payload strings are matched case-insensitively with `contains` (in
|
|
9
|
+
# the query string, the path, or both when the traced source is unknown), or
|
|
10
|
+
# folded into one regex anchored on the parameter when AttackMap knows which
|
|
11
|
+
# query parameter carries the input. Keep them free of Sigma wildcard and
|
|
12
|
+
# escape characters (`*`, `?`, `\`): a test enforces it.
|
|
13
|
+
|
|
14
|
+
templates:
|
|
15
|
+
injection-route:
|
|
16
|
+
date: "2026-10-12"
|
|
17
|
+
title: "${label} attempt against ${method_route}"
|
|
18
|
+
description: >-
|
|
19
|
+
Requests to ${method_route} whose ${payload_where} carries ${label} syntax.
|
|
20
|
+
AttackMap traced request input (${source}) at ${location} into a ${label}
|
|
21
|
+
sink (rule ${rule_id}). Until the code is fixed, these requests are the
|
|
22
|
+
exploitation attempts; after the fix they stay a useful probe signal.
|
|
23
|
+
Limit: the markers are fixed strings, so double or mixed percent-encoding
|
|
24
|
+
(%2527, %u0027) and other encodings evade them unless your pipeline
|
|
25
|
+
decodes the URL first.${blind_spot}
|
|
26
|
+
logsource:
|
|
27
|
+
category: webserver
|
|
28
|
+
fields_required: [cs-method, cs-uri-stem, cs-uri-query, sc-status, c-ip]
|
|
29
|
+
detection:
|
|
30
|
+
selection_route:
|
|
31
|
+
"${route_field}": "${route_value}"
|
|
32
|
+
cs-method: "${method}"
|
|
33
|
+
selection_payload: "${payload_selection}"
|
|
34
|
+
condition: selection_route and selection_payload
|
|
35
|
+
falsepositives:
|
|
36
|
+
- Security scanners and penetration tests you run yourself (allow-list their source IPs)
|
|
37
|
+
- Legitimate values that happen to contain the matched characters; check the full request before acting
|
|
38
|
+
- Missed rather than false matches - double or mixed percent-encoding evades the fixed markers; decode URLs in the pipeline
|
|
39
|
+
level: "${level}"
|
|
40
|
+
test_events:
|
|
41
|
+
positive:
|
|
42
|
+
- cs-method: "${method_example}"
|
|
43
|
+
cs-uri-stem: "${positive_stem}"
|
|
44
|
+
cs-uri-query: "${positive_query}"
|
|
45
|
+
sc-status: 500
|
|
46
|
+
c-ip: 203.0.113.10
|
|
47
|
+
negative:
|
|
48
|
+
- cs-method: "${method_example}"
|
|
49
|
+
cs-uri-stem: "${route_example}"
|
|
50
|
+
cs-uri-query: "${negative_query}"
|
|
51
|
+
sc-status: 200
|
|
52
|
+
c-ip: 198.51.100.20
|
|
53
|
+
|
|
54
|
+
data:
|
|
55
|
+
# Per rule id: the label, the level, the payload markers (URL-encoded and
|
|
56
|
+
# raw forms, since access logs keep the query string as sent), a sample
|
|
57
|
+
# attack value for the positive test event, and a benign value for the
|
|
58
|
+
# negative one. `anchor: prefix` matches the marker at the start of the
|
|
59
|
+
# parameter value instead of anywhere in it. `query`, when set, is the
|
|
60
|
+
# whole positive query string (for payloads that live in the parameter
|
|
61
|
+
# name, like NoSQL operators).
|
|
62
|
+
payloads:
|
|
63
|
+
sql-injection:
|
|
64
|
+
label: SQL injection
|
|
65
|
+
level: high
|
|
66
|
+
contains: ["'", "%27", "--", "%2D%2D", "%2F%2A", "union select", "union+select", "union%20select", "sleep(", "sleep%28", "waitfor delay", "waitfor+delay", "waitfor%20delay", "benchmark(", "benchmark%28"]
|
|
67
|
+
sample: "1%27%20OR%201%3D1--"
|
|
68
|
+
benign: "shoes"
|
|
69
|
+
falsepositives:
|
|
70
|
+
- Names or text with apostrophes (O'Brien) in search parameters
|
|
71
|
+
subprocess-shell:
|
|
72
|
+
label: OS command injection
|
|
73
|
+
level: high
|
|
74
|
+
contains: [";", "%3B", "|", "%7C", "`", "%60", "$(", "%24%28", "&&", "%26%26", "%0A"]
|
|
75
|
+
sample: "127.0.0.1%3Bid"
|
|
76
|
+
benign: "example.com"
|
|
77
|
+
ssti:
|
|
78
|
+
label: Server-side template injection
|
|
79
|
+
level: high
|
|
80
|
+
contains: ["{{", "%7B%7B", "{%", "%7B%25", "${", "%24%7B", "#{", "%23%7B", "<%=", "%3C%25%3D"]
|
|
81
|
+
sample: "%7B%7B7%2A7%7D%7D"
|
|
82
|
+
benign: "Hello"
|
|
83
|
+
eval:
|
|
84
|
+
label: Code injection (eval)
|
|
85
|
+
level: high
|
|
86
|
+
contains: &code_markers ["__import__", "eval(", "eval%28", "exec(", "exec%28", "require(", "require%28", "child_process", "os.system", "os.popen", "process.mainmodule", "function(", "function%28"]
|
|
87
|
+
sample: "__import__%28%27os%27%29"
|
|
88
|
+
benign: "total"
|
|
89
|
+
exec:
|
|
90
|
+
label: Code injection (exec)
|
|
91
|
+
level: high
|
|
92
|
+
contains: *code_markers
|
|
93
|
+
sample: "__import__%28%27os%27%29"
|
|
94
|
+
benign: "total"
|
|
95
|
+
code-injection:
|
|
96
|
+
label: Code injection
|
|
97
|
+
level: high
|
|
98
|
+
contains: *code_markers
|
|
99
|
+
sample: "require%28%27child_process%27%29"
|
|
100
|
+
benign: "total"
|
|
101
|
+
expression-injection:
|
|
102
|
+
label: Expression language injection
|
|
103
|
+
level: high
|
|
104
|
+
contains: ["${", "%24%7B", "#{", "%23%7B", "t(java", "t%28java", "getruntime", "@java.lang", "%40java.lang", "new java.", "new+java.", "new%20java."]
|
|
105
|
+
sample: "%24%7BT%28java.lang.Runtime%29%7D"
|
|
106
|
+
benign: "price"
|
|
107
|
+
jndi-injection:
|
|
108
|
+
label: JNDI injection
|
|
109
|
+
level: high
|
|
110
|
+
contains: ["${jndi", "%24%7Bjndi", "jndi:", "jndi%3A", "ldap://", "ldap%3A%2F%2F", "rmi://", "rmi%3A%2F%2F", "dns://", "dns%3A%2F%2F"]
|
|
111
|
+
sample: "ldap%3A%2F%2Fattacker.example%2Fa"
|
|
112
|
+
benign: "java:comp/env/jdbc/orders"
|
|
113
|
+
unsafe-deserialization:
|
|
114
|
+
label: Unsafe deserialization
|
|
115
|
+
level: high
|
|
116
|
+
contains: ["rO0AB", "aced0005", "gASV", "gAN9", "gAJ9", ":{s:", "%3A%7Bs%3A"]
|
|
117
|
+
sample: "rO0ABXNyABFqYXZhLnV0aWwuSGFzaE1hcA"
|
|
118
|
+
benign: "eyJjYXJ0IjpbXX0"
|
|
119
|
+
path-traversal:
|
|
120
|
+
label: Path traversal
|
|
121
|
+
level: high
|
|
122
|
+
contains: ["../", "..%2F", "%2E%2E", "..%5C", "%252E%252E", "/etc/passwd", "%2Fetc%2Fpasswd", "win.ini", "%00"]
|
|
123
|
+
sample: "..%2F..%2F..%2Fetc%2Fpasswd"
|
|
124
|
+
benign: "report-2026.pdf"
|
|
125
|
+
nosql-injection:
|
|
126
|
+
label: NoSQL operator injection
|
|
127
|
+
level: medium
|
|
128
|
+
regex: false
|
|
129
|
+
contains: ["[$ne]", "%5B%24ne%5D", "[$gt]", "%5B%24gt%5D", "[$regex]", "%5B%24regex%5D", "[$where]", "%5B%24where%5D", "[$exists]", "%5B%24exists%5D", "$where", "%24where", "'||", "%27%7C%7C", "'%7C%7C"]
|
|
130
|
+
sample: "x"
|
|
131
|
+
query: "${param}%5B%24ne%5D=x"
|
|
132
|
+
benign: "alice"
|
|
133
|
+
ldap-injection:
|
|
134
|
+
label: LDAP injection
|
|
135
|
+
level: medium
|
|
136
|
+
contains: [")(|", ")(&", ")(!", "%29%28", "%2A%29", "%00"]
|
|
137
|
+
sample: "x%29%28%7C%28uid%3Dadmin"
|
|
138
|
+
benign: "alice"
|
|
139
|
+
xpath-injection:
|
|
140
|
+
label: XPath injection
|
|
141
|
+
level: medium
|
|
142
|
+
contains: ["' or ", "'+or+", "%27+or+", "%27%20or%20", "' and ", "%27%20and%20", "']", "%27%5D", "count(/", "count%28%2F"]
|
|
143
|
+
sample: "x%27%20or%20%271%27%3D%271"
|
|
144
|
+
benign: "SKU-1001"
|
|
145
|
+
header-injection:
|
|
146
|
+
label: HTTP header injection (CRLF)
|
|
147
|
+
level: low
|
|
148
|
+
contains: ["%0D", "%0A"]
|
|
149
|
+
sample: "report%0D%0ASet-Cookie%3Asid%3Dx"
|
|
150
|
+
benign: "report"
|
|
151
|
+
open-redirect:
|
|
152
|
+
label: Open redirect
|
|
153
|
+
level: medium
|
|
154
|
+
anchor: prefix
|
|
155
|
+
contains: ["http:", "https:", "http%3A", "https%3A", "//", "%2F%2F", "/%5C", "%2F%5C"]
|
|
156
|
+
sample: "https%3A%2F%2Fphish.example%2F"
|
|
157
|
+
benign: "%2Faccount"
|
|
158
|
+
falsepositives:
|
|
159
|
+
- Redirects to your own absolute URLs; add your hosts as an exclusion
|
|
160
|
+
ssrf:
|
|
161
|
+
label: Server-side request forgery
|
|
162
|
+
level: medium
|
|
163
|
+
contains: ["169.254.169.254", "169.254.170.2", "metadata.google.internal", "100.100.100.200", "fd00:ec2::254", "fd00%3Aec2%3A%3A254", "localhost", "127.0.0.1", "0.0.0.0", "[::1]", "%5B%3A%3A1%5D", "2852039166", "0xa9fea9fe", "file:", "file%3A", "gopher:", "gopher%3A", "dict:", "dict%3A"]
|
|
164
|
+
sample: "http%3A%2F%2F169.254.169.254%2Flatest%2Fmeta-data%2Fiam%2F"
|
|
165
|
+
benign: "https%3A%2F%2Fpartner.example%2Ffeed"
|
|
166
|
+
falsepositives:
|
|
167
|
+
- Health checks or internal tooling that legitimately pass loopback URLs
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Leaked-credential rules (#251, part 2). AttackMap never keeps a secret's
|
|
2
|
+
# value (every hint is redacted to its first four characters), so a rule for
|
|
3
|
+
# a specific key carries a placeholder you replace with the leaked key id.
|
|
4
|
+
|
|
5
|
+
templates:
|
|
6
|
+
aws-leaked-access-key-cloudtrail:
|
|
7
|
+
date: "2026-10-12"
|
|
8
|
+
title: "Use of an AWS access key that was committed to the repository"
|
|
9
|
+
description: >-
|
|
10
|
+
CloudTrail events signed with the access key AttackMap found hard-coded
|
|
11
|
+
in ${locations} (rule ${rule_id}). Replace ${placeholder} with the full
|
|
12
|
+
key id (AKIA…, from the file or from IAM). Rotate the workload to a new
|
|
13
|
+
key first; then keep the leaked key active on a user with no
|
|
14
|
+
permissions, so every use by whoever copied it is logged (as
|
|
15
|
+
AccessDenied) and matches this rule. A deleted or deactivated key fails
|
|
16
|
+
authentication before CloudTrail records the call.
|
|
17
|
+
logsource:
|
|
18
|
+
product: aws
|
|
19
|
+
service: cloudtrail
|
|
20
|
+
fields_required: [userIdentity.accessKeyId, eventName, eventSource, sourceIPAddress, userAgent, errorCode]
|
|
21
|
+
detection:
|
|
22
|
+
selection:
|
|
23
|
+
userIdentity.accessKeyId: "${placeholder}"
|
|
24
|
+
condition: selection
|
|
25
|
+
falsepositives:
|
|
26
|
+
- None once the workload has moved to a new key; before that, the legitimate workload itself
|
|
27
|
+
level: high
|
|
28
|
+
test_events:
|
|
29
|
+
positive:
|
|
30
|
+
- eventSource: iam.amazonaws.com
|
|
31
|
+
eventName: ListUsers
|
|
32
|
+
sourceIPAddress: 203.0.113.99
|
|
33
|
+
errorCode: AccessDenied
|
|
34
|
+
userIdentity:
|
|
35
|
+
type: IAMUser
|
|
36
|
+
accessKeyId: "${placeholder}"
|
|
37
|
+
negative:
|
|
38
|
+
- eventSource: iam.amazonaws.com
|
|
39
|
+
eventName: ListUsers
|
|
40
|
+
sourceIPAddress: 10.0.0.5
|
|
41
|
+
userIdentity:
|
|
42
|
+
type: IAMUser
|
|
43
|
+
accessKeyId: AKIAEXAMPLEOTHERKEY0
|
|
44
|
+
|
|
45
|
+
data:
|
|
46
|
+
# SecretHint / SecretHistoryHit kinds that are AWS access key ids.
|
|
47
|
+
aws_key_kinds: [aws_access_key]
|
|
48
|
+
placeholder: REPLACE_WITH_LEAKED_ACCESS_KEY_ID
|