Skip to content

Instantly share code, notes, and snippets.

@icchy
icchy / exploit.py
Created April 28, 2017 04:06
HITCON CTF 2014 stkof
#!/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 April 13, 2017 08:32
angr launcher for Docker
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 March 5, 2017 16:08
Pragyan CTF Binary Exploitation 150
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 October 3, 2016 07:39
SECCON 大阪大会 2016 backdoor(easy)
from pwn import *
import hashlib
import commands
import re
def submit(flag):
import commands
import random
@icchy
icchy / .zshfunc
Last active May 2, 2018 20:15
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 July 20, 2016 04:36
katagaitai #5 関東med crypt.3 parlor
#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 July 18, 2016 14:43
katagaitai #5 関東med crypt.1 hashme
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 17:32
セキュリティ・キャンプ2016 選択課題4
PASS
PASS
PASS
PASS
PASS
PASS
PASS
PASS
PASS
REJECTED
@icchy
icchy / .zshfunc
Created April 9, 2016 14:49
like vagrant
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"