프로그래밍 도서관/Python 리버싱 프로그래밍 스터디

immunity_dbg

0x00 2022. 10. 11. 19:06
from immlib import*

class MyHook ( LogBpHook ):

    def __init__(self):
        LogBpHook.__init__(self)

    def run( regs ):
       
immunity 디렉토리 안에 PyHook 파일이 존재하는데 거기에서
!<scriptname> 을 쓰면 사용할수있다.
 
 
 
 
 
 
import sys
sys.path.append('C:/Program Files (x86)/Immunity Inc/Immunity Debugger')
sys.path.append('C:/Program Files (x86)/Immunity Inc/Immunity Debugger/Libs')

from immlib import*

def main(args):

    imm =   Debugger()
    search_code =   " ".join(agrs)
    search_bytes =   imm.Assemble( search_code )
    search_results  =   imm.Search( search_bytes )

    for hit in search_results:

        code_page = imm.getMemoryPagebyAddress( hit )
        access = code_page.getAccess( human == True)

        if "execute" in access.lower():
            imm.log("[*] Found: %s (0x%08x)" %(search_code, hit), address = hit)
   
    return "[*] Finished searching  for instrcutions , cheak the Log window."

 

코드 조각들을 찾는것 위에 sys 임포트 시킨건  스택오버플로우 에서 immlib.py PATH 에 문제가 있어 시킨것이다.

'프로그래밍 도서관 > Python 리버싱 프로그래밍 스터디' 카테고리의 다른 글

imm_findantidep  (1) 2022.10.13
immunity_badchar  (0) 2022.10.11
pydbg_danger_track  (1) 2022.10.10
pydbg_snapshot  (1) 2022.10.10
pydbg_overflow and access_violation_handler  (1) 2022.10.10