{"id":"e4a74e34-ecde-4aab-b2fb-9112dd01aed0","title":"Dynamic CSharp Compile Artefact","description":"When C# is compiled dynamically, a .cmdline file will be created as a part of the process.\nCertain processes are not typically observed compiling C# code, but can do so without touching disk.\nThis can be used to unpack a payload for execution\n","author":"frack113","status":"test","level":"low","date":"2022-01-09","modified":"2023-02-17","tags":["attack.stealth","attack.t1027.004"],"technique_ids":["T1027.004"],"logsource":{"product":"windows","category":"file_event"},"falsepositives":["Unknown"],"references":["https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1027.004/T1027.004.md#atomic-test-2---dynamic-c-compile"],"source_path":"rules/windows/file/file_event/file_event_win_csharp_compile_artefact.yml","source_sha256":"5f29bfc04d27f5cee70d70d1edf513c2709d8b2e70e18ebf6bd241208ce7eb70","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/file/file_event/file_event_win_csharp_compile_artefact.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Dynamic CSharp Compile Artefact\nid: e4a74e34-ecde-4aab-b2fb-9112dd01aed0\nstatus: test\ndescription: |\n    When C# is compiled dynamically, a .cmdline file will be created as a part of the process.\n    Certain processes are not typically observed compiling C# code, but can do so without touching disk.\n    This can be used to unpack a payload for execution\nreferences:\n    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1027.004/T1027.004.md#atomic-test-2---dynamic-c-compile\nauthor: frack113\ndate: 2022-01-09\nmodified: 2023-02-17\ntags:\n    - attack.stealth\n    - attack.t1027.004\nlogsource:\n    product: windows\n    category: file_event\ndetection:\n    selection:\n        TargetFilename|endswith: '.cmdline'\n    condition: selection\nfalsepositives:\n    - Unknown\nlevel: low\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1027.004","id":"T1027.004","name":"Compile After Delivery","page":"techniques/enterprise/T1027.004/"}],"data_path":"data/detection-rules/e4a74e34-ecde-4aab-b2fb-9112dd01aed0.json","kind":"sigma"}
