标题: DLL注入利器Petools [打印本页] 作者: shane007 时间: 2010-2-4 11:38 标题: DLL注入利器Petools 最近在老外网站上又发现了一些好东西。* [2 v; p P0 N( H1 b9 S( e5 m
9 J0 \& y6 ^% O3 Z0 \
DLL注入利器Petools是一套关于DLL注入的工具集。 ) ]- a+ h3 E5 z将在以后的高难度汉化中派上用处。 $ W K5 ^2 q% C& C* G) J G* o+ a' X
原文 ! q7 _! ^! K' A, \5 O$ yhttp://comrade.ownz.com/projects/petools.html2 \5 k! K" M! _% ^" j
8 I/ i3 {' P8 |
使用方法 9 [, Z4 I. o) [8 N2 k- D9 JInject Tool# D) @0 H; W, Q/ P# S7 H+ {* f
Inject is a tool that injects a DLL into a running process. Its command-line usage is as follows: * M3 i! `: [: p0 @7 e/ A, c' S0 d
% e* X2 f8 J" ~Inject C:\hook.dll into pid 1234: inject.exe 1234 C:\hook.dll 2 [6 t! M7 l" u' }
Inject C:\hook.dll into process notepad.exe (if multiple notepads are running, then whichever one is picked is undefined): inject.exe -p *notepad.exe C:\hook.dll 9 y$ J8 b9 i5 j& H0 c0 R3 X# @' e
Inject C:\hook.dll into running process C:\myprogram.exe: inject.exe -p C:\myprogram.exe C:\hook.dll * S, @ K8 A( \2 U4 P: i% E7 D# @Inject C:\hook.dll into process with a window named "Untitled - Notepad": inject.exe -w "Untitled - Notepad" C:\hook.dll ) R" P6 Z/ \6 J' l0 `& UInject C:\hook.dll into process with a window class Notepad: inject.exe -c Notepad C:\hook.dll ( T. H7 [5 |- A f% Y
Note that in all uses, you should specify the full path to the injected DLL. 5 |4 R9 \, o! w
! l" ]/ Y3 m7 T) I: `; iLoader Tool+ J6 D% P$ ?! ?3 Q# m
Loader is a tool that injects a DLL before launching a process. Its command-line usage is as follows: 0 w# t8 Q* K' L
6 h3 M& T- O6 K9 i8 a3 ~
Load notepad.exe and inject C:\hook.dll into it: loader.exe notepad.exe C:\hook.dll & e; K: p9 ~% J$ yNote that you should specify the full path to the injected DLL. . I: B. B3 m M- L; v- D. }9 d8 Y$ I& S5 |) v) U
Patch Tool4 z6 h7 y4 R& M5 ~# }, A4 c3 V
Patch is a tool that adds a new section to the executable. The new section becomes the new entrypoint, and contains code to load a particular DLL, and then jump back to the original entrypoint. This can be used to create static patches that behave similar to the Loader tool. ' j, x* N4 c" R( Z2 `4 `" y' GThe tool's command-line usage is as follows: 6 O; ^8 c* g$ t ( g2 Y. f2 \; K1 s0 y/ z$ _( c1 P# DPatch original.exe to load C:\hook.dll before execution; save the patched executable to patched.exe: patch.exe original.exe patched.exe C:\hook.dll 1 F) h( j# G! N/ m. ]
' `; c, e2 }! z7 L0 f- rReimport Tool / T5 H5 J. k/ f$ T/ x3 s* hReimport is a tool that redirects certain entries of an executable's import table to another DLL. For example, running reimport.exe game.exe newgame.exe nocd.dll kernel32.dll::GetDriveTypeA kernel32.dll::CreateFileA kernel32.dll::GetVolumeInformation will create a copy of game.exe into newgame.exe, with the above 3 API functions rerouted to nocd.dll, instead of kernel32.dll. That means newgame.exe would import GetDriveTypeA, CreateFileA, and GetVolumeInformation from nocd.dll instead of kernel32.dll.