OpcodeShield is a 100% free, local, offline security scanner, disassembler, sandbox, and surgical binary sanitizer for Windows, Linux, macOS, Google Colab, and Android (.exe, .dll, .apk, .so, .elf, .dylib).
-
One-Click Windows
.msiInstaller (OpcodeShield-v2.1.0-Setup-x64.msi): Automatically installs everything with prebuilt Python 3.13 + preinstalledOpcodeShield-SecNet-v2INT8 AI model + YARA rules + Capstone + Start Menu/Desktop shortcuts + SystemPATH(opcodeshieldworks in any terminal immediately, 100% offline with zero downloads required!). -
Custom Trained Multimodal AI (
OpcodeShield-SecNet-v2): 13.9M-parameter Transformer trained on NVIDIA RTX 5060 Ti across Ghidra pseudo-C, raw x86/x64/ARM64 opcodes, PE/APK/ELF/Mach-O structure, and YARA hits — exported as INT8 Quantized ONNX (~14 MB, 2–3× faster on CPU/NPU) + FP16 Safetensors (~26.5 MB for CUDA/MPS/XPU) with fast auto-download from GitHub Releases CDN. -
Full-Stack Security Suite (
v2.0.0):- Windows PE + Android APK + Linux ELF + macOS Mach-O deep detection & integrity-preserving sanitization
- Offline YARA Rule Engine (
rules/default_rules.yar, drop custom.yarfiles anytime) - In-App APK Re-Signer (
apksignerv1/v2/v3 + built-in SHA-256 v1 fallback) - Real-Time Folder & Download Guard (
watchbackground scanner with optional auto-quarantine) - SHA-256 Rollback Manager & Patch Diff Viewer (
rollback,diff) - Direct Ghidra-Free Capstone Disassembler & UPX Auto-Unpacker (
disasm) - Automated Dynamic Sandbox Runner (
sandboxwith Windows Job Object isolation) - One-Click Self-Replace Auto-Updater (automatic on GUI/Android/Colab; explicit
updatecommand on CLI)
-
Prebuilt Releases: Download standalone executables (
OpcodeShield-GUI.exe,OpcodeShield-CLI.exe,OpcodeShield-GUI-Linux,OpcodeShield-CLI-Linux,OpcodeShield-Android-v2.0.0.apk), INT8 AI weights, and source archives from the Releases page. -
Google Colab: Open
OpcodeShield_Colab.ipynbdirectly in Colab with free GPU acceleration.
- Launch
OpcodeShield-GUI.exe(runs elevated with UAC for process/DLL/registry/scheduled-task inspection) or run from source:python main.py
- Threat Scanner: Run a full system scan (processes, loaded DLLs, startup registry keys, scheduled tasks) or pick a single
.exe/.dllor game/app folder to scan recursively. - AI Decompile & Patch Lab:
- Select any flagged binary to decompile with Ghidra Headless (auto-discovered under
C:\*, or click Auto-Setup to install JDK 21 + Ghidra automatically). - Audit pseudo-C with the local CUDA + Flash Attention AI model (
Qwen/Qwen2.5-Coder-3B-Instructby default) and apply surgical.textpatches with automatic Authenticode stripping, PECheckSumrecalculation, and.bakbackup creation.
- Select any flagged binary to decompile with Ghidra Headless (auto-discovered under
- Quarantine Vault: Safely isolate unpatchable threats with XOR neutralization (restore or permanently delete at any time).
- Live Network Monitor: Inspect active TCP/UDP connections mapped to PIDs and executable paths.
Works on Windows PE binaries (.exe, .dll, .sys, .scr, .asi, .ocx), Android .apk files, and entire folders.
# Scan a single file (.exe, .dll, or .apk)
.\OpcodeShield-CLI.exe scan "C:\path\to\app.exe"
# Recursively scan a folder (add --json for machine-readable output)
.\OpcodeShield-CLI.exe scan "C:\path\to\game_folder" --json
# Sanitize an infected binary to a clean output file (never overwrites original unless specified)
.\OpcodeShield-CLI.exe sanitize "C:\path\to\infected.exe" -o "C:\path\to\cleaned.exe"
.\OpcodeShield-CLI.exe sanitize "C:\path\to\infected.apk" -o "C:\path\to\cleaned.apk"
# Verify structural integrity (PE headers/sections/CheckSum or APK ZIP/AXML/DEX/ELF)
.\OpcodeShield-CLI.exe verify "C:\path\to\cleaned.exe"
.\OpcodeShield-CLI.exe verify "C:\path\to\cleaned.apk"
# Run custom trained OpcodeShield-SecNet-v1 AI model (auto-downloads ~26.5 MB on first run)
.\OpcodeShield-CLI.exe ai-scan "C:\path\to\app.exe"
# Explicit CLI update command (CLI never auto-updates on normal commands)
.\OpcodeShield-CLI.exe update --check
.\OpcodeShield-CLI.exe update(If running from Python source instead of the compiled .exe, replace .\OpcodeShield-CLI.exe with python cli.py.)
- Install the built APK on Android 8.0+ (API 26+). The app requests zero
INTERNETpermission and works 100% offline. - Scanner Tab: Scan installed apps, pick a manual
.apk, or pick a Windows.exe/.dllfile from device storage. - Patch Lab Tab: Inspect flagged native
.soELF libraries or Windows PE.textsections, run on-device MediaPipe LLM auditing (optional.task/.litertlm/.binmodel) or the built-in static analyzer, and export a sanitized copy. - Network & Vault Tabs: Review device security posture and manage XOR-neutralized quarantined files.
- Windows 10/11 (64-bit)
- Python 3.11–3.13 (
py -3.13recommended) - Optional (for local AI decompile/audit in GUI): NVIDIA CUDA GPU + PyTorch CUDA (
requirements-cuda.txt) and Ghidra (or runpython auto_setup.py)
git clone https://github.com/FlaxyDitto-dev/OpcodeShield.git
cd OpcodeShield
.\build.batThis automatically creates .venv, installs dependencies from requirements.txt, and builds both standalone executables:
dist\OpcodeShield-GUI.exe(desktop GUI with UAC manifest)dist\OpcodeShield-CLI.exe(headless CLI)
pip install -r requirements.txt
# Build GUI executable
pyinstaller --noconsole --onefile --uac-admin --name "OpcodeShield-GUI" ^
--collect-all customtkinter ^
--exclude-module torch --exclude-module transformers --exclude-module accelerate ^
--exclude-module sympy --exclude-module numpy --exclude-module safetensors --exclude-module tokenizers ^
--clean main.py
# Build CLI executable
pyinstaller --console --onefile --name "OpcodeShield-CLI" ^
--exclude-module customtkinter --exclude-module tkinter ^
--exclude-module torch --exclude-module transformers --exclude-module accelerate ^
--exclude-module sympy --exclude-module numpy --exclude-module safetensors --exclude-module tokenizers ^
--clean cli.py(To run from source with CUDA + Flash Attention AI enabled:)
pip install -r requirements.txt
pip install --index-url https://download.pytorch.org/whl/cu128 torch
pip install -r requirements-cuda.txt
python main.pysudo apt-get install -y python3-tk # required for CustomTkinter GUI
chmod +x build_linux.sh
./build_linux.shOutputs dist/OpcodeShield-GUI-Linux and dist/OpcodeShield-CLI-Linux.
chmod +x build_macos.sh
./build_macos.shOutputs dist/OpcodeShield-GUI-macOS.app and dist/OpcodeShield-CLI-macOS.
Open OpcodeShield_Colab.ipynb in Google Colab — Cell 1 automatically updates OpcodeShield and downloads OpcodeShield-SecNet-v1 onto the Colab GPU, and Cell 2 lets you upload, scan, AI-audit, sanitize, and download cleaned .exe/.dll/.apk files.
- JDK 17 or JDK 21 (
JAVA_HOMEset) - Android SDK (API 36 / Build-Tools) with
ANDROID_HOMEorandroid/local.properties(sdk.dir=...) configured
cd android
.\gradlew.bat assembleDebugOutput APK:
android\app\build\outputs\apk\debug\app-debug.apk
cd android
.\gradlew.bat assembleReleaseOutput APK:
android\app\build\outputs\apk\release\app-release-unsigned.apk
(Sign the release APK with apksigner or your keystore in Android Studio before installing on a device.)
Requires gcc on PATH and Python 3.11–3.13 (pefile, psutil):
python tests\batch_qa_suite.pyCompiles and tests 210 real binaries (75 .exe, 65 .dll, 70 .apk), verifying detection accuracy, sanitization clearance, structural integrity, and real runtime execution, and writes reports to tests/QA_BATCH_REPORT.md and tests/qa_batch_report.json.
cd android
.\gradlew.bat testDebugUnitTest| File / Folder | Purpose |
|---|---|
main.py |
Windows dark-mode CustomTkinter desktop GUI |
cli.py |
Headless CLI (scan, sanitize, verify, --json) |
scanner.py |
Windows process/DLL/registry/task/folder scanner & deep PE anomaly detector |
binary_patcher.py |
Surgical PE .text patcher, structural sanitizer, CheckSum fixer & Quarantine Vault |
apk_engine.py |
Pure-Python offline Android .apk analyzer, AXML/DEX/ELF sanitizer & integrity verifier |
ghidra_engine.py |
Ghidra Headless auto-discovery & Java pseudo-C export bridge |
ai_auditor.py / cuda_engine.py |
Direct in-process PyTorch CUDA + Flash Attention multi-pass AI auditor |
auto_setup.py |
Automatic bootstrapper for JDK 21, Ghidra, and PyTorch CUDA |
build.bat |
One-click PyInstaller builder for OpcodeShield-GUI.exe & OpcodeShield-CLI.exe |
android/ |
100% offline native Kotlin + Jetpack Compose Android edition |
tests/batch_qa_suite.py |
Automated 210-sample real binary QA validation pipeline |