瀏覽器的Unsafe port

之前很方便,自己寫個應用程式,去 listen 指定 port ,用瀏覽器存取,都沒什麼問題。

但現在瀏覽器守備範圍變寬了,怕你危險,所以當使用奇怪的 port 時,就會出現 unsafe port 的訊息。

每種瀏覽器有不同的解除限制方式。

Chrome

啟動 google chrome 時,加入參數

--explicitly-allowed-ports=xxx

例如

C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --explicitly-allowed-ports=6666

我想使用 Chrome 引擎的幾個瀏覽器應該也都適用,例如 Brave、Edge …

Firefox

firefox 處理方式比較簡單,開個新分頁,網址列輸入

about:config

然後輸入

network.security.ports.banned.override

然後填入

87,88,89,1050

或是範圍

10000-19999

完成以後,會立刻生效。

參考資料

結語

開發上,還是會需要使用到這些不安全的 port 來開發,所以知道怎麼繞過去會蠻有用的。

Hash Buster

Hackin9 看到這篇:Hash Buster – Why crack hashes when you can bust them?

這篇主要是在說 md5/sha1 是不安全的,透過目前電腦的強大能力,已經是可逆的了。用 Hash-Buster 這工具可以很快逆向取得雜湊前的結果。

安裝 Hash-Buster

方法1

git clone https://github.com/s0md3v/Hash-Buster.git
cd Hash-Buster
make install

方法2

wget https://raw.githubusercontent.com/s0md3v/Hash-Buster/master/hash.py -O /usr/local/bin/buster && chmod +x /usr/local/bin/buster

使用

把雜湊值當參數

buster -s "5e8ff9bf55ba3508199d22e984129be6"

把內有雜湊值的檔案當參數

buster -f with_hashed.txt

找目錄下所有內含有雜湊值的檔案

buster -d /somedir

Python 3 產生 md5 雜湊

import hashlib

print(hashlib.md5('sample'.encode('utf-8')).hexdigest())

結語

這工具蠻方便的,而且很小,但使用時必須要注意的一件事情,裡面的程式主要是使用外部的服務,所以是把雜湊值上傳到外部網站,然後取得結果。若是因為不小心遺忘密碼,那麼在取得結果後,要趕緊進行變更,以防萬一。