Skip to content

Instantly share code, notes, and snippets.

@hama7230
hama7230 / exp.py
Created June 2, 2019 18:54
Baidu CTF 2019 echos
#!/usr/bin/env python
from pwn import *
context(terminal=['tmux', 'splitw', '-h']) # horizontal split window
# libc = ELF('')
elf = ELF('./echos')
context(os='linux', arch=elf.arch)
#context(log_level='debug') # output verbose log
@hama7230
hama7230 / exp.c
Created May 24, 2019 08:04
Security Fest CTF 2019 Brainfuck64
#define O_RDONLY 0
#define O_RDWR 00000002
int read(int fd, char* buf, int len) {
__asm__("mov rax, 0");
__asm__("syscall");
}
int write(int fd, char* buf, int len) {
@hama7230
hama7230 / exp.py
Created May 20, 2019 05:14
RCTF 2019 ManyNotes
#!/usr/bin/env python
from pwn import *
context(terminal=['tmux', 'splitw', '-h']) # horizontal split window
# context(terminal=['tmux', 'new-window']) # open new window
# libc = ELF('./libc.so.6')
elf = ELF('./many_notes')
context(os='linux', arch=elf.arch)
# context(log_level='debug') # output verbose log
@hama7230
hama7230 / exp.py
Created May 20, 2019 05:12
RCTF 2019 syscall_interface
#!/usr/bin/env python
from pwn import *
context(terminal=['tmux', 'splitw', '-h']) # horizontal split window
# context(terminal=['tmux', 'new-window']) # open new window
# libc = ELF('')
elf = ELF('./syscall_interface')
context(os='linux', arch=elf.arch)
#context(log_level='debug') # output verbose log
@hama7230
hama7230 / exp.py
Created May 20, 2019 05:11
RCTF 2019 babyheap
#!/usr/bin/env python
from pwn import *
context(terminal=['tmux', 'splitw', '-h']) # horizontal split window
libc = ELF('./libc-2.23.so')
elf = ELF('./babyheap')
context(os='linux', arch=elf.arch)
#context(log_level='debug') # output verbose log
@hama7230
hama7230 / exp.py
Created May 13, 2019 02:29
DEF CON CTF Qualifier 2019 speedrun-012
#!/usr/bin/env python
from pwn import *
context(terminal=['tmux', 'splitw', '-h']) # horizontal split window
# context(terminal=['tmux', 'new-window']) # open new window
# libc = ELF('')
elf = ELF('./speedrun-012')
context(os='linux', arch=elf.arch)
context(log_level='debug') # output verbose log
@hama7230
hama7230 / exp.py
Last active May 5, 2019 10:05
TSG CTF Capacity Oriented Vector
#!/usr/bin/env python
from pwn import *
context(terminal=['tmux', 'splitw', '-h']) # horizontal split window
# context(terminal=['tmux', 'new-window']) # open new window
# libc = ELF('')
elf = ELF('./vector')
context(os='linux', arch=elf.arch)
#context(log_level='debug') # output verbose log
@hama7230
hama7230 / exp.py
Created May 5, 2019 10:04
TSG CTF Super Smash Bros
#!/usr/bin/env python
from pwn import *
context(terminal=['tmux', 'splitw', '-h']) # horizontal split window
# context(terminal=['tmux', 'new-window']) # open new window
# libc = ELF('./libc-2.27.so')
elf = ELF('./ssb')
context(os='linux', arch=elf.arch)
#context(log_level='debug') # output verbose log
@hama7230
hama7230 / exp.py
Created May 5, 2019 10:03
TSG CTF Odd Multiplier
#!/usr/bin/env python
from pwn import *
context(terminal=['tmux', 'splitw', '-h']) # horizontal split window
# context(terminal=['tmux', 'new-window']) # open new window
# libc = ELF('')
elf = ELF('./multiplier')
context(os='linux', arch=elf.arch)
# context(log_level='debug') # output verbose log
@hama7230
hama7230 / exp.c
Created April 30, 2019 21:57
*CTF 2019 hackme
#define PROT_READ 0x1 /* Page can be read. */
#define PROT_WRITE 0x2 /* Page can be written. */
#define MAP_PRIVATE 0x02 /* Changes are private. */
#define MAP_ANONYMOUS 0x20 /* Don't use a file. */
#define MAP_POPULATE 0x8000
#define MAP_FIXED 0x10
#define MAP_GROWSDOWN 0x0100
#define O_RDWR 2
#define O_NOCTTY 00000400
#define O_RDONLY 00000000