Respond Analysis
Analysis: LIVE TRIAGE - Windows
System Information:
These commands are used to retrieve information about the system, including the date, time, hostname, detailed system info, operating system name and version, product name, BIOS serial number, and a brief list of computer systems.
Source: https://technet.microsoft.com/en-us/sysinternals/psinfo.aspx
This command retrieves detailed system information using the psinfo
tool from Sysinternals.
User Information:
These commands gather information regarding the user, like the current user, all user accounts, group and local group administrators, remote desktop settings, and user account details. It also retrieves command line history and saves it to a text file.
Network Information:
These commands collect various network-related information like network statistics, active connections, routing tables, ARP tables, DNS cache content, proxy settings, interface configurations, and more.
Service Information:
PowerShell commands for service information:
These commands display information related to system tasks, services, and processes that are running, including service configuration and memory usage of processes.
Policy, Patch, and Settings Information:
For listing GPO-installed software:
These commands are used to display the environment variable, group policy results, and Quick Fix Engineering (update patches) information.
Autorun and Autoload Information:
Commands to display the content of the startup service path:
Showing Microsoft autorun and hidden files Source: https://technet.microsoft.com/en-us/sysinternals/bb963902.aspx
Commands to display and save all autorun files in CSV and check them using virustotal:
Commands querying registry entries:
HKEY_CURRENT_USERS:
Commands for querying various registry keys under the HKEY_CURRENT_USER hive:
HKEY_LOCAL_MACHINE:
Commands querying registry keys under the HKEY_LOCAL_MACHINE hive:
LOGS
Commands related to working with event logs, including exporting logs:
Alternate Data Streams:
https://technet.microsoft.com/en-us/sysinternals/streams.aspx
check malicious file and save in csv
منبع. https://technet.microsoft.com/en us/sysinternals/bb897441.aspx
check malicious file
DLL Unassigned
https://technet.microsoft.com/en-us/sysinternals/bb896656.aspx
Windows Defender
منبع. http://windows.microsoft.com/en-us/windows/what-is-windows-defender-offline
LIVE TRIAGE - Linux
System Information
User Information
List of users who have logged in:
List of users who have logged in remotely:
Show unsuccessful logins:
Display local users:
Display local groups:
Display sudo access:
Display users with UID 0:
List of valid ssh authentication keys:
List files opened by the user:
Display bash history:
Network Information
Display network interfaces:
Display network connections:
Display listening ports:
Display routes:
Display the ARP table:
Display processes and used ports list:
Service Information
List of processes:
List of loaded modules:
List of open files:
List of network-open files:
List of files opened by a specific process:
List of all files opened by a specific process:
List of unlinked processes’ keys in execution:
Processes of a PID:
Storing analysis of executable files of malware:
Live reports display:
List of services:
Policy, Patch, and Settings Information
Display files within the pam.d path:
Autorun and Autoload Information
List of cron jobs:
List of cron jobs run by root user and UID zero:
Check unusual cron jobs:
Reports
Check history of executed commands by root user:
Check the last user logged into the system:
Files, Drivers, and Shared Environment Information
Display disk usage:
Display files in /etc/init.d path:
More information about a file:
Determine file type:
Display immutable files:
List files in /root path:
Display a list of recently modified files:
List writable files:
List files created since Jan 02, 2017:
List all files and their attributes:
List files in a specific path that have a newer timestamp (might be manipulated):
Display file details:
Check file type:
Run unix-privsec-check tool:
Execute chkrootkit:
Execute rkhunter:
Execute tiger:
Execute lynis:
Execute Linux Malware Detect (LMD):
Get LMD updates:
Run and scan LMD on a specific path:
USB Examination:
Displaying Events using usbrip:
Git Analysis:
Display history:
Display commit contents:
MALWARE Analysis:
STATIC ANALYSIS:
Creating Mount live Sysinternals tools drive:
Checking Signature for dlt and exe files:
Source: http://technet.microsoft.com/en-us/sysinternals/bb897441.aspx
Shell Codes Analysis:
Windows PE Analysis:
Display Hex and ASCI of PE files (exe or any file), with switch -n and first 500 bytes:
Use debug tool in Windows (for .java files):
Windows PE Analysis:
Script for compile time and date of PE files (Only for Windows). Source: https://www.perl.org/get.html and http://www.perlmonks.org/bare/?node_id=484287
Displaying strings inside PE and string lengths with switch -n:
Using strings in Linux:
Source: https://technet.microsoft.com/en-us/sysinternals/strings.aspx
Using strings in Windows:
Identify Malware in dumped memory using Volatility and the Windows7SPFix64 profile:
Source: https://github.com/volatilityfoundation/volatility
Process memory output
Malware Checking and Identification Tool:
Source: https://github.com/Defense-Cyber-Crime-Center/DC3-MWCP
Installing dc3-mwcp tool:
Using dc3-mwcp tool to check suspicious files:
MALWARE IDENTIFICATION
Tool: PROCESS EXPLORER
Source: YouTube Video
Step 1: Process Listing and Inspecting Suspicious Items:
Step 2: Checking File Signatures:
Step 3: Examining Strings:
Step 4: Viewing DLLs:
Step 5: Stopping and Removing Malware:
Step 6: Remove suspicious files that run at system startup:
Step 7: Process Monitoring
Source: Process Monitor
Step 8: Repeat Above Steps for Identifying Suspicious Files.
Check File Hashes
Utilizing VirusTotal APIs:
Utilizing Team Cymru APIs:
Source: Team Cymru
HARD DRIVE AND MEMORY ACQUISITION
OS: WINDOWS
Remotely create a memory dump:
Extract exe and dll files from dumped memory:
OS: LINUX
Create a memory dump:
Investigate Hidden Data in Files and Pictures
Utilizing various websites and tools like dcode, StegCracker, StegExtract, Sonic Visualizer, spek, etc.
Create a memory dump using LiME tool: Source: https://github.com/504ensicslabs/lime
Create a copy of a suspicious process using process ID:
More information about the suspicious process in dumped memory:
Using Strings on a file:
Create a copy of a hard drive and partition including tags and hashes:
Create a hard drive and partition over SSH:
Send a zipped hard drive image over netcat: To send to the host:
To receive by the host:
To send to host host:
To receive by the host using Pipe Viewer meter:
Encryption websites:
Examining hidden data in a file with StegCracker: https://github.com/Paradoxis/StegCracker Example:
Examining hidden data in a photo with bash script StegExtract:
Example:
Examining hidden data in a photo with StegSolve:
Examining hidden data in a file with exiftool:
Example:
Examining hidden data in music with Sonic Visualizer: https://www.sonicvisualiser.org/download.html Example: In Sonic Visualizer, select: Pane -> Add Spectrogram -> Channel 1
Examining hidden data in music with spek:
Powershell Investigation
Investigating PowerShell activity can be crucial in modern cybersecurity due to PowerShell's powerful capabilities and its frequent use in various attack scenarios. PowerShell is a versatile scripting language that provides vast access to a system's internals, making it a potent tool for both system administrators and adversaries. Hence, monitoring PowerShell execution is essential for detecting potential malicious activities.
Here's how the Windows Event IDs 4103 and 4104 pertain to PowerShell investigation:
Event ID 4103: PowerShell Script Block Logging:
Event ID 4103 is associated with PowerShell Script Block Logging, which is a feature that logs the processing of PowerShell commands and scripts. This logging includes the script block contents, even if they are obfuscated or encrypted, providing insight into exactly what code was run.
By analyzing the logs associated with this Event ID, investigators can examine the PowerShell commands/scripts executed on a system. This can be invaluable in understanding the actions taken by an adversary or troubleshooting legitimate script-related issues.
Event ID 4104: PowerShell Module Logging:
Event ID 4104 is related to PowerShell Module Logging, which logs pipeline execution details, including the names of cmdlets, functions, workflows, and scripts involved, along with their parameters.
Similar to script block logging, module logging helps investigators understand the sequence of PowerShell operations and the context in which they were run. This can be instrumental in identifying malicious PowerShell usage or troubleshooting legitimate operations.
Both Event IDs 4103 and 4104 are part of a broader PowerShell logging capability that, when properly configured and monitored, can significantly aid in the investigation of malicious activities or system issues. Collecting and analyzing these logs can provide a wealth of information about the actions being performed on a system via PowerShell, making them a crucial aspect of PowerShell-related investigations.
Registry run keys
Logon Type
Logon Failure
Common failure code
Account management events
Addition or removal of a member events
Security group creation and removal events
Process Anatomy
Process name: lsass.exe
Process path:
%Systemroot%\System32\lsass.exe
Username: SYSTEM
Number of instances: One
Parent process:
wininit.exe
Process name: smss.exe
Process path:
%Systemroot%\System32\smss.exe
Username: SYSTEM
Number of instances: One
Parent process:
System
Process name: csrss.exe
Process path:
%Systemroot%\System32\csrss.exe
Username: SYSTEM
Number of instances: Two (one for system processes and one for user processes)
Parent process:
smss.exe
Process name: wininit.exe
Process path:
%Systemroot%\System32\wininit.exe
Username: SYSTEM
Number of instances: One
Parent process:
smss.exe
Process name: services.exe
Process path:
%Systemroot%\System32\services.exe
Username: SYSTEM
Number of instances: One
Parent process:
wininit.exe
Process name: svchost.exe
Process path:
%Systemroot%\System32\svchost.exe
Username: Varies (can run as SYSTEM, NETWORK SERVICE, LOCAL SERVICE, etc.)
Number of instances: Multiple (one for each group of services)
Parent process:
services.exe
Process name: RuntimeBroker.exe
Process path:
%Systemroot%\System32\RuntimeBroker.exe
Username: The user's account
Number of instances: Multiple
Parent process:
svchost.exe
Process name: winlogon.exe
Process path:
%Systemroot%\System32\winlogon.exe
Username: SYSTEM
Number of instances: One for each interactive user login
Parent process:
smss.exe
Process name: LogonUI.exe
Process path:
%Systemroot%\System32\LogonUI.exe
Username: SYSTEM
Number of instances: One (when required for user logon interactions)
Parent process:
winlogon.exe
Process name: explorer.exe
Process path:
%Systemroot%\explorer.exe
Username: The user's account
Number of instances: One per user session
Parent process:
userinit.exe
orwinlogon.exe
(depending on the system configuration)
Event ID 4688 records every process creation activity
Event ID 4689 records every process exit activity
Process integrity values for Mandatory Labe
Windows processes
Last updated