PowerShell for Detection and Analysis
Incident Identification
General Indicators Of Compromise
1. Attack Surface Vulnerability Exists
2. Corroboration From Multiple Intelligence Assets
3. Unusual Ingress/Egress Network Traffic
4. Anomalies In Privileged User Account Activity
5. Geographical Irregularities
6. Log-In Anomalies
7. Volume Increase For Database Reads
8. HTTP Response Size Anomalies
9. Large Numbers Of Requests For The Same File
10. Mismatched Port-Application Traffic
11. Suspicious Registry Or System File Changes
12. DNS Request Anomalies
13. Unexpected Patching Of Systems
14. Mobile Device Profile Changes
15. Data In The Wrong Places
16. Unusual Lateral Movement
17. Velocity Increase For Share / Mount Activity
18. Time Based Anomalies
19. Suspicious Byte Counts
20. Suspicious Domain Controller Activity
21. Subsequent Activity By Attacker Address / GEO
22. HTTP Response Code Success
23. File HashesInternal Threat Indicators
Network Forensic Indicators
Suspicious Domain Indicators
Azure & Office 365 Indicators
Important event logs
Identify Notable Processes
Monitor process behaviour: Look for any unusual or suspicious activities, such as high CPU or memory usage, unexpected network traffic, or processes running from unfamiliar locations.
Check process file locations: Verify the file locations of running processes. Legitimate Windows processes typically reside in specific system directories (e.g., C:\Windows\System32). If you find a process running from an unusual location, it could indicate malware.
Investigate process names: Research the names of unfamiliar or suspicious processes.
Analyse process signatures: Use tools like Process Explorer or Process Monitor to examine digital signatures of running processes. Legitimate processes often have valid digital signatures from reputable publishers, while unsigned or suspicious signatures can indicate potential malicious activity.
Monitor startup programs: Regularly review the list of programs set to run at system startup. Use the "msconfig" utility or Task Manager's Startup tab to check for unfamiliar or suspicious entries. Malware often tries to persist by adding itself to startup programs.
Check for unusual network connections: Use network monitoring tools to identify any abnormal network connections initiated by processes. Look for connections to suspicious IP addresses or domains that are known to be associated with malware or botnets.
Be cautious of system changes: Be vigilant when new processes suddenly appear after installing software or visiting unknown websites. Malware may attempt to install additional processes or modify existing ones. Monitor your system for any unauthorized changes.
System Processes
System (Profile: start at boot, no parent, one instance, runs .sys and .dll executables, runs for ntoskml.exe)
Services (Profile: Parent is wininit.exe, Starts at boot, path= C\Windows\System32, only one instance running)
lsm.exe (Profile: Parent is wininit.exe, Starts at boot, Path= C\Windows\System32, only one instance running
csrss.exe (Profile: Parent not shown (parent disappears after boot), could have multiple processes running, start after boot, Path= C\Windows\System32)
tashost.exe (Profile: Parent is Services, trigger based on User or local service action, path= C\Windows\System32)
Winlogon.exe (Profile: Parent not shown, path=C\Windows\System32, Children = (LogonUI.exe, winlogon.exe, and Dwm.exe))
Lsass.exe (Profile: Starts at boot, Parent is wininit.exe, Path = C\Windows\System32, Only one instance, NO child processes)
SMSS.exe (Profile: Starts immediately after boot, Parent is System, Path = C\Windows\System32)
WININIT.exe (Profile: Starts immediately after boot, Will not see Parent(smss.exe), Only one instance, Associated with starting: (lsm.exe, lsass.exe, services.exe))
SVCHOST.exe (Profile: Parent is services.exe, multiple instances running, Used for running service DLLS, Path = C\Windows\System32)
User Processes
Explorer.exe (Profile: Parent not shown, Path=C\Windows\System32, One for each logged-on user, Running underneath it should be user programs)
Iexplore.exe (Profile: Parent is explorer.exe, Path="Program files\Internet Explorer" OR Path=Program files (x86), One for each logged-on user, Running underneath it should be user programs)
Accounts and Groups
Local Groups
Logged in Users
Local Users
Local Administrators
Domain Account - Users | Group | Computers
List of IPV4 Addresses Who Have Connected (RDP)
User Autologon Registry Items
Check for executables in the Local System User Profile and Files
Startup Commands for Certain Programs
Installed Software Directories
Software in Registry
Connected Drives
Firewall Config
Credential Manager
Scan Process Creation Logs for AppData
T1176 Browser Extensions
Chrome
Firefox
Edge
Internet Explorer
T1031 Modify Existing Service
T1050 New Service
T1137 Office Application Startup
T1060 Registry Run Keys / Startup Folder
T1053 Scheduled Task
T1019 System Firmware
T1100 Web Shell
T1074 Data Staging
Query WMI Persistence
Review Software Keys for malicious entries
Check system directories for executables not signed as part of an operating system release
Determine if the user Trusted a doc/spreadsheet, etc and ran a macro
Check Office Security Settings
Check Outlook Temporary Files
Check MS Office Logs for High-Risk File Names
Determine if a user opened a document
Find files without extensions
Obtain hash for all running executables
Obtain hash and established network connections for running executables with DNS cache
Obtain hash and listening network connections for running executables
Obtain hash and possible tunnelled network connections for running executables
Obtain Workstation Name for Tunnelled Authentication
Obtain Processes Where the Binary File Version Doesn’t Match the OS Release
Obtain Process Binary File External Names
Baseline Processes and Services
Alternate Data Streams Discovery
Use Alternate Data Streams to find the download location
List Alternate Data Streams in text files within AppData
Programs Accessing Windows Features such as Webcam and Microphone
Programs Using Webcam
Programs Using Microphone
Last updated