312-50V13 · Question #147
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 hexadecimal value for the No-Operation (NOP) instruction in x86 architecture, frequently used to create NOP sleds in buffer overflow exploits, is 0x90.
Question
Options
- A0x60
- B0x80
- C0x70
- D0x90
How the community answered
(19 responses)- A5% (1)
- C5% (1)
- D89% (17)
Why each option
The hexadecimal value for the No-Operation (NOP) instruction in x86 architecture, frequently used to create NOP sleds in buffer overflow exploits, is 0x90.
`0x60` is the opcode for PUSHAD (Push All General-Purpose Registers) in x86, not NOP.
`0x80` is a common prefix for many two-byte instructions (e.g., immediate byte following), not the NOP instruction itself.
`0x70` is the opcode for JNO (Jump if No Overflow), a conditional jump instruction, not NOP.
In the x86 instruction set, `0x90` is the single-byte opcode for the NOP (No-Operation) instruction. A NOP sled consists of a sequence of these instructions, providing a range of memory addresses where execution can land and slide down to the actual shellcode, making buffer overflow exploitation more reliable.
Concept tested: x86 NOP instruction hexadecimal value in buffer overflows
Source: https://www.felixcloutier.com/x86/nop
Topics
Community Discussion
No community discussion yet for this question.