Skip to content

Instantly share code, notes, and snippets.

@hhc0null
hhc0null / ropasaurusrex_exploit.py
Created September 7, 2015 09:47
ropasaurusrex
#!/usr/bin/env python2
import binascii
import re
import socket
import struct
import subprocess
import sys
import telnetlib
import time
@hhc0null
hhc0null / exploit_template.py
Created September 15, 2015 14:45
a exploit template for myself.
#!/usr/bin/env python2
import binascii
import collections
import hashlib
import itertools
import numpy
import re
import shlex
import socket
@hhc0null
hhc0null / test.md
Last active October 10, 2015 05:17

test

vvv here is objdumpped text.

 804848b:	8d 4c 24 04          	lea    0x4(%esp),%ecx
 804848f:	83 e4 f0             	and    $0xfffffff0,%esp
 8048492:	ff 71 fc             	pushl  -0x4(%ecx)
 8048495:	55                   	push   %ebp
 8048496:	89 e5                	mov    %esp,%ebp
 8048498:	51                   	push   %ecx
 8048499:	83 ec 24 sub $0x24,%esp
@hhc0null
hhc0null / rev100.md
Last active May 26, 2017 16:00
A Writeup for rev100 on "#04 Hokkaido CTF 勉強会"(http://doctf.connpass.com/event/20842/)

rev100のwriteup

Author: hhc0null
 本文は#04 Hokkaido CTF 勉強会で出されたrev100のwriteupである.

概要

 最適化のかかっていない標準的なELF x86のバイナリを解析するという問題. この問題は主に以下のようなことを行っている.

  • 前処理
     主に, flagとなる文字列が判別できないようなバイト列を生成する.
@hhc0null
hhc0null / rev200.md
Created October 10, 2015 06:47
A Writeup for rev200 on "#04 Hokkaido CTF 勉強会"(http://doctf.connpass.com/event/20842/)

rev200のwriteup

Author: hhc0null
 本文は#04 Hokkaido CTF 勉強会で出されたrev200のwriteupである.

概要

 最適化はかかっていないが, stripコマンドによりシンボル情報が欠除したELF x86のバイナリを解析するという問題. この問題は主に以下のようなことを行っている.

** // TODO **

@hhc0null
hhc0null / baremetal_writeup.md
Created December 3, 2015 16:46
A writeup for "SIGINT CTF 2013 pwnable100 baremetal"

A writeup for "SIGINT CTF 2013 pwnable100 baremetal"

これはCTF Advent Calendar 2015の3日目の記事です. 簡単な説明で終わってしまってるのでそのうち追記するかもです.

SIGINT CTF 2013 pwnable100 baremetal

Okay, okay. It's not baremetal...

Running on: 188.40.147.100 1024 2b2ec84ea812c9730a244b44a2549fcb

 問題ファイルはここにあります -> 2b2ec84ea812c9730a244b44a2549fcb

#include <time.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#define TIME_PREFIX_SIZE 8 // "YYYYmmdd"
int main()
{
struct tm *current_tm;
@hhc0null
hhc0null / seeing-the-behavior-by-ltrace
Last active March 10, 2016 03:26
some study of heap exploitation
(12:23) hhc0null@arch_on_vbox% ltrace -s 512 -e "[email protected].*" ./freenote [~/ctf] [8296]
freenote->malloc(6160) = 0x17d0010
== 0ops Free Note ==
1. List Note
2. New Note
3. Edit Note
4. Delete Note
5. Exit
====================
Your choice: freenote->read(02
@hhc0null
hhc0null / 0ctfq.md
Last active March 16, 2016 16:29
I didn't submit any flags on this contest:P

A writeup(?) for 0CTF 2016 Quals

trace (rev 4pts)

First, I sorted the log file by a snippet shown below to analyze its behaviour.
After that I noticed that it showed a process of quick-sorting some characters('a'-'z'|'A'-'Z'|'0'-'9'|flag).

#!/usr/bin/env python2

import collections