/bin/shを起動するシェルコード(x86) その3

更にバイト数を削れたのでメモ。と思ったけど、eaxへの代入にバイト数を割いていて、今回も21bytesだった。 今回は文字列の終端に0x00が必要だったので、//shではなく/shになっている。 # objdump -d -Mintel c.out | grep -A6 \<main\> 080483ed <main>: 80483ed: 31 c9 </main></main\>…

/bin/shを起動するシェルコード(x86) その2

前回よりもシェルコードを短くできたのでメモ。 前回は23bytes、今回は21bytes。 # objdump -d -Mintel b.out | grep -A8 \<main\> 080483ed <main>: 80483ed: 31 c0 xor eax,eax 80483ef: 50 push eax 80483f0: 89 e1 mov ecx,esp 80483f2: 68 2f 2f 73 68 push 0x68732f</main></main\>…

/bin/shを起動するシェルコード(x86)

単純なオーバフローを起こすと解けるpwnは解けるようになってきた。 ただ、shellcodeが必要な問題だと、shellcodeをどこからか持ってこないといけない。 それだと応用が効かないので、shellcodeを作れるようになりたいと思う。 そのためにまずは、shellcode…

PicoCTF2013 Overflow4 Writeup

今回は一応できたけど、非常にもやもやしたまま。すっきりしない。 問題編 問題文 Category: Binary Exploitation Points: 150 Description: Stack overflows are the most basic binary exploitation technique, but they take a lot of skill to master. I…

PicoCTF2013 Overflow3 Writeup

問題編 問題文 Category: Binary Exploitation Points: 120 Description: Stack overflows are the most basic binary exploitation technique, but they take a lot of skill to master. If you already know some C, these problems can help acquaint you…

PicoCTF2013 Overflow2 Writeup

問題編 問題文 Category: Binary Exploitation Points: 100 Description: Stack overflows are the most basic binary exploitation technique, but they take a lot of skill to master. If you already know some C, these problems can help acquaint you…

PicoCTF2013 Overflow1 Writeup

ROP3が難しすぎるので、Overflow1を先に解くことに。 問題編 問題文 Category: Binary Exploitation Points: 90 Description: Stack overflows are the most basic binary exploitation technique, but they take a lot of skill to master. If you already …

PicoCTF2013 ROP2 Writeup

前回に引き続き、PicoCTF2013の問題。今回はROP2。 問題編 今回もソースコード付きの問題。 前回と比べて差分もちょっとだけで、system関数を使っているところは同じだが、/bin/bash文字列が別の場所に定義されている。 # diff -b ../ROP1/rop1.c rop2-20f65…

PicoCTF2013 ROP1 Writeup

CTFに参加しても全然解けないので、難易度低めの過去問を解いていこうと思う。 特にPwnやRevが解けるようになりたい!! まずはPicoCTFの問題からやっていきます。 今回は2013年のROP1。 問題編 珍しく問題文が充実してる。 Category: Binary Exploitation P…