看流星社区

 找回密码
 注册账号
查看: 3707|回复: 0

[VB] 关于LdrLoadDll

[复制链接]

该用户从未签到

发表于 2013-5-11 08:51:34 | 显示全部楼层 |阅读模式
调用过程:LoadLibraryA->LoadLibraryW->LdrLoadDll……

针对有些未加载kernel32.dll的进程,可以用ShellCode+LdrLoadDll进行DLL注入

还有就是可以用LdrGetProcedureAddress代替GetProcAddress

使用方法:

Private Declare Function LdrLoadDll Lib "NTDLL.DLL" (PathToFile As String, ByVal Flags As Long, ModuleFileName As UNICODE_STRING, ModuleHandle As Long) As Long

Private Type UNICODE_STRING
    Length As Integer
    MaximumLength As Integer
    Buffer As Long
End Type

Private Sub xx()
    Dim uPath As UNICODE_STRING
    Dim hModule As Long
    uPath.Buffer = StrPtr(dllPath)
    uPath.Length = LenB(dllPath)
    uPath.MaximumLength = uPath.Length
    LdrLoadDll vbNullString, 0, uPath, hModule
End Sub
点击按钮快速添加回复内容: 支持 高兴 激动 给力 加油 苦寻 生气 回帖 路过 感恩
您需要登录后才可以回帖 登录 | 注册账号

本版积分规则

小黑屋|手机版|Archiver|看流星社区 |网站地图

GMT+8, 2024-4-27 05:43

Powered by Kanliuxing X3.4

© 2010-2019 kanliuxing.com

快速回复 返回顶部 返回列表