[Hack.lu CTF 2012] #12 Donn Beach - 500
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i. identify the version | |
ii. pwn it! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
from pwning import * | |
import sys | |
if len(sys.argv) != 2: | |
print "Usage: {} [align]".format(sys.argv[0]) | |
rhp = ("pwnable.katsudon.org", 32100) | |
#rhp = ("localhost", 32100) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" vim: set fdm=marker commentstring=: | |
" neobundle {{{ | |
set nocompatible | |
filetype off | |
if has('vim_starting') | |
set runtimepath+=~/.vim/bundle/neobundle.vim | |
call neobundle#begin(expand('~/.vim/bundle/')) | |
endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int table[255] = {0}; | |
int mark = 0xdeadbeef; | |
int index = 0; | |
void generate_table() | |
{ | |
for(index; index < 0xff; index++) { | |
if(table[index] == 0) { | |
table[index] = mark; | |
} else if((index+1)&2) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# too sleepy.....it's kimoi. | |
# N = p*q | |
# C = M*(M+B) mod N | |
import binascii | |
import itertools | |
import string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int filter(int size, char *shellcode) | |
{ | |
int b1; // -0x10(%ebp) | |
int b2; // -0x14(%ebp) | |
int x; // -0xc(%ebp) | |
int y; // -0x8(%ebp) | |
int i; // -0x4(%ebp) | |
for(int i = 0; i < size; i+=2) { | |
b1 = (unsigned int)shellcode[i]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rp is verbose:( don't you think so? | |
rp -f [filename] -r 4|sed -r -e 's/\x1b\[[0-9]*m//g' -e 's/\(.*found\)//g'|grep -e 'ret[[:space:]]*;[[:space:]]*' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it's necessary to do `export JAVA_HOME=/usr/lib/jvm/<jvm-directory>'. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
デフォルトで26.85に設定している. | |
_is_thermistor_adc_readyは1秒おきにtrueになる.(1秒おきに温度を取得して表示) | |
それ以外の間はずっと前回取得した値を表示する. | |
--- | |
なぜか、26.85が表示されて、現在の値が表示されて、26.85が表示されて、現在の値が表示されて。。。という繰り返し | |
*/ | |
void ControlRoutine(void) | |
{ |