HabrSeptember 1, 2026🇷🇺Translated from Russian

Callfuscated: Reverse Engineering a Stack-Based VM Protected by MBA, Opaque Predicates and Call-Based Jumps

The HackTheBox challenge Callfuscated presents one of the most layered crackmes published on the platform, combining virtualization, Mixed Boolean-Arithmetic (MBA), opaque predicates and junk instructions inside a single binary.

Initial analysis shows hundreds of functions that appear to receive arguments through mysterious arg_* variables. Disassembly reveals that every call is immediately followed by a pop r8 instruction; the return address is discarded and only r8 is clobbered. Unicorn emulation of the entire binary confirms that r8 is never subsequently read, proving that each call-pop pair is a hand-written jump.

A lightweight Python script using Capstone walks the code, replaces the call opcode (0xE8) with jmp (0xE9) and overwrites the pop r8 bytes with NOPs. After patching, Ghidra produces a readable main function containing the characteristic dispatch loop of a stack-based virtual machine.

Each handler invokes a separate function protected by MBA. The author employs Triton to symbolically execute these routines and extract an AST for the return value in RAX. The resulting expressions, sometimes exceeding 7 000 characters, are fed to the CoBRA MBA solver, which reduces them to the original operations: addition, subtraction, multiplication, bitwise AND, OR and XOR. Two handlers that receive random values as arguments simplify to expressions that ignore those arguments, confirming the presence of opaque predicates.

With opcode semantics recovered, the author uses Unicorn again to dump the bytecode at the point where it has been fully initialized. A small C emitter translates the bytecode into ordinary C statements that operate on a 256-element stack. The generated file is compiled with optimizations and loaded into a decompiler, yielding a clean routine whose final comparison against zero determines whether the flag is correct.

Related articles

AntiMalwareMalware & Botnets

MacSync Malware Evolves to Steal Cryptocurrency and Conceal Components in iCloud

Updated MacSync malware for macOS now arrives bundled with a stealer and backdoor, allowing attackers to harvest browser history, cookies, passwords, Telegram data, and cryptocurrency wallet details while maintaining persistent remote access. Discovered by Kaspersky researchers in September 2026, the new variant uses a multi-stage infection chain that begins with a fake application download, such as a document collaboration tool or crypto wallet. One component is delivered through a publicly shared iCloud calendar entry in ICS format, bypassing traditional loaders. After execution, MacSync requests administrator credentials, displays a fake macOS damage notification, and installs the stealer alongside a Finder-masquerading backdoor. The backdoor enables arbitrary code execution, file theft, browser extension installation, and replacement of the legitimate Ledger application with a malicious version to drain cryptocurrency funds. Users are advised to download software only from trusted sources and remain cautious of unexpected administrator password prompts.

HabrMalware & Botnets

Network Traffic Analysis Reveals 75% Malware Threats Over 10 Months of Monitoring

Positive Technologies analyzed anonymized data from PT Sandbox and PT Network Attack Discovery collected between October 2025 and July 2026. The study found that malicious software accounted for 75% of all detected threats in organizational network traffic. Information-stealing trojans made up 24% of malware samples, with 85% of those focused on credential theft. RATs, loaders, and ransomware each represented smaller but high-impact shares. Legacy vulnerabilities such as CVE-2017-0199 and CVE-2017-11882 remained active attack vectors. Activity from groups including MustangPanda, TA505, and APT37 was observed across finance, manufacturing, and government sectors.

BoletimSecMalware & Botnets

HEAVYGRAM Spyware Uses Telegram Bots for Command and Control Against Iranian Targets

Researchers at Group-IB have published a detailed analysis of HEAVYGRAM, a spyware family that abuses the Telegram messaging platform as its command-and-control infrastructure. The malware family was first observed in the second half of 2023 and has since been linked with moderate confidence to the Handala Hack group. Instead of operating dedicated servers, the operators rely on Telegram bots, accounts, and groups to register infected hosts, receive commands, exfiltrate stolen data, and deliver additional payloads. Once active, HEAVYGRAM captures screenshots, records audio, harvests cached files, and steals data from Telegram Desktop installed on the victim machine. The campaign primarily targets Iranian journalists, dissidents, and individuals opposed to the Iranian government. Infection vectors include malicious files distributed via messengers, disguised as legitimate applications such as Pictory, KeePass, or Telegram-related tools, sometimes delivered as HTML applications or scripts.

BoletimSecMalware & Botnets

KREMLIN Banking Malware Hijacks Chrome and Edge to Steal Credentials and Session Tokens in Brazil

Elastic Security Labs researchers have detailed the operations of the KREMLIN banking malware, tracked under the identifier REF9334, which targets Chrome and Edge browsers to harvest credentials and session tokens. The campaign focuses almost exclusively on Brazil, with 98 percent of the 1,515 identified infections located in the country and impersonating a dozen Brazilian banks. Infection begins with multi-stage JavaScript loaders disguised as banking documents, invoices, or corporate papers that require manual execution by the victim. The loaders then deploy C++ installers and malicious browser extensions that modify the Secure Preferences file, enable developer mode, and overwrite protection objects with forged metadata using a technique called Phantom Extension. Once active, the extension collects session tokens, cookies, sessionStorage and localStorage data, 15 days of browsing history, screenshots, open tab information, and full HTML of visited pages. The operation has run since May 2025 across seven distinct campaigns and began using Ethereum smart contracts for infrastructure on 19 May 2026.