關于m4ngl3m3
m4ngl3m3是一款功能強大的常見密碼模式生成工具,該工具可以幫助廣大研究人員使用字符串列表來生成常見的密碼模式。
工具安裝&運行
由于該工具基于純Python 3開發,因此我們首先需要在本地設備上安裝并配置好Python 3環境。接下來,廣大研究人員可以直接使用下列命令將該項目源碼克隆至本地:
git clone https://github.com/localh0t/m4ngl3m3.git
然后切換到項目目錄中,運行下列命令即可啟動m4ngl3m3:
cd m4ngl3m3 ./main.py
工具使用幫助
usage: main.py [-h] [-fy FROM_YEAR] [-ty TO_YEAR] [-sy] [-nf NUMBERS_FILE] [-sf SYMBOLS_FILE] [-cf CUSTOM_FILE] [-sbs] [-sap] [-mm MUTATION_METHODS] MUTATION_MODE STRINGS_FILE OUTPUT_FILE Common password pattern generator using strings list positional arguments: MUTATION_MODE 要執行的變異模式(prefix-mode | suffix-mode | dual-mode) STRINGS_FILE 要執行變異的字符串文件 OUTPUT_FILE 寫入變異字符串的文件路徑 optional arguments: -h, --help 顯示工具幫助信息和退出 -fy FROM_YEAR, --from-year FROM_YEAR 要迭代的起始年份 (默認: 2015) -ty TO_YEAR, --to-year TO_YEAR 要迭代的終止年份 (默認: 2020) -sy, --short-year 在迭代時添加年份短格式 (默認: False) -nf NUMBERS_FILE, --numbers-file NUMBERS_FILE 數字前綴/后綴文件 (默認: ./files/numbers/numbers_set2.txt) -sf SYMBOLS_FILE, --symbols-file SYMBOLS_FILE 符號前綴/后綴文件 (默認: ./files/symbols/symbols_set2.txt) -cf CUSTOM_FILE, --custom-file CUSTOM_FILE 自定義單詞/日期/字符串等文件 (默認: None) -sbs, --symbols-before-suffix 在年份/數字前插入自定義符號 (默認: False) -sap, --symbols-after-prefix 在年份/數字后插入自定義符號 (默認: False) -mm MUTATION_METHODS, --mutation-methods MUTATION_METHODS 要執行的變異方法 (默認:normal,uppercase,firstup,replacevowels) 工具參數使用
工具參數使用
--from-year (-fy), --to-year (-ty)
設置希望腳本迭代年份的起止時間,輸出樣例:
password2017 [...] password2018 [...] password2019
--short-year (-sy)
迭代年份時,可以添加兩位數的短格式年份,輸出樣例:
password17 [...] password18 [...] password19
--numbers-file (-nf)
我們可以選擇一個文件,其中包含了人們經常添加到密碼中的數字,生成的輸出樣例如下:
password1 [...] password123 [...] password1234
--symbols-file (-sf)
這個選項可以選擇一個包含人們經常添加到密碼中符號的文件,生成的輸出樣例如下:
password123! [...] password2018? [...] password1234.
--custom-file (-cf)
在這里,我們可以添加所知道的關于目標的任何其他信息,可以是公司首字母縮寫、出生日期、特殊日期……到特定年份、短關鍵字等。這個自定義字符串將以與年份/數字相同的方式處理生成的輸出樣例如下:
passwordABC [...] password01011980! [...] password.admin
MUTATION_MODE(變異模式)
suffix-mode:后綴模式,例如password2018!; prefix-mode:前綴模式,例如!2018password; dual-mode:雙模式運行;
工具使用演示
使用演示一
$ ./main.py --from-year 2017 --to-year 2018 --symbols-before-suffix suffix-mode strings.txt output.txt (or, shorter version) $ ./main.py -fy 2017 -ty 2018 -sbs suffix-mode strings.txt output.txt [!] Starting... [+] Normal-Mangling mutation method done on string: admin [+] UpperCase-Mangling mutation method done on string: admin [+] FirstUp-Mangling mutation method done on string: admin [+] ReplaceVowels-Mangling mutation method done on string: admin --- [+] Normal-Mangling mutation method done on string: companyname [+] UpperCase-Mangling mutation method done on string: companyname [+] FirstUp-Mangling mutation method done on string: companyname [+] ReplaceVowels-Mangling mutation method done on string: companyname --- [!] All done! [!] Strings read: 2 [!] Strings written: 888 [!] Exiting ...
輸入文件:
admin companyname
輸出文件:
admin admin! [...] Admin2017! Admin!2017 [...] COMPANYNAME1234! COMPANYNAME!1234 [...] c0mp4nyn4m32018@ c0mp4nyn4m3@2018 [...]
使用演示二
$ ./main.py -fy 2016 -ty 2019 -sy -nf ./files/numbers/numbers_set1.txt -sf ./files/symbols/symbols_set1.txt -sbs -sap -mm normal,firstup,doubleandfirstup,basicleet dual-mode strings.txt output.txt [!] Starting... [+] Normal-Mangling mutation method done on string: password [+] FirstUp-Mangling mutation method done on string: password [+] DoubleAndFirstUp-Mangling mutation method done on string: password [+] BasicLeet-Mangling mutation method done on string: password --- [+] Normal-Mangling mutation method done on string: example [+] FirstUp-Mangling mutation method done on string: example [+] DoubleAndFirstUp-Mangling mutation method done on string: example [+] BasicLeet-Mangling mutation method done on string: example --- [!] All done! [!] Strings read: 2 [!] Strings written: 1288 [!] Exiting ...
輸入文件:
password example
輸出文件:
password password! password@ [...] !2018PasswordPassword !18PasswordPassword 2018!PasswordPassword 18!PasswordPassword [...] p455w0rd$1 p455w0rd123 p455w0rd123! p455w0rd!123 [...] Example!2019 Example!19 [...]
許可證協議
本項目的開發與發布遵循Creative Commons BY-NC-SA 4.0開源許可證協議。
項目地址
m4ngl3m3:https://github.com/localh0t/m4ngl3m3
參考資料
https://github.com/digininja/CeWL
黑白之道
ManageEngine卓豪
上官雨寶
007bug
上官雨寶
上官雨寶
商密君
一顆小胡椒
信息安全與通信保密雜志社
信息安全與通信保密雜志社
一顆小胡椒
合天網安實驗室