13.07.2013 Views

The art of Unpacking 번역 - SecretOfSh의 블로그

The art of Unpacking 번역 - SecretOfSh의 블로그

The art of Unpacking 번역 - SecretOfSh의 블로그

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

51 | 페이지<br />

http://msdn.micros<strong>of</strong>t.com/msdnmag/issues/02/03/PE2/<br />

최싞버젼의 PE 파읷 포맷 은 아래 연결을 통해 얻을 수 잇습니다:<br />

micros<strong>of</strong>t Portable Executable and Common Object File Format Specification<br />

http://www.micros<strong>of</strong>t.com/whdc/system/platform/firmware/PECOFF.mspx<br />

6.4 Stolen Bytes<br />

Stolen Bytes 는 패커가 이동시킨 보호된 프로그램의 코드의 읷부분(보통은 엔트리 포읶트의 몇 개의 명령어)입니다. 이<br />

부분의 명령어는 이동된 곳 이나 할당 받은 메모리 공갂에서 실행됩니다. 보호된 프로세스의 메모리가 덤프 되었을 때 Stolen<br />

Bytes 를 복구 하지 못한다면 덤프된 실행파읷은 작동하지 않습니다.<br />

여기 이 예제는 실행될 수 잇는 파읷의 오리지날 엔트리 포읶트(OEP)입니다:<br />

004011CB MOV EAX,DWORD PTR FS:[0]<br />

004011D1 PUSH EBP<br />

004011D2 MOV EBP,ESP<br />

004011D4 PUSH -1<br />

004011D6 PUSH 0047401C<br />

004011DB PUSH 0040109A<br />

004011E0 PUSH EAX<br />

004011E1 MOV EWORD PTR FS:[0],ESX<br />

004011E8 SUB ESP,10<br />

004011EB PUSH EBX<br />

004011EC PUSH ESI<br />

004011ED PUSH EDI<br />

그리고 아래는 Enigma Protector 패커로 패킹하여 앞부분의 두 개의 명령어를 훔쳐낸 동읷한 코드입니다:<br />

004011CB POP EBX<br />

004011CC CMP EBX,EBX

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!