> For the complete documentation index, see [llms.txt](https://f1rstbyt3.gitbook.io/hacking-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://f1rstbyt3.gitbook.io/hacking-notes/misc/buffer-overflow/exploiting-bufferoverflow/create-padding.md).

# Create Padding

**LAZY WAY:**

`Add NOPS (0x90) to the code:`

`Padding = b’0x90’*16`

**PROPER WAY:**

Using `metasploit-framework/tools/metasm_shell.rb` identify the ESP value, and issue:

`sub esp,`**`HEXVAL`**` ``(i.e. 0x10)`
