Skip to content

Instantly share code, notes, and snippets.

@icchy
icchy / exploit.py
Created Apr 28, 2017
HITCON CTF 2014 stkof
View exploit.py
#!/usr/bin/env python
from pwn import *
context(os='linux', arch='amd64')
context.log_level = 'debug' # output verbose log
RHOST = "127.0.0.1"
RPORT = 10080
LHOST = "127.0.0.1"
LPORT = 10080
@icchy
icchy / run_angr.sh
Created Apr 13, 2017
angr launcher for Docker
View run_angr.sh
function run_angr() {
if [ $# -gt 0 ]; then
WRAPPER=$(basename `mktemp`)
cat << EOF > $WRAPPER
#!/bin/sh
. ~/.virtualenvs/angr/bin/activate
rm -f \$0
\$@
EOF
chmod +x $WRAPPER
@icchy
icchy / solve.py
Created Mar 5, 2017
Pragyan CTF Binary Exploitation 150
View solve.py
from unicorn import *
from unicorn.x86_const import *
from capstone import *
from capstone.x86_const import *
flag = ""
rax_flag = False
def hook(uc, address, size, userdata):
cs = Cs(CS_ARCH_X86, CS_MODE_64)
@icchy
icchy / solve_10000.py
Created Oct 3, 2016
SECCON 大阪大会 2016 backdoor(easy)
View solve_10000.py
from pwn import *
import hashlib
import commands
import re
def submit(flag):
import commands
import random
View .zshfunc
function prezto-update() {
olddir=`pwd`
cd ~/.zprezto && git pull && git submodule update --init --recursive
cd $olddir
}
function swap() {
mv $1 .$1.myswp
mv $2 $1
mv .$1.myswp $2
@icchy
icchy / attack.cpp
Created Jul 20, 2016
katagaitai #5 関東med crypt.3 parlor
View attack.cpp
#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cstring>
#include <cassert>
#include <vector>
#include <thread>
#include <mutex>
#include "md5.cpp"
@icchy
icchy / solve.py
Created Jul 18, 2016
katagaitai #5 関東med crypt.1 hashme
View solve.py
from math import sin
from urlparse import parse_qs
from base64 import b64encode
from base64 import b64decode
from re import match
from pwn import remote, context
# context.log_level = 'debug'
USER = 'icchy'
@icchy
icchy / result
Last active May 30, 2016
セキュリティ・キャンプ2016 選択課題4
View result
PASS
PASS
PASS
PASS
PASS
PASS
PASS
PASS
PASS
REJECTED
@icchy
icchy / .zshfunc
Created Apr 9, 2016
like vagrant
View .zshfunc
function vm_debian() {
case "$1" in
start)
/usr/local/bin/VBoxManage startvm "debian" --type headless
;;
stop|poweroff)
/usr/local/bin/VBoxManage controlvm "debian" acpipowerbutton
;;
status)
/usr/local/bin/VBoxManage showvminfo "debian" | grep "State"