overflow

    [FC3] Level 5. evil_wizard → dark_stone

    [FC3] Level 5. evil_wizard → dark_stone

    dark_stone keyword : POP POP RET / Remote /* The Lord of the BOF : The Fellowship of the BOF - dark_stone - Remote BOF on Fedora Core 3 - hint : GOT overwriting again - port : TCP 8888 */ #include // magic potion for you from socket import * void pop_pop_ret(void) { asm("pop %eax"); asm("pop %eax"); asm("ret"); } int main() { char buffer[256]; char saved_sfp[4]; int length; char temp[1024]; prin..

    [FC3] Level 3. dark_eyes → hell_fire

    [FC3] Level 3. dark_eyes → hell_fire

    hell_fire keyword : another fake_ebp or got overwriting /* The Lord of the BOF : The Fellowship of the BOF - hell_fire - Remote BOF on Fedora Core 3 - hint : another fake ebp or got overwriting - port : TCP 7777 */ #include int main() { char buffer[256]; char saved_sfp[4]; char temp[1024]; printf("hell_fire : What's this smell?\n"); printf("you : "); fflush(stdout); // give me a food fgets(temp,..

    [FC3] Level 2. iron_golem → dark_eyes

    [FC3] Level 2. iron_golem → dark_eyes

    dark_eyes Keyword : RET Sleding /* The Lord of the BOF : The Fellowship of the BOF - dark_eyes - Local BOF on Fedora Core 3 - hint : RET sleding */ int main(int argc, char *argv[]) { char buffer[256]; char saved_sfp[4]; if(argc < 2){ printf("argv error\n"); exit(0); } // save sfp memcpy(saved_sfp, buffer+264, 4); // overflow!! strcpy(buffer, argv[1]); // restore sfp memcpy(buffer+264, saved_sfp,..

    [LOB] 원정대란?

    [LOB] 원정대란?

    [LOB-Lord of Bufferoverflow][BOF-BufferOverflow- 원정대란?]비교적 쉬운 BOF 공략 환경인 Redhat 6.2에서부터 궁극의 Fedora 14까지 수십개의 레벨을 거쳐가며 BOF 시스템 해킹 실습을 하는 War-Game입니다. [접속 방법]BOF 원정대는 도메인이나 IP가 아닌, vmware 이미지 형태로 제공합니다.따라서 각자의 PC에 워게임 서버를 가동하신 후 접속해 풀어나가는 방식입니다. [다운로드]1. 다음 Vmware 이미지를 다운받아 부팅한다.링크(http://hackerschool.org/TheLordofBOF/TheLordOfTheBOF_redhat_bootable.zip)2. gate/gate로 로그인한다.3. netconfig 명령으로 네트워크 설..

    [해커스쿨] FTZ level9 풀이과정

    [해커스쿨] FTZ level9 풀이과정

    2017/01/11 - [Study :)/FTZ] - [해커스쿨] FTZ level8 풀이과정 힌트를 봐야 겠지? 힌트를 보니 Buffer Overflow 문제인 것같다. 버퍼 오버플로우는 어떻게 발생하는가? 버퍼 오버플로우를 이해하기 위해서는 먼저 프로그램이 데이터를 어떻게 저장하고 어떻게 함수가 호출되는지 알아야 한다. 하나의 프로그램은 수 많은 함수로 구성되어 있는데 이 함수가 호출될 때, 지역 변수와 복귀 주소(Return Address)가 스택(Stack)이라 하는 논리 데이터 구조에 저장된다. 복귀 주소가 저장되는 이유는 함수가 종료될 때 운영체제가 함수를 호출한 프로그램에 제어권을 넘겨야 하는데, 이 복귀주소가 없으면 함수가 종료된 후 어떤 명령어를 수행해야 할 지 모르기 때문이다. 버퍼 오..

    [Format String Attack] 포맷 스트링 공격이란?

    [Format String Attack] 포맷 스트링 공격이란?

    Format String Attack [1] Format String Attack서론2000년도 후반에 해커들 사이에 큰 반향을 일으키 보고서 하나가 발표되었다.Format String Attack...Format String Attack이란 무엇인가? 이것은 기존에 가장 널리 사용되고 있던 Buffer Overflow 공격 기법에 견줄 만한 강력한 해킹 기법이었다. 이 해킹 기법이 발표되고 나서 그 동안 별 문제 없어 보였던 각종 프로그램들에 대한 취약점이 속속 발표되고 해당 프로그램을 제작했던 회사들은 이 취약점을 해결하기 위해 분주해지기 시작했다. 그렇다면 Format String Attack은 어떤 방식으로 이루어지는 것인가? 이것을 이해하기 위해서는 먼저 Format String이 무엇인지를 이..