Byvalver
takes shellcode bad-bytes and banishes them, returning cleaned shellcode with preserved functionalities
Install / Use
/learn @umpolungfish/ByvalverREADME
Table of Contents
- Overview
- Quick-Start
- Interactive TUI
- Targeted Bad-Byte Banishment
- Bad-Byte Profiles
- Features
- Architecture
- System Requirements
- Dependencies
- Building
- Installation
- Usage
- Obfuscation Strategies
- Denullification Strategies
- ML Training & Validation
- Agent Menagerie
- Development
- Documentation
- Troubleshooting
- License
Overview
byvalver is a CLI tool built in C for automatically eliminating (or "banishing") bad-bytes from x86/x64/ARM/ARM64 shellcode while maintaining complete functional equivalence
NEW in v4.0: Cross-Architecture Support
| Architecture | Maturity | Strategies | Notes | |---|---|---|---| | x86 (32-bit Intel/AMD) | Stable v4.2 | 150+ | Production-tested, full coverage | | x64 (64-bit Intel/AMD) | Stable v4.2 | 150+ | Default architecture, production-tested | | ARM (32-bit) | Experimental v0.1 | 7 core | Limited testing, core instructions only | | ARM64 (AArch64) | Experimental v0.1 | Basic | Framework ready, minimal strategies |
- Automatic Capstone mode selection via
--archflag
v4.0.1 Bug Fixes:
- Fixed ARM SUB instruction encoding (correct opcode 0x2 with I=1 bit)
- Fixed ARM64 strategy
can_handlelogic for pass-through strategies - Added experimental warnings when ARM/ARM64 architecture is selected
- Added architecture mismatch detection heuristics
- Improved code organization (includes moved to file scope)
NEW in v4.2: Enhanced x64 Support
- x86/x64 Strategy Compatibility Layer: 128+ x86 strategies now work on x64 shellcode
- 5 New x64-Specific Strategy Files: MOVABS, SBB, TEST, SSE Memory, LEA Displacement
- Extended Register Encoding: Full R8-R15 support with proper REX prefix handling
- REX Prefix Utilities:
is_64bit_register(),is_extended_register(),build_rex_prefix() - Resolves 100% failure rate on x64-only shellcode samples
The tool uses the Capstone disassembly framework to analyze instructions and applies over 175+ ranked transformation strategies to replace bad-byte-containing code with equivalent alternatives
The generic bad-byte banishment framework provides 2x usage modes:
- Direct specification: The
--bad-bytesoption allows specification of arbitrary bytes to banish (e.g.,--bad-bytes "00,0a,0d"for newline-safe shellcode) - Profile-based: The
--profileoption uses pre-configured bad-byte sets for common exploit scenarios (e.g.,--profile http-newline,--profile sql-injection,--profile alphanumeric-only)
Supports Windows, Linux, and macOS
CORE TECH:
- Pure
Cimplementation for efficiency and low-level control Capstonefor precise disassemblyNASMfor generating decoder stubs- Modular strategy pattern for extensible transformations (153+ strategy implementations)
- Neural network integration for intelligent strategy selection
- Biphasic processing: Obfuscation followed by denullification
[!NOTE] Null-byte elimination (
--bad-bytes "00"or default): WELL-TESTED / Generic bad-byte elimination (--bad-bytes "00,0a,0d"etc.): NEWLY IMPLEMENTED
BAD-BYTE BANISHMENT IN ACTION
<img src="assets/images/denulling.gif" alt="bad-byte banishment in action">QUICK-START
Get started with byvalver in minutes:
INSTALLATION
OPTION 1: FROM GITHUB (RECOMMENDED)
curl -sSL https://raw.githubusercontent.com/umpolungfish/byvalver/main/install.sh | bash
OPTION 2: BUILD FROM SOURCE
git clone https://github.com/umpolungfish/byvalver.git
cd byvalver
make
sudo make install
sudo make install-man # Install man page
Basic Usage
banish NULL BYTES (DEFAULT):
byvalver input.bin output.bin
USING BAD-BYTE PROFILES:
# HTTP contexts (removes null, newline, carriage return)
byvalver --profile http-newline input.bin output.bin
# SQL injection contexts
byvalver --profile sql-injection input.bin output.bin
# Alphanumeric-only shellcode (most restrictive)
byvalver --profile alphanumeric-only input.bin output.bin
MANUAL BAD-BYTE SPECIFICATION:
# banish null bytes and newlines
byvalver --bad-bytes "00,0a,0d" input.bin output.bin
ADVANCED FEATURES:
# Add obfuscation layer before denullification
byvalver --biphasic input.bin output.bin
# Enable ML-powered strategy selection
byvalver --ml input.bin output.bin
# Generate XOR-encoded shellcode with decoder stub
byvalver --xor-encode DEADBEEF input.bin output.bin
# Output in different formats
byvalver --format c input.bin output.c # C array
byvalver --format python input.bin output.py # Python bytes
byvalver --format hexstring input.bin output.hex # Hex string
VERIFICATION
Always verify your transformed shellcode:
# Check for remaining bad bytes
python3 verify_denulled.py --bad-bytes "00,0a,0d" output.bin
# Verify functional equivalence
python3 verify_functionality.py input.bin output.bin
CROSS-ARCHITECTURE SUPPORT
byvalver supports multiple architectures via the --arch flag:
x86 (32-bit Intel/AMD) - Fully supported with 150+ strategies
byvalver --arch x86 --bad-bytes "00" x86_shellcode.bin output.bin
x64 (64-bit Intel/AMD) - Fully supported (default)
byvalver --arch x64 --bad-bytes "00,0a,0d" x64_shellcode.bin output.bin
ARM (32-bit) - Experimental support with basic strategies
byvalver --arch arm --bad-bytes "00" arm_shellcode.bin output.bin
ARM64 (AArch64) - Experimental support with basic strategies
byvalver --arch arm64 --bad-bytes "00,0a" arm64_shellcode.bin output.bin
Notes:
- ARM/ARM64 support focuses on core instructions (MOV, arithmetic, loads/stores)
- Use simpler bad-byte profiles for ARM (e.g., null-byte only)
- Experimental warnings are displayed when ARM/ARM64 is selected
- Basic architecture mismatch detection warns if shellcode appears to be wrong architecture
- Automatic architecture detection is planned for future releases
BATCH PROCESSING
Process entire directories:
# Process all .bin files recursively
byvalver -r --pattern "*.bin" input_dir/ output_dir/
# Apply HTTP profile to all shellcode in directory
byvalver -r --profile http-newline input_dir/ output_dir/
INTERACTIVE TUI
<div align="center"> <img src="assets/images/menu_main.png" alt="TUI main menu"> </div><div align="center"> <img src="assets/images/menu_proc.png" alt="TUI batch processing"> </div>
byvalver includes an interactive TUI (Text User Interface) with 1:1 CLI feature parity.
The TUI provides an intuitive, visual interface for all bad-byte banishment operations, including:
- batc
Related Skills
node-connect
349.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
