首页
社区
课程
招聘
7
[原创]DllHijacker For Delphi
发表于: 2008-8-20 20:35 18334

[原创]DllHijacker For Delphi

2008-8-20 20:35
18334

生成用于Dll劫持的Delphi模板,部分DLL需要修改代码后才能支持劫持。
界面如下


生成ws2help.dll的模板如下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
library ws2help;
 
//==============================================================================
// DllHijacker By pathletboy
//==============================================================================
 
uses
Windows;
 
{$R *.res}
 
var
ModHandle: Cardinal;
POldWahCloseApcHelper: Pointer;
POldWahCloseHandleHelper: Pointer;
POldWahCloseNotificationHandleHelper: Pointer;
POldWahCloseSocketHandle: Pointer;
POldWahCloseThread: Pointer;
POldWahCompleteRequest: Pointer;
POldWahCreateHandleContextTable: Pointer;
POldWahCreateNotificationHandle: Pointer;
POldWahCreateSocketHandle: Pointer;
POldWahDestroyHandleContextTable: Pointer;
POldWahDisableNonIFSHandleSupport: Pointer;
POldWahEnableNonIFSHandleSupport: Pointer;
POldWahEnumerateHandleContexts: Pointer;
POldWahInsertHandleContext: Pointer;
POldWahNotifyAllProcesses: Pointer;
POldWahOpenApcHelper: Pointer;
POldWahOpenCurrentThread: Pointer;
POldWahOpenHandleHelper: Pointer;
POldWahOpenNotificationHandleHelper: Pointer;
POldWahQueueUserApc: Pointer;
POldWahReferenceContextByHandle: Pointer;
POldWahRemoveHandleContext: Pointer;
POldWahWaitForNotification: Pointer;
 
procedure WahCloseApcHelper; asm jmp POldWahCloseApcHelper end;
procedure WahCloseHandleHelper; asm jmp POldWahCloseHandleHelper end;
procedure WahCloseNotificationHandleHelper; asm jmp POldWahCloseNotificationHandleHelper end;
procedure WahCloseSocketHandle; asm jmp POldWahCloseSocketHandle end;
procedure WahCloseThread; asm jmp POldWahCloseThread end;
procedure WahCompleteRequest; asm jmp POldWahCompleteRequest end;
procedure WahCreateHandleContextTable; asm jmp POldWahCreateHandleContextTable end;
procedure WahCreateNotificationHandle; asm jmp POldWahCreateNotificationHandle end;
procedure WahCreateSocketHandle; asm jmp POldWahCreateSocketHandle end;
procedure WahDestroyHandleContextTable; asm jmp POldWahDestroyHandleContextTable end;
procedure WahDisableNonIFSHandleSupport; asm jmp POldWahDisableNonIFSHandleSupport end;
procedure WahEnableNonIFSHandleSupport; asm jmp POldWahEnableNonIFSHandleSupport end;
procedure WahEnumerateHandleContexts; asm jmp POldWahEnumerateHandleContexts end;
procedure WahInsertHandleContext; asm jmp POldWahInsertHandleContext end;
procedure WahNotifyAllProcesses; asm jmp POldWahNotifyAllProcesses end;
procedure WahOpenApcHelper; asm jmp POldWahOpenApcHelper end;
procedure WahOpenCurrentThread; asm jmp POldWahOpenCurrentThread end;
procedure WahOpenHandleHelper; asm jmp POldWahOpenHandleHelper end;
procedure WahOpenNotificationHandleHelper; asm jmp POldWahOpenNotificationHandleHelper end;
procedure WahQueueUserApc; asm jmp POldWahQueueUserApc end;
procedure WahReferenceContextByHandle; asm jmp POldWahReferenceContextByHandle end;
procedure WahRemoveHandleContext; asm jmp POldWahRemoveHandleContext end;
procedure WahWaitForNotification; asm jmp POldWahWaitForNotification end;
 
exports
WahCloseApcHelper,
WahCloseHandleHelper,
WahCloseNotificationHandleHelper,
WahCloseSocketHandle,
WahCloseThread,
WahCompleteRequest,
WahCreateHandleContextTable,
WahCreateNotificationHandle,
WahCreateSocketHandle,
WahDestroyHandleContextTable,
WahDisableNonIFSHandleSupport,
WahEnableNonIFSHandleSupport,
WahEnumerateHandleContexts,
WahInsertHandleContext,
WahNotifyAllProcesses,
WahOpenApcHelper,
WahOpenCurrentThread,
WahOpenHandleHelper,
WahOpenNotificationHandleHelper,
WahQueueUserApc,
WahReferenceContextByHandle,
WahRemoveHandleContext,
WahWaitForNotification;
 
begin
ModHandle:= LoadLibrary('C:\WINDOWS\system32\ws2help.dll');
if ModHandle > 0 then
begin
   POldWahCloseApcHelper:= GetProcAddress(ModHandle, 'WahCloseApcHelper');
   POldWahCloseHandleHelper:= GetProcAddress(ModHandle, 'WahCloseHandleHelper');
   POldWahCloseNotificationHandleHelper:= GetProcAddress(ModHandle, 'WahCloseNotificationHandleHelper');
   POldWahCloseSocketHandle:= GetProcAddress(ModHandle, 'WahCloseSocketHandle');
   POldWahCloseThread:= GetProcAddress(ModHandle, 'WahCloseThread');
   POldWahCompleteRequest:= GetProcAddress(ModHandle, 'WahCompleteRequest');
   POldWahCreateHandleContextTable:= GetProcAddress(ModHandle, 'WahCreateHandleContextTable');
   POldWahCreateNotificationHandle:= GetProcAddress(ModHandle, 'WahCreateNotificationHandle');
   POldWahCreateSocketHandle:= GetProcAddress(ModHandle, 'WahCreateSocketHandle');
   POldWahDestroyHandleContextTable:= GetProcAddress(ModHandle, 'WahDestroyHandleContextTable');
   POldWahDisableNonIFSHandleSupport:= GetProcAddress(ModHandle, 'WahDisableNonIFSHandleSupport');
   POldWahEnableNonIFSHandleSupport:= GetProcAddress(ModHandle, 'WahEnableNonIFSHandleSupport');
   POldWahEnumerateHandleContexts:= GetProcAddress(ModHandle, 'WahEnumerateHandleContexts');
   POldWahInsertHandleContext:= GetProcAddress(ModHandle, 'WahInsertHandleContext');
   POldWahNotifyAllProcesses:= GetProcAddress(ModHandle, 'WahNotifyAllProcesses');
   POldWahOpenApcHelper:= GetProcAddress(ModHandle, 'WahOpenApcHelper');
   POldWahOpenCurrentThread:= GetProcAddress(ModHandle, 'WahOpenCurrentThread');
   POldWahOpenHandleHelper:= GetProcAddress(ModHandle, 'WahOpenHandleHelper');
   POldWahOpenNotificationHandleHelper:= GetProcAddress(ModHandle, 'WahOpenNotificationHandleHelper');
   POldWahQueueUserApc:= GetProcAddress(ModHandle, 'WahQueueUserApc');
   POldWahReferenceContextByHandle:= GetProcAddress(ModHandle, 'WahReferenceContextByHandle');
   POldWahRemoveHandleContext:= GetProcAddress(ModHandle, 'WahRemoveHandleContext');
   POldWahWaitForNotification:= GetProcAddress(ModHandle, 'WahWaitForNotification');
end;
end.

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

上传的附件:
收藏
免费 7
支持
分享
赞赏记录
参与人
雪币
留言
时间
Youlor
为你点赞~
2024-1-4 00:26
伟叔叔
为你点赞~
2023-11-13 02:46
QinBeast
为你点赞~
2023-8-22 00:57
PLEBFE
为你点赞~
2023-8-21 00:29
shinratensei
为你点赞~
2023-7-29 00:03
心游尘世外
为你点赞~
2023-7-18 00:29
飘零丶
为你点赞~
2023-7-7 00:24
最新回复 (19)
雪    币: 305
活跃值: (1815)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
能举个应用范例吗?
2008-8-20 22:18
0
雪    币: 437
活跃值: (403)
能力值: ( LV12,RANK:240 )
在线值:
发帖
回帖
粉丝
3
支持 ~~~
2008-8-20 22:22
0
雪    币: 225
活跃值: (10)
能力值: ( LV5,RANK:60 )
在线值:
发帖
回帖
粉丝
4
感谢共享~~~~
2008-8-20 22:53
0
雪    币: 22
活跃值: (478)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
5
很好哦:)  不过还是喜欢用C的 体积小呀
2008-8-21 00:13
0
雪    币: 372
活跃值: (31)
能力值: ( LV12,RANK:410 )
在线值:
发帖
回帖
粉丝
6
学习一下~~
2008-8-21 11:51
0
雪    币: 200
活跃值: (345)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
7
不错!非常感谢
2008-8-22 00:00
0
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
8
太感谢了,有了这个方便多了
2009-5-30 22:58
0
雪    币: 220
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
9
delphi的代码总体看起来有点肥。。。
2009-5-30 23:04
0
雪    币: 602
活跃值: (45)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
10
先感谢楼主 再测试
2010-3-9 17:26
0
雪    币: 602
活跃值: (45)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
11
某些用序号的dll函数不能导出
2010-3-9 17:29
0
雪    币: 203
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
12
这个厉害了.. 弄来学习学习.  

其实主要是我突然想看看自己有多少现金..
2010-4-9 20:04
0
雪    币: 218
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
13
马上下载试用,不错哈
2010-5-3 13:49
0
雪    币: 255
活跃值: (49)
能力值: ( LV9,RANK:180 )
在线值:
发帖
回帖
粉丝
14
感谢分享 ^_^
2010-5-12 13:29
0
雪    币: 208
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
15
楼主说了不支持所有的dll,某些dll需要修改代码。
今天再看有些熟悉了
2010-5-12 18:17
0
雪    币: 253
活跃值: (89)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
16
这是好东西,非常有用,谢谢!
2010-5-13 07:54
0
雪    币: 2560
活跃值: (2976)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
17
不错的东东!!谢谢共享。
2010-5-18 08:31
0
雪    币: 201
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
18
支持 ~~~
2010-6-10 22:27
0
雪    币: 419
活跃值: (48)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
19
好东西 收藏下
2011-5-6 12:57
0
雪    币: 204
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
20
学习了。。。。。
2011-5-19 19:13
0
游客
登录 | 注册 方可回帖
返回

账号登录
验证码登录

忘记密码?
没有账号?立即免费注册