Habr•July 22, 2026•🇷🇺Translated from Russian

187,064 Instructions for One Flag: Reverse Engineering HTB Callfuscated Insane Challenge

The HackTheBox challenge Callfuscated presents a stripped 64-bit ELF binary that requests a password and prints either Correct or Incorrect flag. Inside the binary lies a heavily obfuscated verification routine built from four complementary techniques that survive static analysis but collapse under concrete execution.

The Obfuscation Arsenal

The protection consists of a custom VM whose bytecode resides in a 586-element array called program[]. A dispatcher reads the current program counter, fetches an opcode, and dispatches to handlers. Every arithmetic primitive is further expanded with Mixed Boolean-Arithmetic expressions. Opaque predicates double the control-flow graph with branches whose outcome is known at compile time. Finally, genuine instructions are wrapped inside thousands of call gadgets of the form pop r8; <insn>; call next, producing the 187,064-instruction count mentioned in the title.

Dynamic Reconnaissance

Because all four layers are execution-dependent, the author recorded a full instruction trace using ptrace with PTRACE_SINGLESTEP on a known input. The resulting log contained 187,064 lines together with register values after each instruction inside the image range 0x401000–0x40d000. A separate memory dumper extracted the VM program array and stack frames directly from the running process.

Building a Faithful Emulator

The trace was replayed inside a custom x86-64 emulator written in Python that parsed objdump output and implemented handlers for the thirty opcodes actually encountered. Two notable bugs were corrected during validation:

  • rand() is invoked from four distinct call sites (0x409235, 0x40ad5b, 0x40af37, 0x40b10b) for a total of 192 calls; each return address must be calculated as call-site + 5 rather than assuming a single fixed location.
  • Operand-size detection used a naïve substring check that incorrectly treated “DWORD PTR” as containing “WORD”, truncating 32- and 64-bit memory accesses.

After these fixes the emulator matched the original trace line-by-line and reached the final instruction at address 0x40b537 with eax equal to 0xffffffff, exactly as the real binary behaves on an incorrect password.

Recovering the VM Semantics

With a working emulator the author dumped the data stack after every dispatch and decoded the 586 VM instructions. The bytecode implements a simple stack machine whose relevant operations are:

  • PUSH imm – push constant
  • H2 – addition (used to compute input buffer address 0x40f080)
  • DEREF – read input byte
  • H5 – multiply accumulator by 256
  • H7 – add next byte
  • G8 / G3 – XOR with per-group constants

Consequently every four input characters are accumulated into a 32-bit big-endian word. Eight such words are XORed with the following constant pairs:

  • (0x0915033a, 0x41414141)
  • (0x427d7872, 0x11111111)
  • (0x30310a00, 0x55555555)
  • (0x2a052e32, 0x5a5a5a5a)
  • (0xcff5ecdf, 0xaaaaaaaa)
  • (0x1914031e, 0x77777777)
  • (0xf6f7c6ad, 0x99999999)
  • (0x6c6a524e, 0x33333333)

The resulting 32-bit values must all be zero for the password to be accepted. Solving each equation yields the flag bytes directly: HTB{******_**_***_********_*_**}.

Conclusion

The exercise demonstrates that even an extreme combination of VM-based dispatch, MBA, opaque predicates and call obfuscation remains vulnerable once execution is recorded and replayed. All four techniques ultimately depend on concrete runtime values that a faithful emulator can capture and simplify.

Related articles

AntiMalware•Malware & Botnets

GTA VI-Themed Malware Campaigns Deploy WARDEN Stealer and spkvol.dll

Experts from Solar 4RAYS at GC Solar have identified at least two separate campaigns distributing infostealers under the guise of free GTA VI downloads for Windows. Victims are lured with promises of pre-release builds or unofficial launchers, leading them to archives containing malicious executables instead of the game. In the first campaign, a Google Colab notebook redirects users to Windows Software Hub, where a ZIP file marked Verified Safe contains Gta_6_Exe_File_Download.exe, identified as WARDEN Stealer that harvests credentials, contact data, and cryptocurrency wallet access. The second campaign uses CyberLauncher.zip with a !SETUP.bat file that deploys a stealer resembling spkvol.dll, which attempts to escalate privileges, disable Microsoft Defender protections including Smart App Control, and exfiltrate system information via Discord. Analyst Nikita Pryamukhin notes that the attacks specifically instruct victims to weaken their own defenses by running files as administrator and adding exclusions. Researchers strongly advise downloading games only from official sources and ignoring any instructions to bypass security tools.

BoletimSec•Malware & Botnets

Brute-Force Campaign Targets Exposed Microsoft SQL Server Instances with Monero Miner and Gh0st RAT

An active campaign since early October 2026 is brute-forcing passwords on internet-exposed Microsoft SQL Server instances and deploying a Monero cryptocurrency miner along with a variant of the Gh0st RAT remote access trojan. Fortinet detailed the infection chain in a report published on November 12, 2026, starting with the Go-based dllhost.exe binary that uses the Naabu port scanner to locate open TCP port 1433. The malware then downloads dwm.exe, a .NET brute-forcer that tests over 2,700 passwords against common accounts such as sa and admin using up to 500 concurrent threads. Successful logins enable xp_cmdshell to execute commands, after which the attackers drop a scheduled task mimicking Microsoft updates and install both the miner and the persistent RAT. The campaign relies solely on weak or reused passwords and does not exploit any software vulnerability. Fortinet rates the threat as high and recommends keeping SQL Server behind firewalls or VPNs while disabling xp_cmdshell when unused.

Habr•Malware & Botnets

Fake GTA VI Installer Distributed via Google Colab Steals Steam Credentials and Crypto Wallet Data

Researchers at cybersecurity firm Cynet have uncovered a fake Grand Theft Auto VI installer for PC that targets Steam accounts and cryptocurrency wallets. The malware is promoted through a Google Colab notebook that leads users to a fraudulent WooCommerce store page called Windows Software Hub. The download archive contains only a small 796 KB executable and a README file instructing victims to run the file as administrator and disable security features. Once executed, the malware bypasses sandboxes and virtual machines, injects code into browser processes, and harvests passwords, cookies, browsing data, and crypto wallet information while also swapping clipboard addresses. The campaign coincides with growing scam activity around the unreleased title, which Rockstar Games has not yet scheduled for PC release. Earlier reports from Netcraft documented multiple GTA VI-related fraud schemes between July and October 2026.

BoletimSec•Malware & Botnets

Cloudflare Blocks 18.2 Million DDoS Attacks in Q3 2026 Amid Shifting Attack Patterns

Cloudflare reported blocking 18.2 million network-layer DDoS attacks between July and September 2026, marking a 208% increase from the same period in 2025. The company recorded an average of roughly 8,200 attacks per hour, with 96% lasting under ten minutes and 98% staying below 1 Gbps. Large-scale attacks exceeding 1 Tbps dropped sharply from 805 in Q2 to 251 in Q3, a decline Cloudflare links to early 2026 law enforcement actions against four IoT botnets. Attack vectors shifted notably, with CLDAP reflection falling 99.5% while DNS amplification rose 215% and UDP floods grew 122%. The United States led targeted countries, followed by China and Indonesia, while media and publishing remained the most affected industry. Mirai variants accounted for 46.5% of network-layer bytes, with new families such as Dysphoria and Evooo1Bot emerging to replace dismantled botnets.