arm 동적 디버깅

2025. 5. 1. 17:22·Tips & theory
728x90
반응형

서론

오랜만에 들이대면 까먹기 때문에 써놓음.

본론

사용 프로그램 설치

sudo apt-get install qemu-user-static
sudo apt-get install gdb-multiarch

qemu-user-static은 바이너리 실행용

gdb-multiarch는 디버깅용.

 

바이너리 실행

설치 후 바이너리의 운영체제에 맞게 아래와 같이 실행 가능.

qemu-????-static ./prob

종류는 자동완성 기능을 사용해보면 쉽게 찾을 수 있음. (qemu- 까지 치고 탭 두번)

qemu-aarch64-static       qemu-armel-static         qemu-loong64-static       qemu-mips64el-static      qemu-ppc-static           qemu-sh4-static           qemu-xtensaeb-static
qemu-aarch64_be-static    qemu-armhf-static         qemu-loongarch64-static   qemu-mipsel-static        qemu-ppc64-static         qemu-sh4eb-static
qemu-alpha-static         qemu-cris-static          qemu-m68k-static          qemu-mipsn32-static       qemu-ppc64el-static       qemu-sparc-static
qemu-amd64-static         qemu-debootstrap          qemu-microblaze-static    qemu-mipsn32el-static     qemu-ppc64le-static       qemu-sparc32plus-static
qemu-arm-static           qemu-hexagon-static       qemu-microblazeel-static  qemu-nios2-static         qemu-riscv32-static       qemu-sparc64-static
qemu-arm64-static         qemu-hppa-static          qemu-mips-static          qemu-or1k-static          qemu-riscv64-static       qemu-x86_64-static
qemu-armeb-static         qemu-i386-static          qemu-mips64-static        qemu-powerpc-static       qemu-s390x-static         qemu-xtensa-static

 

동적 디버깅

바이너리 실행과 함께 포트를 열어 대기시킴.

➜  qemu-arm64-static -g 1234 ./prob

이후 gdb-multiarch를 실행하고, gdb 내에서 remote로 접속

➜  ~ gdb-multiarch
gef➤  target remote localhost:1234

이후 하던대로 디버깅 하면 된다.

 

PWNTOOLS와 함께.

아래와 같이 바이너리를 실행하면 됨.

io = process(['qemu-arm64-static','-g','1234','./prob'])
728x90
반응형
저작자표시 비영리 변경금지 (새창열림)

'Tips & theory' 카테고리의 다른 글

Certificate verification failed  (0) 2025.04.29
team T4B pwnable 기초 - library  (0) 2024.01.02
team T4B pwnable 기초 - mitigation  (0) 2024.01.02
team T4B pwnable 기초 - format string bug  (0) 2024.01.02
team T4B pwnable 기초 - return oriented programming  (0) 2024.01.02
'Tips & theory' 카테고리의 다른 글
  • Certificate verification failed
  • team T4B pwnable 기초 - library
  • team T4B pwnable 기초 - mitigation
  • team T4B pwnable 기초 - format string bug
wyv3rn
wyv3rn
아저씨의 흔한 취미. wyv3rn#1249
  • wyv3rn
    think storage
    wyv3rn
  • 전체
    오늘
    어제
    • 분류 전체보기 (500) N
      • To do list (7) N
        • Doing (1) N
        • Complete (6)
      • Diary (35)
      • Tips & theory (77)
      • Kernel Exploit (27) N
        • Theory (15)
        • Exercise (5) N
      • Wargame (313)
        • pwn.college (34)
        • Dreamhack (148)
        • pwnable.kr (15)
        • Lord of Sqlinjection (3)
        • Cryptohack (20)
        • Root me (27)
        • CodeEngn (4)
        • Exploit Education (22)
        • ROP Emporium (8)
        • H4C (10)
        • Hackerchool (22)
      • CTF (41) N
        • Solved (39) N
        • Unsolved (2)
      • Script (0)
  • 블로그 메뉴

    • 홈
    • 방명록
  • 링크

  • 공지사항

    • PWN wargame 모음 (및 느낀점)
    • 비공개 글들에 대해.
    • 뭐라도 하나 얻어가시길...
  • 인기 글

  • 태그

    Me
    dreamhack
    x86
    FSB
    Format String Bug
    cryptohack
    phoenix
    root
    root-me
    64bit
    32bit
    libc
    x64
    Buffer Overflow
    RTL
    lob
    docker
    vtable
    exploit education
    _IO_FILE
    BOF
    pwnable.kr
    tcache
    heap
    hackerschool
    rop
    pwntools
    CANARY
    ROOT ME
    la ctf
  • 최근 댓글

  • 최근 글

  • 250x250
    반응형
  • hELLO· Designed By정상우.v4.10.3
wyv3rn
arm 동적 디버깅
상단으로

티스토리툴바