Chapter 6 - Exploit Development

Security risks at the application level are among the most significant, pervasive categories of security problems impacting organizations today. But traditional IT security focuses on network and perimeter-based protection, not on the application code itself.And while most development teams test their applications for functionality, performance, and integration, the lack of security testing early in the development process can have serious consequences. Failure to address security throughout the application lifecycle can result in embarrassment—or catastrophic damages like the loss of intellectual property, money, or data.

Buffer Overflow Attacks: Detect, Exploit, Prevent, page 403

Resources

Understanding programs in memory

Anatomy of a program in memoryarrow-up-right

Journey to the stackarrow-up-right

Epilogue: Canaries and Buffer Overflowsarrow-up-right

Intro to Assembly

Writing ARM Assembly Part 1arrow-up-right

Assembly - SkullSecurityarrow-up-right

x86 Assembly Crash Coursearrow-up-right

Assembly Language MegaPrimer for Linuxarrow-up-right

Intro to Buffer Overflows

Intro to Buffer Overflows - Computerphilearrow-up-right

Getting cozy with Exploit Developmentarrow-up-right

Courses

Course materials for Modern Binary Exploitation by RPISECarrow-up-right

Resources

From Buffer Overflows to “Weird Machines” and Theory of Computationarrow-up-right

Breaking the x86 Instruction Setarrow-up-right

LiveOverflow's YouTube Channelarrow-up-right

radare2 as an alternative to gdb-pedaarrow-up-right

Trampolines in x64arrow-up-right

Exploit Mitigation Kill Chainarrow-up-right

Stack Smashing Protectorarrow-up-right

Unusual Bugsarrow-up-right

Exploit tips & techniquesarrow-up-right

Differential Slicing: Identifying Casual Execution Differencesarrow-up-right

Shellcoding for Linux & Windows Tutorialarrow-up-right

Writing Shellcode by Handarrow-up-right

Understanding JIT Sprayingarrow-up-right

Interpreter Exploitation: Pointer inference and JIT sprayingarrow-up-right

Writing JIT-Spray Shellcode for fun and profitarrow-up-right

Bypassing memory protections: the future of exploitationarrow-up-right

Intel

Registers

Instructions

Buffer Overflows

Setup & Information

Check ASLR/DEP

Linux

Windows

PowerSploitarrow-up-right

Disable/Enable ASLR/DEP

Linux

Windows

The Enhanced Mitigation Experience Toolkitarrow-up-right

Disable ASLRarrow-up-right

See what shared libs a program uses

Linux

Find hex addresses of functions/libs within a program

Linux

Attack Vectors

Integer-based

Socket Programming in Python and Integer Overflowarrow-up-right

Stack-based

Overflow input to overwrite EIP with return address that leads to payload

Intro to Buffer Overflows - ch3rn0bylarrow-up-right

Beginning Stack Based Buffer Overflows - The Grey Cornerarrow-up-right

Exploit Writing Tutorial Part 1 Stack Based Overflowsarrow-up-right

Smash Stack Revivedarrow-up-right

Smashing the Stack for Fun & Profit : Revivedarrow-up-right

Are Buffer Overflows on a modern system impossible?arrow-up-right

Identifying another exploit mitigation and finding a bypassarrow-up-right

Brute-force 32bit stack cookiearrow-up-right

Exploiting SLMailarrow-up-right

Introduction to Exploit Development - FuzzySecurityarrow-up-right

Introduction to Linux Exploit Development - FuzzySecurityarrow-up-right

Windows Buffer Overflow Tutorial: Dealing with Character Translation - The Grey Cornerarrow-up-right

SEH-based

Overflow input to overwrite SEH -> next SEH -> Pop pop ret

SEH Stack based buffer overflows - The Grey Cornerarrow-up-right

Stacks & Handlers & Python, oh my! - ch3rn0bylarrow-up-right

Exploit Tutorial: Buffer Overflow – SEH Bypassarrow-up-right

Heap-based

Overflow input to overwrite heap with dummy data, 2nd chunk overwrite forward link with destination and backwards link with value

Heap Exploitationarrow-up-right

Heap Exploitation - GitHubarrow-up-right

Heap Spraying Exploit Tutorialarrow-up-right

Exploit Writing Tutorial Heap Spraying Demystified - corelanarrow-up-right

Walking the heap using pydbgarrow-up-right

Tracking down heap overflows with RRarrow-up-right

The Heap: What does malloc() do?arrow-up-right

The Heap: How to exploit a Heap Overflowarrow-up-right

how2heap - GitHubarrow-up-right

Heap Overflows for Humans 101arrow-up-right

Double-free

Memory freed twice. corrupts heap memory manager.

1) chunk must be isolated ( no freed adjacent chunks )

2) destination free list bin must be empty

Forward/Backward pointers both point to base of heap, and the heap points back to the node (self referential) infinite loop. (unlink fails)

deprecated but still works with some creativity

If heap falls into this state you may be able to use after free or another buffer overflow.

The Heap: How do use-after-free exploits work?arrow-up-right

The Heap: Once upon a free()arrow-up-right

The Heap: dlmalloc unlink() exploitarrow-up-right

Exploring pwnable with ltrace and gdbinit script - Exploitation part 1/2arrow-up-right

Use-after-free and overwrite entry in GOT - Exploitation part 2/2arrow-up-right

Memory Corruption

Using memory corruption to leak sensitive data Fuzz the inputs and observe all possible changes in the program Note any oddities and changes (Especially a dump of bytes! ;))

Blind Buffer Overflow exploitation to leak secret dataarrow-up-right

Return to libc

libc database - GitHubarrow-up-right

Return-to-libcarrow-up-right

Doing ret2libc with a Buffer Overflow because of restricted return pointerarrow-up-right

BUFFER OVERFLOW PRIMER PART 8 (RETURN TO LIBC THEORY)arrow-up-right

The Geometry of Innocent Flesh on the Bone: Return-into-libc without Function Calls (on the x86)arrow-up-right

Understanding glibc mallocarrow-up-right

Cheating the ELFarrow-up-right

PLT and GOT - the key to code sharing and dynamic librariesarrow-up-right

Bitflip

Rowhammer Attacks: An Extended Walkthrough Guidearrow-up-right

Exploiting the DRAM rowhammer bug to gain kernel privilegesarrow-up-right

flipfloyd - GitHubarrow-up-right

SIGRETURN Oriented Programming

Sigreturn Oriented Programming is a real Threatarrow-up-right

Jump Oriented Programming

Jump-Oriented Programming: A New Class of Code-Reuse Attackarrow-up-right

Return Oriented Programming

64-bit Linux Return-Oriented Programmingarrow-up-right

Return Oriented Exploitation (ROP)arrow-up-right

An introduction to the Return Oriented Programming and ROP chain generationarrow-up-right

Return-Oriented-Programming (ROP FTW)arrow-up-right

DEP & ROP: Modern Binary Exploitationarrow-up-right

ROP is Still Dangerous: Breaking Modern Defensesarrow-up-right

Return oriented programming - Wikipediaarrow-up-right

Introduction to return oriented programming (ROP)arrow-up-right

The need for a POP POP RET instruction sequencearrow-up-right

Intro to ROP: ROP Emporium — Splitarrow-up-right

ROP Emporiumarrow-up-right

OptiROP: hunting for ROP gadgets in stylearrow-up-right

Introduction to return oriented programming (ROP)arrow-up-right

SROP | Signals, you say?arrow-up-right

Return-Oriented Programming without Returnsarrow-up-right

Blind Return Oriented Programming (BROP)arrow-up-right

EggHunting

The art of searching memory

EggHunting Sorcery - ch3rn0bylarrow-up-right

Windows Buffer Overflow Tutorial: An Egghunter and a Conditional Jumparrow-up-right

HackSysTeam - EggHunterarrow-up-right

Security Mechanisms

Stack Canaries/Cookies

Buffer Overflow Protections (Canaries) - Wikipediaarrow-up-right

Mitigating Buffer Overflow Attacks with Stack Cookiesarrow-up-right

Exploit writing tutorial part 6 : Bypassing Stack Cookies, SafeSeh, SEHOP, HW DEP and ASLRarrow-up-right

Linux GLibC Stack Canary Valuesarrow-up-right

PLAYING WITH CANARIESarrow-up-right

NX/DEP

Executable Space Protection - Wikipediaarrow-up-right

Can MPROTECT set the stack itself as executable? - StackExchangearrow-up-right

ASLR

ASLR - Wikipediaarrow-up-right

Exploit Dev 101: Bypassing ASLR on Windowsarrow-up-right

Simple ASLR/NX bypass on a Linux 32 bit binary - Decoder's Blogarrow-up-right

Linux ASLR integer overflow: Reducing stack entropy by fourarrow-up-right

Bypassing ASLR by predicting a process’ randomizationarrow-up-right

Information Disclosure

Format Strings

Resources

Remote format string exploit in syslog()arrow-up-right

Format String to dump binary and gain RCEarrow-up-right

Format String Exploit and overwrite the Global Offset Tablearrow-up-right

Format string exploit on an arduinoarrow-up-right

A simple Format String exploit examplearrow-up-right

From Format String Vulnerability to Remote Code Executionarrow-up-right

Format String Exploitation-Tutorialarrow-up-right

Fun with Info-Leaksarrow-up-right

Deserialization

PHP

Resources

Exploiting PHP7 unserializearrow-up-right

Remote code execution via PHP [Unserialize]arrow-up-right

Java

Resources

2017 - Practical Serialization Attacks by Nicky Bloorarrow-up-right

nodejs

Resources

Exploiting Node.js deserialization bug for Remote Code Executionarrow-up-right

Last updated