nerdexam
EC-Council

312-50V9 · Question #595

You are programming a buffer overflow exploit and you want to create a NOP sled of 200 bytes in the program exploit.c What is the hexadecimal value of NOP instruction?

The correct answer is D. 0x90. The x86 NOP instruction has the opcode 0x90, and a NOP sled is a sequence of these bytes used to increase buffer overflow exploit reliability.

System Hacking

Question

You are programming a buffer overflow exploit and you want to create a NOP sled of 200 bytes in the program exploit.c What is the hexadecimal value of NOP instruction?

Options

  • A0x60
  • B0x80
  • C0x70
  • D0x90

How the community answered

(37 responses)
  • A
    5% (2)
  • B
    5% (2)
  • C
    3% (1)
  • D
    86% (32)

Why each option

The x86 NOP instruction has the opcode 0x90, and a NOP sled is a sequence of these bytes used to increase buffer overflow exploit reliability.

A0x60

0x60 is the opcode for the PUSHA instruction on x86, which pushes all general-purpose registers onto the stack and is unrelated to NOP.

B0x80

0x80 is a prefix byte for immediate arithmetic and logical operations on x86 operands, not the NOP opcode.

C0x70

0x70 is the opcode for JO (Jump if Overflow), a conditional branch instruction, not a no-operation instruction.

D0x90Correct

On x86 and x86-64 processors, 0x90 is the single-byte opcode for the NOP (No Operation) instruction. A NOP sled of 200 bytes means writing 0x90 repeated 200 times before the shellcode, so that a jump landing anywhere in the sled slides execution forward into the payload without crashing.

Concept tested: x86 NOP opcode used in buffer overflow NOP sleds

Topics

#NOP sled#buffer overflow#exploit development#assembly opcodes

Community Discussion

No community discussion yet for this question.

Full 312-50V9 Practice