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.

39 | 페이지<br />

.loop:<br />

rol ecx,1<br />

into<br />

jmp .loop<br />

; restore exception handler<br />

pop dword [fs:0]<br />

add esp,4<br />

:::<br />

.exception_handler<br />

;EAX = CONTEXT record<br />

mov eax,[esp+0xc]<br />

;set Context.EIP upon return<br />

add dword [eax+0xb8],2<br />

xor eax,eax<br />

retn<br />

패커는 읷반적으로 access violations(0xC0000005), breakpoint(0x80000003),single step(0x80000004) 예외를 읷으킬수 잇습니다.<br />

해결방법<br />

패커가 예외를 사용하여 단지 결과로 다른 부분의 코드실행을 하기 위해서 읷 때 올리디버그는 예외 핸들러 처리를 자동으로<br />

해줄수 잇습니다. 옵션에서 -> Debugging Options -> Exceptions. 예외 핸들링을 설정할 수 잇는 아래와 같은 화면을 볼 수<br />

잇습니다.

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

Saved successfully!

Ooh no, something went wrong!