工具|渗透测试之5种工具分享(Shiro插件、CTFR、JR-scan、dirsearch-Web等)
工具目錄
1.BurpShiroPassiveScan是一款基于BurpSuite的被動式shiro檢測插件;
2.reconftw是對具有多個子域的目標執行全面檢查的腳本;
3.CTFR是一款不適用字典攻擊也不適用蠻力獲取的子域名的工具;
4.JR-scan是一款一鍵實現基本信息收集,支持POC掃描,支持利用AWVS探測的工具
5.dirsearch-Web是一種成熟的命令行工具,旨在暴力破解Web服務器中的目錄和文件
1.BurpShiroPassiveScan
介紹
BurpShiroPassiveScan 一個希望能節省一些滲透時間好進行劃水的掃描插件
該插件會對BurpSuite傳進來的每個不同的域名+端口的流量進行一次shiro檢測
目前的功能如下
?shiro框架指紋檢測?shiro加密key檢測
安裝
這是一個 java maven項目
如果你想自己編譯的話, 那就下載本源碼自己編譯成 jar包 然后進行導入BurpSuite
如果不想自己編譯, 那么下載該項目提供的 jar包 進行導入即可
檢測方法選擇
目前有一種方法進行 shiro框架 key的檢測
1.l1nk3r師傅 的 基于原生shiro框架 檢測方法
l1nk3r師傅的檢測思路地址:?https://mp.weixin.qq.com/s/do88_4Td1CSeKLmFqhGCuQ
目前這兩種方法都已經實現!!!
根據我的測試 l1nk3r師傅 的更加適合用來檢測“shiro key”這個功能!!!
使用 l1nk3r師傅 這個方法 對比 URLDNS 我認為有以下優點
1.去掉了請求dnslog的時間, 提高了掃描速度, 減少了大量的額外請求2.避免了有的站點沒有 dnslog 導致漏報3.生成的密文更短, 不容易被waf攔截
基于以上優點, 我決定了, 現在默認使用 l1nk3r師傅 這個方法進行 shiro key的爆破
使用方法
例如我們正常訪問網站
訪問完畢以后, 插件就會自動去進行掃描
如果有結果那么插件就會在以下地方顯示
?Extender?Scanner-Issue activity
問題查看
shiro加密key查看
shiro加密方法
目前搭配了兩種加密方法 cbc 與 gcm
cbc就是經常使用的
gcm就是最新出的
tag界面查看漏洞情況
現在可以通過tag界面查看漏洞情況了
分別會返回
?waiting for test results = 掃描shiro key 中?shiro key scan out of memory error = 掃描shiro key時,發生內存錯誤?shiro key scan diff page too many errors = 掃描shiro key時,頁面之間的相似度比對失敗太多?shiro key scan task timeout = 掃描shiro key時,任務執行超時?shiro key scan unknown error = 掃描shiro key時,發生未知錯誤?[-] not found shiro key = 沒有掃描出 shiro key?[+] found shiro key: xxxxxx = 掃描出了 shiro key
注意: 發生異常錯誤的時候,不用擔心下次不會掃描了,下次訪問該站點的時候依然會嘗試進行shiro key掃描,直到掃描完畢為止
項目地址
https://github.com/suifengg/BurpShiroPassiveScan
2.reconftw
介紹
這是一個簡單的腳本,旨在對具有多個子域的目標執行全面檢查。
安裝
git clone https://github.com/six2dez/reconftw cd reconftw chmod +x *.sh ./install.sh ./reconftw.sh -d target.com -a用法
./reconfw.sh -h
$ ./reconftw.sh -h██?███ ▓█████ ▄████▄ ?█████ ███▄ █ █████?▄▄▄█████▓ █ █?▓██ ? ██?▓█ ? ?██? ?█ ?██? ██? ██ ?█ █ ▓██ ? ▓ ██? ▓?▓█? █ ?█? ▓██ ?▄█ ??███ ?▓█ ▄ ?██? ██?▓██ ?█ ██??████ ? ? ▓██? ???█? █ ?█ ?██??█▄ ?▓█ ▄ ?▓▓▄ ▄██??██ ██?▓██? ?▌██??▓█? ? ? ▓██▓ ? ?█? █ ?█ ?██▓ ?██???████?? ▓███? ?? ████▓???██? ▓██???█? ?██? ? ??██?██▓ ? ?▓ ??▓??? ?? ?? ?? ? ?? ?????? ? ?? ? ? ? ? ? ?? ? ▓?? ? ?? ? ?? ? ? ? ? ? ? ? ?? ? ?? ? ?? ? ? ? ? ? ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?? ? ? ? ? ? ? by @six2dez1(Twitter) or @six2dez(rest of sites) Params (-d always required):./reconftw.sh -d target.com Target domain (required always)./reconftw.sh -l targets.txt Web list (required only with -w)Flags (1 required): ./reconftw.sh -a All checks (default and recommended)./reconftw.sh -s Only subdomains./reconftw.sh -g Only Google Dorks./reconftw.sh -w Only web scan./reconftw.sh -h Show this helpExamples: ./reconftw.sh -d target.com -a -> All checks./reconftw.sh -d target.com -s -> Only subdomains./reconftw.sh -d target.com -g -> Only Google Dorks./reconftw.sh -d target.com -l targets.txt -w -> Only Web Scan (Target list required)用例
./reconfw.sh -a baidu.com特征
Google Dorks(基于deggogle_hunter)
子域枚舉(多種工具:Pasive,分辨率,蠻力和排列)
Sub TKO(副翼和核)
探測(httpx)
Web屏幕截圖(水色)
模板掃描儀(核)
端口掃描(naabu)
網址提取(waybackurls和gau)
模式搜索(gf和gf模式)
參數發現(paramspider和arjun)
XSS(Gxss和dalfox)
GitHub檢查(git-hound)
Favicon Real IP(收藏夾)
Javascript檢查(JSFScan.sh)
目錄模糊/發現(dirsearch和ffuf)
Cors(CORScanner)
SSL檢查(testssl)
您也可以只執行子域掃描,網絡掃描或Google Dork。請記住,webscan需要帶有-l標志的目標列表。
它使用目標域的名稱在Recon /文件夾中生成并輸出,例如Recon / target.com /
項目地址
https://github.com/six2dez/reconftw
3.CTFR
介紹
您會錯過AXFR技術嗎?此工具允許您在幾秒鐘內從HTTP S網站獲取子域。
這個怎么運作?CTFR既不使用字典攻擊也不使用蠻力,而只是濫用證書透明度日志。
有關CT日志的詳細信息,請www.certificate-transparency.org和crt.sh。[1]
入門
請按照以下說明安裝運行CTFR
先決條件
R確保安裝以下工具
Python 3.0 or later. pip3 (sudo apt-get install python3-pip).正在安裝
$ git clone https://github.com/UnaPibaGeek/ctfr.git $ cd ctfr $ pip3 install -r requirements.txtRunning
$ python3 ctfr.py --help用法
-d --domain [target_domain] (required) -o --output [output_file] (optional)例子
$ python3 ctfr.py -d starbucks.com $ python3 ctfr.py -d facebook.com -o /home/shei/subdomains_fb.txt項目地址
https://github.com/UnaPibaGeek/ctfr
4.JR-scan
介紹
利用python3寫的綜合掃描工具,可“一鍵”實現基本信息收集(端口、敏感目錄、WAF、服務、操作系統),支持POC掃描(可自行添加POC,操作簡單),支持利用AWVS探測,未來爭取實現xray聯動。
在啟動掃描器后,傻瓜式操作即可完成掃描。
掃描器允許進行單個掃描,批量掃描(從文件列表里掃描網站),C段掃描
啟動方法:直接利用Python3運行JR.py即可
提示:最好是在liux環境下運行,win的話,可能會出現編碼問題!!!
安裝
git clone https://github.com/suifengg/JR-scan python3.8 /JR/JR.PY啟動界面
數據庫界面
網站整體界面
端口界面
URL界面
漏洞界面
項目地址
https://github.com/suifengg/JR-scan
5.dirsearch-Web路徑掃描器
總覽
?Dirsearch是一種成熟的命令行工具,旨在暴力破解Web服務器中的目錄和文件。?隨著6年的增長,dirsearch現在已成為頂級的Web內容掃描儀。?作為功能豐富的工具,dirsearch為用戶提供了執行復雜的Web內容發現的機會,其中包括單詞列表的許多矢量,高精度,出色的性能,高級的連接/請求設置,現代的蠻力技術和出色的輸出。
安裝及使用
git clone https://github.com/maurosoria/dirsearch.git cd dirsearch python3 dirsearch.py -u <URL> -e <EXTENSIONS>?要使用SOCKS代理或../在單詞列表中使用它,您需要使用以下命令安裝點子requirements.txt:pip3 install -r requirements.txt?如果您使用的是Windows,并且沒有git,則可以在此處[2]安裝ZIP文件。Dirsearch還支持Docker[3]
Dirsearch需要python 3或更高版本
特征
?快速?易于使用?多線程?通配符響應過濾(無效的網頁)?保持活躍的聯系?支持多種擴展?支持每種HTTP方法?支持HTTP請求數據?擴展不包括?報告(純文本,JSON,XML,Markdown,CSV)?遞歸暴力破解?IP范圍內的目標枚舉?子目錄暴力破解?力擴展?HTTP和SOCKS代理支持?HTTP cookie和標頭支持?文件中的HTTP標頭?用戶代理隨機化?代理主機隨機化?批量處理?請求延遲?429個響應碼檢測?多種單詞列表格式(小寫,大寫,大寫)?文件中的默認配置?通過主機名強制請求的選項?添加自定義后綴和前綴的選項?可以將響應代碼列入白名單,支持范圍(-i 200,300-399)?可以將響應代碼列入黑名單,支持范圍(-x 404,500-599)?選擇按大小排除響應?選擇排除文字回復?選擇排除正則表達式的響應?選擇通過重定向排除響應?僅顯示響應長度在范圍內的項目的選項?從每個單詞列表條目中刪除所有擴展名的選項?靜音模式?調試模式
關于詞表
摘要:
Wordlist必須是一個文本文件,每一行都是一個端點。關于擴展名,與其他工具不同,如果不使用該-f標志,dirsearch不會將擴展名附加到每個單詞上。默認情況下,僅%EXT%單詞表中的關鍵字將被擴展名(-e <extensions>)替換。
詳細資料:
?單詞表中的每一行都將照此處理,除非使用特殊關鍵字%EXT%時,它將為作為參數傳遞的每個擴展名(-e | --extensions)生成一個條目。
例:
root/ index.%EXT%傳遞擴展名“ asp”和“ aspx”(-e asp,aspx)將生成以下字典:
root/ index index.asp index.aspx?對于沒有%EXT%的單詞列表(例如SecLists[4]),您需要使用*-f | --force-extensions**開關可將擴展名附加到單詞表中的每個單詞以及“ /”。對于不想強制使用的單詞列表中的條目,可以在它們的末尾添加%NOFORCE%*,以便dirsearch不會附加任何擴展名。
例:
admin home.%EXT% api%NOFORCE%通過**-f** /?--force-extensions標志(-f -e php,html)傳遞擴展名“ php”和“ html”將生成以下字典:
admin admin.php admin.html admin/ home home.php home.html api要使用多個單詞列表,可以用逗號分隔單詞列表。示例:-w wordlist1.txt,wordlist2.txt
選件
Usage: dirsearch.py [-u|--url] target [-e|--extensions] extensions [options]Options:--version show program's version number and exit-h, --help show this help message and exitMandatory:-u URL, --url=URL Target URL-l FILE, --url-list=FILEURL list file--cidr=CIDR Target CIDR-e EXTENSIONS, --extensions=EXTENSIONSExtension list separated by commas (Example: php,asp)-X EXTENSIONS, --exclude-extensions=EXTENSIONSExclude extension list separated by commas (Example:asp,jsp)-f, --force-extensionsAdd extensions to the end of every wordlist entry. Bydefault dirsearch only replaces the %EXT% keyword withextensionsDictionary Settings:-w WORDLIST, --wordlists=WORDLISTCustomize wordlists (separated by commas)--prefixes=PREFIXESAdd custom prefixes to all entries (separated bycommas)--suffixes=SUFFIXESAdd custom suffixes to all entries, ignore directories(separated by commas)--only-selected Only entries with selected extensions or no extension+ directories--remove-extensionsRemove extensions in all wordlist entries (Example:admin.php -> admin)-U, --uppercase Uppercase wordlist-L, --lowercase Lowercase wordlist-C, --capital Capital wordlistGeneral Settings:-r, --recursive Bruteforce recursively-R DEPTH, --recursion-depth=DEPTHMaximum recursion depth-t THREADS, --threads=THREADSNumber of threads--subdirs=SUBDIRS Scan sub-directories of the given URL[s] (separated bycommas)--exclude-subdirs=SUBDIRSExclude the following subdirectories during recursivescan (separated by commas)-i STATUS, --include-status=STATUSInclude status codes, separated by commas, supportranges (Example: 200,300-399)-x STATUS, --exclude-status=STATUSExclude status codes, separated by commas, supportranges (Example: 301,500-599)--exclude-sizes=SIZESExclude responses by sizes, separated by commas(Example: 123B,4KB)--exclude-texts=TEXTSExclude responses by texts, separated by commas(Example: 'Not found', 'Error')--exclude-regexps=REGEXPSExclude responses by regexps, separated by commas(Example: 'Not foun[a-z]{1}', '^Error$')--exclude-redirects=REGEXPSExclude responses by redirect regexps or texts,separated by commas (Example: 'https://okta.com/*')--calibration=PATH Path to test for calibration--random-agent Choose a random User-Agent for each request--minimal=LENGTH Minimal response length--maximal=LENGTH Maximal response length-q, --quiet-mode Quiet mode--full-url Print full URLs in the output--no-color No colored outputRequest Settings:-m METHOD, --http-method=METHODHTTP method (default: GET)-d DATA, --data=DATAHTTP request data-H HEADERS, --header=HEADERSHTTP request header, support multiple flags (Example:-H 'Referer: example.com' -H 'Accept: */*')--header-list=FILE File contains HTTP request headers-F, --follow-redirectsFollow HTTP redirects--user-agent=USERAGENT--cookie=COOKIEConnection Settings:--timeout=TIMEOUT Connection timeout--ip=IP Server IP address-s DELAY, --delay=DELAYDelay between requests--proxy=PROXY Proxy URL, support HTTP and SOCKS proxies (Example:localhost:8080, socks5://localhost:8088)--proxy-list=FILE File contains proxy servers--matches-proxy=PROXYProxy to replay with found paths--max-retries=RETRIES-b, --request-by-hostnameBy default dirsearch requests by IP for speed. Thiswill force requests by hostname--exit-on-error Exit whenever an error occurs--debug Debug modeReports:--simple-report=OUTPUTFILE--plain-text-report=OUTPUTFILE--json-report=OUTPUTFILE--xml-report=OUTPUTFILE--markdown-report=OUTPUTFILE--csv-report=OUTPUTFILE注意:您可以通過編輯default.conf文件來更改dirsearch的默認配置(默認擴展名,超時,單詞列表位置等)。
使用
簡單實用
python3 dirsearch.py -u https://target python3 dirsearch.py -e php,html,js -u https://target python3 dirsearch.py -e php,html,js -u https://target -w /path/to/wordlist遞歸掃描
通過使用-r | --recursive參數,dirsearch將自動對找到的目錄進行暴力破解。
python3 dirsearch.py -e php,html,js -u https://target -r您可以使用-R或--recursion-depth設置最大遞歸深度
python3 dirsearch.py -e php,html,js -u https://target -r -R 3線程數
線程號(-t | --threads)反映了單獨的暴力破解進程的數量,每個進程將針對目標執行路徑暴力破解。因此,線程數越大,目錄搜索運行得越快。默認情況下,線程數為20,但是如果您想加快進度,可以增加它。
盡管如此,速度實際上仍然不可控,因為它很大程度上取決于服務器的響應時間。作為警告,我們建議您不要將線程數過大,以免受到過多自動化請求的影響,因此應對其進行調整以適合您要掃描的系統的功能。
python3 dirsearch.py -e php,htm,js,bak,zip,tgz,txt -u https://target -t 30前綴/后綴
?--prefixes:向所有條目添加自定義前綴
python3 dirsearch.py -e php -u https://target --prefixes .,admin,_,~基本單詞表:
tools生成的前綴:
.tools admintools _tools ~tools?--suffixes:向所有條目添加自定義后綴
python3 dirsearch.py -e php -u https://target --suffixes ~,/基本單詞表:
index.php internal生成后綴:
index.php~ index.php/ internal~ internal/排除擴展
使用**-X | --exclude-extensions**與您的exclude-extension列表一起刪除單詞列表中具有給定擴展名的所有條目
python3 dirsearch.py -e asp,aspx,htm,js -u https://target -X php,jsp,jspx基本單詞表:
admin admin.%EXT% index.html home.php test.jsp后:
admin admin.asp admin.aspx admin.htm admin.js index.html詞表格式
支持的單詞列表格式:大寫,小寫,大寫
小寫:
admin index.html test大寫:
ADMIN INDEX.HTML TEST篩選器
使用**-i | --include-status和-x | --exclude-status**選擇允許和不允許的響應狀態代碼
python3 dirsearch.py -e php,html,js -u https://target -i 200,204,400,403 -x 500,502,429還支持**--exclude-sizes,-- **exclude-texts,--?exclude-regexps和**--exclude-redirects**以使用更高級的過濾器
python3 dirsearch.py -e php,html,js -u https://target --exclude-sizes 1B,243KB python3 dirsearch.py -e php,html,js -u https://target --exclude-texts "403 Forbidden" python3 dirsearch.py -e php,html,js -u https://target --exclude-regexps "^Error$"掃描子目錄
掃描子目錄
您可以從URL中使用**--subdirs**掃描子目錄。
python3 dirsearch.py -e php,html,js -u https://target --subdirs admin/,folder/,/此功能的反向版本是**--exclude-subdirs**,它可以防止目錄搜索進行強行強制執行的目錄,而在執行遞歸掃描時,這些目錄不應被強行使用。
python3 dirsearch.py -e php,html,js -u https://target --recursive -R 2 --exclude-subdirs "server-status/,%3f/"代理
Dirsearch支持SOCKS和HTTP代理,具有兩個選項:代理服務器或代理服務器列表。
python3 dirsearch.py -e php,html,js -u https://target --proxy 127.0.0.1:8080 python3 dirsearch.py -e php,html,js -u https://target --proxy socks5://10.10.0.1:8080 python3 dirsearch.py -e php,html,js -u https://target --proxylist proxyservers.txt報告
Dirsearch允許用戶將輸出保存到文件中。它支持多種輸出格式,例如text或json,并且我們會不斷更新新格式
python3 dirsearch.py -e php -l URLs.txt --plain-text-report report.txt python3 dirsearch.py -e php -u https://target --json-report target.json python3 dirsearch.py -e php -u https://target --simple-report target.txt其他命令
python3 dirsearch.py -e php,txt,zip -u https://target -w db/dicc.txt -H "X-Forwarded-Host: 127.0.0.1" -f python3 dirsearch.py -e php,txt,zip -u https://target -w db/dicc.txt -t 100 -m POST --data "username=admin" python3 dirsearch.py -e php,txt,zip -u https://target -w db/dicc.txt --random-agent --cookie "isAdmin=1" python3 dirsearch.py -e php,txt,zip -u https://target -w db/dicc.txt --json-report=target.json python3 dirsearch.py -e php,txt,zip -u https://target -w db/dicc.txt --header-list rate-limit-bypasses.txt python3 dirsearch.py -e php,txt,zip -u https://target -w db/dicc.txt --minimal 1 python3 dirsearch.py -e php,txt,zip -u https://target -w db/dicc.txt -q --stop-on-error python3 dirsearch.py -e php,txt,zip -u https://target -w db/dicc.txt --full-url python3 dirsearch.py -u https://target -w db/dicc.txt --no-extension還有更多功能,需要自己發現哦
提示
?要以每秒的請求速率運行dirsearch,請嘗試?-t <rate> -s 1?是否要查找配置文件或備份?試用--suffixes ~和--prefixes .?對于您不想強制擴展的某些端點,請%NOFORCE%在它們的末尾添加?是否只想查找文件夾/目錄?結合--no-extension和--suffixes /!?的組合--cidr,-F并且-q將降低大部分噪聲+假陰性的用CIDR當暴力破解
支持Docker
安裝Docker
curl -fsSL https://get.docker.com | bash建立映像目錄搜尋
創建圖像
docker build -t “ dirsearch:v0.4.1 ” 。使用目錄搜索
用于
docker run -it --rm "dirsearch:v0.4.1" -u target -e php,html,js,zip項目地址
https://github.com/suifengg/dirsearch
References
[1]?www.certificate-transparency.org和crt.sh。:?http://www.certificate-transparency.org和crt.sh。
[2]?此處:?https://github.com/maurosoria/dirsearch/archive/master.zip
[3]?Docker:?https://github.com/maurosoria/dirsearch#support-docker
[4]?SecLists:?https://github.com/danielmiessler/SecLists
總結
以上是生活随笔為你收集整理的工具|渗透测试之5种工具分享(Shiro插件、CTFR、JR-scan、dirsearch-Web等)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Kubernetes APIServer
- 下一篇: 优秀渗透工具资源整理(持续更新)