[Pwn] Re ACSC 2023
Writeup RE ACSC 2023
Source code:
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192#include <stdlib.h>#include <unistd.h>#include <stdio.h>static int getnline(char *buf, int size);static int getint(void);static void edit(void);struct Memo { size_t size; char* buf;} mlist[10];__attribute__((constructor))static int init(){ alarm(30); setbuf( ...
Thêm debug symbol vào stripped libc
Thêm debug symbol vào stripped libcVào một ngày khi làm một bài pwn, với đề bài đưa libc trước, mình xài pwninit tool …pwninit bị lỗi nào đó không thể lấy file dbg trong package package libc6-dbg_....deb để unstrip libc.
Khi gặp nhiều bài ctf cần debug các hàm trong libc, đặc biệt là liên quan tới heap, việc không có debug symbol sẽ gây khó khăn hơn trong việc debug.
Sau đây, mình xin trình bày 2 cách để “chữa cháy” lỗi này.
Cách 1: Load debug symbol vào gdbBạn để ý thì pwninit nó cũng tải packa ...