Skip to content

Commit 9ef21d7

Browse files
committed
Updating to 0.1.9
1 parent f568418 commit 9ef21d7

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Sample Plugin (v0.1.8)
1+
# Shellcode-IDE (v0.1.9)
22
Author: **CX330Blake**
33

44
_This is a short description meant to fit on one line._
55

66
## Description:
77

8-
# Shellcode IDE — Binary Ninja Plugin
8+
# Shellcode IDE
99

1010
A Qt-based Binary Ninja plugin that helps you compose, analyze, optimize, validate, and export shellcode across architectures that Binary Ninja supports. It combines Binary Ninja’s assembler/disassembler with a user-friendly GUI for rapid iteration and safe validation of shellcode for reverse engineering, CTFs, and security research.
1111

plugin.json

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,43 @@
11
{
22
"pluginmetadataversion": 2,
33
"name": "Shellcode-IDE",
4-
"type": ["ui", "binaryview", "helper"],
5-
"api": ["python3"],
4+
"type": [
5+
"ui",
6+
"binaryview",
7+
"helper"
8+
],
9+
"api": [
10+
"python3"
11+
],
612
"description": "This is a short description meant to fit on one line.",
713
"longdescription": "# Shellcode IDE\n\nA Qt-based Binary Ninja plugin that helps you compose, analyze, optimize, validate, and export shellcode across architectures that Binary Ninja supports. It combines Binary Ninja\u2019s assembler/disassembler with a user-friendly GUI for rapid iteration and safe validation of shellcode for reverse engineering, CTFs, and security research.\n\n- Audience: reverse engineers, CTF players, exploit developers, security researchers\n- Status: early development; core assemble/disassemble and UI scaffolding targeted first\n\n---\n\n## Highlights\n\n- Two-way conversion: raw bytes/hex \u21c6 assembly text\n- Assemble for any Binary Ninja architecture/platform\n- Multiple output formats: inline `\\x..`, raw hex, C stub, Python stub, Zig stub, Rust stub, Go stub\n- Live metadata: byte length, instruction count, null count, endianness, arch\n- Configurable bad-pattern detection (e.g., `00`, `0a`, `ff`, sequences, regex)\n- Peephole optimizations with preview/confirm (e.g., `push 0` \u2192 `xor reg, reg; push reg`, `mov rax, imm8` when safe)\n- Validation rules: no variables/labels, no absolute addresses/relocations, no nulls (unless allowed)\n- Binary Ninja integration: menu + toolbar + dockable/floating Qt window with shortcuts\n\n---\n\n## Screenshots\n\n(Coming soon)\n- Main window with Input/Output panes and live stats\n- Validation tab with clickable issues and fix suggestions\n\n---\n\n## Requirements\n\n- Binary Ninja (licensed), with Python API available\n- Python 3.8+ (match your Binary Ninja build)\n- Qt via PySide2 (Binary Ninja typically bundles PySide2; no manual install required)\n- Optional: Capstone/Keystone for fallback dis/assembly (used only if configured)\n\n---\n\n## Installation\n\nYou can install as a user plugin. Typical plugin directories:\n\n- macOS: `~/Library/Application Support/Binary Ninja/plugins`\n- Linux: `~/.binaryninja/plugins`\n- Windows: `%APPDATA%\\Binary Ninja\\plugins`\n\nManual install:\n\n1. Close Binary Ninja.\n2. Copy or clone this repository into your plugins directory as `Shellcode-IDE`.\n - Example (macOS/Linux):\n - `cd \"~/Library/Application Support/Binary Ninja/plugins\"` (macOS) or `cd ~/.binaryninja/plugins` (Linux)\n - `git clone https://github.com/<you>/Shellcode-IDE.git Shellcode-IDE`\n3. Start Binary Ninja. The plugin registers a Tools menu entry and a toolbar icon.\n\nIf you\u2019re reading this inside `.../Binary Ninja/plugins/Shellcode-IDE`, you\u2019re set. Restart Binary Ninja to load the plugin, or use \u201cReload Plugins\u201d if available.\n\n---\n\n## Launching\n\n- Menu: `Tools \u2192 Shellcode IDE`\n- Toolbar: Shellcode IDE icon\n- Docking: Opens as a dockable/floating Qt window\n\n---\n\n## Quick Start\n\n- Disassemble bytes/hex \u2192 assembly\n 1. Open Shellcode IDE.\n 2. Select target `Architecture`/`Platform` (defaults to active view when available).\n 3. Paste hex/bytes into the \u201cHex/Bytes\u201d tab (supports whitespace, `0x` prefixes, and `\\x..` forms).\n 4. Click \u201cDisassemble\u201d. View assembly in the output panel and stats in the status bar.\n 5. Export via the \u201cFormats\u201d tab (copy or save to file).\n\n- Assemble assembly \u2192 shellcode\n 1. Switch to the \u201cAssembly\u201d tab and enter one instruction per line.\n 2. Click \u201cAssemble\u201d. Errors (if any) show inline with line/column info.\n 3. Review live stats, run \u201cOptimize\u201d (optional), \u201cValidate\u201d, and export in your preferred format.\n\n---\n\n## Features\n\n- Input/Output\n - Input tabs: \u201cHex/Bytes\u201d, \u201cAssembly\u201d, with syntax highlighting and paste detection\n - Output tabs: \u201cDisassembly / Assembly Output\u201d, \u201cFormats\u201d, \u201cValidation\u201d, \u201cHistory\u201d\n - Status bar: arch/platform, length, null count, bad-pattern count, optimization status\n\n- Assemblers & Disassemblers\n - Uses Binary Ninja API: `Architecture.assemble()` and instruction text utilities\n - Disassembly can work in-memory from raw bytes; follows branches best-effort\n - Architecture and platform are user-selectable and default to the active view\n\n- Export Formats\n - Inline: `\"\\x90\\x90\\x48...\"`\n - Hex: `90 90 48 ...` or `0x90,0x90,...` (selectable)\n - C: minimal runnable C stub (mmap + function pointer)\n - Python: minimal runnable Python stub (mmap + ctypes)\n - Zig: minimal runnable Zig stub (page-alloc + mprotect + function pointer)\n - Rust: minimal runnable Rust stub (mmap + function pointer)\n - Go: minimal runnable Go stub (cgo + mmap + function pointer)\n - Configurable templates: variable names, include length, trailing comma, line wrapping\n\n- Bad-Pattern Detection\n - Patterns as hex bytes (`00`, `0a`, `ff`), byte sequences (`00 00 00`), or regex over hex text\n - Matches list with offsets; click to highlight bytes/assembly\n - Status badge for match count\n\n- Validation Rules\n - No variables/labels or assembler directives that produce relocations\n - No absolute addresses (e.g., `mov rax, 0x7fff...`, `[0xADDR]`)\n - No relocations/unresolved symbols from the assembler\n - No null bytes by default; user can allow via patterns\n\n- Peephole Optimizations (opt-in)\n - `push 0` \u2192 `xor reg, reg; push reg` (arch-aware)\n - `mov rax, IMM` \u2192 `mov al, IMM` when `IMM` fits and safe\n - Preview changes; accept/reject per transform\n - Safety checks ensure no forbidden bytes/semantics changes; warn on uncertainty\n\n- History & Snippets\n - Save/load named snippets per architecture\n - Persist settings and patterns per user\n\n---\n\n## UI Overview\n\n- Top toolbar: New, Open, Save, Copy, Assemble, Disassemble, Optimize (toggle), Validate\n- Left pane: Input tabs (Hex/Bytes, Assembly)\n- Right pane: Output (Disassembly/Assembly), Formats, Validation, History\n- Bottom status bar: arch/platform, length, nulls, bad-patterns, optimization state\n\n---\n\n## Keyboard Shortcuts (default)\n\n- `Ctrl/Cmd + Enter`: Assemble current Assembly tab\n- `Shift + Enter`: Disassemble Hex/Bytes input\n- `Ctrl/Cmd + B`: Toggle Optimize preview\n- `Ctrl/Cmd + E`: Validate\n- `Ctrl/Cmd + C`: Copy current format block\n\n(Shortcuts are subject to change; configurable in a later milestone.)\n\n---\n\n## Safety & Ethics\n\n- The plugin never executes shellcode. It assembles/disassembles and analyzes bytes only.\n- Use shellcode exclusively on systems you own or have explicit permission to test.\n\n---\n\n## Configuration & Storage\n\n- Bad patterns, export templates, and user snippets are stored in a plugin-specific config under Binary Ninja\u2019s user data directory (platform-specific).\n- A future update will add UI to import/export settings and custom transforms.\n\n---\n\n## Development\n\n- Tech stack: Python 3.8+, Binary Ninja Python API, PySide2\n- Recommended workspace layout:\n\n```\nShellcode-IDE/\n shellcode_ide/\n __init__.py # plugin entrypoint (BN actions, dock widget)\n ui/ # Qt .ui files and wrappers\n backends/\n bn_adapter.py # BN assembly/disassembly wrappers\n optimize.py # peephole passes\n validator.py # validation checks\n formatters/ # export formatters\n tests/ # unit tests and sample shellcodes\n README.md # this file\n LICENSE # MIT recommended\n```\n\n### Running & Reloading\n\n- Start Binary Ninja; the plugin registers automatically.\n- To iterate on UI/logic: edit files, then restart BN or use \u201cReload Plugins\u201d.\n- Logs and errors: open Binary Ninja\u2019s Log and Python Console to view tracebacks and debug prints.\n\n### Testing\n\n- Tests cover assemble/disassemble round-trips, optimization rules, and validators.\n- From the repo root (with BN\u2019s Python available on PATH or `PYTHONPATH`), run:\n - `python -m pytest -q`\n- Some tests may require the Binary Ninja API; those will be skipped if the API is unavailable in the current interpreter.\n\n### Coding Style\n\n- Prefer small, composable modules with clear responsibilities\n- Keep GUI code thin; push logic to backends\n- Add docstrings where behavior isn\u2019t obvious; avoid over-commenting obvious code\n\n---\n\n## Roadmap\n\n- M1 \u2014 Core assemble/disassemble: basic GUI, assemble/disassemble, formats, length\n- M2 \u2014 Validation & bad-patterns: validation pipeline, pattern editor UI\n- M3 \u2014 Optimize passes: two sample peepholes, preview+apply UX\n- M4 \u2014 Extensibility: snippets, custom transforms, export templates\n- M5 \u2014 Polish & tests: full unit tests, docs, sample snippets, CI\n\n---\n\n## Troubleshooting\n\n- \u201cAssemble\u201d fails or produces errors\n - Confirm the selected Architecture/Platform matches your intent\n - Check Binary Ninja version and that its Python environment is used\n - Inspect the Log/Python Console for detailed assembler diagnostics\n\n- Disassembly stops mid-stream\n - The bytes may not decode fully for the selected architecture; verify input and arch mode (e.g., 32-bit vs 64-bit)\n\n- UI issues (blank window or missing Qt)\n - Binary Ninja bundles Qt/PySide2; ensure you\u2019re not shadowing it with another Qt install\n - Restart Binary Ninja and check the Log for exceptions\n\n- Validation flags \u201crelocations\u201d\n - Remove labels/symbols/absolute addresses from assembly; ensure position-independent constructs\n\n---\n\n## FAQ\n\n- Does the plugin execute shellcode?\n - No. It never runs user-provided bytes; it only assembles/disassembles and analyzes.\n\n- Can I add my own optimizations?\n - Planned: a small JSON/DSL for custom peepholes with safety checks.\n\n- Which architectures are supported?\n - Any architecture that Binary Ninja supports and exposes via its Python API on your installation.\n\n---\n\n## Contributing\n\nContributions are welcome! Please open issues for bugs/ideas and submit focused PRs.\n\n- Keep changes minimal and scoped to the task\n- Match the existing code style and structure\n- Include tests for new logic where practical\n\n---\n\n## License\n\nMIT (recommended). See `LICENSE` once added to the repository.\n\n---\n\n## Acknowledgments\n\n- Binary Ninja team and community for the APIs and plugin ecosystem\n- Inspiration from common shellcode workflows and CTF tooling\n",
814
"license": {
915
"name": "MIT",
1016
"text": "Copyright (c) <year> <copyright holders>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
1117
},
12-
"platforms": ["Darwin", "Linux", "Windows"],
18+
"platforms": [
19+
"Darwin",
20+
"Linux",
21+
"Windows"
22+
],
1323
"installinstructions": {
1424
"Darwin": "macOS:\ncd \"~/Library/Application Support/Binary Ninja/plugins\"\ngit clone https://github.com/CX330Blake/Shellcode-IDE Shellcode-IDE\nRestart Binary Ninja or use \"Reload Plugins\".",
1525
"Linux": "Linux:\ncd ~/.binaryninja/plugins\ngit clone https://github.com/CX330Blake/Shellcode-IDE Shellcode-IDE\nRestart Binary Ninja or use \"Reload Plugins\".",
1626
"Windows": "Windows (PowerShell or CMD):\ncd \"%APPDATA%\\Binary Ninja\\plugins\"\ngit clone https://github.com/CX330Blake/Shellcode-IDE Shellcode-IDE\nRestart Binary Ninja or use \"Reload Plugins\"."
1727
},
1828
"dependencies": {
19-
"pip": ["pygments>=2.12", "keystone-engine>=0.9.2"],
29+
"pip": [
30+
"pygments>=2.12",
31+
"keystone-engine>=0.9.2"
32+
],
2033
"apt": [],
2134
"installers": [],
2235
"other": [
2336
"Requires Binary Ninja with Python API (licensed).",
2437
"PySide2 is bundled with Binary Ninja; no extra install typically required."
2538
]
2639
},
27-
"version": "0.1.8",
40+
"version": "0.1.9",
2841
"author": "CX330Blake",
2942
"minimumbinaryninjaversion": 3164
30-
}
31-
43+
}

0 commit comments

Comments
 (0)