본문 바로가기

2014/049

[exploit-exercises] fusion level00 [ fusion level00 ] 1#include "../common/common.c" 2 3int fix_path(char *path) 4{ 5 char resolved[128]; 6 7 if(realpath(path, resolved) == NULL) return 1; // can't access path. will error trying to open 8 strcpy(path, resolved); 9} 10 11char *parse_http_request() 12{ 13 char buffer[1024]; 14 char *path; 15 char *q; 16 17 printf("[debug] buffer is at 0x%08x :-)\n", buffer); 18 19 if(read(0, buffer.. 2014. 4. 18.
SSL 연결 과정 잘 정리된 곳 링크 http://blog.naver.com/arternis74?Redirect=Log&logNo=150016954638 http://blog.daum.net/tlos6733/58 2014. 4. 16.
2014 codegate - autumata[400] http://ctfagain.kr/index.html 위 사이트에서 대회 문제 파일&환경을 제공해준다. [Binary & idb] 먼저 IDA로 첫 부분을 살펴 보면 다음과 같다. chksum[0] = 0; chksum[1] = 0; chksum[2] = 0; w_send(fd, "[=] Welcome to Automata System [=]\n\n"); w_send(fd, "[*] Enter your command: "); w_recv(fd, command); w_send(fd, "[*] Enter your code: "); w_recv(fd, code); makeChksum(command, chksum); chk3 = 0; chk2 = 0; chk1 = 0; for ( i = 0; i < ::chk1.. 2014. 4. 10.
문자열 디코딩 함수 반복 - immunity script 처음에는 pydbg로 만들다가 이뮤니티 스크립트로 바꿈 ... ( 혹시 몰라서 백업) [ 이뮤니티 스크립트 파일 ] [*] 이뮤니티 디버거의 PyCommands 경로에 넣어준다. [ 사용법 ] 1. 스크립트 실행- decoding 함수를 call하는 위치에서 "!loop"와 같이 스크립트를 실행한다.- unicode로 결과값을 얻으려는 경우에는 "!loop y'로 실행한다. 2. 인자값 세팅 - 이뮤니티 디버거 디렉토리의 argv.txt 파일에 저장한다.- 인자값은 ','로 구분한다.- 특정 인자값의 문자열의 길이가 들어가는 인자의 경우에 len(arg1)와 같이 사용할 수 있다. ex) argv.txt 파일1001622C, 1001622C, 0, len(arg1)1001623C, 1001623C, 0,.. 2014. 4. 4.