{"id":"c80e66d8-1780-48a9-b412-46663fd21ac0","title":"Suspicious Autorun Registry Modified via WMI","description":"Detects suspicious activity where the WMIC process is used to create an autorun registry entry via reg.exe, which is often indicative of persistence mechanisms employed by malware.\n","author":"Swachchhanda Shrawan Poudel (Nextron Systems)","status":"experimental","level":"high","date":"2025-02-17","modified":"","tags":["attack.privilege-escalation","attack.execution","attack.persistence","attack.t1547.001","attack.t1047"],"technique_ids":["T1047","T1547.001"],"logsource":{"category":"process_creation","product":"windows"},"falsepositives":["Legitimate administrative activity or software installations"],"references":["Internal Research","https://github.com/HackTricks-wiki/hacktricks/blob/e4c7b21b8f36c97c35b7c622732b38a189ce18f7/src/windows-hardening/windows-local-privilege-escalation/privilege-escalation-with-autorun-binaries.md"],"source_path":"rules/windows/process_creation/proc_creation_win_autorun_registry_modified_via_wmic.yml","source_sha256":"c03338b3d2833ccad1f00f31952dc29f8c7571b26c73a44fdde62fb93938577c","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/process_creation/proc_creation_win_autorun_registry_modified_via_wmic.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Suspicious Autorun Registry Modified via WMI\nid: c80e66d8-1780-48a9-b412-46663fd21ac0\nstatus: experimental\ndescription: |\n    Detects suspicious activity where the WMIC process is used to create an autorun registry entry via reg.exe, which is often indicative of persistence mechanisms employed by malware.\nreferences:\n    - Internal Research\n    - https://github.com/HackTricks-wiki/hacktricks/blob/e4c7b21b8f36c97c35b7c622732b38a189ce18f7/src/windows-hardening/windows-local-privilege-escalation/privilege-escalation-with-autorun-binaries.md\nauthor: Swachchhanda Shrawan Poudel (Nextron Systems)\ndate: 2025-02-17\ntags:\n    - attack.privilege-escalation\n    - attack.execution\n    - attack.persistence\n    - attack.t1547.001\n    - attack.t1047\nlogsource:\n    category: process_creation\n    product: windows\ndetection:\n    selection_execution_img:\n        - Image|endswith: '\\wmic.exe'\n        - OriginalFileName: 'wmic.exe' # wmic process call create 'reg.exe add HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run /v Desktops /t REG_SZ /d \"\\\"C:\\Users\\user\\AppData\\Roaming\\Microsoft\\tre\\Desktops.exe\\\" random\" /f'\n        - ParentImage|endswith: '\\wmiprvse.exe'\n    selection_execution_cmd:\n        CommandLine|contains|all:\n            - 'reg'\n            - ' add '\n        CommandLine|contains:\n            - '\\Software\\Microsoft\\Windows\\CurrentVersion\\Run'\n            - '\\Software\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Run'\n            - '\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run'\n    selection_suspicious_paths_1:\n        CommandLine|contains:\n            - ':\\Perflogs'\n            - :\\ProgramData'\n            - ':\\Windows\\Temp'\n            - ':\\Temp'\n            - '\\AppData\\Local\\Temp'\n            - '\\AppData\\Roaming'\n            - ':\\$Recycle.bin'\n            - ':\\Users\\Default'\n            - ':\\Users\\public'\n            - '%temp%'\n            - '%tmp%'\n            - '%Public%'\n            - '%AppData%'\n    selection_suspicious_paths_user_1:\n        CommandLine|contains: ':\\Users\\'\n    selection_suspicious_paths_user_2:\n        CommandLine|contains:\n            - '\\Favorites'\n            - '\\Favourites'\n            - '\\Contacts'\n            - '\\Music'\n            - '\\Pictures'\n            - '\\Documents'\n            - '\\Photos'\n    condition: all of selection_execution_* and (selection_suspicious_paths_1 or (all of selection_suspicious_paths_user_*))\nfalsepositives:\n    - Legitimate administrative activity or software installations\nlevel: high\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1047","id":"T1047","name":"Windows Management Instrumentation","page":"techniques/enterprise/T1047/"},{"key":"enterprise/T1547.001","id":"T1547.001","name":"Registry Run Keys / Startup Folder","page":"techniques/enterprise/T1547.001/"}],"data_path":"data/detection-rules/c80e66d8-1780-48a9-b412-46663fd21ac0.json","kind":"sigma"}
