To identify thefile namethat triggered theRuleName: Suspicious PowerShellon theaccounting-pcworkstation, follow these detailed steps:
Step 1: Access the SIEM System
Open your web browser and navigate to theSIEM dashboard.
Log in with youradministrator credentials.
Step 2: Set Up the Query
Go to theSearchorQuerysection of the SIEM.
Set theTime Rangeto thelast 24 hours.
Query Parameters:
Agent Name:accounting-pc
Rule Name:Suspicious PowerShell
Event Type:Startup items or Process creation
Step 3: Construct the SIEM Query
Here’s an example of how to construct the query:
Example Query (Splunk):
index=windows_logs
| search agent.name="accounting-pc" RuleName="Suspicious PowerShell"
| where _time > now() - 24h
| table _time, agent.name, process_name, file_path, RuleName
Example Query (Elastic SIEM):
{
"query": {
"bool": {
"must": [
{ "match": { "agent.name": "accounting-pc" }},
{ "match": { "RuleName": "Suspicious PowerShell" }},
{ "range": { "@timestamp": { "gte": "now-24h" }}}
]
}
}
}
Step 4: Analyze the Query Results
Example Output:
_time
agent.name
process_name
file_path
RuleName
2024-04-07T10:45:23
accounting-pc
powershell.exe
C:\Users\Accounting\AppData\Roaming\calc.ps1
Suspicious PowerShell
Step 5: Identify the Suspicious File
Theprocess_namein the output showspowershell.exeexecuting a suspicious script.
Thefile pathindicates the script responsible:
makefile
C:\Users\Accounting\AppData\Roaming\calc.ps1
calc.ps1
Step 6: Confirm the Malicious Nature
Manual Inspection:
Navigate to the specified file path on theaccounting-pcworkstation.
Check the contents of calc.ps1 for any malicious PowerShell code.
Hash Verification:
Answer:
calc.ps1
Step 7: Immediate Response
Isolate the Workstation:Disconnectaccounting-pcfrom the network.
Terminate the Malicious Process:
Stop the powershell.exe process running calc.ps1.
Use Task Manager or a script:
powershell
Stop-Process -Name "powershell" -Force
powershell
Remove-Item "C:\Users\Accounting\AppData\Roaming\calc.ps1" -Force
Scan for Persistence Mechanisms:
Step 8: Documentation
Record the following:
Date and Time:When the incident was detected.
Affected Host:accounting-pc
Malicious File:calc.ps1
Actions Taken:File removal and process termination.