관리 메뉴

Information Security

Crackme0x01 본문

Reversing

Crackme0x01

HackingPractice 2020. 3. 28. 20:43

./crackme0x01 실행을 시켜 Password 123을 입력 시 Invalid Password! 메시지를 보여준다.

그림 1-1 crackme0x01

afll 명령어로 crackem0x01 사용한 함수들을 확인할 수 있다.

그림 1-2 afl 명령어

그림 1-2에서 main 함수 주소 0x0804832e4로 이동 후 iz 명령어로 데이터 섹션의 모든 문자열을 확인했다. 

그림 1-3 iz 명령어

pdf 명령어는 디스 어셈블리로 보여준다.  입력한 값과 정답이 일치하면 "Password Ok :)" 다르면 "Invalid Passowrd!" 메시지를 보여주는 것을 알 수 있다.

그림 1-3 pdf 명령어

0x0804842b 값에 0x149a 값을 10진수 값을 알기 위해 ? 0x149a 입력 시 5274 10진수 값을 알 수 있다.

그림 1-4 ? 명령어

./crackme0x01 실행 후 5274 입력 시 "Password OK :)" 메시지를 확인했다.

그림 1-5 정답

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import angr
 
find_addr = 0x8048449
avoid_addr = 0x804843B
 
= angr.Project('./crackme0x01', auto_load_libs = False)
 
state = p.factory.entry_state()
 
= p.factory.simulation_manager(state)
 
s.explore(find = find_addr, avoid = avoid_addr)
 
print('[*] find flag: ')

 

'Reversing' 카테고리의 다른 글

Crackme0x02  (0) 2020.03.31