文件上傳漏洞掃描器和利用工具
VSole2022-08-02 09:29:24
0x01 fuxploider介紹
Fuxploider是一種開源滲透測試工具,可自動檢測和利用文件上傳表單缺陷的過程。該工具能夠檢測允許上傳的文件類型,并能夠檢測哪種技術最適合在所需的Web服務器上上傳Web Shell或任何惡意文件。

0x02 fuxploider安裝
Python3.6+
git clone https://github.com/almandin/fuxploider.git cd fuxploider pip3 install -r requirements.txt
如果您的pip有問題(并且您使用Windows):
python3 -m pip install -r requirements.txt
對于Docker安裝
docker build -t almandin/fuxploider .
0x03 fuxploider使用
要獲取基本選項和開關的列表,請使用:
python3 fuxploider.py -h
幫助:
Usage: fuxploider.py [-h] [-d postData] [--proxy proxyUrl] [--proxy-creds [credentials]] [-f integer] [--cookies omnomnom] [--uploads-path path] [-t templateName] [-r regex] -u target [--not-regex regex] [--true-regex regex] [-l listOfExtensions | -n n] [-v | -vv | -vvv] [-s] [-y] [-T Threads] [-U useragent | --random-user-agent] [-m] [--input-name image] [--form-action upload.php]
可選參數:
-h, --help 顯示這個幫助信息并退出
-d postData, --data postData 通過 POST 方法傳輸的額外數據 Example: -d "key1=value1&key2=value2"
--proxy proxyUrl 代理信息 Example: --proxy "user:password@proxy.host:8080"
--proxy-creds [credentials] 在運行時提示代理憑據 Format: 'user:pass'
-f integer, --filesize integer 用于創建和上傳文件的文件大小 (in kB).
--cookies omnomnom 用于 HTTP 請求的 Cookie Example: PHPSESSID=aef45aef45afeaef45aef45&JSESSID=AQSEJHQSQSG
--uploads-path path 遠程服務器上放置上傳文件的路徑 Example: '/tmp/uploads/'
-t templateName, --template templateName 用于代碼執行檢測的惡意有效載荷 默認是使用所有已知的模板 有關模板的完整列表參見 TEMPLATE 部分
-r regex, --regex-override regex 指定用于檢測代碼執行的正則表達式 覆蓋在使用的模板中定義的默認代碼執行檢測正則表達式
-l listOfExtensions, --legit-extensions listOfExtensions 以逗號分隔的合法的擴展名列表 用于表單的正常使用 Example: 'jpg,png,bmp'
-n n 使用的常用擴展名的數量 Example: -n 100
-v 詳細模式
-vv 非常詳細的模式
-vvv 非常非常詳細的模式
-s, --skip-recon 跳過偵查階段 在這一階段 Fuxploider 試圖確定服務器期望和過濾哪些擴展名 需要 -l 開關
-y 蠻力檢測每個入口點 不會在第一次發現代碼執行時停止
-T Threads, --threads Threads 并行任務線程的數量
-U useragent, --user-agent useragent 在請求目標時使用的用戶代理
--random-user-agent 在請求目標時使用隨機的用戶代理
必要具名參數:
-u target, --url target 包含要測試的文件上傳表單的 Web 頁面 URL Example: http://test.com/index.html?action=upload
--not-regex regex 匹配上傳失敗的正則表達式
--true-regex regex 匹配上傳成功的正則表達式
手動表單檢測參數:
-m, --manual-form-detection 禁用自動表單檢測 當使用 JavaScript 加載表單和當 URL 中存在多個文件上傳表單而導致自動檢測失敗時很有用
--input-name image 輸入文件的名稱 Example: <input type="file" name="image">
--form-action upload.php 表單 action 屬性的路徑 Example: <form method="POST" action="upload.php">
[TEMPLATES]
模板是被掃描的遠程服務器上的惡意負載
代碼執行檢測是基于負載的預期輸出完成的
默認模板如下:
'phpinfo' - '簡單調用 phpinfo() 函數的 php 純文本文件'
'nastygif' - '有效的 GIF 文件 在文件的注釋部分調用 phpinfo() 函數'
'nastyjpg' - '有效的 JPG 文件 在文件的注釋部分調用 phpinfo() 函數'
'basicjsp' - '基礎的 JSP 文件 具有簡單的數學表達式'
'imagetragick' - '嘗試利用 ImageMagick CVE-2016–3714 RCE 漏洞'
'htaccess' - '利用 Apache 2.4 錯誤配置上傳 .htaccess 文件'
文章來源:霧曉安全
VSole
網絡安全專家