Skip to content

whoismissing/captured-flags

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

captured-flags

My solutions and notes for CTFs that I've played. This is a way for me to document my learning and techniques used. For all of the successful solves here, there are many more challenges for which I failed and learned from.

This repository's organization is inspired from https://github.com/guyinatuxedo/ctf

Binary Exploitation (pwn)

ROP Chain

Return 2 system

Sigreturn Oriented Programming (SROP)

  • x64: 2019/csawquals19/pwn/small_boi Static binary containing sigreturn gadget, buffer overflow to sigreturn and load necessary registers to make the syscall execve("/bin/sh", 0, 0)

Format String

  • x32: 2019/redpwnctf19/pwn/rot26 Classic format string exploit, got overwrite of exit with function that calls system
  • x32: 2019/tuctf19/pwn/vulnmath Format string exploit, user input can be passed 5 times, so leak puts got_plt then overwrite free got_plt with system libc address with the remaining loops in four writes
  • x32: 2019/tuctf19/pwn/printfun Format string exploit, overwrite the same value to two buffers so strcmp(buf1, buf2) will return true
  • x64: 2020/bytebandits20/pwn/fmt-me Format string bug in snprintf(). Overwrite system got.plt with main to loop, trigger the bug again to overwrite atoi got.plt with the address to system plt

Stack Buffer Overflow

  • x32: 2019/tuctf19/pwn/3step Stack buffer overflow to execute shellcode among two buffers jumping from stack to heap
  • x32: 2019/tuctf19/pwn/pancakes Stack buffer overflow to call puts() to leak a password in data section
  • x32: 2019/tuctf19/pwn/leakalicious Leak puts libc address, then use libc.blukat.me libc database to identify libc version. Stack buffer overflow and ROP to one_gadget
  • x64: 2020/redpwn20/pwn/skywriting/skywriting_solve.py Infinite loop and stack buffer overflow. We use this to systematically leak rbp, stack canary, and a libc address. Then we buffer overflow and trigger a ret to ROP to one_gadget.

Shellcode

  • x64: 2020/googlectf20/sandbox/writeonly/writeonly_solve.py Seccomp rules disable read syscall. The program forks, provides the child pid, the child reads the flag, the parent adds the seccomp rules and executes shellcode. We write shellcode to open(/proc/child_pid/mem), lseek(), and write() to the code section of the child in order to patch the child process to print the flag.

Reverse Engineering (RE)

Crackmes

Web

Code review

About

My solutions and notes for CTFs that I've played

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published