Skip to content

Instantly share code, notes, and snippets.

@hhc0null
hhc0null / qoobee.c
Last active August 29, 2015 14:17
[Memo] BCTF2015-qoobee-Exploit500
int sub_400d5d(arg0)
{
rbp_18h = arg0;
rbp_08h = rbp_18h ^ 0xdead;
return rbp_08h;
}
void sub_400d79()
{
// Local variables.
@hhc0null
hhc0null / decompiled.c
Created March 18, 2015 06:43
B-sides 2015 SB340 Baby Playpen Fence
int main()
{
// Local variables.
int rsp_04h;
setvbuf(stdin, 0, 2); // maybe
setvbuf(stdout, 0, 2); // maybe
puts("\n ______\n | |__| | WELCOME TO THE\n | () | UNTRUSTED COMPUTING SERVICE\n |______| V0.0.1a\n\nLOAD PROGRAM");
@hhc0null
hhc0null / exploit.py
Last active August 29, 2015 14:17
B-sides 2015 Own200 www
#!/usr/bin/env python2
import binascii
import re
import socket
import struct
import sys
import telnetlib
import time
@hhc0null
hhc0null / gm.c
Created March 17, 2015 14:10
B-sides 2015 Own350 Glorious Modern memo
// checked
void sub_400976(arg0)
{
// Local variables.
rbp_28h;
rbp_10h;
rbp_08h;
rbp_28h = arg0;
rbp_10h = 0;
@hhc0null
hhc0null / CODEGATE2015-systemshock-200pts
Last active August 29, 2015 14:17
!!THIS IS NOT A WRITEUP!! CODEGATE 2015 [PWN200] systemshock
// DEP, ASLR, SSP
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#define not(x) (!(x))
extern char **environ;
@hhc0null
hhc0null / gizmo.py
Created March 9, 2015 18:15
my gadget searcher.
#!/usr/bin/env python2
"""Usage:
gizmo.py [-h] [-o NAME] [-r NUMBER] PATH
gizmo.py --version
Arguments:
PATH source path
Options:
@hhc0null
hhc0null / decompiled.c
Created March 4, 2015 08:27
CODEGATE 2014 [PWN250] Angry Doraemon
int data_804b078 = 100; // Doraemon HP
int bss_804b080; // fd
char bss_804b0a0[5000]; // buffer
// error message.
void sub_804889d(char *arg0)
{
fprintf(bss_804b080, "%s\n", arg0);
exit(EXIT_FAILURE);
}
@hhc0null
hhc0null / kendall.c
Last active August 29, 2015 14:16
BkpCTF 2015 Kendall
// .data section
char data_602800[] = "192.168.000.100";
char data_602810[] = "192.168.000.200";
char data_602820[] = "255.255.255.000";
char data_602830[] = "8.8.8.8";
// .bss section
char bss_602880[128]; // buffer
bool bss_602900; // flag: is_not_authenticated
int bss_602904; // sockfd
@hhc0null
hhc0null / ezhp.c
Created January 1, 2015 15:54
a dirty decompiled code of ezhp(Plaid CTF 2014 Pwnbale 200pts)
/* I might me making some mistakes... */
#define NONUSE 0xfffffffe
#define INUSE 1
typedef struct _chunk {
int size;
chunk_t *next;
chunk_t *back;
} chunk_t;
@hhc0null
hhc0null / yabai.dump
Created December 31, 2014 19:39
ヤバい
int sub_8049110()
{
8049110: 5d pop %ebp // return address: 0x8048f06
8049111: 8b 45 00 mov 0x0(%ebp),%eax // eax = 0xfffffff
8049114: 83 e0 03 and $0x3,%eax
*ebp &= 3;
8049117: 83 f8 03 cmp $0x3,%eax
804911a: 75 42 jne 804915e <exit@plt+0xb8e>
if(*ebp == 3) {
804911c: 6a 00 push $0x0