Benjamin Taylor

Holmes CTF: “The Payload” 📦

👤 Author: Benjamin Taylor (@benjqminn)

🛡️ Team: Sherlock’s Homies

🏆 Ranking: 634 / 7,085 teams

📝 Prompt: With the malware extracted, Holmes inspects its logic. The strain spreads silently across the entire network. Its goal? Not destruction-but something more persistent…friends. NOTE: The downloaded file is active malware. Take the necessary precautions when attempting this challenge.

📌 Summary: A malware sample has been extracted for analysis — it spreads quietly across a network with the unusual goal of persistence rather than outright destruction. Your task is to reverse-engineer its behavior (DLL imports, GUIDs, COM interop, opcodes, and decryption/key-generation logic), recover and decrypt the killswitch domain, and then block that domain in a controlled Docker environment to claim the final artifact.

⚠️ DISCLAIMER: This walkthrough was all completed inside of a Virtual Machine, as we are dealing with malware. Proceed with caution.

🟥 Challenge Difficulty: HARD


📋 TL;DR (Answers)


🚩 Flag 1: DLL for COM

Question: During execution, the malware initializes the COM library on its main thread. Based on the imported functions, which DLL is responsible for providing this functionality? (filename.ext)

Walkthrough:

Folder contents

DANGER text

Import Directory

Answer: ole32.dll


🚩 Flag 2: GUID used

Question: Which GUID is used by the binary to instantiate the object containing the data and code for execution? (**----****)

Walkthrough:

Opening Ghidra

GUID Used

Answer: dabcd999-1234-4567-89ab-1234567890ff


🚩 Flag 3: .NET bridge

Question: Which .NET framework feature is the attacker using to bridge calls between a managed .NET class and an unmanaged native binary? (string)

Walkthrough:

Code example

COM library

COM Interop

Answer: Interop


🚩 Flag 4: First call opcode

Question: Which Opcode in the disassembly is responsible for calling the first function from the managed code? (** ** **)

Walkthrough:

Opcode Correspondance

Answer: ff 50 68


🚩 Flag 5: Keygen constants

Question: Identify the multiplication and addition constants used by the binary’s key generation algorithm for decryption. (*, **h)

Walkthrough:

Decryption logic

Python Hex

Answer: 7, 42h


🚩 Flag 6: Decrypt call opcode

Question: Which Opcode in the disassembly is responsible for calling the decryption logic from the managed code? (** ** **)

Walkthrough:

Decryption logic

Answer: ff 50 58


🚩 Flag 7: DNS API

Question: Which Win32 API is being utilized by the binary to resolve the killswitch domain name? (string)

Walkthrough:

Binary Block

Answer: getaddrinfo


🚩 Flag 8: Share API

Question: Which network-related API does the binary use to gather details about each shared resource on a server? (string)

Walkthrough:

ScanAndSpread()

NetShareEnum presence

Netapi32.dll library

Answer: NetShareEnum


🚩 Flag 9: Run payload opcode

Question: Which Opcode is responsible for running the encrypted payload? (** ** **)

Walkthrough:

Opcode found

Answer: ff 50 60


🚩 Flag 10: DNS Management

Question: Find → Block → Flag: Identify the killswitch domain, spawn the Docker to block it, and claim the flag. (HTB{**_**_**_**})

Walkthrough:

Decode to hex string

Cyberchef

DNS Management Dashboard

Holmes Story

Final Flag

Answer: HTB{Eternal_Companions_Reunited_Again}


Back to Main Page: Holmes CTF 2025