Notice
Recent Posts
Recent Comments
Link
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

cdor1's lab

ELF memory dump 본문

Security/Reversing

ELF memory dump

Cdor1 2017. 4. 19. 16:04

reversing.kr의 모 문제를 풀다가 알게 된 덤프 방법이다.

프로그램이 내부에서 섹션을 만들고 그곳에 코드를 쓰는 등 일련의 작업을 하면 분석하기 매우 귀찮아지는데

섹션을 모두 만들고 코드가 모두 쓰인 상태에서 memory dump를 떠서 분석하면 간단해진다.


-IDA remote debug 상태-

shift + f2 excute script

auto file, fname, i, address, size, x;
address = 
size = 
fname = "C:\\dump_mem.bin";
file = fopen(fname, "wb");
for (i=0; i<size; i++, address++)
{
 x = DbgByte(address);
 fputc(x, file);
}
fclose(file);


-GDB-

dump memory /home/cdor1/reverse/mem_dump start_addr stop_addr


히히

'Security > Reversing' 카테고리의 다른 글

Reversing.kr SimpleVM  (0) 2017.05.12
SimpleVM algorithm  (0) 2017.04.21
Root-Me ELF - ExploitMe  (0) 2017.04.07
Reversing.kr Multiplicative  (0) 2017.04.06
Root-Me PYC - ByteCode  (0) 2017.04.05
Comments