|
本帖最后由 Mouri_Naruto 于 2015-10-2 15:04 编辑
感谢yamingw大大的SetWoW64工具(http://bbs.wuyou.net/forum.php?mod=viewthread&tid=371490)
我在他的基础上做了以下改进
1.补丁退出后内核对象不会消失(即不需要后台运行)
2.减小程序大小(原作者程序大小229KB受够了!本工具只要不到5KB)
3.去掉Kernel32,User32等Windows子系统dll的依赖(我的依赖只有ntdll;所以改成native程序也是很容易的)
但是也有遗憾,由于能力限制,没有实现原作者帖子fryquez的回复(is it possible to also add KnownDlls32 Sections?),希望有大牛可以实现
PS:附WOW64被“封杀”的原因
我今天发现了一个令人震惊的消息:原来PE可以用WOW64是Bug;微软其实在5年前的Win7(甚至9年前的Vista)中的smss(文件版本是6.1.7600.16385)的汇编代码中就有封杀PE下运行WOW64的判断
if ( !MiniNTBoot && !_wcsicmp(v8, L"DllDirectory32") )
{
v9 = (__int64)&SmpKnownDllPath32;
return SmpInitializeKnownDllPath(v9, v7, v6);
}
上述代码的逻辑即如果MiniNTBoot返回false且_wcsicmp(v8, L"DllDirectory32") 返回0(即注册表键值找到)再进行内核区对象创建
比如我随机抽取的64位8pe就没有WOW64内核对象,即没有KnownDll32目录对象
Win10应该是修复了Windows子系统的一个Bug(估计是增加了对内核对象的判断;如果存在则支持WOW64);所以Win10PE“和谐”WOW64其实只是为了修复漏洞
为何要封杀wow64? 因为微软在WinPE 1.0出来时就明确表明不能把PE当作正常系统使用。
本工具是开源的(代码附在压缩包内,使用VS2015编译);附源代码使用协议(MIT)
The MIT License (MIT)
Copyright (c) 2015 M2-Team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
PS:如果觉得这个工具不错,可以向M2-Team捐赠(支付宝账号: wxh32lkk@live.cn)
下载地址(包含源代码)
Win10WoW64Support With Source.zip
(379.64 KB, 下载次数: 487)
使用方法:直接运行即可
PS:打个小广告,NSudo.NET(NSudo 4.0)正在开发中,敬请期待
Mouri_Naruto@M2-Team
PS:M2-Team官方论坛对应帖子地址:http://innoalpha.ga/thread-16-1-1.html
|
评分
-
查看全部评分
|