loadlibrary dllmaina 加载dll 可以读写游戏吗

loadlibrarya 加载dll 可以读写游戏吗_百度知道
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。
loadlibrarya 加载dll 可以读写游戏吗
我有更好的答案
近期的法国《科学与未来》杂志认为,目前国际上的电子游戏分为单机电脑游戏、游戏机游戏以及电脑网络游戏。青少年本身心理抵御能力就弱,而随着这三类游戏越来越逼真,他们对游戏的依赖性越来越大。这种电子游戏“毒瘾”能导致疾病、严重的社会交流障碍,对亲情和社会的冷漠等,已成年的青年人甚至可能因此失业,或者与恋人或配偶分手。
采纳率:72%
来自团队:
为您推荐:
其他类似问题
等待您来回答The page is temporarily unavailable
nginx error!
The page you are looking for is temporarily unavailable.
Please try again later.
Website Administrator
Something has triggered an error on your
This is the default error page for
nginx that is distributed with
It is located
/usr/share/nginx/html/50x.html
You should customize this error page for your own
site or edit the error_page directive in
the nginx configuration file
/etc/nginx/nginx.conf.WIN7下远程LoadLibrary注入DLL问题,求解|::::广海游戏:::: - ★广海社区★ -
授人以鱼不如授人以渔 - Powered by phpwind
查看完整版本: [--
WIN7下远程LoadLibrary注入DLL问题,求解
此贴&&&&&我是在这个帖子上下载的程序,测试了LoadLibrary那种注入方式。&&&我记得以前在家里台式机器XP下,可以实现远程注入&可现在我在笔记本WIN7下,就不灵了,发现DLL不运行,我就在360进程管理器下查看目标进程的DLL文件,还是没找到,就确定并没有注入成功。&&&有人遇到过这样的情况的。很急。因为我现在必须用到这种注入方式,其他方式解决我遇到的一个问题不好使。&&&我把这个源码里注入操作的源码贴出来。&&&& //....................上面的就不写了。 &//tempDll是DLL的路径& //hProcess是目标进程的ID &//这俩变量我已经检查过了,是绝对没有错误的。& //下面是实现注入的过程&&    DWORD dwSize = tempDll.GetLength() + 1; &&    LPVOID lpBuf = VirtualAllocEx( hProcess, NULL, dwSize, MEM_COMMIT, PAGE_READWRITE );    &    if ( NULL == lpBuf )    &    {    &        CloseHandle( hProcess );  &        AfxMessageBox(&申请内存出错!&);&        &        // 失败处理    &    }    &    if ( WriteProcessMemory( hProcess, lpBuf, (LPVOID)tempDll.GetBuffer(tempDll.GetLength()), dwSize, &dwWritten ) )    &    {    &        // 要写入字节数与实际写入字节数不相等,仍属失败    &        if ( dwWritten != dwSize )    &        {    &            VirtualFreeEx( hProcess, lpBuf, dwSize, MEM_DECOMMIT );    &            CloseHandle( hProcess );  &            AfxMessageBox(&写入内存大小不符!&);&            &            // 失败处理    &        }   &        else&        {&            tempDll.ReleaseBuffer();&        }&    }    &    else   &    {    &        CloseHandle( hProcess );    &        AfxMessageBox(&写入内存出错!&);&        &        // 失败处理    &    }    &    // 使目标进程调用LoadLibrary,加载DLL    &    DWORD dwID;    &    LPVOID pFunc = LoadLibraryA;    &    HANDLE hThread = CreateRemoteThread( hProcess, NULL, 0, (LPTHREAD_START_ROUTINE)pFunc, lpBuf, 0, &dwID ); &    // 等待LoadLibrary加载完毕&    WaitForSingleObject( hThread, INFINITE );  &    // 释放目标进程中申请的空间&    VirtualFreeEx( hProcess, lpBuf, dwSize, MEM_DECOMMIT );    &    CloseHandle( hThread );    &    CloseHandle( hProcess );   &&&有人跟我说是没提权我就找了提权的代码,试了还是不行&&&//提升下自己的权限&&&&&TOKEN_PRIVILEGES&&&&&HANDLE hT&&&&&if(!OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES|TOKEN_QUERY,&hToken)){&&&&&&&&&MessageBox(&OpenProcessToken failed!&);//获得进程句柄失败&&&&&}&&&&&LookupPrivilegeValue(NULL,&SeDebugPrivilege&,&tkp.Privileges[0].Luid);//获得本地机唯一的标识&&&&&tkp.PrivilegeCount=1;&&&&&tkp.Privileges[0].Attributes =&&SE_PRIVILEGE_ENABLED;&&&&&AdjustTokenPrivileges(hToken, FALSE, &tkp, 0,(PTOKEN_PRIVILEGES) NULL, 0);//调整获得的权限&&&&&if(GetLastError() != ERROR_SUCCESS){&&&&&&&&&MessageBox(&AdjustTokenPrivileges enable failed!&);//修改权限失败&&&&&}&&&也有人说获得 LoadLibraryA 函数地址的方式不对。&我就从&LPVOID pFunc = LoadLibraryA;   &改成了&LPVOID pFunc = GetProcAddress(LoadLibrary(&Kernel32.dll&),&LoadLibraryA&);&&&&&&还是不行。&&惆怅,希望知情者能点播一下。实在没思路了。
1.uac&&2.openprocess权限不够&&3.目标进程有防注入
1.UAC 的话,应该有提示的。系统没提示。&&2.openprocess的写的是   OpenProcess(PROCESS_ALL_ACCESS, FALSE,dwProcessID);  &权限应该够了啊。&&3.注入记事本也是不行。所以应该不是防注入
引用第2楼dudl于 03:47发表的 回 1楼(twilight) 的帖子 :&1.UAC 的话,应该有提示的。系统没提示。&2.openprocess的写的是   OpenProcess(PROCESS_ALL_ACCESS, FALSE,dwProcessID);  &权限应该够了啊。&....... &&..你对uac理解错了&权限问题 右键 管理员身份运行就好了 &或者在在manifest文件里加入管理员权限申请
UAC是什么啊
引用第3楼若囿于 04:36发表的 Re:回 1楼(twilight) 的帖子 :&..你对uac理解错了&权限问题 右键 管理员身份运行就好了 &或者在在manifest文件里加入管理员权限申请 &&&&多谢哥们。又学了点东西,呵呵。多谢。
编译的时候 修改一下设置
请问怎么修改,我也遇到这问题了,查资料看到一篇文章说64位系统和32位系统的PE文件头不同,所以注入不了
查看完整版本: [--
Powered by
Time 0.078124 second(s),query:2 Gzip enabledLoadLibrary查找路径及相关问题解决
& & LoadLibrary失败
&正常情况,在一个exe中LoadLibrary(DLL1)可以获得正常的结果;但是,当我们需要load的DLL1如果调用了其它的DLL2,
那么我们就会得到一个结果:The program can't start because ****.dll is missing
from you computer. Try reinstalling the program to fix this
problem.用@err,hr查看:The specified module could not be found.
注意:我这里讨论的是指Dll1与Dll2在同一个目录,Dll1与Dll2均是自己定义的DLL,而exe与这两个dll不在同一个目录。
讨论正常的情况:如果Dll1与Dll2没有关系,即Dll1是独立的,它不依赖其它自定义的Dll,
则我们LoadLibrary(Dll1的绝对路径)肯定能成功。
讨论不正常的情况:如果Dll1与Dll2有关系,即Dll1不是独立的,它依赖自定义的Dll2,
则我们LoadLibrary(Dll1的绝对路径)时候就会出现上面的情况。
& & 为什么呢?
按理说,Dll1的绝对路径都写上了,明明是对的,可为什么得到的返回值是0x,而且说module找不到??虽然Dll1依赖于Dll2,但是Dll1与Dll2是在同一个目录下啊,怎么找不到呢?
其实,这里分两个步骤,LoadLibrary首先会去加载Dll1, 然后加载它依赖的Dll2.
对于Dll1,因为有绝对路径,所以能找到,但是,对于Dll2来说,我们却找不到,尽管Dll1与Dll2在同一个目录。LoadLibrary只管你指明要加载的DLL,它才不会去主动寻找你依赖的DLL。因此这就造成了module找不到,这里说的找不到module一般都是指找不到依赖的DLL。
至于LoadLibrary的查找路径,可以参见MSDN上的文章:Dynamic-Link Library Search
默认情况如下:
& & The directory from which
the application loaded. (应用程序所在的目录)&
& & The system directory.
Use the GetSystemDirectory function to get the path of this
directory. (system32目录)
& & The 16-bit system
directory. There is no function that obtains the path of this
directory, but it is searched. (System目录)&
& & The Windows directory.
Use the GetWindowsDirectory function to get the path of this
directory. (Windows目录)&
& & The current directory.
(不清楚这个目录和应用程序所在的目录有什么区别)&
The directories that are listed in the PATH environment
variable. Note that this does not include &
& the per-application path specified by the App
Paths registry key. (PATH路径)&
解决办法:其实我们只需要将Dll2的路径添加到LoadLibrary的查找目录就可以了。
在Dll1的工程属性-&Linker-&Advanced下修改Delay
Loaded DLL,将之改为Support Unload (/DELAY:UNLOAD);
在Dll1的工程属性-&Linker-&Input下修改Delay
Loaded DLLs,在后面添加Dll2;
在Dll1的代码中添加一些内容。我这里选择DllMain。
DLL_PROCESS_ATTACH:
SetDllDirectory(Dll2的路径);
& case DLL_THREAD_ATTACH:
SetDllDirectory(Dll2的路径);
& & 那么SetDllDirectory
有何功效呢?参见MSDN。
& & The SetDllDirectory
function affects all subsequent calls to the LoadLibrary and
LoadLibraryEx functions. It also effectively disables safe DLL
search mode while the specified directory is in the search
& & After calling
SetDllDirectory, the DLL search path is:
& & The directory from which
the application loaded.&
& & The directory specified
by the lpPathName parameter. (添加了DLL
Search的路径)&
& & The system directory.
Use the GetSystemDirectory function to get the path of this
directory. & & &
The name of this directory is System32.&
& & The 16-bit system
directory. There is no function that obtains the path of this
directory, but it is searched. The name of this directory is
& & The Windows directory.
Use the GetWindowsDirectory function to get the path of this
directory.&
& & The directories that are
listed in the PATH environment variable.&
& & To revert to the default
search path used by LoadLibrary and LoadLibraryEx, call
SetDllDirectory with NULL. This also restores safe DLL search mode
based on the SafeDllSearchMode registry value.
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/woyaowenzi/archive//4332187.aspx
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。}

我要回帖

更多关于 cdll.loadlibrary 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信