본문 바로가기

wargame

[Toddler's Bottle] collision - 3PT 보호되어 있는 글입니다. 더보기
[Toddler's Bottle] fd - 1PT 보호되어 있는 글입니다. 더보기
http://www.pythonchallenge.com/pc/def/oxygen.html import re, Image i = Image.open("oxygen.png") row = [i.getpixel((x, 45)) for x in range(0, i.size[0], 7)] AS_list = [r for r, g, b, a in row if r == g == b] result = "".join(map(chr,AS_list)) print "".join(map(chr,map(int,re.findall("\d+",result)))) 더보기
http://www.pythonchallenge.com/pc/def/channel.html import re, zipfilezip = zipfile.ZipFile("C:\\Users\\sec\\Downloads\\channel.zip")result = ""file = "90052" result = "" while 1: text = zip.read(file+".txt") file = re.findall("Next nothing is (\d+)",text) #read the next file name if file : file = "".join(file) result+=zip.getinfo(file+".txt").comment #collect the comments else : #if contents are not "Next nothing..." print result exit(0) 더보기
http://www.pythonchallenge.com/pc/def/peak.html import pickle f = open("C:\\Users\\sec\\Downloads\\banner.p","rb") result = pickle.load(f) for lst in result: line = "" for tu_ch,tu_cnt in lst: line += tu_ch*tu_cnt print line f.close() 더보기
vortex7 Vortex Level 7 → Level 8Checksum FunThis level requires CRC_32(argv[1], strlen(argv[1])) to be 0xe1ca95ee. You might need to extract the crc tables from the program.Reading MaterialCRC and How to Reverse ItIncluded file: vortex7.cint main(int argc, char **argv) { char buf[58]; u_int32_t hi; if((hi = crc32(0, argv[1], strlen(argv[1]))) == 0xe1ca95ee) { strcpy(buf, argv[1]); } else { printf("0x%08.. 더보기
Easy_KeygenMe 키젠 문제이다.키젠 문제는 네임과 시리얼의 관계를 알아내는것이 목적이다. 문제파일에 Readme.txt 를 읽어보면 시리얼이 주어지고, 해당하는 이름을 맞추란다.네임이 주어지고 시리얼을 맞추는것이면 해당하는 네임을 넣고 트레이싱하면 쉽게 구할수있다.하지만 이건 역으로 구하는 것이기 때문에 키 생성 알고리즘을 찬찬히 봐야한다. 일단 ida로 보면 해당하는 문자열을 받고 그 문자열을 한글자씩 가져와서, 차례대로 0x10,0x20,0x30이랑 xor시켜서 키를 생성한다. 그 헥스값 그대로 sprintf해서 메모리에 쓴다음, 사용자가 입력한 키값과 일치하는지 비교한다. 그래서 역으로 다시 한글자씩 가져와 xor시키는 코드를 짜보았다. import string prob="5B134977135E7D13" def s.. 더보기
Easy_ELF 먼저 실행시켜보자.간단히 입력을 받고 틀렷다고 출력을 해주었다. strace에 붙여본결과 딱히 anti리버싱은 되어있지 않은거 같다. ida에 붙여보면, 처음 start에서 libc_start_main을 부른다. 이때 준 인자값으로 가면 main함수인것을 알 수 있다. 입력받는함수 에 바로 따라나오는 함수가 입력한 값을 비교해 정답과 오답을 가려주는 함수이며, 이 함수가 0을 리턴하면 오답, 1을 리턴하면 정답이다. 일단 처음 2번째글자가 1인지 비교하고, 그리고 바로 뒤에서 첫번째, 2번째, 3번째 글자를 xor한다음, 4 번째 글자가 'X'인지 확인한다. 그리고 그 아래에서 xor한후 값과 비교를 하는데, 이는 python으로 쉽게 원래 비교값을 찾아냇다. 그래서 나온글자를 조합해보면 L1NUX이다 더보기
vortex6 Vortex Level 6 → Level 7Generic Binary ExploitationYou must disassemble this level’s exploitable application in order to find the hole.Reading MaterialReconstructing Binaries to C For BeginnersReverse Engineering - Functions… functions! functions!? sheeshBinary downloadvortex6.bin 소스코드는 없고 파일만 있다.디버깅해서 취약점으로 exploit해야한다. ida로 attach시켜서 메인함수를 본 모습이다.끝에 printf가 보이는것으로 봐서 FSB를 사용해 exploit하면 될것같다. 하.. 더보기
vortex5 Vortex Level 5 → Level 6MD5 Brute ForceA password is required for the next level. vortex5.c and md5.h. a-z,A-Z,0-9 is the search space. The password length is 5 chars long, it was originally 7 chars long.Collision(s) tested : 489265082 in 217 second(s), 361 millisec, 101 microsec. Average of 2250932.1 hashes/sec. Included file: vortex5.c/* A tribute to arc :) */ /* ** SQLite uses this code for t.. 더보기