Hayabusa medium test sigma
Potential Persistence Via PowerShell User Profile Using Add-Content
Detects calls to "Add-Content" cmdlet in order to modify the content of the user profile and potentially adding suspicious commands for persistence
Detection Logic
{
"ps_script": {
"EventID": 4104,
"Channel": [
"Microsoft-Windows-PowerShell/Operational",
"PowerShellCore/Operational"
]
},
"selection_add": {
"ScriptBlockText
| contains": "Add-Content $profile"
},
"selection_options": {
"ScriptBlockText
| contains": [
"-Value \"IEX ",
"-Value \"Invoke-Expression",
"-Value \"Invoke-WebRequest",
"-Value \"Start-Process",
"-Value 'IEX ",
"-Value 'Invoke-Expression",
"-Value 'Invoke-WebRequest",
"-Value 'Start-Process"
]
},
"condition": "ps_script and (all of selection_*)"
} False Positives
- ⚠ Legitimate administration and tuning scripts that aim to add functionality to a user PowerShell session
Field Validations
Loading…
Comments (0)
Loading comments...