{"id":"5a3164f2-b373-4152-93cf-090b13c12d27","title":"Potentially Suspicious Child Process Of VsCode","description":"Detects uncommon or suspicious child processes spawning from a VsCode \"code.exe\" process. This could indicate an attempt of persistence via VsCode tasks or terminal profiles.","author":"Nasreddine Bencherchali (Nextron Systems)","status":"test","level":"medium","date":"2023-01-26","modified":"2023-10-25","tags":["attack.execution","attack.stealth","attack.t1218","attack.t1202"],"technique_ids":["T1202","T1218"],"logsource":{"category":"process_creation","product":"windows"},"falsepositives":["In development environment where VsCode is used heavily. False positives may occur when developers use task to compile or execute different types of code. Remove or add processes accordingly"],"references":["https://twitter.com/nas_bench/status/1618021838407495681","https://twitter.com/nas_bench/status/1618021415852335105"],"source_path":"rules/windows/process_creation/proc_creation_win_vscode_child_processes_anomalies.yml","source_sha256":"8ba9daa27e398f5b7a7c917c57060dc2692d8c94d78f23d9c3d9fa311b99ea81","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/process_creation/proc_creation_win_vscode_child_processes_anomalies.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Potentially Suspicious Child Process Of VsCode\nid: 5a3164f2-b373-4152-93cf-090b13c12d27\nstatus: test\ndescription: Detects uncommon or suspicious child processes spawning from a VsCode \"code.exe\" process. This could indicate an attempt of persistence via VsCode tasks or terminal profiles.\nreferences:\n    - https://twitter.com/nas_bench/status/1618021838407495681\n    - https://twitter.com/nas_bench/status/1618021415852335105\nauthor: Nasreddine Bencherchali (Nextron Systems)\ndate: 2023-01-26\nmodified: 2023-10-25\ntags:\n    - attack.execution\n    - attack.stealth\n    - attack.t1218\n    - attack.t1202\nlogsource:\n    category: process_creation\n    product: windows\ndetection:\n    selection_parent:\n        ParentImage|endswith: '\\code.exe'\n    selection_children_images:\n        Image|endswith:\n            - '\\calc.exe'\n            - '\\regsvr32.exe'\n            - '\\rundll32.exe'\n            - '\\cscript.exe'\n            - '\\wscript.exe'\n    selection_children_cli:\n        Image|endswith:\n            - '\\powershell.exe'\n            - '\\pwsh.exe'\n            - '\\cmd.exe'\n        CommandLine|contains:\n            - 'Invoke-Expressions'\n            - 'IEX'\n            - 'Invoke-Command'\n            - 'ICM'\n            - 'DownloadString'\n            - 'rundll32'\n            - 'regsvr32'\n            - 'wscript'\n            - 'cscript'\n    selection_children_paths:\n        Image|contains:\n            # Add more suspicious locations\n            - ':\\Users\\Public\\'\n            - ':\\Windows\\Temp\\'\n            - ':\\Temp\\'\n    condition: selection_parent and 1 of selection_children_*\nfalsepositives:\n    - In development environment where VsCode is used heavily. False positives may occur when developers use task to compile or execute different types of code. Remove or add processes accordingly\nlevel: medium\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1202","id":"T1202","name":"Indirect Command Execution","page":"techniques/enterprise/T1202/"},{"key":"enterprise/T1218","id":"T1218","name":"System Binary Proxy Execution","page":"techniques/enterprise/T1218/"}],"data_path":"data/detection-rules/5a3164f2-b373-4152-93cf-090b13c12d27.json","kind":"sigma"}
