Looking at some of the assembly and disassembly code in “The Shellcoder’s Handbook”, I found that the sequence operand for an instruction is not the same.
For example, on assembly:
mov ebx,0
and, on disassembly:
mov 0,ebx
Why is this so?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Either there’s something wrong with your assembler or disassembler, or there’s a simple mismatch in notation.
For example, the two common notations for x86 (Intel and AT&T) reverse the order of the operands, like:
Both of these mean the same thing, setting the
ebxregister to zero.In the Shellcoder’s Handbook that you reference, the tools being used are using the two different notations. For example, on one page (pg 39 in my edition), you see this text:
From that, you can see quite clearly that
nasmexpects the Intel notation butobjdumpproduces AT&T notation. You just have to get used to the differences between them.