NOP slide

NOP slide

In computer CPUs, a NOP slide, NOP sled or NOP ramp is a sequence of NOP (no-operation) instructions (on Intel x86, this is the opcode 0x90) meant to "slide" the CPU's instruction execution flow to its final, desired, destination. Generally a NOP slide will be used in cases where execution will branch into a position that cannot be determined with absolute accuracy, therefore "padding" the memory area before and after the approximate branch address is performed in the hope of avoiding an exception which would cause the program or system to crash. Once the CPU branches anywhere within the NOP slide, its instruction pointer (IP) will "slide" to its final destination, where there is valid code to be executed.

NOP slides can be used in buffer overflow and similar exploits designed to take over a program's execution path, or in defensive programming such as in EMC aware programming.

Example

If you were writing a numbered list of things for a person to do and you didn't know where he might start, you could add many "no operation" steps at the beginning and end, so that in most cases he would do something predictable, rather than beginning in the middle of the important steps.

  1. Continue.
  2. Continue.
  3. Continue.
  4. Continue.
  5. Place key in lock.
  6. Turn key.
  7. You're done.
  8. Continue.
  9. Continue.
  10. Continue.
  11. Continue.
  12. Go to step 1.

See also

  • Heap spraying, a technique which is complementary to the use of NOP slides

Sources


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • NOP — For other uses, see NOP (disambiguation). In computer science, NOP or NOOP (short for No Operation or No Operation Performed) is an assembly language instruction, sequence of programming language statements, or computer protocol command that… …   Wikipedia

  • PaX — In computer security, PaX is a patch for the Linux kernel that implements least privilege protections for memory pages. The least privilege approach allows computer programs to do only what they have to do in order to be able to execute properly …   Wikipedia

  • Address space layout randomization — (ASLR) is a computer security technique which involves randomly arranging the positions of key data areas, usually including the base of the executable and position of libraries, heap, and stack, in a process s address space. Benefits Address… …   Wikipedia

  • Instruction set — An instruction set, or instruction set architecture (ISA), is the part of the computer architecture related to programming, including the native data types, instructions, registers, addressing modes, memory architecture, interrupt and exception… …   Wikipedia

  • Heap spraying — In computer security, heap spraying is a technique used in exploits to facilitate arbitrary code execution. The term is also used to describe the part of the source code of an exploit that implements this technique. In general, code that sprays… …   Wikipedia

  • Buffer overflow — In computer security and programming, a buffer overflow, or buffer overrun, is an anomalous condition where a process attempts to store data beyond the boundaries of a fixed length buffer. The result is that the extra data overwrites adjacent… …   Wikipedia

  • PDP-8 — A PDP 8 on display at the Smithsonian s National Museum of American History in Washington, D.C.. This example is from the first generation of PDP 8s, built with discrete transistors and later known as the Straight 8. The 12 bit PDP 8 was the… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”