Static Hidden String Recovery Tool for Obfus.h Protected Binaries
Obfus.h HIDE_STRING Dumper is a specialized C++ analysis utility designed exclusively for detecting and reconstructing strings hidden by the HIDE_STRING macro from the Obfus.h TCC obfuscation framework.
Unlike generic string dumpers, this tool specifically targets the exact instruction patterns generated by Obfus.h during compile-time string protection. It statically parses Windows PE executables and rebuilds hidden plaintext strings directly from stack-based byte initialization sequences emitted by Tiny C Compiler (TCC).
The scanner identifies dynamically constructed strings without emulation, unpacking, or runtime execution.
Every recovered string is automatically resolved to its corresponding Virtual Address (VA), allowing instant navigation inside x64dbg, IDA Pro, Ghidra, or Binary Ninja.
-
โก High-Speed Static PE Scanning
Loads the target executable directly into memory for ultra-fast analysis. -
๐งต Obfus.h HIDE_STRING Reconstruction
Detects the exact stack construction patterns generated by:HIDE_STRING(...)STACK_STRING(...)- Tiny C Compiler byte initialization code
-
๐ฏ Virtual Address Resolution
Converts raw file offsets into debugger-ready Virtual Addresses. -
๐ TCC-Specific Pattern Matching
Designed specifically around Tiny C Compiler opcode generation used by Obfus.h. -
๐ง PE Header Parsing
Automatically processes:- DOS headers
- NT headers
- PE sections
- ImageBase
- RVA mappings
-
๐ฅ๏ธ Colored Console Interface
Styled hexadecimal reporting with debugger-friendly formatting. -
๐ฆ Zero Dependencies
Pure WinAPI + standard C++ implementation.
Obfus.h HIDE_STRING Dumper is a command-line utility.
ObfusHide_StringDumper.exe <target_pe.exe>Example:
ObfusHide_StringDumper.exe malware_sample.exe[+] Scanning file: malware_sample.exe (231424 bytes)
[VA: 0x000000014001A420 | File Offset: 0x00018820] -> "Hello World"
[VA: 0x000000014001A480 | File Offset: 0x00018880] -> "https://api.telegram.org"
[VA: 0x0000000140020F10 | File Offset: 0x0001F310] -> "Debugger detected"
[+] Found 3 hidden strings.
The HIDE_STRING macro from Obfus.h avoids storing plaintext strings inside .rdata by constructing them byte-by-byte directly on the stack.
Original code:
HIDE_STRING("Hello World")becomes something similar to:
mov eax, 48h
mov [rbp-0Fh], al
mov eax, 65h
mov [rbp-0Eh], al
mov eax, 6Ch
mov [rbp-0Dh], al
mov eax, 6Ch
mov [rbp-0Ch], al
mov eax, 6Fh
mov [rbp-0Bh], alinstead of the normal compiler output:
lea rax, "Hello World"This removes plaintext strings from the binary data section and forces reconstruction at runtime.
The scanner walks byte-by-byte through executable memory searching for exact instruction chains emitted by TCC and Obfus.h.
Supported patterns include:
B8 XX 00 00 00
88 45 YYand stack-write variants:
C6 45 YY XXC6 44 24 YY XXWhen multiple sequential byte writes are detected, the tool reconstructs the original hidden string directly from opcode immediates.
A string candidate is considered valid when:
- Multiple sequential stack writes are detected
- At least 4 printable characters are reconstructed
- The opcode chain matches known Obfus.h/TCC generation patterns
Non-printable bytes are automatically filtered before output.
Obfus.h analysis
The project targets Windows and is built using MSVC.
- Visual Studio 2019/2022
- Windows SDK
- C++17 recommended
- Open the project in Visual Studio
- Select:
Releasex64orx86
- Build the solution (
Ctrl + Shift + B)
This project is intended strictly for educational purposes, malware research, and authorized reverse engineering.
Do not use this software against systems or binaries you do not own or have permission to analyze.