All Projects → zerosum0x0 → Winrepl

zerosum0x0 / Winrepl

Licence: zlib
x86 and x64 assembly "read-eval-print loop" shell for Windows

Programming Languages

shell
77523 projects
assembly
5116 projects
assembler
53 projects
shellcode
44 projects

Projects that are alternatives of or similar to Winrepl

Rappel
A linux-based assembly REPL for x86, amd64, armv7, and armv8
Stars: ✭ 818 (+92.92%)
Mutual labels:  x86, x64, debugger, repl
X64dbg
An open-source x64/x32 debugger for windows.
Stars: ✭ 37,825 (+8820.99%)
Mutual labels:  x86, x64, debugger
PBD
🖨️🐞 Printf Based Debugger, a user-friendly C debugger
Stars: ✭ 52 (-87.74%)
Mutual labels:  debugger, x86
xgadget
Fast, parallel, cross-variant ROP/JOP gadget search for x86/x64 binaries.
Stars: ✭ 33 (-92.22%)
Mutual labels:  x64, x86
NIM-CSharp-SDK
网易云信C# SDK
Stars: ✭ 15 (-96.46%)
Mutual labels:  x64, x86
opcodesDB
x86-64 | ARM (AArch32/AArch64/THUMB) full instruction set.
Stars: ✭ 49 (-88.44%)
Mutual labels:  x64, x86
Reverse-Engineering
A FREE comprehensive reverse engineering tutorial covering x86, x64, 32-bit ARM & 64-bit ARM architectures.
Stars: ✭ 7,234 (+1606.13%)
Mutual labels:  x64, x86
Saraff.Twain.NET
Saraff.Twain.NET is the skillful scanning component which allows you to control work of flatbed scanner, web and digital camera and any other TWAIN device from .NET environment. You can use this library in your programs written in any programming languages compatible with .NET technology.
Stars: ✭ 74 (-82.55%)
Mutual labels:  x64, x86
profiler-api
The portable version of JetBrains profiler API for .NET Framework / .NET Core / .NET / .NET Standard / Mono
Stars: ✭ 21 (-95.05%)
Mutual labels:  x64, x86
Croissant
🥐 A Lua REPL and debugger
Stars: ✭ 285 (-32.78%)
Mutual labels:  debugger, repl
Mirage
kernel-mode Anti-Anti-Debug plugin. based on intel vt-x && ept technology
Stars: ✭ 272 (-35.85%)
Mutual labels:  x86, x64
Byebug
Debugging in Ruby 2
Stars: ✭ 3,202 (+655.19%)
Mutual labels:  debugger, repl
fdtd3d
fdtd3d is an open source 1D, 2D, 3D FDTD electromagnetics solver with MPI, OpenMP and CUDA support for x86, arm, arm64 architectures
Stars: ✭ 77 (-81.84%)
Mutual labels:  x64, x86
async
async is a tiny C++ header-only high-performance library for async calls handled by a thread-pool, which is built on top of an unbounded MPMC lock-free queue.
Stars: ✭ 25 (-94.1%)
Mutual labels:  x64, x86
Reloaded.Assembler
Minimal .NET wrapper around the simple, easy to use Flat Assembler written by Tomasz Grysztar. Supports both x64 and x86 development.
Stars: ✭ 17 (-95.99%)
Mutual labels:  x64, x86
Capstone.NET
.NET Core and .NET Framework binding for the Capstone Disassembly Framework
Stars: ✭ 108 (-74.53%)
Mutual labels:  x64, x86
ts-c99-compiler
ANSI C 16bit Compiler + NASM Assembler + Intel 8086 / 80186 + X87 emulator written entirely in TypeScript
Stars: ✭ 78 (-81.6%)
Mutual labels:  repl, x86
X86 Bare Metal Examples
Dozens of minimal operating systems to learn x86 system programming. Tested on Ubuntu 17.10 host in QEMU 2.10 and real hardware. Userland cheat at: https://github.com/cirosantilli/linux-kernel-module-cheat#userland-assembly ARM baremetal setup at: https://github.com/cirosantilli/linux-kernel-module-cheat#baremetal-setup 学习x86系统编程的数十个最小操作系统。 已在QE…
Stars: ✭ 3,985 (+839.86%)
Mutual labels:  x86, x64
kasm
Assembler library for Kotlin
Stars: ✭ 40 (-90.57%)
Mutual labels:  x64, x86
kar98k public
pwn & ctf tools for windows
Stars: ✭ 24 (-94.34%)
Mutual labels:  x64, x86

WinREPL

WinREPL is a "read-eval-print loop" shell on Windows that is useful for testing/learning x86 and x64 assembly.

Pre-compiled binaries are available at: https://github.com/zerosum0x0/WinREPL/releases/

WinREPL

zerosum0x0/WinREPL is similar to yrp604/rappel (Linux) and Tyilo/asm_repl (Mac), but with a slightly different methodology that should allow for tricks such as self-modifying shellcode crypting/encoding. There is also enferex/asrepl for a Unicorn (emulated) version, but WinREPL is completely native inside a Windows process context.

Methodology

WinREPL is a debugger (parent process) that hollows out a copy of itself (child process).

  1. Parent process retrieves input from the user
  2. Machine code is generated with the ASMTK library
  3. Resulting bytes are written to a child process thread context
  4. Child process thread is resumed
  5. Parent process polls for debug events

Commands

Multiple assembly mnemonics can be executed on a single line by separating with semi-colons. Refer to ASMTK documentation for other syntactic sugar.

Besides being a raw assembler, there are a few extra commands.

.help                   Show this help screen.
.registers              Show more detailed register info.
.read addr size         Read from a memory address.
.write addr hexdata     Write to a memory address.
.allocate size          Allocate a memory buffer.
.loadlibrary path       Load a DLL into the process.
.kernel32 func          Get address of a kernel32 export.
.shellcode hexdata      Execute raw shellcode.
.peb                    Loads PEB into accumulator.
.reset                  Start a new environment.
.quit                   Exit the program.

The following commands are not yet implemented but on the Todo list:

.dep addr size [0/1]    Enable or disable NX-bit.
.stack                  Dump current stack memory contents.
.string data            Push a string onto the stack.
.errno                  Get last error code in child process.

Create a GitHub issue to request other commands.

Other Todo

As always happens, code is rushed and awful.

  1. Clean up the hodge-podge of C and C++... just make it all C++
  2. Look into label support
  3. Better error handling for debug events
  4. Better command mappings
  5. Support for AT&T syntax
  6. Support for ARM architecture
  7. Perhaps integration with Unicorn for obscure architectures?
  8. Print useful error messages for debug exceptions like access violations

Building

As I don't want to go to prison, the provided binaries (./bin/winrepl_x86.exe and ./bin/winrepl_x64.exe) are not backdoored. That said, this program works via sorcery that is probably suspicious to antivirus.

You should be able to just initialize the git submodules and build with Visual Studio.

License

ZLIB, a super permissive license. Thanks @mrexodia

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].