Giter VIP home page Giter VIP logo

Comments (2)

ivanfratric avatar ivanfratric commented on July 24, 2024

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.

CodeDweller avatar CodeDweller commented on July 24, 2024

"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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.