|
| 1 | +name: Process spawned from unusual directory |
| 2 | +id: eb51aad3-f2ce-4f5a-b8f1-4cfb8d0d141e |
| 3 | +version: 1.0.0 |
| 4 | +description: | |
| 5 | + Detects executions of common utilities or build tools when those binaries |
| 6 | + are launched from suspicious default Windows directories. Attackers often |
| 7 | + place well-known system binaries beside malicious payloads or abuse proxy |
| 8 | + binaries from unexpected paths to evade defenses. |
| 9 | +labels: |
| 10 | + tactic.id: TA0005 |
| 11 | + tactic.name: Defense Evasion |
| 12 | + tactic.ref: https://attack.mitre.org/tactics/TA0005/ |
| 13 | + technique.id: T1218 |
| 14 | + technique.name: System Binary Proxy Execution |
| 15 | + technique.ref: https://attack.mitre.org/techniques/T1218/ |
| 16 | + |
| 17 | +condition: > |
| 18 | + spawn_process and |
| 19 | + ps.name iin |
| 20 | + ( |
| 21 | + 'rundll32.exe', |
| 22 | + 'regsvr32.exe', |
| 23 | + 'certutil.exe', |
| 24 | + 'mshta.exe', |
| 25 | + 'wmic.exe', |
| 26 | + 'cmstp.exe', |
| 27 | + 'cscript.exe', |
| 28 | + 'wscript.exe', |
| 29 | + 'msxsl.exe', |
| 30 | + 'RegAsm.exe', |
| 31 | + 'msbuild.exe', |
| 32 | + 'installutil.exe', |
| 33 | + 'csc.exe', |
| 34 | + 'hh.exe', |
| 35 | + 'jsc.exe', |
| 36 | + 'vbc.exe' |
| 37 | + ) and |
| 38 | + ps.exe imatches |
| 39 | + ( |
| 40 | + '?:\\Windows\\Tasks\\*', |
| 41 | + '?:\\Windows\\System32\\Tasks\\*', |
| 42 | + '?:\\PerfLogs\\*', |
| 43 | + '?:\\$Recycle.Bin\\*', |
| 44 | + '?:\\ProgramData\\*', |
| 45 | + '?:\\Users\\Public\\*', |
| 46 | + '?:\\Users\\*\\AppData\\Roaming\\*', |
| 47 | + '?:\\Users\\*\\Documents\\*', |
| 48 | + '?:\\Users\\*\\Pictures\\*', |
| 49 | + '?:\\Users\\*\\Music\\*', |
| 50 | + '?:\\Users\\*\\Videos\\*', |
| 51 | + '?:\\Windows\\AppReadiness\\*', |
| 52 | + '?:\\Windows\\Prefetch\\*', |
| 53 | + '?:\\Windows\\Fonts\\*', |
| 54 | + '?:\\Windows\\INF\\*', |
| 55 | + '?:\\Windows\\tracing\\*', |
| 56 | + '?:\\Windows\\Help\\*', |
| 57 | + '?:\\Windows\\csc\\*', |
| 58 | + '?:\\Windows\\Web\\*', |
| 59 | + '?:\\Windows\\Servicing\\*', |
| 60 | + '?:\\Windows\\Boot\\*', |
| 61 | + '?:\\Windows\\Resources\\*', |
| 62 | + '?:\\Windows\\Provisioning\\*', |
| 63 | + '?:\\Windows\\PrintDialog\\*', |
| 64 | + '?:\\Windows\\SchCache\\*', |
| 65 | + '?:\\Windows\\Cursors\\*', |
| 66 | + '?:\\Windows\\debug\\*', |
| 67 | + '?:\\Windows\\Containers\\*', |
| 68 | + '?:\\Windows\\ShellComponents\\*', |
| 69 | + '?:\\Windows\\ShellExperiences\\*', |
| 70 | + '?:\\Windows\\Setup\\*', |
| 71 | + '?:\\Windows\\Migration\\*', |
| 72 | + '?:\\Windows\\PLA\\*', |
| 73 | + '?:\\Windows\\Vss\\*', |
| 74 | + '?:\\Windows\\WaaS\\*', |
| 75 | + '?:\\Windows\\ImmersiveControlPanel\\*', |
| 76 | + '?:\\Windows\\PolicyDefinitions\\*', |
| 77 | + '?:\\Windows\\Globalization\\*', |
| 78 | + '?:\\Windows\\appcompat\\*', |
| 79 | + '?:\\Windows\\apppatch\\*', |
| 80 | + '?:\\Windows\\addins\\*', |
| 81 | + '?:\\Windows\\SystemTemp\\*', |
| 82 | + '?:\\Windows\\WinSxS\\*', |
| 83 | + '?:\\Windows\\TextInput\\*', |
| 84 | + '?:\\Windows\\TAPI\\*', |
| 85 | + '?:\\Windows\\Prefetch\\*', |
| 86 | + '?:\\Intel\\*', |
| 87 | + '?:\\AMD\\Temp\\*', |
| 88 | + '?:\\Windows\\hp\\*', |
| 89 | + '?:\\Windows\\RemotePackages\\*', |
| 90 | + '?:\\Windows\\ServiceProfiles\\*', |
| 91 | + '?:\\Windows\\dot3svc\\*', |
| 92 | + '?:\\Windows\\CbsTemp\\*', |
| 93 | + '?:\\Windows\\LiveKernelReports\\*', |
| 94 | + '?:\\Windows\\SoftwareDistribution\\*', |
| 95 | + '?:\\Windows\\ServiceState\\*', |
| 96 | + '?:\\Windows\\SKB\\*', |
| 97 | + '?:\\Users\\*\\AppData\\Local\\Microsoft\\Windows\\INetCache\\IE\\*' |
| 98 | + ) and |
| 99 | + not |
| 100 | + ( |
| 101 | + (ps.name = 'rundll32.exe' and ps.parent.name = 'svchost.exe' and ps.parent.args iin ('LocalServiceNoNetworkFirewall')) or |
| 102 | + (ps.name = 'regsvr32.exe' and ps.args imatches ('?:\\Windows\\servicing\\LCU\\Package_for_RollupFix~*')) or |
| 103 | + (ps.parent.exe imatches '?:\\Windows\\system32\\CompatTelRunner.exe' and ps.parent.args imatches ('*-m:appraiser.dll')) or |
| 104 | + (ps.exe imatches ('?:\\Program Files\\*\\msbuild.exe', '?:\\Program Files (x86)\\*\\msbuild.exe')) |
| 105 | + ) |
| 106 | +action: |
| 107 | + - name: kill |
| 108 | + |
| 109 | +output: > |
| 110 | + Process %ps.name spawned from suspicious directory %ps.exe |
| 111 | +severity: medium |
| 112 | + |
| 113 | +min-engine-version: 3.0.0 |
0 commit comments