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/01.Shellcode

    • 04.Pwntools Shellcode(Shellcraft)

      2020.05.04 by RACC8N

    • 03.Bind & Reverse Shellcode

      2020.05.04 by RACC8N

    • 02.Basic & Change permissions Shellcode

      2020.05.04 by RACC8N

    • 01.The basics technique of Shellcode

      2020.05.04 by RACC8N

    04.Pwntools Shellcode(Shellcraft)

    Local Shellcode - shellcraft 모듈에서는 sh() 함수를 이용해 간단하게 "/bin/sh" 를 실행하는 shellcode를 생성할 수 있다. 해당 함수는 aarch64,amd64,arm,i386,mips,thumb 아키텍처의 linux, freebsd 운영체제에 맞는 shellocode를 생성 할 수 있다. 다음과 같이 아키텍처와 운영체제를 선택한 후 sh() 함수를 호출하면, 해당 조건에 맞는 shellcode를 리턴한다. shellcraft.i386.linux.sh() [EXAMPLE] Bind Shellcode - shellcraft 모듈에서는 bindsh() 함수를 이용해 간단하게 bind shellcode를 생성 할 수 있다. 해당 함수는 amd64,mips,thumb 아키..

    Pwnable Exploitation/01.Shellcode 2020. 5. 4. 20:37

    03.Bind & Reverse Shellcode

    BACKGROUND socket() 함수를 이용해 통신에 필요한 socket 생성 bind() 함수를 이용해 server socket에 필요한 정보를 저장하고 커널에 등록 listen() 함수를 이용해 클라이언트로부터의 연결 요청 대기 accept() 함수를 이용해 클라이언트 연결을 허용 struct sockaddr 과 struct sockaddr_in의 크기 비교 (16) [C language] - 프로그램을 실행시키면 6666 port가 열려있는 것을 알 수 있다. * Bind shellcode (Socekt + "/bin/sh") [C language] int dup2 (int oldfd , int newfd ); - dup2 함수는 파일 디스크립터를 복제한다. newfd 파일 디스크립터를 oldf..

    Pwnable Exploitation/01.Shellcode 2020. 5. 4. 15:15

    02.Basic & Change permissions Shellcode

    * Basic Shellcode ("/bin/sh") [C language] Create execve /bin/sh shellcode 1. Check system call number : execve 2. Assembly code 3. Build & Run * Change permissions shellcode (seteuid + "/bin/sh") [C language] 1. Check system call number : setresuid 2. Assembly code 3. Build & Run - Shellcode에 추가된 "setresuid(0,0,0)" 코드에 의해 프로세스의 uid가 root로 복구되었다. - Basic Shellcode execve("/bin//sh",["/bin//sh",N..

    Pwnable Exploitation/01.Shellcode 2020. 5. 4. 11:32

    01.The basics technique of Shellcode

    Shellcode - shellcode라고 불리는 이유는 일반적으로 명령 shell을 실행하여 공격자가 해당 시스템을 제어하기 때문이라고 한다. - shellcode는 Machine code로 작성된 작은 크기의 프로그램 - shellcode는 실행중인 프로그램에 삽입된 코드 - shellcode는 실제로 실행 가능한 프로그램은 아니므로 작성할 때 메모리상 배치, 메모리 세그먼트 등에 신경 쓰지 않아도 됨. - shellcode는 Assembly, Machine code 같은 저수준 언어로 개발 Assembly code에서 시스템 함수 호출 Instruction Meaning Architecture INT Call to interrupt x86, x86_64 SYSCALL System call x86_6..

    Pwnable Exploitation/01.Shellcode 2020. 5. 4. 10:32

    추가 정보

    페이징

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

    티스토리툴바