|
| 1 | +title: Potential Shellcode Injection |
| 2 | +id: 250ae82f-736e-4844-a68b-0b5e8cc887da |
| 3 | +status: test |
| 4 | +description: Detects potential shellcode injection as seen used by tools such as Metasploit's migrate and Empire's psinject. |
| 5 | +references: |
| 6 | + - https://github.com/EmpireProject/PSInject |
| 7 | +author: Bhabesh Raj |
| 8 | +date: 2022/03/11 |
| 9 | +modified: 2024/07/02 |
| 10 | +tags: |
| 11 | + - attack.defense_evasion |
| 12 | + - attack.privilege_escalation |
| 13 | + - attack.t1055 |
| 14 | + - detection.threat_hunting |
| 15 | +logsource: |
| 16 | + category: process_access |
| 17 | + product: windows |
| 18 | +detection: |
| 19 | + selection: |
| 20 | + GrantedAccess: |
| 21 | + - '0x147a' |
| 22 | + - '0x1f3fff' |
| 23 | + CallTrace|contains: 'UNKNOWN' |
| 24 | + filter_main_wmiprvse: |
| 25 | + SourceImage: 'C:\Windows\System32\Wbem\Wmiprvse.exe' |
| 26 | + TargetImage: 'C:\Windows\system32\lsass.exe' |
| 27 | + filter_optional_dell_folders: |
| 28 | + # If dell software is installed we get matches like these |
| 29 | + # Example 1: |
| 30 | + # SourceImage: C:\Program Files\Dell\SupportAssistAgent\bin\SupportAssistAgent.exe |
| 31 | + # TargetImage: C:\Program Files\Dell\TechHub\Dell.TechHub.exe |
| 32 | + # GrantedAccess: 0x1F3FFF |
| 33 | + # Example 2: |
| 34 | + # SourceImage: C:\Program Files (x86)\Dell\UpdateService\DCF\Dell.DCF.UA.Bradbury.API.SubAgent.exe |
| 35 | + # TargetImage: C:\Program Files\Dell\TechHub\Dell.TechHub.exe |
| 36 | + # GrantedAccess: 0x1F3FFF |
| 37 | + # Example 3: |
| 38 | + # SourceImage: C:\Program Files\Dell\TechHub\Dell.TechHub.exe |
| 39 | + # TargetImage: C:\Program Files (x86)\Dell\UpdateService\DCF\Dell.DCF.UA.Bradbury.API.SubAgent.exe |
| 40 | + # GrantedAccess: 0x1F3FFF |
| 41 | + SourceImage|startswith: |
| 42 | + - 'C:\Program Files\Dell\' |
| 43 | + - 'C:\Program Files (x86)\Dell\' |
| 44 | + TargetImage|startswith: |
| 45 | + - 'C:\Program Files\Dell\' |
| 46 | + - 'C:\Program Files (x86)\Dell\' |
| 47 | + filter_optional_dell_specifc: |
| 48 | + SourceImage: 'C:\Program Files (x86)\Dell\UpdateService\ServiceShell.exe' |
| 49 | + TargetImage: 'C:\Windows\Explorer.EXE' |
| 50 | + filter_optional_visual_studio: |
| 51 | + SourceImage|startswith: 'C:\Program Files\Microsoft Visual Studio\' |
| 52 | + TargetImage|startswith: 'C:\Program Files\Microsoft Visual Studio\' |
| 53 | + condition: selection and not 1 of filter_main_* and not 1 of filter_optional_* |
| 54 | +falsepositives: |
| 55 | + - Unknown |
| 56 | +level: medium |
0 commit comments