|
| 1 | +# Shellcode-IDE (v0.1.12) |
| 2 | +Author: **CX330Blake** |
| 3 | + |
| 4 | +_## Demo |
| 5 | + |
| 6 | +https://github.com/user-attachments/assets/8a0cbc62-4f29-417f-a1d1-6d3005a1be41 |
| 7 | + |
| 8 | +## What the project does |
| 9 | + |
| 10 | +Shellcode-IDE is a powerful Binary Ninja plugin designed for reverse engineers, CTF players, exploit developers, and security researchers. It provides a comprehensive environment for developing and analyzing shellcode with a user-friendly GUI that combines Binary Ninja's assembler/disassembler capabilities for rapid iteration and safe validation of shellcode. |
| 11 | + |
| 12 | +### Key Features |
| 13 | + |
| 14 | +- **Two-way conversion**: Raw bytes/hex ↔ assembly text |
| 15 | +- **Multi-architecture support**: Assemble for any Binary Ninja architecture/platform |
| 16 | +- **Multiple export formats**: Inline `\x..`, raw hex, C stub, Python stub, Zig stub, Rust stub, Go stub |
| 17 | +- **Live metadata**: Byte length, instruction count, null count, endianness, architecture |
| 18 | +- **Configurable bad-pattern detection**: e.g., `00`, `0a`, `ff`, sequences, regex |
| 19 | +- **Peephole optimizations**: With preview/confirm (e.g., `push 0` → `xor reg, reg; push reg`) |
| 20 | +- **Validation rules**: No variables/labels, no absolute addresses/relocations, no nulls (unless allowed) |
| 21 | +- **Binary Ninja integration**: Menu + toolbar + dockable/floating Qt window with shortcuts |
| 22 | + |
| 23 | +## Why the project is useful |
| 24 | + |
| 25 | +Shellcode-IDE streamlines the shellcode development workflow by providing: |
| 26 | + |
| 27 | +- **Rapid iteration**: Quickly test and validate shellcode snippets without external tools |
| 28 | +- **Architecture flexibility**: Work across different architectures with a single interface |
| 29 | +- **Safety checks**: Built-in validation prevents common shellcode issues like null bytes |
| 30 | +- **Optimization**: Improve your shellcode with intelligent peephole optimizations |
| 31 | +- **Multi-format export**: Generate code snippets for various programming languages |
| 32 | +- **Integration**: Seamlessly integrates into Binary Ninja's ecosystem |
| 33 | + |
| 34 | +## How users can get started |
| 35 | + |
| 36 | +### Prerequisites |
| 37 | + |
| 38 | +- Binary Ninja (licensed), with Python API available |
| 39 | +- Python 3.8+ (matching your Binary Ninja build) |
| 40 | +- Qt via PySide2 (Binary Ninja typically bundles PySide2; no manual install required) |
| 41 | + |
| 42 | +### Installation |
| 43 | + |
| 44 | +You can install as a user plugin. The typical plugin directories are: |
| 45 | + |
| 46 | +- **macOS**: `~/Library/Application Support/Binary Ninja/plugins` |
| 47 | +- **Linux**: `~/.binaryninja/plugins` |
| 48 | +- **Windows**: `%APPDATA%\Binary Ninja\plugins` |
| 49 | + |
| 50 | +#### Manual Install |
| 51 | + |
| 52 | +1. Close Binary Ninja |
| 53 | +2. Clone or copy this repository into your plugins directory as `Shellcode-IDE` |
| 54 | + |
| 55 | + - **Example (macOS/Linux)**: |
| 56 | + |
| 57 | + ```bash |
| 58 | + cd "~/Library/Application Support/Binary Ninja/plugins" # macOS |
| 59 | + # or cd ~/.binaryninja/plugins # Linux |
| 60 | + git clone https://github.com/CX330Blake/Shellcode-IDE.git Shellcode-IDE |
| 61 | + ``` |
| 62 | + |
| 63 | +3. Start Binary Ninja. The plugin registers a Tools menu entry and a toolbar icon |
| 64 | + |
| 65 | +#### Platform-specific Instructions |
| 66 | + |
| 67 | +**macOS**: |
| 68 | + |
| 69 | +```bash |
| 70 | +cd "~/Library/Application Support/Binary Ninja/plugins" |
| 71 | +git clone https://github.com/CX330Blake/Shellcode-IDE Shellcode-IDE |
| 72 | +``` |
| 73 | + |
| 74 | +**Linux**: |
| 75 | + |
| 76 | +```bash |
| 77 | +cd ~/.binaryninja/plugins |
| 78 | +git clone https://github.com/CX330Blake/Shellcode-IDE Shellcode-IDE |
| 79 | +``` |
| 80 | + |
| 81 | +**Windows (PowerShell)**: |
| 82 | + |
| 83 | +```powershell |
| 84 | +cd "$env:APPDATA\Binary Ninja\plugins" |
| 85 | +git clone https://github.com/CX330Blake/Shellcode-IDE Shellcode-IDE |
| 86 | +``` |
| 87 | + |
| 88 | +After installation, restart Binary Ninja or use "Reload Plugins". |
| 89 | + |
| 90 | +### Quick Start |
| 91 | + |
| 92 | +#### To disassemble bytes/hex to assembly |
| 93 | + |
| 94 | +1. Open Shellcode IDE from `Tools → Shellcode IDE` or toolbar icon |
| 95 | +2. Select target `Architecture`/`Platform` (defaults to active view when available) |
| 96 | +3. Paste hex/bytes into the "Hex/Bytes" tab (supports whitespace, `0x` prefixes, and `\x..` forms) |
| 97 | +4. Click "Disassemble". View assembly in the output panel and stats in the status bar |
| 98 | +5. Export via the "Formats" tab (copy or save to file) |
| 99 | + |
| 100 | +#### To assemble assembly to shellcode |
| 101 | + |
| 102 | +1. Switch to the "Assembly" tab and enter one instruction per line |
| 103 | +2. Click "Assemble". Errors (if any) show inline with line/column info |
| 104 | +3. Review live stats, run "Optimize" (optional), "Validate", and export in your preferred format |
| 105 | + |
| 106 | +### Usage Examples |
| 107 | + |
| 108 | +**Basic Assembly:** |
| 109 | + |
| 110 | +``` |
| 111 | +mov rax, 0x3b |
| 112 | +mov rdi, 0x68732f6e69622f |
| 113 | +push rdi |
| 114 | +mov rsi, rsp |
| 115 | +xor rdx, rdx |
| 116 | +syscall |
| 117 | +``` |
| 118 | +
|
| 119 | +**Hex Input:** |
| 120 | +
|
| 121 | +``` |
| 122 | +90 90 48 c7 c0 3b 00 00 00 48 c7 c7 2f 62 69 6e 2f 73 68 57 48 89 e6 48 31 d2 0f 05 |
| 123 | +``` |
| 124 | +
|
| 125 | +or |
| 126 | +
|
| 127 | +``` |
| 128 | +\x90\x90\x48\xc7\xc0\x3b\x00\x00\x00\x48\xc7\xc7\x2f\x62\x69\x6e\x2f\x73\x68\x57\x48\x89\xe6\x48\x31\xd2\x0f\x05 |
| 129 | +``` |
| 130 | +
|
| 131 | +## Where users can get help |
| 132 | +
|
| 133 | +- **Documentation**: Refer to the detailed information in this README |
| 134 | +- **Issues**: Report bugs or request features at [GitHub Issues](https://github.com/CX330Blake/Shellcode-IDE/issues) |
| 135 | +- **Binary Ninja Community**: Join the Binary Ninja community forums for plugin-related questions |
| 136 | +- **Source Code**: Browse the source code in this repository for implementation details |
| 137 | +
|
| 138 | +## Who maintains and contributes |
| 139 | +
|
| 140 | +### Maintainer |
| 141 | +
|
| 142 | +- **CX330Blake** - Original author and current maintainer |
| 143 | +
|
| 144 | +### Contributing |
| 145 | +
|
| 146 | +Contributions are welcome! Please open issues for bugs/ideas and submit focused PRs. |
| 147 | +
|
| 148 | +#### Development Setup |
| 149 | +
|
| 150 | +1. Clone the repository into your Binary Ninja plugins directory |
| 151 | +2. Install dependencies: `pip install -r requirements.txt` |
| 152 | +3. Restart Binary Ninja or use "Reload Plugins" |
| 153 | +
|
| 154 | +#### For Developers |
| 155 | +
|
| 156 | +- **Tech stack**: Python 3.8+, Binary Ninja Python API, PySide2 |
| 157 | +- Keep changes minimal and scoped to the task |
| 158 | +- Match the existing code style and structure |
| 159 | +- Include tests for new logic where practical |
| 160 | +
|
| 161 | +### Dependencies |
| 162 | +
|
| 163 | +The plugin requires the following dependencies: |
| 164 | +
|
| 165 | +- `pygments>=2.12` |
| 166 | +- `keystone-engine>=0.9.2` |
| 167 | +
|
| 168 | +## License |
| 169 | +
|
| 170 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details._ |
| 171 | +
|
| 172 | +## Description: |
| 173 | +
|
| 174 | +Shellcode IDE — makes developing and analyzing shellcode much more convenient. |
| 175 | +
|
| 176 | +
|
| 177 | +## Installation Instructions |
| 178 | +
|
| 179 | +### Darwin |
| 180 | +
|
| 181 | +macOS: |
| 182 | +cd "~/Library/Application Support/Binary Ninja/plugins" |
| 183 | +git clone https://github.com/CX330Blake/Shellcode-IDE Shellcode-IDE |
| 184 | +Restart Binary Ninja or use "Reload Plugins". |
| 185 | +
|
| 186 | +### Linux |
| 187 | +
|
| 188 | +Linux: |
| 189 | +cd ~/.binaryninja/plugins |
| 190 | +git clone https://github.com/CX330Blake/Shellcode-IDE Shellcode-IDE |
| 191 | +Restart Binary Ninja or use "Reload Plugins". |
| 192 | +
|
| 193 | +### Windows |
| 194 | +
|
| 195 | +Windows (PowerShell or CMD): |
| 196 | +cd "%APPDATA%\Binary Ninja\plugins" |
| 197 | +git clone https://github.com/CX330Blake/Shellcode-IDE Shellcode-IDE |
| 198 | +Restart Binary Ninja or use "Reload Plugins". |
| 199 | +
|
| 200 | +## Minimum Version |
| 201 | +
|
| 202 | +This plugin requires the following minimum version of Binary Ninja: |
| 203 | +
|
| 204 | +* 3164 |
| 205 | +
|
| 206 | +
|
| 207 | +
|
| 208 | +## Required Dependencies |
| 209 | +
|
| 210 | +The following dependencies are required for this plugin: |
| 211 | +
|
| 212 | + * pip - pygments>=2.12, keystone-engine>=0.9.2 |
| 213 | + * apt - |
| 214 | + * installers - |
| 215 | + * other - Requires Binary Ninja with Python API (licensed)., PySide2 is bundled with Binary Ninja; no extra install typically required. |
| 216 | +
|
| 217 | +
|
| 218 | +## License |
| 219 | +
|
| 220 | +This plugin is released under a MIT license. |
| 221 | +## Metadata Version |
| 222 | +
|
| 223 | +2 |
0 commit comments