Skip to content

Commit

Permalink
Just need to add search for kernoff and then done
Browse files Browse the repository at this point in the history
  • Loading branch information
psychomario committed May 30, 2012
1 parent ca12de0 commit 0559ada
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions dllinject.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,19 +394,12 @@ def kitrap0d():
optional_header = nt_header.contents.OptionalHeader
baseofcode = optional_header.BaseOfCode
sizeofcode = optional_header.SizeOfCode
#search between kernelhandle[baseofcode] - kernelhandle[baseofcode+sizeofcode] for xpsig
buf = ctypes.c_byte*kernsize
kernelarray = ctypes.cast(kernhandle, ctypes.POINTER(buf)).contents
fh=open("E:\\file.exe",'wb')
kernelarray = kernelarray[:]
kernelarray = [chr(abs(i)) for i in kernelarray]
return kernelarray
fh.close()
#for i in range(0,kernsize):
# chunk = ''.join([chr(abs(i)) for i in kernelarray[i:i+len(xpsig)]])
# if chunk == xpsig:
# continue
return i
#i = OptHeader->BaseOfCode; i < OptHeader->SizeOfCode; i++
#&ImageBase[i] = kernel handle
#kernoff = i at start of xpsig
return



Expand Down

0 comments on commit 0559ada

Please sign in to comment.