Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4336516
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:49:03+00:00 2026-05-21T10:49:03+00:00

Looking at some of the assembly and disassembly code in The Shellcoder’s Handbook, I

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T10:49:04+00:00Added an answer on May 21, 2026 at 10:49 am

    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:

    mov  ebx, 0     ; Intel
    mov  $0, %ebx   ; AT&T
    

    Both of these mean the same thing, setting the ebx register 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:


    Let’s write these three steps in assembly. We can then get an ELF binary; from this file we can finally extract the opcodes.

    Section .text
    global _start
    _start:
        mov ebx,0
        mov eax,1
        int 0x80
    

    Now we want to use the nasm assembler to create our object file, and then use the GNU linker to link object files:

    [slap@0day root] nasm -f elf exit_shellcode.asm
    [slap@0day root] ld -o exit_shellcode exit_shellcode.o
    

    Finally, we are ready to get our opcodes. In this example, we will use objdump. The objdump utility is a simple tool that displays the contents of object files in human readable form. It also prints out the opcode nicely when displaying contents of the object file, which makes it useful in designing shellcode. Run our program through objdump, like this:

    [slap@0day root] objdump -d exit_shellcode
    exit_shellcode:file format elf32-i386
    Disassembly of section .text:
    08048080 <.text>:
    8048080: bb 00 00 00 00 mov $0x0,%ebx
    8048085: b8 01 00 00 00 mov $0x1,%eax
    804808a: cd 80          int $0x80
    

    From that, you can see quite clearly that nasm expects the Intel notation but objdump produces AT&T notation. You just have to get used to the differences between them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am playing with TFS 2010, and am trying to setup a build process

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.