Mysql outfile getshell

利用需要满足以下条件:
root权限
GPC关闭(能使用单引号)
有绝对路径(读文件可以不用,写文件必须)
没有配置–secure-file-priv
利用注入点写shell一般都是用union,如下:

id=1 union select 查询的列数以及shell into outfile "绝对路径"

一般来说,使用union构造语句还是有些麻烦,毕竟需要得到列数,所以下面是不需要union的方法:

id=1 into outfile "绝对路径" fields terminated by 'shell'

这种方法较简单,但是需要被查询的表的列数>1,因为shell内容起的是分隔符的作用
如下:


Mysql outfile getshell_第1张图片
深度截图_选择区域_20170731121116.png

你可能感兴趣的:(Mysql outfile getshell)