atomic-threat-coverage/Atomic_Threat_Coverage/Detection_Rules/win_usb_device_plugged.md
2019-02-11 23:28:16 +01:00

3.9 KiB

Title USB Device Plugged
Description Detects plugged USB devices
ATT&CK Tactic
    ATT&CK Technique
      Data Needed
        Trigger There is no Trigger for this technique yet.
        Severity Level low
        False Positives
        • Legitimate administrative activity
        Development Status experimental
        References
        Author Florian Roth

        Detection Rules

        Sigma rule

        title: USB Device Plugged
        description: Detects plugged USB devices
        references:
            - https://df-stream.com/2014/01/the-windows-7-event-log-and-usb-device/
            - https://www.techrepublic.com/article/how-to-track-down-usb-flash-drive-usage-in-windows-10s-event-viewer/
        status: experimental
        author: Florian Roth
        logsource:
            product: windows
            service: driver-framework
        detection:
            selection:
                EventID: 
                    - 2003  # Loading drivers
                    - 2100  # Pnp or power management
                    - 2102  # Pnp or power management
            condition: selection
        falsepositives: 
            - Legitimate administrative activity
        level: low
        
        

        Kibana query

        EventID:("2003" "2100" "2102")
        

        X-Pack Watcher

        curl -s -XPUT -H \'Content-Type: application/json\' --data-binary @- localhost:9200/_xpack/watcher/watch/USB-Device-Plugged <<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:(\\"2003\\" \\"2100\\" \\"2102\\")",\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 \'USB Device Plugged\'",\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:("2003" "2100" "2102")