본문 바로가기 메뉴 바로가기

ba0bab

프로필사진

ba0bab

ba0bab
검색하기 폼 Mountain View
  • About me

  • 분류 전체보기 (165)
    • pwnable (127)
      • bandit (8)
      • FTZ (19)
      • LOB (11)
      • pwnable.kr (6)
      • pwnable.tw (16)
      • HackCTF (1)
      • CTF write-up (22)
      • windows (4)
      • 정리 (39)
    • reversing (0)
      • CTF write-up (0)
    • web hacking (0)
      • CTF write-up (0)
    • programming (30)
      • c, c++ (10)
      • python (20)
    • cs (5)
      • network (1)
      • etc (4)
    • CTF write-up (3)
  • GUESTBOOK
  • TAG
  • RSS

pwnable/정리
_IO_FILE Arbitrary Read & Write

보호되어 있는 글입니다.

보호글 2020. 3. 9. 22:00
FSOP : File Stream Oriented Programming

Introduction file struct 구조를 분석하여 File Stream Oriented Programming에 대해 공부한 내용을 정리하려 한다. Data Structure in File 먼저, file 구조체를 알아야한다. struct _IO_FILE { int _flags; /* High-order word is _IO_MAGIC; rest is flags. */ #define _IO_file_flags _flags /* The following pointers correspond to the C++ streambuf protocol. */ /* Note: Tk uses the _IO_read_ptr and _IO_read_end fields directly. */ char* _IO_rea..

pwnable/정리 2019. 12. 22. 04:08
glibc exit.c analysis

exit()? C에서 exit() 이라는 함수는, 현재의 C프로그램 자체를 완전 종료하는 기능을 가집니다. exit()는 코드에서 직접 선언하여 사용할 수도 있지만, __libc_start_main()에서 main함수를 동작한 이후 마지막 단계에서 호출하기도 합니다. ba0bab➤ disas 0x7ffff7a05ab0 Dump of assembler code for function __libc_start_main: 0x00007ffff7a05ab0 : push r13 0x00007ffff7a05ab2 : push r12 0x00007ffff7a05ab4 : xor eax,eax ... ... ... 0x00007ffff7a05b95 : call rax 0x00007ffff7a05b97 : mov edi,..

pwnable/정리 2019. 11. 12. 11:29
64bit fsb 정리

#include #include #include int main(void) { char buf[300] = {0}; setvbuf(stdin, 0, 2, 0); setvbuf(stdout, 0, 2, 0); printf("input: "); read(0, buf, 300); printf(buf); exit(0); } 컴파일 : gcc fsb.c -o fsb -no-pie printf 에서 Format String Bug가 발생한다. Exploit scenario 오프셋 구하기 exit_got를 main으로 돌리는 동시에 libc_start_main leak exit_got를 one_gadget으로 overwrite get shell Exploit flow main으로 다시 가야하는 이유는 첫 번째 fsb..

pwnable/정리 2019. 11. 6. 15:33
libc_start_main leak

ret 주소를 leak하면 libc_start_main+231/241 주소를 나타내고 있음 오프셋 잘 구하면 libc base를 쉽게 구할 수 있다.

pwnable/정리 2018. 9. 13. 11:40
kail tool pattern_create / offset

root@kali:/usr/share/metasploit-framework/tools# ls 이 위치에 많은 tool들이 존재한다. root@kali:/usr/share/metasploit-framework/tools# ./pattern_create.rb 5000Aa0Aa1Aa2Aa3Aa4Aa5Aa6Aa7Aa8Aa9Ab0Ab1Ab2Ab3Ab4Ab5Ab6Ab7Ab8Ab9Ac0Ac1Ac2Ac3Ac4Ac5Ac6Ac7Ac8Ac9Ad0Ad1Ad2Ad3Ad4Ad5Ad6Ad7Ad8Ad9Ae0Ae1Ae2Ae3Ae4Ae5Ae6Ae7Ae8Ae9Af0Af1Af2Af3Af4Af5Af6Af7Af8Af9Ag0Ag1Ag2Ag3Ag4Ag5Ag6Ag7Ag8Ag9Ah0Ah1Ah2Ah3Ah4Ah5Ah6Ah7Ah8Ah9Ai0Ai1Ai2Ai..

pwnable/정리 2018. 9. 6. 00:04
pwnable 기법 공부하기 좋은 사이트

https://www.lazenca.net/display/TEC/

pwnable/정리 2018. 8. 19. 01:29
mprotect를 이용한 rop

https://github.com/hyomin-Lee/exploit/blob/master/Hitcon_training/lab5/simplerop.py hitcon training lab5 simplerop 문제이다. 이 문제는 static 컴파일이 되어있어서 GOT overwrite 같은 공격이 불가하다. 따라서 shellcode의 실행으로 sh을 얻을 수 있었다. not stripped 이기때문에 mprotect의 주소를 얻을 수 있었다. NX기법이 걸려있으면 shellcode를 실행 할 수 없다. 하지만 mprotect를 이용해서 bss영역에 실행권한을 부여하면 shellcode를 이용해서 공격할 수 있다.

pwnable/정리 2018. 8. 19. 01:28
이전 1 2 3 4 5 다음
이전 다음
최근에 올라온 글
최근에 달린 댓글
TAG
  • heap
  • 해킹
  • overflow
  • HackCTF
  • exit
  • codegate
  • FSB
  • pwnable.tw
  • fastbindup
  • glibc
  • SQLi
  • fsop
  • pwnable
  • srop
  • 본선가고싶다
  • tcache
  • pwable
  • TLS
  • ebp change
  • stack reusing
  • fastbin
  • rt_sigreturn
  • oob
  • hacking
  • shellcoding
more
Total
Today
Yesterday

Powered by Tistory / Designed by INJE

티스토리툴바