mirror of
https://github.com/Xenov-X/NOPe
synced 2026-06-08 12:57:52 +00:00
updated readme to match NOPe.py
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
.vscode/*
|
||||
old/*
|
||||
@@ -1,17 +1,85 @@
|
||||
# NOPe
|
||||
A quick hacky script to test some NOP sled alternatives
|
||||
|
||||
> Note: You'll need to use the correct architecture python install for each script
|
||||
A quick and hacky script to test alternatives to traditional NOP sleds by prepending various x86 or x64 "NOP-like" instructions to shellcode and executing it in memory.
|
||||
|
||||
Usage:
|
||||
Note: You must use the correct architecture of Python for the type of shellcode you're testing.
|
||||
|
||||
- Use 32-bit Python for x86 shellcode
|
||||
- Use 64-bit Python for x64 shellcode
|
||||
|
||||
## Usage
|
||||
|
||||
Run with the default payload (x64 message box shellcode):
|
||||
```
|
||||
python Nope_x64.py #Runs MSFVenom Messagebox
|
||||
python Nope_x64.py file.bin #Runs user supplied bin
|
||||
python NOPe.py
|
||||
```
|
||||
|
||||
|
||||
Shellcode regen steps:
|
||||
Run with your own shellcode binary:
|
||||
```
|
||||
msfvenom -p windows/x64/messagebox > msgbox.x64.bin
|
||||
msfvenom -p windows/messagebox > msgbox.x86.bin
|
||||
python NOPe.py -f my_shellcode.bin
|
||||
```
|
||||
|
||||
Specify architecture:
|
||||
```
|
||||
python NOPe.py -f msgbox.x86.bin –arch x86
|
||||
```
|
||||
|
||||
Enable verbose output:
|
||||
```
|
||||
python NOPe.py -f msgbox.x64.bin –arch x64 –verbose
|
||||
```
|
||||
|
||||
List supported NOP variants for a given architecture:
|
||||
```
|
||||
python NOPe.py –arch x86 –list-nops
|
||||
```
|
||||
|
||||
## Generating Shellcode
|
||||
|
||||
To regenerate the message box payloads using `MSFVenom`:
|
||||
|
||||
x64 shellcode
|
||||
```
|
||||
msfvenom -p windows/x64/messagebox TEXT=“NOPe64” TITLE=“Hello” -f raw > msgbox.x64.bin
|
||||
```
|
||||
|
||||
x86 shellcode
|
||||
```
|
||||
msfvenom -p windows/messagebox TEXT=“NOPe32” TITLE=“Hello” -f raw > msgbox.x86.bin
|
||||
```
|
||||
|
||||
# bin2sc
|
||||
|
||||
A simple script for converting raw `.bin` shellcode files into formatted C or Rust source code.
|
||||
|
||||
## Usage
|
||||
|
||||
Convert and print shellcode in C-style hex array format:
|
||||
```
|
||||
python bin2sc.py shellcode.bin
|
||||
```
|
||||
Write the output to a file:
|
||||
|
||||
```
|
||||
python bin2sc.py shellcode.bin -o output.h
|
||||
```
|
||||
|
||||
Change output format:
|
||||
|
||||
```
|
||||
python bin2sc.py shellcode.bin -s c-array # Default
|
||||
python bin2sc.py shellcode.bin -s c-string # “\x90\x90…” style
|
||||
python bin2sc.py shellcode.bin -s rust # Rust-style byte array
|
||||
```
|
||||
Customise the variable name and bytes per line:
|
||||
```
|
||||
python bin2sc.py shellcode.bin –name my_shellcode –bytes-per-line 8
|
||||
```
|
||||
|
||||
## Example Output (C Array)
|
||||
|
||||
```c
|
||||
unsigned char payload[] = {
|
||||
0x90, 0x90, 0xCC, 0xCC, 0xEB, 0xFE
|
||||
};
|
||||
```
|
||||
Reference in New Issue
Block a user