# Stack

- [Introduction](https://ir0nstone.gitbook.io/notes/binexp/stack/introduction.md): An introduction to binary exploitation
- [ret2win](https://ir0nstone.gitbook.io/notes/binexp/stack/ret2win.md): The most basic binexp challenge
- [De Bruijn Sequences](https://ir0nstone.gitbook.io/notes/binexp/stack/de-bruijn-sequences.md): The better way to calculate offsets
- [Shellcode](https://ir0nstone.gitbook.io/notes/binexp/stack/shellcode.md): Running your own code
- [NOPs](https://ir0nstone.gitbook.io/notes/binexp/stack/nops.md): More reliable shellcode exploits
- [32- vs 64-bit](https://ir0nstone.gitbook.io/notes/binexp/stack/32-vs-64-bit.md): The differences between the sizes
- [No eXecute](https://ir0nstone.gitbook.io/notes/binexp/stack/no-execute.md): The defence against shellcode
- [Return-Oriented Programming](https://ir0nstone.gitbook.io/notes/binexp/stack/return-oriented-programming.md): Bypassing NX
- [Calling Conventions](https://ir0nstone.gitbook.io/notes/binexp/stack/return-oriented-programming/calling-conventions.md): A more in-depth look into parameters for 32-bit and 64-bit programs
- [Gadgets](https://ir0nstone.gitbook.io/notes/binexp/stack/return-oriented-programming/gadgets.md): Controlling execution with snippets of code
- [Exploiting Calling Conventions](https://ir0nstone.gitbook.io/notes/binexp/stack/return-oriented-programming/exploiting-calling-conventions.md): Utilising Calling Conventions
- [ret2libc/ret2system](https://ir0nstone.gitbook.io/notes/binexp/stack/return-oriented-programming/ret2libc.md): The standard ROP exploit
- [Stack Alignment](https://ir0nstone.gitbook.io/notes/binexp/stack/return-oriented-programming/stack-alignment.md): A minor issue
- [Format String Bug](https://ir0nstone.gitbook.io/notes/binexp/stack/format-string.md): Reading memory off the stack
- [Stack Canaries](https://ir0nstone.gitbook.io/notes/binexp/stack/canaries.md): The Buffer Overflow defence
- [PIE](https://ir0nstone.gitbook.io/notes/binexp/stack/pie.md): Position Independent Code
- [Pwntools, PIE and ROP](https://ir0nstone.gitbook.io/notes/binexp/stack/pie/pwntools-pie-and-rop.md)
- [PIE Bypass with Given Leak](https://ir0nstone.gitbook.io/notes/binexp/stack/pie/pie-exploit.md): Exploiting PIE with a given leak
- [PIE Bypass](https://ir0nstone.gitbook.io/notes/binexp/stack/pie/pie-bypass.md): Using format string
- [ASLR](https://ir0nstone.gitbook.io/notes/binexp/stack/aslr.md): Address Space Layout Randomisation
- [ASLR Bypass with Given Leak](https://ir0nstone.gitbook.io/notes/binexp/stack/aslr/aslr-bypass-with-given-leak.md)
- [PLT and GOT](https://ir0nstone.gitbook.io/notes/binexp/stack/aslr/plt_and_got.md): Bypassing ASLR
- [ret2plt ASLR bypass](https://ir0nstone.gitbook.io/notes/binexp/stack/aslr/ret2plt-aslr-bypass.md)
- [Virtual Addresses and Virtual Memory](https://ir0nstone.gitbook.io/notes/binexp/stack/virtual-addresses-and-virtual-memory.md)
- [GOT Overwrite](https://ir0nstone.gitbook.io/notes/binexp/stack/got-overwrite.md): Hijacking functions
- [Exploiting a GOT overwrite](https://ir0nstone.gitbook.io/notes/binexp/stack/got-overwrite/exploiting-a-got-overwrite.md)
- [RELRO](https://ir0nstone.gitbook.io/notes/binexp/stack/relro.md): Relocation Read-Only
- [Reliable Shellcode](https://ir0nstone.gitbook.io/notes/binexp/stack/reliable-shellcode.md): Shellcode, but without the guesswork
- [ROP and Shellcode](https://ir0nstone.gitbook.io/notes/binexp/stack/reliable-shellcode/rop-and-shellcode.md)
- [Using RSP](https://ir0nstone.gitbook.io/notes/binexp/stack/reliable-shellcode/using-rsp.md)
- [ret2reg](https://ir0nstone.gitbook.io/notes/binexp/stack/reliable-shellcode/ret2reg.md): Using Registers to bypass ASLR
- [Using ret2reg](https://ir0nstone.gitbook.io/notes/binexp/stack/reliable-shellcode/ret2reg/using-ret2reg.md)
- [One Gadgets and Malloc Hook](https://ir0nstone.gitbook.io/notes/binexp/stack/one-gadgets-and-malloc-hook.md): Quick shells and pointers
- [Syscalls](https://ir0nstone.gitbook.io/notes/binexp/stack/syscalls.md): Interfacing directly with the kernel
- [Exploitation with Syscalls](https://ir0nstone.gitbook.io/notes/binexp/stack/syscalls/exploitation-with-syscalls.md)
- [Sigreturn-Oriented Programming (SROP)](https://ir0nstone.gitbook.io/notes/binexp/stack/syscalls/sigreturn-oriented-programming-srop.md): Controlling all registers at once
- [Using SROP](https://ir0nstone.gitbook.io/notes/binexp/stack/syscalls/sigreturn-oriented-programming-srop/using-srop.md)
- [ret2dlresolve](https://ir0nstone.gitbook.io/notes/binexp/stack/ret2dlresolve.md): Resolving our own libc functions
- [Exploitation](https://ir0nstone.gitbook.io/notes/binexp/stack/ret2dlresolve/exploitation.md)
- [ret2csu](https://ir0nstone.gitbook.io/notes/binexp/stack/ret2csu.md): Controlling registers when gadgets are lacking
- [Exploitation](https://ir0nstone.gitbook.io/notes/binexp/stack/ret2csu/exploitation.md)
- [CSU Hardening](https://ir0nstone.gitbook.io/notes/binexp/stack/ret2csu/csu-hardening.md)
- [Exploiting over Sockets](https://ir0nstone.gitbook.io/notes/binexp/stack/exploiting-over-sockets.md): File Descriptors and Sockets
- [Exploit](https://ir0nstone.gitbook.io/notes/binexp/stack/exploiting-over-sockets/exploit.md): Duplicating the Descriptors
- [Socat](https://ir0nstone.gitbook.io/notes/binexp/stack/exploiting-over-sockets/socat.md): More on socat
- [Forking Processes](https://ir0nstone.gitbook.io/notes/binexp/stack/forking-processes.md): Flaws with fork()
- [Stack Pivoting](https://ir0nstone.gitbook.io/notes/binexp/stack/stack-pivoting.md): Lack of space for ROP
- [Exploitation](https://ir0nstone.gitbook.io/notes/binexp/stack/stack-pivoting/exploitation.md): Stack Pivoting
- [pop rsp](https://ir0nstone.gitbook.io/notes/binexp/stack/stack-pivoting/exploitation/pop-rsp.md): Using a pop rsp gadget to stack pivot
- [leave](https://ir0nstone.gitbook.io/notes/binexp/stack/stack-pivoting/exploitation/leave.md): Using leave; ret to stack pivot
- [Pointer Authentication](https://ir0nstone.gitbook.io/notes/binexp/stack/pointer-authentication.md): An Arm hardware protection to combat ROP
- [Memory Tagging Extension (MTE)](https://ir0nstone.gitbook.io/notes/binexp/stack/memory-tagging-extension-mte.md): Arm's MTE Hardware Protection
- [Memory Integrity Enforcement](https://ir0nstone.gitbook.io/notes/binexp/stack/memory-integrity-enforcement.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ir0nstone.gitbook.io/notes/binexp/stack.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
