프로세스 시작시 자동 디버깅

Reversing 2012. 1. 5. 04:04
Image File Execution options 설정으로 프로세스 시작시 자동 디버깅 가능

1. Regedit.exe
 
2. 
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\

3. 서브키로 디버깅 하려는 Program의 이름을 추가 (Ex. clarus.exe)


4. 추가한 서브키에 "이름:Debugger ; 종류:문자열 값(REG_SZ) ; 데이터:디버거 Full path" 추가


by MSDN

You can set up your application to start Visual Studio when you launch the application from Windows. Visual Studio will load your application, ready for debugging, but will not commence debugging until you issue an execution command. Having Visual Studio launch the debugger in this way is useful for debugging services and COM out-of-proc servers.

To setup an application to launch the debugger automatically

  1. Start the Registry Editor (regedit).
  2. In the Registry Editor, open the HKEY_LOCAL_MACHINE folder.
  3. Navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\currentversion\image file execution options.
  4. Under the Image File Execution Options folder, locate the name of the application you want to debug (myapp.exe, for example). If you cannot find the application you want to debug:
    1. Right-click the Image File Execution Options folder and choose New Key from the shortcut menu.
    2. Right-click the new key and choose Rename from the shortcut menu.
    3. Edit the key name to the name of your application, for example, myapp.exe.
  5. Right-click the myapp.exe folder and choose New String Value from the shortcut menu.
  6. Right-click the new string value and choose Rename from the shortcut menu.
  7. Change the name to debugger.
  8. Right-click the new string value and choose Modify from the shortcut menu.

    The Edit String dialog box appears.

  9. In the Value data box, type devenv /debugexe.
  10. Click OK.
  11. From the Registry menu, choose Exit.

    The directory containing devenv.exe must be in your system path.

    Now, use any method to start your application. Visual Studio .NET will start and load the application.

 





'Reversing' 카테고리의 다른 글

hooks  (0) 2015.11.12
Anti-reversing  (0) 2012.09.24
Restructuring01  (0) 2011.12.12
unpack 참고 url  (0) 2011.11.08
Inline patch 로 해결  (0) 2011.10.28
: