Comments (2)
Hi,
You should have some level of familiarity with your target function, at least in the sense that you should have general idea what the function does (see "How to select a target function" in README) and the number of arguments it takes.
In case all you have is a binary, this means you might have to do some reversing. Tools like Ida could probably tell you the number of arguments, but you should be able to figure it out with WinDbg or another tool of your choice with some work.
"can we always count on register and stack being set up immediately before the call"
Setting up the function arguments is the responsibility of the caller, so yes
"Also, what are the consequences of using the wrong number arguments passed to the target method?"
If you specify too little arguments, then some of the arguments won't be restored to their initial state between fuzzing iterations which might cause unpredictable behavior, crashes etc.
If you specify too much arguments, some register and/or stack values will be restored to their initial state even though they don't store function arguments. Most likely nothing bad will happen as a result of this.
from winafl.
"Setting up the function arguments is the responsibility of the caller, so yes"
I know that, but what I meant was, for example, if the caller calls 2 functions one after another, and uses RCX, RDX and R8 in first, but sets up only RCX and RDX after the first and before the second call, can we be sure that only those 2 arguments are passed to the second function, or is R8 being implicitly passed?
On MSDN it says that "RAX, RCX, RDX, R8, R9, R10, R11 are considered volatile and must be considered destroyed on function calls", so I would take that it means there can be no "implicit" passing of values in those registers between the function calls...
Thanks for the answer, I'm just getting started in this field, so your help is very much appreciated... :)
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.