Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
#
# ASIS CTF 2016
# feap
#
# @_hugsy_
#
# $ ./gef-exploit.py (13:55)
# [+] Connected to feap.asis-ctf.ir:7331
# [+] Leaking addresses
@st98
st98 / pwn.py
Last active March 13, 2021 06:07
angstromCTF 2016 - [binary 160] rop2libc
import struct
from subprocess import *
def p64(x):
return struct.pack('<Q', x)
def u64(x):
return struct.unpack('<Q', x)[0]
def read_until(f, s):
@staaldraad
staaldraad / x11.py
Last active August 28, 2022 05:09
Python script to do keystrokes via X11 abstract socket. Useful for silly docker breakout.
#!/usr/bin/python
"""
Python script to connect to an abstract unix socket created by X11 and send arbitrary key-strokes.
Created by: [email protected]
Credits to: https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/unix/x11/x11_keyboard_exec.rb
Borrowed heavily from the original metasploit module. Thanks!
"""
from socket import *
import subprocess
@LiveOverflow
LiveOverflow / cookbook.py
Last active June 6, 2022 11:54
Exploit for cookbook challenge from Boston Keyparty CTF 2016
import struct
import sys
import subprocess
import socket
import telnetlib
import ctypes
"""
Cookbook - 6 - 0 solves : pwn: a top chef wrote this cookbook for me but i think he has an extra secret recipe!
https://s3.amazonaws.com/bostonkeyparty/2016/58056c425dc617b65f94a8b558a4699fedf4a9fb.tgz
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
(define hash-table-preparation-interface
(interface ()
hash-table:get-size
in-cicada-key->key
create-in-cicada-key
key->finite-sum
key-equal?
hash))
@staaldraad
staaldraad / huaweiDecrypt.py
Created March 11, 2015 13:19
Decrypt Huawei router/firewall passwords. Huawei stores passwords using DES encryption when the crypted option is enabled.
#!/usr/bin/python
"""
Simple tool to extract local users and passwords from most Huawei routers/firewalls config files.
Will extract plain-text passwords and crypted credentials. Huawei config files use DES encryption with
a known key. Using this information, the script will decrypt credentials found in the config file.
Author: Etienne Stalmans ([email protected])
Version: 1.0 (12/01/2014)
"""
from Crypto.Cipher import DES
@Zulko
Zulko / rapunzel_moviepy.py
Last active July 25, 2025 11:24
Tangled + MoviePy
"""
This creates the following GIF, where the text appears to be "embedded"
in the video and "disappears" behind rapunzel.
http://i.imgur.com/gxEHfLX.gif
"""
from moviepy.editor import *
import numpy as np
import skimage.morphology as skm
@secretsquirrel
secretsquirrel / osx_infector.py
Last active March 31, 2021 19:33
From Shmoocon infection demo
import os
import struct
import shutil
import subprocess
class macho_intel32_shellcode():
"""
Mach-O Intel x32 shellcode class
"""
@st98
st98 / memo.md
Last active June 4, 2022 04:37
Advent Calendar CTF 2014 の write-up。ブログに移動しました -> https://st98.github.io/diary/posts/2014-12-26-adctf.html

Advent Calendar CTF 2014

ぼっチーム omakase として参加した。最終的に獲得できたポイントは 173 点でチーム順位は 24 位 (505 チーム中) だった。
1 ~ 14 日目、21 ~ 22 日目、25 日目の問題を解いた。

1 日目 warmup (misc)

'0x41444354465f57334c43304d335f37305f414443374632303134'.match(/[0-9a-f]{2}/g).map(function(c){return String.fromCharCode(parseInt(c, 16))}).join('');
flag: ADCTF_W3LC0M3_70_ADC7F2014