Lupin Sherlock Walkthrough

Solved Lupin from Hack The Box!

Field Details
Case Reference HTB-SHRLCK-LUPIN
Platform Hack The Box — Sherlock
Category Malware Analysis — Windows Dropper (Reverse Engineering)
Difficulty Medium
Date Opened —
Severity High
Status In Progress — training scenario
Artifact Malicious executable optimize.exe
Tools diec, Cutter (rizin), strings

Scenario: After a security incident, unusual activity on Samira’s workstation led to the discovery of a suspicious binary operating stealthily in the background. The executable evades standard detection while maintaining persistence and network communication. Your mission is to reverse the binary and extract the attacker’s TTPs for the endpoint security team.


1. Executive Summary

A native C PE binary (optimize.exe) was recovered from Samira’s workstation. Static analysis with diec shows it is not packed (overall entropy 6.4145). The binary masquerades using the filename syscrondvr.exe (mimicking a system driver service), performs region-based execution checks via GetLocaleInfoA, and evades sandbox analysis with Sleep(1000ms) loops and DeleteUrlCacheEntry (purging the Windows Internet cache before fetching from C2). The C2 URL is constructed dynamically with wsprintfA using a hardcoded array at 0x414310. The lab is currently incomplete (Q5 has no recorded answer).

1.1 Incident Summary

Field Details
Incident Type Stealthy Windows dropper (masquerading + locale check + cache evasion)
Initial Access Suspicious binary on Samira’s workstation
Discovery Unusual background activity on the endpoint
Malware optimize.exe (native C PE, not packed)
Overall Severity High

1.2 Key Findings

  • Entropy: 6.41450 — not packed (below the 7.0 packing threshold).
  • Consistent replication filename: syscrondvr.exe (4 call sites pushing str.syscrondvr.exe).
  • Region-based execution constraint: GetLocaleInfoA (system language/locale check).
  • C2 cache evasion: DeleteUrlCacheEntry (purges cached responses before fetching).
  • C2 URL built dynamically with wsprintfA using a hardcoded array at 0x414310.
  • Sandbox evasion: nested Sleep(1000ms) loops to outlast sandbox timeouts.
  • Q5 is incomplete — no recorded answer.

2. Investigation Scope & Artifacts

2.1 Artifacts Analyzed

Artifact Format What it answers
optimize.exe Native C PE (not packed) All questions Q1–Q5

2.2 Tools & Methods

Tool Purpose
diec (-e entropy flag) Entropy analysis / packing detection
Cutter (rizin) Reverse engineering (strings, X-Refs, disassembly)
strings Static string extraction (locale keywords)

3. Technical Analysis

3.1 Scenario

Reverse engineering a stealthy Windows dropper. The binary evades standard detection while maintaining persistence and network communication. Objective: extract the attacker’s TTPs for the endpoint security team.

3.2 Q1 — What is the entropy value of the executable file?

Answer: 6.41450

To determine whether the binary was packed or obfuscated, we calculated its entropy using diec with the -e (entropy) flag. Entropy measures randomness in a file’s byte distribution — values above 7.0 typically indicate packing or encryption, while values below that suggest readable, unobfuscated content.

$ diec -e optimize.exe
Total 6.4145: not packed
  0|PE Header|0|1024|2.29117: not packed
  1|Section(0)['.text']|1024|59392|6.11097: not packed
  2|Section(1)['.rdata']|60416|14336|5.60578: not packed
  3|Section(2)['.data']|74752|7168|5.67993: not packed

The overall entropy of 6.4145 falls below the packing threshold, and diec confirms not packed across all sections. The .text section (executable code) sits at 6.11097, consistent with compiled native code. No section shows suspiciously high entropy, meaning the binary is unlikely to be compressed or encrypted — we can proceed with static analysis directly.

Detection angle. diec -e entropy per section — packing/obfuscation detection.

3.3 Q2 — What is the consistent filename used by the malware when replicating itself across different locations?

Answer: syscrondvr.exe

Since the binary is a native C PE, we opened it in Cutter and searched for CreateFileW — the Windows API used to create or open files. To find what filename is passed to it, we searched all strings in the binary and identified syscrondvr.exe as a candidate. Cross-referencing it via X-Refs revealed 4 separate call sites all pushing str.syscrondvr.exe as an argument, confirming this is the hardcoded filename the malware consistently uses when copying itself to different locations. The code preview also shows calls to GetModuleFileNameW, PathFindFileNameW, and ExpandEnvironmentStringsW nearby — indicating the malware resolves target paths dynamically before dropping the copy.

image.png

MITRE ATT&CK: T1036.005 — Masquerading: Match Legitimate Name or Location (filename mimics a legitimate-sounding system driver service).

Detection angle. Cutter X-Refs on str.syscrondvr.exe — confirms hardcoded replication filename across 4 call sites.

3.4 Q3 — Following filename verification, which Win32 API does the binary use to enforce region-based execution constraints?

Answer: GetLocaleInfoA

After identifying the self-replication filename in Q2, we continued static analysis in Cutter by searching the strings panel for locale-related keywords. Searching for local surfaced GetLocaleInfoA in the binary’s referenced strings — a Win32 API used to retrieve locale information for a given locale identifier. Its presence indicates the malware performs a region check at runtime, likely comparing the system’s locale against a hardcoded target value and altering execution behavior (continuing, exiting, or sleeping) based on the result.

Also can use strings:

strings optimize.exe | grep -i 'locale'
GetLocaleInfoA

MITRE ATT&CK: T1614.001 — System Location Discovery: System Language Discovery (adversaries query locale/language settings to determine whether they are operating in a targeted or safe region).

Detection angle. strings grep for locale/GetLocaleInfoA — region-based execution gating.

3.5 Q4 — The function at relative address 0x407680 makes a WinAPI call immediately before initiating the network request. Which WinAPI function does it call to ensure fresh data is retrieved from the C2 server?

Answer: DeleteUrlCacheEntry

We navigated directly to address 0x407680 in Cutter and scrolled through the function body. The function opens with two nested loops calling Sleep(1000ms) — an evasion technique to outlast sandbox timeouts. It then dynamically constructs a C2 URL using wsprintfA with a format string and domain values pulled from a hardcoded array at 0x414310. Immediately before the network request is initiated, the malware calls DeleteUrlCacheEntry on the freshly built URL, purging any cached response from the Windows Internet cache and forcing a live fetch from the C2 server.

0x00407757      call    dword [wsprintfA]        ; build C2 URL string
0x00407767      call    dword [DeleteUrlCacheEntry] ; purge cache before fetch

MITRE ATT&CK: T1071.001 (Application Layer Protocol: Web Protocols — C2 over HTTP) | T1497.003 (Virtualization/Sandbox Evasion: Time Based Evasion — Sleep loops).

Detection angle. DeleteUrlCacheEntry before a network fetch — C2 cache-evasion technique.

3.6 Q5 — Samira noticed unusual behavior during the paste operation. What is the relative address of the function responsible for this strange activity?

Answer: (not recorded — lab incomplete)

The original walkthrough ends here without a recorded answer. The question refers to unusual behavior during a paste operation, likely a clipboard-monitoring or keylogging routine in the binary. This Q would require further reverse engineering of the binary in Cutter (searching for clipboard APIs such as OpenClipboard, GetClipboardData, etc.).

Detection angle. Clipboard API calls (OpenClipboard, GetClipboardData) in a binary — potential keylogger/clipboard stealer.


4. Challenge Q&A Log

# Question Answer Method
1 Entropy value of the executable 6.41450 diec -e
2 Consistent replication filename syscrondvr.exe Cutter strings + X-Refs
3 Win32 API for region-based execution constraints GetLocaleInfoA Cutter strings panel
4 WinAPI called before network request (cache evasion) DeleteUrlCacheEntry Cutter disassembly at 0x407680
5 Relative address of function responsible for paste behavior (not recorded) (incomplete)

5. Incident Narrative

A stealthy Windows dropper (optimize.exe) was discovered on Samira’s workstation. The binary is not packed (entropy 6.4145), masquerades using the filename syscrondvr.exe, performs region-based execution checks via GetLocaleInfoA, and evades sandbox analysis with Sleep(1000ms) loops and DeleteUrlCacheEntry (purging the Windows Internet cache before fetching from C2). The C2 URL is constructed dynamically with wsprintfA using a hardcoded array at 0x414310. The lab is currently incomplete (Q5 has no recorded answer).


6. Attack Timeline

Timestamp (UTC) Event Artifact ATT&CK
(runtime) Binary executed (not packed, entropy 6.4145) diec -e —
(runtime) Region check via GetLocaleInfoA Cutter strings T1614.001
(runtime) Sleep(1000ms) loops (sandbox evasion) Cutter disassembly T1497.003
(runtime) DeleteUrlCacheEntry purges cache before C2 fetch Cutter disassembly T1497.003
(runtime) C2 URL built with wsprintfA (array at 0x414310) Cutter disassembly T1071.001
(runtime) Self-replication as syscrondvr.exe (4 call sites) Cutter X-Refs T1036.005

7. Indicators of Compromise (IOCs)

7.1 File IOCs

Type Value Context
File Name optimize.exe Original malicious binary
File Name syscrondvr.exe Hardcoded replication filename (masquerading) — Q2

7.2 Network IOCs

Type Value Context
C2 URL Built dynamically with wsprintfA (array at 0x414310) C2 communication — Q4

7.3 Behavioral IOCs

Type Value Context
API GetLocaleInfoA Region-based execution gating — Q3
API DeleteUrlCacheEntry C2 cache evasion — Q4
API wsprintfA Dynamic C2 URL construction — Q4
API Sleep(1000ms) (nested loops) Sandbox time-based evasion — Q4
Entropy 6.41450 (not packed) Binary is unobfuscated — Q1

8. Detection Opportunities

Source What to look for Why it matters
Static analysis Entropy < 7.0 but presence of suspicious APIs (GetLocaleInfoA, DeleteUrlCacheEntry) Dropper with region checks and cache evasion
Strings analysis Hardcoded filename syscrondvr.exe in a binary Masquerading replication filename — Q2
Disassembly Sleep loops before network activity Sandbox time-based evasion — Q4
Disassembly DeleteUrlCacheEntry before HTTP fetch C2 cache-evasion technique — Q4
Disassembly wsprintfA with hardcoded array for URL construction Dynamic C2 URL building — Q4

9. MITRE ATT&CK Mapping

TTP ID Tactic Technique Evidence
T1036.005 Defense Evasion Masquerading: Match Legitimate Name or Location syscrondvr.exe replication filename — Q2
T1614.001 Discovery System Location Discovery: System Language Discovery GetLocaleInfoA region check — Q3
T1071.001 Command and Control Application Layer Protocol: Web Protocols C2 via HTTP (wsprintfA URL) — Q4
T1497.003 Defense Evasion Virtualization/Sandbox Evasion: Time Based Evasion Sleep(1000ms) loops — Q4

10. Conclusions & Recommendations

10.1 Incident Summary

What Happened A stealthy Windows dropper (optimize.exe) was discovered on Samira’s workstation. It is not packed, masquerades as syscrondvr.exe, performs region-based execution checks, and evades sandbox analysis with Sleep loops and cache purging before fetching from C2.
Root Cause Malicious binary executed on the endpoint; no application control or sandbox caught the region checks and cache evasion.
Impact Assessment Confidentiality: High — C2 communication and potential data exfiltration. Integrity: Medium — self-replication as syscrondvr.exe. Availability: Low — no destructive action observed.

10.2 Recommendations

Priority Timeframe Recommendation
Immediate Within 24h Isolate the host; hunt syscrondvr.exe across the estate; block the C2 domain (once recovered from the 0x414310 array)
High Within 7 days Submit optimize.exe to a sandbox with locale variation and extended timeout to defeat the Sleep/cache evasion
Medium Within 30 days Alert on DeleteUrlCacheEntry + network fetch in the same process; alert on GetLocaleInfoA in non-localized binaries
Low Within 90 days Application control (allow-list) for executables; user awareness
Strategic Ongoing Document reverse engineering workflow for native C PEs; complete Q5 analysis (clipboard monitoring)

11. Analyst Notes & Learning

11.1 What I Did Well

Used diec for entropy analysis to confirm the binary was not packed before diving into static analysis. Anchored Cutter’s Strings panel on the CreateFileW/syscrondvr.exe string to find the replication logic. Identified the DeleteUrlCacheEntry cache-evasion technique by reading disassembly at 0x407680.

11.2 Key Takeaways

  • Entropy < 7.0 doesn’t mean safe — the binary can still be malicious with region checks and cache evasion.
  • GetLocaleInfoA is a common anti-analysis technique — malware checks the system locale and exits if it doesn’t match the target region.
  • DeleteUrlCacheEntry before a network fetch forces a live C2 request, defeating cache-based analysis.
  • Sleep loops (1000ms × nested) outlast short sandbox timeouts.
  • Masquerading filenames (syscrondvr.exe) mimic legitimate system services.
  • Q5 is incomplete — further reverse engineering needed (clipboard APIs).

11.3 New Techniques

diec entropy analysis, Cutter reverse engineering (strings, X-Refs, disassembly at specific addresses), GetLocaleInfoA region-check identification, and DeleteUrlCacheEntry cache-evasion analysis.


12. References

HTB Sherlock · Lupin · Malware Analysis · 2026-03-25