본문 바로가기

프로그래밍/Reversing

[코드엔진] Basic 01 풀이

반응형


1번의 문제는


HDD를 CD-Rom으로 인식시키기 위해서는 GetDriveTypeA의 리턴값이 무엇이 되어야 하는가 이다.


그렇다면 프로그램을 다운받어 OllyDbg로 열어보면 GetDriverTypeA의 문자열이 보인다.


우선 GetDriverType의 API가 사용자 정의인지 MS에서 제공되는 API인지 확인해 볼 필요가 있다고 생각해서 검색 해봤다.


MSDN 

http://msdn.microsoft.com/en-us/library/windows/desktop/aa364939(v=vs.85).aspx


Return value

The return value specifies the type of drive, which can be one of the following values.

Return code/valueDescription
DRIVE_UNKNOWN
0

The drive type cannot be determined.

DRIVE_NO_ROOT_DIR
1

The root path is invalid; for example, there is no volume mounted at the specified path.

DRIVE_REMOVABLE
2

The drive has removable media; for example, a floppy drive, thumb drive, or flash card reader.

DRIVE_FIXED
3

The drive has fixed media; for example, a hard disk drive or flash drive.

DRIVE_REMOTE
4

The drive is a remote (network) drive.

DRIVE_CDROM
5

The drive is a CD-ROM drive.

DRIVE_RAMDISK
6

The drive is a RAM disk.

 


이런 값들을 확인 할 수 있는데...그럼 F8을 눌러 어떠한 값이 확인 되는지 보자.




위와 같이 문자열 값을 확인 했고.


디버깅을 계속 하다보면 닶이 나온다.



내가 표시해둔 안에 답이 있다.


리버싱 막 시작한 나에게 딱 알맞는 문제인 듯...



반응형

'프로그래밍 > Reversing' 카테고리의 다른 글

[코드엔진] Basic 03 풀이  (0) 2014.02.15
[코드엔진] Basic 02 풀이  (0) 2014.02.15
OllyDbg 사용 방법[예시로 기본적인 프로그램 디버깅]  (0) 2014.02.14
http://reversing.kr  (0) 2014.02.12
MBR 초기화  (0) 2013.12.18