Table Top Exercise
Table Top Exercise
Outline
This document is created to provide the outline and overall objectives of the Table Top Exercises which should be performed for validation of the documentation and SOPs of the project.
Scenario
DeMo Team Analysis:
While monitoring DeMo Team has identified one of store front desk employee’s PC was generating some anomalous behavior.
There are some Ransomware signatures which got deleted followed by a RAT alarm triggered by CrowdStrike on the device, which is not cleaned/quarantined.
A Process Injection alarm triggered.
An unauthorized process named nbtscan.exe was found to be executed on the host.
Demo Team has also identified a credential dumping alarm on CrowdStrike on a security admin user’s PC on the same store named Gideon.
These 2 machines were found to be communicating with a POS Device on Store and Organization Domain controller- AllSafeCyberSec as per analysis from DeMo team. Demo Team has
escalated the case to SIRT Team.
SIRT Analysis:
From the initial investigation,
SIRT Team has identified, the user has received a suspicious email for a security update and from that day onwards the activity started.
SIRT Team has found a file named nbs.txt which seems to be related to nbtscan.exe on the front desk machine.
SIRT Team found some evidences that Gideon’s machine seems to be communicating with the Domain Controller.
SIRT Team has captured these 3 machines memory dumps and escalated the case to SIRT Forensics team for further analysis and to identify the RCA.
1. What email address tricked the front desk employee into installing a security update?
2. How was the fake update delivered? If so, what is the filename?
3. What is the name of the RAT family used by the attacker?
4. The malware appears to be leveraging process injection. What is the PID of the process that is injected?
5. What is the unique value the malware is using to maintain persistence after reboot?
6. Malware often uses a unique value or name to ensure that only one copy runs on the system. What is the unique name the malware is using?
7. Is the machine compromised before? Can we identify that?
8. What is the NTLM password hash for the administrator account?
9. Do you find any tools moved by the attacker on the compromised front desk host? How many tools did the attacker move?
10. What is the password for the front desk local administrator account?
11. What is the std create data timestamp for the nbtscan.exe tool?
12. Attacker relation with nbtscan.exe tool? The attackers appear to have stored the output from the nbtscan.exe tool in a text file on a disk called nbs.txt. What is the IP address of the first
machine in that file?
13. What is the full IP address and the port was the attacker's malware using?
14. It appears the attacker also installed legit remote administration software. What is the name of the running process?
15. It appears the attackers also used a built-in remote access method. What IP address did they connect to?
1. It appears the attacker moved latterly from the front desk machine to the security admins (Gideon) machine and dumped the passwords. What is Gideon's password?
2. Once the attacker gained access to "Gideon," they pivoted to the AllSafeCyberSec domain controller to steal files. It appears they were successful. What password did they use?
3. What was the name of the RAR file created by the attackers?
4. How many files did the attacker add to the RAR archive?
5. Any scheduled task on this machine?
Machine: POS
Answers:
First, we must find the correct volatility profile for the images. In our real cases, we will know the host OS version, but still we need to figure out which profile suits the parsing.
Question1: What email address tricked the front desk employee into installing a security update?
We can first use the filescan plugin to see if there are ost/pst file present in the memory dump
Message0000
1 contains references to an update that must be Downloaded. Annotated in yellow is the downloaded link. It is not a secure http connection, so we can assume it’s malware. To find the sender
of the email we can do below:
Question2: Is there any file delivered on email? If so, what is the filename?
From the previous question, we saw that the filename is named AnyConnectInstaller.exe.
Answer: AnyConnectInstaller.exe
Question3: What is the name of the rat's family used by the attacker?
AnyConnectInstaller is not a process in itself. To dump it, we can check the output of the filescan plugin that we ran previously.
mkdir AnyConn
vol.py -f target1/Target1-1dd8701f.vmss —profile=Win7SP1x86_23418 dumpfiles -D AnyConn -n -u -Q
0x000000003df12dd0,0x000000003df1cf00,0x000000003e0bc5e0,0x000000003e2559b0,0x000000003e2ae8e0,0x000000003ed57968
md5sum AnyConn/*
Answer: XTREMERAT
Question4: The malware appears to be leveraging process injection. What is the PID of the process that is injected?
We can check if these values match Established connections in the memory dump, using the netscan plugin:
Question5: What is the unique value the malware is using to maintain persistence after reboot?
Evidence of persistence can be found in the registry. First, we need to find the virtual offset of the Software hive:
Answer: Mr.Robot
Malware often uses a unique value or name to ensure that only one copy runs on the system. Let’s check the handles open for pid 2996:
Answer: fsociety0.dat
There is not much evidence in the cmdline/consoles/cmdscan plugins. One way to find potential attackers is to filter for User directories:
Zerocool the unusual name which seems to be created long back and there is no trace of this user.
Answer: Zerocool
Question8: What is the NTLM password hash for the administrator account?
Answer:
79402b7671c317877b8b954b3311fa82
Question9: Do you find any tools moved by the attacker on the compromised front desk host? How many tools did the attacker move?
A tool must mean anything ‘executable’ so to speak. In the consoles plugin’s output, there was an instance of Windows\Temp being listed:
Because there are also two directories in the Temp folder. We can check the filescan output for LNK files and Jumplists, stored (https://nasbench.medium.com/windows-forensics-analysis-
windows-artifacts-part-ii-71b8fa68d8a1) as AUTOMATICDESTINATIONS-MS and CUSTOMDESTINATIONS-MS.
We can literally dumped ALL of them, instead of wasting time copy-pasting the offsets we can use this one liner to format them into a comma separated line which would then be passed to the
Q option of dumpfiles:
cat target1-filescan.txt | egrep '\.lnk|Destinations' | grep frontdesk | sed 's/ .//g' | tr '\n' ','
mkdir links
vol.py -f target1/Target1-1dd8701f.vmss —profile=Win7SP1x86_23418 dumpfiles -D links -u -n -Q [paste offsets from command above]
grep -F '\Temp' links/
Of the four files matching, only w.lnk* and 918e0ecb43d17e23.automaticDestinations-ms.dat directly reference a file in the Windows\Temp directory.
Strings – 918e0ecb43d17e23.automaticDestinations-ms.dat
getlsasrvaddr.exe is a tool (https://github.com/returnvar/wce) that finds the addresses for Windows Credentials Editor to find credentials in memory.
nbtscan.exe is a NetBios scanning tool.
Rar.exe is WinRAR.
wce.exe is Windows Credentials Editor.
This is where paying attention to the question is important! The question asked for the number of TOOLS moved. Even though we checked the Github Repo of Windows Credentials Editor. We
didn’t really put together that wce.exe and getlsasrvaddr.exe belong to the same tool! So in total, three tools were moved
Answer: 3
Question10: What is the password for the front desk local administrator account?
In the output of the consoles plugin, we can see that Windows Credential Editor (wce.exe) (https://github.com/returnvar/wce) was executed. On WCE’s github page, the option* -w means
‘Dump cleartext passwords stored by the digest authentication package ‘.
Question11: What is the std create data timestamp for the nbtscan.exe tool?
The most precise way to find filesystem metadata is by analyzing the $MFT. With volatility, we can use the mftparser plugin. Then, we just need to grep for the filename:
The attackers appear to have stored the output from the nbtscan.exe tool in a text file on a disk called nbs.txt. Since we have saved the output of the filescan plugin to a file, we can just grep for
‘nbs.txt’ to find its offset and dump the file:
Answer: 10.1.1.2
Queation13: What is the full IP address and the port was the attacker's malware using?
In Question 4, the malware’s md5 hash was submitted to Virus Total. It showed a list of contacted IPs by the malware. This list was compared with established connections from the netscan
plugin. The only matching IP was 180.76.254.120, on port 22
The same IP address hosted the initial malware, ‘AnyConnectInstaller.exe’ which the user was tricked into downloading.
Answer: 180.76.254.120:22
It appears the attacker also installed legit remote administration software. If we use the uninstallinfo plugin, no remote administration software is returned. However, there is evidence of
TeamViewer being executed in the cmdline plugin:
The
use of –action hooks and –IPCport is suspicious. We can check the log file for more information:
We can see a connection to the Attacker’s IP address! On top of that, TeamViewer.exe is returned by the malfind plugin:
Answer: TeamViewer.exe
It appears the attackers also used a built-in remote access method. The last result from cmdline, after the TeamViewer commands is for mstsc.exe, which is a built-in remote access method
(https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/mstsc):
If we would want to find more information about these connections, then we could dump the Security evtx log, and look for event ID 4624: (https://ponderthebits.com/2018/02/windows-rdp-
related-event-logs-identification-tracking-and-investigation/)
Answer: 10.1.1.21
It appears the attacker moved latterly from the front desk machine to the security admins (Gideon) machine and dumped the passwords. Using the cmdscan plugin:
Answer: t76fRJhS
Question2: What password did they use?
Once the attacker gained access to “Gideon,” they pivoted to the AllSafeCyberSec domain controller to steal files. It appears they were successful.
Previously, we found that the attackers stored the output of nbtscan.exe into a file named nbs.txt. This revealed that the IP Address of the Domain Controller is 10.1.1.2.
In the output of Target2’s console, we can see that the attackers logged into the DC (annotated in yellow) and compressed all text files into a rar archive named ‘crownjewlez.rar’:
The command used was rar a -hp123qwe!@# crownjewlez.rar .txt.
The switch -hp is used to encrypt both file data and headers. Therefore the password used was 123qwe!@# .
Answer: 123qwe!@#
Question3: What was the name of the RAR file created by the attackers?
Answer: crownjewlez.rar
Question4: How many files did the attacker add to the RAR archive?
Since the files were stolen from the DC server, they are not accessible in the MFT or the filescan plugin. Instead, we can dump pid 3048 (which is the PID associated with the creation of the rar
archive).
Only three files occur following this offset. To double check our findings, we can grep for the directory ‘\crownjewels\’ . In the console history, we saw that the attacker cd-ed into that directory,
and listed its contents.
Answer: 3
Question5: What is the name of the file associated with the scheduled task?
The attacker appears to have created a scheduled task on Gideon’s machine. Scheduled Tasks can be found in the Registry and under the \Tasks\ Directory:
This confirms that the Scheduled Task is up and running. Finally, we can dump the 1.bat file and check its contents:
cat target2-filescan.txt | grep -F '1.bat'
vol.py -f target2/target2-6186fe9f.vmss —profile=Win7SP1x86_23418 dumpfiles -D . -n -u -Q 0x000000003f427e50
cat file.None.0x83faf398.1.bat.dat
Answer: 1.bat
Machine: POS
First, we should find the which Pids are returned by the malfind plugin:
All the IPs are local Ips, except for the connection to iexplorer.exe:
We can do a quick strings search for this IP address and see if it comes up again:
strings pos01/POS-01-c4e8f786.vmss | grep -F '54.84.237.92' -B 10 -A 10
The first
match is enough to confirm that it is the C2C server of the attacker. The attack follows the same pattern as the other machines.
Answer: 54.84.237.92
Question2:What is the common name of the malware used to infect the POS system?
In the previous question, we found that the malware was (very likely) to be distributed through an email. We can find the files offset using the filescan plugin, dump it and then check its md5
hash in Virus Total:
Answer: Dexter
Question3: In the POS malware whitelist. What application was specific to Allsafecybersec?
peframe 'file.None.0x8559cf78.allsafe_update[1].exe.dat'
Here is a list of files present in the executable.
Answer: allsafe_protector.exe
Question4: What is the name of the file the malware was initially launched from?
We previously identified that the initial malware was ‘allsafe_update.exe ‘. The executable was found at:
\Device\HarddiskVolume2\Users\pos\AppData\Local\Microsoft\Windows\Temporary Internet Files\Low\Content.IE5\NEQ2CLDX.
It was suggested that it was delivered through a link to the C2C server. We can use the iehistory for more information: