pwnkidhn.github.io

고정 헤더 영역

글 제목

메뉴 레이어

pwnkidhn.github.io

메뉴 리스트

    • 분류 전체보기 (194)
      • memo (0)
      • Pwnable Exploitation (19)
        • 01.Shellcode (4)
        • 02.Return to Shellcode (1)
        • 03.RTL(Return to libc) (2)
        • 04.Frame faking(Fake ebp) (1)
        • 05.Frame Pointer Overwrite (2)
        • 06.ROP(Return Oriented Prog.. (3)
        • 07.SROP(Sigreturn-oriented .. (2)
        • 08.JOP(Jump-Oriented Progra.. (1)
        • 09.Return-to-csu(__libc_csu.. (0)
        • Malloc - glibc(ptmalloc2) (3)
      • Pwnable Write-Up (54)
        • 00.CTF (0)
        • 01.hackerschool F.T.Z (20)
        • 02.hackerschool L.O.B (21)
        • 03.dreamHack (13)
        • 04.HackCTF (0)
      • Reversing Write-Up (38)
        • 01.Abex's crackme (5)
        • 02.CodeEngn Basic (20)
        • 03.CodeEngn Advance (13)
      • Fuzzing (1)
        • Theory (1)
      • Programming (22)
        • Data Structure (0)
        • Windows System (22)
      • Computer Science (60)
        • Computer Architecture (18)
        • OS Concepts (29)
        • Linux System (5)
        • Reverse Core (8)

    검색 레이어

    pwnkidhn.github.io

    검색 영역

    컨텐츠 검색

    Pwnable Exploitation/05.Frame Pointer Overwrite

    • 02.Frame Pointer Overwrite(One-byte Overflow) - x64

      2020.06.29 by RACC8N

    • 01.Frame Pointer Overwrite(One-byte Overflow) - x86

      2020.06.26 by RACC8N

    02.Frame Pointer Overwrite(One-byte Overflow) - x64

    BackGround 해당 취약성은 다음과 같은 구조에서 발생한다. vuln() 함수에서 Overflow로 인해 main() 함수의 Frame Pointer를 1 byte 변경 할 수 있다. vuln() 함수가 종료 될 때 변경된 Frame Pointer는 leave 명령어에 의해 RBP 레지스터에 저장된다. main() 함수가 종료 될 때 RBP 레지스터에 저장된 Frame Pointer는 leave 명령어에 의해 RSP 레지스터에 저장된다. 즉, 이로 인해 ret 명령어에 의해 이동할 영역을 변경 할 수 있다. 공격하는 형태는 Frame faking과 동일 하다. 단, Frame faking은 Return Address 영역까지 Overflow 했으나, FPO는 Frame Pointer의 1 byte를..

    Pwnable Exploitation/05.Frame Pointer Overwrite 2020. 6. 29. 21:18

    01.Frame Pointer Overwrite(One-byte Overflow) - x86

    BackGround 32 bit Binary의 경우 64bit와 달리 스택을 16 바이트 경계에 정렬하는 코드가 추가된다. x86-64 ABI는 16 바이트 스택 정렬이 필요하다. ABI와 호환되지 않는 환경에서 스택 공간을 제한해서 사용하기 위해서다. 펜티엄 III에서 SSE(Streaming SIMD Extension) 데이터 유형 __m128이 16 바이트 정렬되지 않으면 올바르게 작동하지 않을 수 있다. Stack alignment at 16-byte boundary 다음과 같이 16byte 경계에 스택을 정렬하기 위한 코드는 다음과 같이 동작한다. main() 함수가 시작 되는 부분에서는 이전 함수에서 사용하던 Frame Pointer를 Stack에 저장하기 전에 Stack alignment을 ..

    Pwnable Exploitation/05.Frame Pointer Overwrite 2020. 6. 26. 17:05

    추가 정보

    페이징

    이전
    1
    다음
    TISTORY
    pwnkidhn.github.io © rvkhun
    페이스북 트위터 인스타그램 유투브 메일

    티스토리툴바