1

i am reading the "The Grey Hat Hacking-The ethical hacker's Handbook".The book is nice ,but there is a doubt on a particular subject.In the vulnerability analysis chapter it is trying to analyze a vulnerability using IDA-PRO.

But there is a twist on it.As we know stack variables are pushed right to left fashion. Ex:function x(int x, int y, int z),so variable will push into following order push z push y push x

In the book it is saying about function name which is below

function Name

Function Format is as below:

Function format

Then after that it is saying if we click any variable in IDA-PRO it will give up to below stack layout where arguments of function are passed.chek the below image

[stack layout[2]

But if we see the above picture we can see that arguments are not passed in the proper way.something mixed up .i mean to say not "right to left" manner, which is little bit confusing.

Anyone have any idea, please let me know

  • 1
    Please don't post text as image, it makes it hard to copy&paste and is not good for searching. – Igor Skochinsky Jun 9 '17 at 21:54
1

Look at the place where sprintf is called and you should see the arguments being pushed in the correct order.

The variables listed here are local variables of the function manage_request and not its arguments. They're arguments of the sprintf call but the variables themselves can be placed in whatever order the compiler decides in the stack (usually, but not always, the order they were declared in the source code).

| improve this answer | |
  • Yeah you are right.They are already declared on the stack during local variables of manage_request.I just missed it. – Bikash Dash Jun 12 '17 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.