BruteLoops:協(xié)議無關(guān)的在線密碼安全檢測API
關(guān)于BruteLoops
BruteLoops是一款功能強(qiáng)大且協(xié)議無關(guān)的在線密碼安全檢測API,廣大研究人員可以使用BruteLoops來實(shí)現(xiàn)在線密碼猜解,以檢查用戶所使用的密碼是否安全,或識(shí)別密碼中的安全問題。
BruteLoops針對身份驗(yàn)證接口提供了密碼爆破猜解功能,代碼庫中提供了一個(gè)模塊化的使用示例,并演示了如何使用BruteLoops來實(shí)現(xiàn)密碼安全解析。它的功能非常齊全,并且提供了多個(gè)爆破模塊,下面給出的是其功能示例:
- http.accellion_ftp FTP HTTP接口登錄加速模塊
- http.basic_digest 通用HTTP基本摘要驗(yàn)證
- http.basic_ntlm 通用HTTP基本NTLM身份驗(yàn)證
- http.global_protectWeb接口全局保護(hù)
- http.mattermost Mattermost登錄Web接口
- http.netwrix Netwrix登錄Web接口
- http.okta Okta JSON API
- http.owa2010 OWA 2010Web接口
- http.owa2016 OWA 2016 Web接口
- smb.smb 針對單個(gè)SMB服務(wù)器執(zhí)行任務(wù)
- testing.fake 用于培訓(xùn)/測試的模擬身份驗(yàn)證模塊
關(guān)鍵功能
- 協(xié)議無關(guān)
- SQLite支持
- 密碼噴射和密碼填充
- 密碼猜解計(jì)劃任務(wù)
- 細(xì)粒度可配置性以避免鎖定事件
- 任務(wù)暫停和繼續(xù)
- 多進(jìn)程支持
- 日志記錄
工具依賴
BruteLoops工具要求Python 3.7或更高版本的Python環(huán)境,以及SQLAlchemy 1.3.0,后者可以通過pip工具以及該項(xiàng)目提供的requirements.txt來安裝:
- python3.7 -m pip install -r requirements.txt
工具安裝
廣大研究人員可以通過下列命令將該項(xiàng)目源碼克隆至本地,并安裝該工具所需的依賴組件:
- git clone https://github.com/arch4ngel/bruteloops
- cd bruteloops
- python3 -m pip install -r requirements.txt
工具使用
在使用該工具時(shí),我們可以按照以下步驟來對密碼安全測試進(jìn)行拆分:
- 尋找一個(gè)需要測試的目標(biāo)服務(wù);
- 如果py【1】中沒有存在該目標(biāo),則需要構(gòu)建一個(gè)回調(diào);
- 搜索某些用戶名、密碼和憑證信息;
- 通過向py【2】輸入認(rèn)證數(shù)據(jù)來構(gòu)建一個(gè)數(shù)據(jù)庫;
- 如果相關(guān),則枚舉或請求活動(dòng)目錄鎖定策略來智能地配置安全測試過程;
- 根據(jù)目標(biāo)鎖定策略執(zhí)行密碼安全測試【1】【3】【4】;
工具使用樣例
(1) 通過example.py執(zhí)行爆破猜解模塊
命令:
- archangel@deskjet:bruteloops_dev~> ./example.py test.sqlite3 testing.fake --help
輸出:
- usage: example.py dbfile testing.fake [-h] --username USERNAME --password PASSWORD
- Fake authentication module for training/testing
- optional arguments:
- -h, --help show this help message and exit
- --username USERNAME required - str - Username to check against
- --password PASSWORD required - str - Password to check against
(2) 通過dbmanager.py創(chuàng)建輸入數(shù)據(jù)庫
命令:
- archangel@deskjet:bruteloops_dev~> ./dbmanager.py --help
輸出:
- usage: dbmanager.py [-h] dbfile {dump-valid,dump-credentials,import-values,import-credentials,delete-values,delete-credentials} ...
- Manage BruteLoops input databases
- positional arguments:
- dbfile Database file to manipulate
- {dump-valid,dump-credentials,import-values,import-credentials,delete-values,delete-credentials}
- SUBCOMMANDS:
- dump-valid Dump valid credentials from the database
- dump-credentials Dump all credential values from the database
- import-values Import values into the target database
- import-credentials Import credential pairs into the target database
- delete-values Delete values from the target database
- delete-credentials Delete credential pairs from the target database
- optional arguments:
- -h, --help show this help message and exit
(3) 通過example.py執(zhí)行模擬爆破猜解模塊
命令:
- ./example.py test.sqlite3 \
- --parallel-guess-count 4 --auth-threshold 2 \
- --auth-jitter-min 1s --auth-jitter-max 5s \
- --threshold-jitter-min 10s --threshold-jitter-max 20s \
- -lf test.log \
- testing.fake --username administrator --password P@ssw0rd
輸出:
- archangel@deskjet:bruteloops_dev~> ./example.py test.sqlite3 -pgc 4 -at 2 -ajmin 1s -ajmax 5s -tjmin 10s -tjmax 20s -lf test.log testing.fake --username administrator --password P@ssw0rd
- 2020-12-08 15:22:50,077 - example.py - GENERAL - Initializing attack
- 2020-12-08 15:22:50,078 - BruteForcer - GENERAL - Initializing 4 process
- 2020-12-08 15:22:50,078 - BruteForcer - GENERAL - Logging attack configuration parameters
- 2020-12-08 15:22:50,078 - BruteForcer - GENERAL - Config Parameter -- authentication_jitter: <Jitter(min="1s", max="5s")>
- 2020-12-08 15:22:50,078 - BruteForcer - GENERAL - Config Parameter -- max_auth_jitter: <Jitter(min="10s", max="20s")>
- 2020-12-08 15:22:50,078 - BruteForcer - GENERAL - Config Parameter -- max_auth_tries: 2
- 2020-12-08 15:22:50,078 - BruteForcer - GENERAL - Config Parameter -- stop_on_valid: False
- 2020-12-08 15:22:50,078 - BruteForcer - GENERAL - Config Parameter -- db_file: test.sqlite3
- 2020-12-08 15:22:50,083 - BruteForcer - GENERAL - Beginning attack: 15:22:50 EST (20/12/08)
- 2020-12-08 15:22:51,572 - BruteForcer - INVALID - user1:pass1
- 2020-12-08 15:22:53,544 - BruteForcer - INVALID - admin:password
- 2020-12-08 15:22:54,597 - BruteForcer - INVALID - user1:password
- 2020-12-08 15:22:55,025 - BruteForcer - INVALID - admin:pass1
- 2020-12-08 15:22:55,247 - BruteForcer - INVALID - user2:pass1
- 2020-12-08 15:22:56,307 - BruteForcer - INVALID - user2:password
- 2020-12-08 15:22:59,025 - BruteForcer - INVALID - administrator:pass1
- 2020-12-08 15:22:59,680 - BruteForcer - INVALID - administrator:password
- 2020-12-08 15:23:07,384 - BruteForcer - INVALID - user1:welcome1
- 2020-12-08 15:23:07,955 - BruteForcer - INVALID - user1:P@ssw0rd
- 2020-12-08 15:23:08,775 - BruteForcer - INVALID - administrator:welcome1
- 2020-12-08 15:23:09,631 - BruteForcer - VALID - administrator:P@ssw0rd
- 2020-12-08 15:23:12,057 - BruteForcer - INVALID - user2:welcome1
- 2020-12-08 15:23:12,299 - BruteForcer - INVALID - admin:welcome1
- 2020-12-08 15:23:12,309 - BruteForcer - INVALID - user2:P@ssw0rd
- 2020-12-08 15:23:12,534 - BruteForcer - INVALID - admin:P@ssw0rd
- 2020-12-08 15:23:12,748 - BruteForcer - GENERAL - Attack finished
- 2020-12-08 15:23:12,748 - BruteForcer - GENERAL - Shutting attack down
- 2020-12-08 15:23:12,755 - BruteForcer - GENERAL - Closing/joining Processes
- 2020-12-08 15:23:12,758 - example.py - GENERAL - Attack complete
項(xiàng)目地址
BruteLoops:【GitHub傳送門】