The detailed email transfer process involves multiple steps and servers:
Alice
) composes email for bob@b.org
and sends it to the sending server smtp.a.org
.dns.a.org
is queried for the MX record of b.org
.b.org
.mx.b.org
via SMTP.mx.b.org
stores the email in Bob's mailbox.Bob
) downloads the email to his local mailbox via POP3.Potential attackers:
Know how to find the headers in various clients, and from within mail archives.
Extract these and copy them into a text document to work on.
Headers contain significant information about the message sender, recipient and intermediary servers.
The message header must include at least the following fields:
According to RFCs 822 and 2822 every email should have a message id field that "provides a unique message identifier that refers to a particular version of a particular message. The uniqueness of the message identifier is guaranteed by the host that generates it….This message identifier is intended to be machine readable and not necessarily meaningful to humans. A message identifier pertains to exactly one instantiation of a particular message; subsequent revisions to the message each receive new message identifiers."
Microsoft Exchange Server (Exchange) uses a database based on Microsoft Extensible Storage Engine (ESE).
Transaction logs • Checkpoints ( RESx.logs) • Temporary files (.tmp)
To retrieve log files created by Exchange, use the Windows PowerShell cmdlet Get-TransactionLogStats.ps1 - Gather
Malware manipulates the registry to run automatically
Check Windows AutoStart registry location, using tools e.g. Regripper to extract NTUSER.dat
System Behavior Analysis
Malware uses Pes (portable executables) to inject themselves into processes
Use Process monitoring e.g. Process Monitor to scan for suspicious processes
Check registry artifacts, look for Windows AutoStart registry locations using monitoring tools: regshot, Registry Viewer, RegScanner
Malware uses Windows services to remotely control the victim machine
Check Service Manager to identify suspicious services that run automatically or manually (refer to http://tools.sysprogs.org)
Use monitoring processes, e.g. Process Monitor, Process Explorer, Monit, SrvMan, Autoruns for Windows
System Behavior Analysis (cont’d)
Malware can change system settings, specifically startup menu
Check startup program entries in the registry
Check C:\Windows\System32\drivers, boot.ini or bcd entries
Check startup folders
Check AutoRuns for Windows to detect suspicious startups
Malware might get executed under event logs
Check C:\Windows\System32\winevt\Logs
Use Event Viewer to monitor events based on specific details, e.g. name
Key event IDs: 4688, 5156, 7040, 4663, 4660, 4657, 7045 (refer to https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/plan/appendix-l--events-to-monitor)
System Behavior Analysis (cont’d)
Malicious programs use Windows APIs to access OS information
Use API Monitor to intercept API calls made by the malware
Check HTML and SCR files
Use API Monitor, APImetrics, AlertSite, Runscope, Datadog, Postman
Check device drivers to find any untrusted downloading sources
DriverView, Driver Booster, Driver Reviver, Driver Easy
Check the Installations to find traces of the application data on the system
Mirekusoft Installer Monitor, Advanced Uninstaller PRO, Comodo Programs Manager,
Check for System Calls or syscalls to reveal the type of damage to the system via the malware
Strace
Check for Scheduled Tasks to find malware such as logic bombs
Schtasks, ADAudit, CronitorCLI
Check suspicious files and fodders,
e.g. Sigverif, PA File Sight, Tripwire File Integrity Monitoring, Netwrix Auditor Check
System Behavior Analysis (cont’d)
Malwares can get installed with the device drivers
Check for suspicious drivers and check whether they are genuine
Run -> “msinfo32” -> Software Environment -> System Drivers
DriverView tool displays a list of all device drivers and all relevant details
Check files and folder integrity for any malwares
Use SIGVERIF to check the integrity
Use FCIV to compute hash values
Use TRIPWIRE Enterprise to scan the system files
PA File Sight tool can be used for file monitoring
Use integrity tools such as FastSum or WinMD5