-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathbyvalver.1
More file actions
210 lines (195 loc) · 4.66 KB
/
byvalver.1
File metadata and controls
210 lines (195 loc) · 4.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
.TH BYVALVER 1 "December 2025" "byvalver v3.0.0" "User Commands"
.SH NAME
byvalver \- SHELLCODE BAD-CHARACTER BANISHER
.SH SYNOPSIS
.B byvalver
.RI [ OPTIONS ]
.IR input_file
.RI [ output_file ]
.SH DESCRIPTION
.B byvalver
is an advanced C-based command-line tool designed for automated elimination of bad bytes from shellcode while preserving functional equivalence. The tool leverages the Capstone disassembly framework to analyze x86/x64 assembly instructions and applies sophisticated transformation strategies to replace bad-byte-containing instructions with functionally equivalent alternatives. By default, byvalver eliminates null bytes (0x00). Version 3.0 introduces generic bad byte elimination via the --bad-bytes option, allowing you to specify any set of bytes to eliminate (e.g., newlines, spaces, CRLF sequences).
.SH OPTIONS
.SS "General Options"
.TP
.BR \-h ", " \-\-help
Show help message and exit
.TP
.BR \-v ", " \-\-version
Show version information and exit
.TP
.BR \-V ", " \-\-verbose
Enable verbose output
.TP
.BR \-q ", " \-\-quiet
Suppress non-essential output
.TP
.BI \-\-config\ FILE
Use custom configuration file
.TP
.BR \-\-no-color
Disable colored output
.SS "Processing Options"
.TP
.BR \-\-biphasic
Enable biphasic processing (obfuscation + bad-byte-elimination)
.TP
.BR \-\-pic
Generate position-independent code
.TP
.BR \-\-ml
Use ML strategy selection (Architecture v2.0 with one-hot encoding and context window)
.TP
.BI \-\-xor-encode\ KEY
XOR encode output with 4-byte key (hex)
.TP
.BI \-\-format\ FORMAT
Output format: raw, c, python, powershell, hexstring (default: raw)
.TP
.BI \-\-arch\ ARCH
Target architecture: x86, x64 (default: x64)
.SS "Bad Character Elimination (v3.0)"
.TP
.BI \-\-bad-chars\ BYTES
Comma-separated hex bytes to eliminate (e.g., "00,0a,0d"). Default: "00" (null bytes only)
.TP
.BI \-\-profile\ NAME
Use predefined bad-byte profile. Examples: http-newline, url-safe, sql-injection, alphanumeric-only, printable-only
.TP
.BR \-\-list-profiles
List all available bad-byte profiles
.SS "ML Metrics Options (requires --ml)"
.TP
.BR \-\-metrics
Enable ML metrics tracking and learning
.TP
.BI \-\-metrics-file\ FILE
Metrics output file (default: ./ml_metrics.log)
.TP
.BR \-\-metrics-json
Export metrics in JSON format
.TP
.BR \-\-metrics-csv
Export metrics in CSV format
.TP
.BR \-\-metrics-live
Show live metrics during processing
.SS "Batch Processing Options"
.TP
.BR \-r ", " \-\-recursive
Process directories recursively
.TP
.BI \-\-pattern\ PATTERN
File pattern to match (default: *.bin)
.TP
.BR \-\-no-preserve-structure
Don't preserve directory structure in output
.TP
.BR \-\-no-continue-on-error
Stop processing on first error (default is to continue)
.TP
.BI \-\-failed-files\ FILE
Output list of failed files to specified file
.SS "Advanced Options"
.TP
.BI \-\-strategy-limit\ N
Limit number of strategies to consider per instruction
.TP
.BI \-\-max-size\ N
Maximum output size (in bytes)
.TP
.BI \-\-timeout\ SECONDS
Processing timeout (default: no timeout)
.TP
.BR \-\-dry-run
Validate input without processing
.TP
.BR \-\-stats
Show detailed statistics after processing
.SS "Output Options"
.TP
.BR \-o ", " \-\-output
Output file (alternative to positional argument)
.TP
.BR \-\-validate
Validate output is bad-byte free
.SH EXAMPLES
.B Basic usage (eliminate null bytes):
.br
byvalver shellcode.bin output.bin
.br
.PP
.B With biphasic processing:
.br
byvalver --biphasic shellcode.bin output.bin
.br
.PP
.B With XOR encoding:
.br
byvalver --biphasic --xor-encode 0x12345678 shellcode.bin output.bin
.br
.PP
.B Generate position-independent code:
.br
byvalver --pic shellcode.bin output.bin
.br
.PP
.B Eliminate specific bad bytes (v3.0+):
.br
# Eliminate null, newline, and carriage return (for network protocols)
.br
byvalver --bad-bytes "00,0a,0d" shellcode.bin output.bin
.br
.PP
.B Use predefined profiles (v3.0+):
.br
# Use HTTP newline profile (eliminates 0x00, 0x0A, 0x0D)
.br
byvalver --profile http-newline shellcode.bin output.bin
.br
.PP
.B Use ML-powered strategy selection:
.br
byvalver --ml shellcode.bin output.bin
.br
.PP
.B Batch process directory:
.br
byvalver input_dir/ output_dir/
.br
.PP
.B Batch process recursively with pattern:
.br
byvalver -r --pattern "*.bin" --biphasic input_dir/ output_dir/
.br
.SH EXIT CODES
.TP
.B 0
Success
.TP
.B 1
General error
.TP
.B 2
Invalid arguments
.TP
.B 3
Input file error
.TP
.B 4
Processing failed
.TP
.B 5
Output file error
.TP
.B 6
Timeout exceeded
.TP
.B 7
Configuration error
.SH AUTHOR
Orchestrated by `umpolungfish`
.SH REPORTING BUGS
Report bugs to: https://github.com/umpolungfish/byvalver/issues
.SH COPYRIGHT
Unlicense