-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ASM] Add support for attacker fingerprinting (#4698)
* Report WAF fingerprints * WAF fingerprint RC capabilities * Linting * Remove useless file * Add blank line * Remove unused capability * Generate fingerprint on user login events * Fix linting * Add passport plugin test to GHA * Add business logic addressses * Add body-parser dep to passport plugin test * Reformat test * Refactor report derivatives * Move method to its right place * Unify reportSchemas and reportFingerprint test in one suite * Unify reportSchemas and reportFingerprint test in one suite
- Loading branch information
Showing
17 changed files
with
724 additions
and
15 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
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
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
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
204 changes: 204 additions & 0 deletions
204
packages/dd-trace/test/appsec/attacker-fingerprinting-rules.json
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,204 @@ | ||
{ | ||
"version": "2.2", | ||
"metadata": { | ||
"rules_version": "1.5.0" | ||
}, | ||
"rules": [ | ||
{ | ||
"id": "tst-000-001-", | ||
"name": "rule to test fingerprint", | ||
"tags": { | ||
"type": "attack_tool", | ||
"category": "attack_attempt", | ||
"confidence": "1" | ||
}, | ||
"conditions": [ | ||
{ | ||
"parameters": { | ||
"inputs": [ | ||
{ | ||
"address": "server.request.query" | ||
} | ||
], | ||
"list": [ | ||
"testattack" | ||
] | ||
}, | ||
"operator": "phrase_match" | ||
} | ||
], | ||
"transformers": [] | ||
} | ||
], | ||
"processors": [ | ||
{ | ||
"id": "http-endpoint-fingerprint", | ||
"generator": "http_endpoint_fingerprint", | ||
"conditions": [ | ||
{ | ||
"operator": "exists", | ||
"parameters": { | ||
"inputs": [ | ||
{ | ||
"address": "waf.context.event" | ||
}, | ||
{ | ||
"address": "server.business_logic.users.login.failure" | ||
}, | ||
{ | ||
"address": "server.business_logic.users.login.success" | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"parameters": { | ||
"mappings": [ | ||
{ | ||
"method": [ | ||
{ | ||
"address": "server.request.method" | ||
} | ||
], | ||
"uri_raw": [ | ||
{ | ||
"address": "server.request.uri.raw" | ||
} | ||
], | ||
"body": [ | ||
{ | ||
"address": "server.request.body" | ||
} | ||
], | ||
"query": [ | ||
{ | ||
"address": "server.request.query" | ||
} | ||
], | ||
"output": "_dd.appsec.fp.http.endpoint" | ||
} | ||
] | ||
}, | ||
"evaluate": false, | ||
"output": true | ||
}, | ||
{ | ||
"id": "http-header-fingerprint", | ||
"generator": "http_header_fingerprint", | ||
"conditions": [ | ||
{ | ||
"operator": "exists", | ||
"parameters": { | ||
"inputs": [ | ||
{ | ||
"address": "waf.context.event" | ||
}, | ||
{ | ||
"address": "server.business_logic.users.login.failure" | ||
}, | ||
{ | ||
"address": "server.business_logic.users.login.success" | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"parameters": { | ||
"mappings": [ | ||
{ | ||
"headers": [ | ||
{ | ||
"address": "server.request.headers.no_cookies" | ||
} | ||
], | ||
"output": "_dd.appsec.fp.http.header" | ||
} | ||
] | ||
}, | ||
"evaluate": false, | ||
"output": true | ||
}, | ||
{ | ||
"id": "http-network-fingerprint", | ||
"generator": "http_network_fingerprint", | ||
"conditions": [ | ||
{ | ||
"operator": "exists", | ||
"parameters": { | ||
"inputs": [ | ||
{ | ||
"address": "waf.context.event" | ||
}, | ||
{ | ||
"address": "server.business_logic.users.login.failure" | ||
}, | ||
{ | ||
"address": "server.business_logic.users.login.success" | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"parameters": { | ||
"mappings": [ | ||
{ | ||
"headers": [ | ||
{ | ||
"address": "server.request.headers.no_cookies" | ||
} | ||
], | ||
"output": "_dd.appsec.fp.http.network" | ||
} | ||
] | ||
}, | ||
"evaluate": false, | ||
"output": true | ||
}, | ||
{ | ||
"id": "session-fingerprint", | ||
"generator": "session_fingerprint", | ||
"conditions": [ | ||
{ | ||
"operator": "exists", | ||
"parameters": { | ||
"inputs": [ | ||
{ | ||
"address": "waf.context.event" | ||
}, | ||
{ | ||
"address": "server.business_logic.users.login.failure" | ||
}, | ||
{ | ||
"address": "server.business_logic.users.login.success" | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"parameters": { | ||
"mappings": [ | ||
{ | ||
"cookies": [ | ||
{ | ||
"address": "server.request.cookies" | ||
} | ||
], | ||
"session_id": [ | ||
{ | ||
"address": "usr.session_id" | ||
} | ||
], | ||
"user_id": [ | ||
{ | ||
"address": "usr.id" | ||
} | ||
], | ||
"output": "_dd.appsec.fp.session" | ||
} | ||
] | ||
}, | ||
"evaluate": false, | ||
"output": true | ||
} | ||
] | ||
} |
Oops, something went wrong.