Comments (4)
You might be able to work around this by injecting them into a resumed session.
I don't think it will matter much if this is done early in the fuzzing process.
- quickly run a session and generate the output directory structure
- place the raw tokens as separate files in \o\queue.state\auto_extras
- rename the files with this batch script if necessary:
@echo off
SET COUNT=0
setlocal EnableDelayedExpansion
SET PREFIX=auto
FOR /f "tokens=*" %%G IN ('dir /b *') DO (call :renum "%%G")
GOTO :eof
:renum
set "formattedValue=000000%count%"
ren %1 %PREFIX%_!formattedValue:~-6!
set /a count+=1
GOTO :eof
- resume the session by specifying a dash instead of an input dir ( e.g. "-o ./outdir -i - ")
don't forget to back up your results often
from winafl.
Admittedly I didn't do a lot of testing with dictionaries because I didn't use them myself so it's possible there are bugs with this. I'll take a look at this when I can find some spare cycles. Meanwhile, If you can point out the bug in the code it would be highly appreciated.
@mrpeppels or anyone else - Was -x working for you?
from winafl.
There are two bugs.
The first is in the load_extras function in afl-fuzz.c
It uses in_dir instead of dir
Actual:
static void load_extras(u8* dir) {
WIN32_FIND_DATA fdata;
HANDLE h;
u32 min_len = MAX_DICT_FILE, max_len = 0, dict_level = 0;
u8* x;
char *pattern;
if(in_dir[strlen(in_dir)-1] == '\\') {
pattern = alloc_printf("%s*", in_dir);
} else {
pattern = alloc_printf("%s\\*", in_dir);
}...
Fixed:
static void load_extras(u8* dir) {
WIN32_FIND_DATA fdata;
HANDLE h;
u32 min_len = MAX_DICT_FILE, max_len = 0, dict_level = 0;
u8* x;
char *pattern;
if(dir[strlen(dir)-1] == '\\') {
pattern = alloc_printf("%s*", dir);
} else {
pattern = alloc_printf("%s\\*", dir);
}...
The second bug is the MAX_DICT_FILE which is too litle -> By increasing this constant allows you to read dictionary files greater than 128 Bytes ;-)
from winafl.
Awesome! Thanks for spotting this! I had to change directory listing in several places due to different APIs on Linux and Windows and I must have copy-pasted this from another place and forgot to change the variable name. I just released the updated version with the fix.
MAX_DICT_FILE is the same as in linux AFL and I think it might be deliberate to limit the maximum size of a dictionary token.
from winafl.
Related Issues (20)
- Yes, I am use attach by add option -A, But it seems no function. below is my command. HOT 1
- Cannot run simple test due to timeout HOT 4
- Update docs HOT 3
- Facing Issues with Offset Calculation and Starting Fuzzing in WinAFL HOT 2
- Compilation failed HOT 3
- Documented build commands do not generate winafl.dll HOT 9
- How to stop WinAFL properly? HOT 1
- Winafl + Libprotobuf-mutator
- WinAFL Internal Crash at PC 0x5a1a456e HOT 6
- PROGRAM ABORT : Unexpected result from pipe! expected 'P', instead received '' HOT 1
- ERROR while building winafl HOT 1
- Error: Can't open .cur_input
- drrun.exe and afl-fuzz.exe giving error when -fsanitize=address flag given to compile target
- PROGRAM ABORT : Test case 'id_000000' results in a crash HOT 3
- Occur time out when init test case
- Incorrect detection count threads on multiCPU motherboards HOT 2
- Winafl doesn't want to start, reading other issues didn't help
- PROGRAM ABORT : CreateNamedPipe failed, GLE=231 HOT 2
- tmin: Proposing del_len option for improved speed HOT 2
- Is dumb mode (-n) currently implemented? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from winafl.