Skip to content

Instantly share code, notes, and snippets.

View famasoon's full-sized avatar
🎯
Focusing

Ryota Sakai famasoon

🎯
Focusing
View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char *argv[]){
char name[10];
if(argc != 2){
printf("Usage: %s name\n", argv[0]);
exit(1);
@famasoon
famasoon / block_incoming.py
Last active April 3, 2016 16:49
require tweepy
# -*- coding: utf-8 -*-
import tweepy
consumer_key = '' #set consumer key
consumer_secret = '' #set consumer secret
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth_url = auth.get_authorization_url()
print 'Please authorize: ' + auth_url
verifier = raw_input('PIN: ').strip()

Keybase proof

I hereby claim:

  • I am famasoon on github.
  • I am famasoon (https://keybase.io/famasoon) on keybase.
  • I have a public key whose fingerprint is E7DD 8EF6 3A99 3488 0ECB DE82 0893 BF7E 6E4F B638

To claim this, I am signing this object:

MBE Lecture 01

MBE のLecture 01についてメモ

用語

  • Machine コンピュータ、サーバ、CPUを搭載したもの 以下"マシン"

  • Binary EXE, ELF, MachO等といったマシン上で実行可能なコードを含んだもの

@famasoon
famasoon / exploit.py
Created October 16, 2016 07:20
ropasaurusrex writeup (local version)
from pwn import process
import struct
from subprocess import PIPE, Popen
def p(a):
return struct.pack('<I', a)
def u(a):
return struct.unpack("<I",a)[0]
syntax enable
set t_Co=256
set number
set nowritebackup
set nobackup
set noswapfile
set matchpairs& matchpairs+=<:>
set showmatch " 対応する括弧などをハイライト表示する
set matchtime=3
set ignorecase " 大文字小文字を区別しない

Exploitation 1 - CSAW 2013 Qualification Round

問題

問題ファイルはここにある。 2つファイルが用意されている。 見た感じバイナリと、それのソースコードの一部。

    $ file exploit1
    exploit1: ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=c7646dc29ce50cfdf6d7acaf5e8ebfc88401b7e1, not stripped

Exploitation 2 - CSAW 2013 Qualification Round

問題

問題ファイルはここ。 今回はソースコードはなくバイナリだけ。

$ file exploit2 
exploit2: ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=94f196c7d8ce45ecf9943690ed4e193c9d13b906, not stripped
import struct
p32 = lambda x: struct.pack('<I', x)
gadget = lambda x: p32(libc_base + x)

Exploitation 3 (CSAW-Diary-300) - CSAW 2013 Qualification Round

問題ファイルはここ。 今回もバイナリだけ。

$ file fil_chal 
fil_chal: ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=e6e7d1f8a7d1b6fea2e862816b795ac1410fa3af, stripped