atomic-threat-coverage/Atomic_Threat_Coverage/Detection_Rules/win_susp_sam_dump.md

3.9 KiB

Title SAM Dump to AppData
Description Detects suspicious SAM dump activity as cause by QuarksPwDump and other password dumpers
ATT&CK Tactic
ATT&CK Technique
Data Needed
Trigger
Severity Level high
False Positives
  • Penetration testing
Development Status experimental
References
    Author Florian Roth

    Detection Rules

    Sigma rule

    title: SAM Dump to AppData
    status: experimental
    description: Detects suspicious SAM dump activity as cause by QuarksPwDump and other password dumpers
    tags:
        - attack.credential_access
        - attack.t1003
    author: Florian Roth
    logsource:
        product: windows
        service: system
        definition: The source of this type of event is Kernel-General
    detection:
        selection:
            EventID: 16
        keywords:
            - '*\AppData\Local\Temp\SAM-*.dmp *'
        condition: all of them
    falsepositives:
        - Penetration testing
    level: high
    
    

    Kibana query

    (EventID:"16" AND "*\\\\AppData\\\\Local\\\\Temp\\\\SAM\\-*.dmp\\ *")
    

    X-Pack Watcher

    curl -s -XPUT -H \'Content-Type: application/json\' --data-binary @- localhost:9200/_xpack/watcher/watch/SAM-Dump-to-AppData <<EOF\n{\n  "trigger": {\n    "schedule": {\n      "interval": "30m"\n    }\n  },\n  "input": {\n    "search": {\n      "request": {\n        "body": {\n          "size": 0,\n          "query": {\n            "query_string": {\n              "query": "(EventID:\\"16\\" AND \\"*\\\\\\\\AppData\\\\\\\\Local\\\\\\\\Temp\\\\\\\\SAM\\\\-*.dmp\\\\ *\\")",\n              "analyze_wildcard": true\n            }\n          }\n        },\n        "indices": []\n      }\n    }\n  },\n  "condition": {\n    "compare": {\n      "ctx.payload.hits.total": {\n        "not_eq": 0\n      }\n    }\n  },\n  "actions": {\n    "send_email": {\n      "email": {\n        "to": null,\n        "subject": "Sigma Rule \'SAM Dump to AppData\'",\n        "body": "Hits:\\n{{#ctx.payload.hits.hits}}{{_source}}\\n================================================================================\\n{{/ctx.payload.hits.hits}}",\n        "attachments": {\n          "data.json": {\n            "data": {\n              "format": "json"\n            }\n          }\n        }\n      }\n    }\n  }\n}\nEOF\n
    

    Graylog

    (EventID:"16" AND "*\\\\AppData\\\\Local\\\\Temp\\\\SAM\\-*.dmp *")