Memory Forensics
Memory Forensics
• PID- process ID number, PPID –parent PID , the processes that spawned the
child process (in investigations tracing back the process that spawned the
malicious process is imp to understand events that led to compromise of
the system)
• Can refer the saved output to dump any process know offset
Psscan
• Finds terminated processes, processes that may be hidden by malwares.
• If the attackers unlink their malicious processes via the double-linked list,
the related processes cannot be viewed via the pslist plugin.
• The psscan plugin doesn’t trust the linked list (called ActiveProcessLinks) of
the processes
• Helps to find malware activity that had run and shutdown and not gets
listed in pslist. processes that are hidden by malware and terminated
processes can also be found
• -i – case insensitive
• Check parent child relationship of processes:
• Ex services.exe-svchost.exe for all instances
• Check pid for services and ppid for svchost are the same
• Similalry look for other processes
Filtering Windows Non- Core process
• Ex to check for misspelling
• grep -E –i –v “(system|wininit|lsass|lsm|services|sms|taskhost|wimlogon|iexplore|explorer|svchost|csrss)”
destpath/pslist.txt > destpath/pslist_all_non_wincore.txt
• -v – not in list
• Ex may find scvhost.exe – abuse of svchost
Singleton Check
• grep –E –i “(system|wininit|lsass|lsm|services)” dest/pslist.txt > dest/pslist_singleton.txt
• Check system start time and compare with other processes – check if any other
process starts long after system boot time.
• Ex: 2 instances of lsass but not anomaly in boot time (5 sec difference) but
anomalous since its singleton.
Psscan- Non Core process
• grep -E –i –v “(system|wininit|lsass|lsm|services|sms|taskhost|wimlogon|iexplore|explorer|svchost|csrss)”
destpath/psscan.txt > destpath/psscan_all_non_wincore.txt
• Can see IP address in the dump and its making a POST request
• Sending information to
• May be a directory at the IP address
Cridex Banking Trojan
• Trojan gets onto the machine and disguises itself as adobe reader
• Watches if someone goes to banking website and steals their login
information
• Sends banking information to Command and Control server
• Associated with Russian
website and can see it
changed its IP multiple
times
• Remedy measure – block
the IP incoming/outgoing
• Check which computer is
communicating with the IP
Check for persistence
• See if malware residing only on memory or HDD too
• If found in HDD it can be triggered when computer restarts
• Windows keep hive data used for running the machine like registry
key, data needed to start up the machine (start up values/commands)
• Registry key stores information need for long time (ex: screen
resolution, list of programs that starts at boot)
• Nothing anomalous in hivelist results
• Info kept in registries, the one we are interested in is located in start up
values located at above location.
Print Keys out of registry location
• The command looks inside
registry editor and
printsout whatever the
keys are inside of there.
• We find one entry that’s
odd
• Program with weird name
(KB00207877.exe) running
out of documents and
settings.
• Associated with the
malware- take and reverse
engineer
• This indicates persistence
mechanism.
Conclusion
• Turns out that (KB00207877.exe) is the one loading
malware into explorer.exe
• Memory inside explorer replaced by malware and
malware is the one disguised as explorer now.