
PyMultitor - Python マルチスレッド Tor プロキシ
Python マルチスレッド Tor プロキシ。
同時に2つの異なる場所にいたいと思ったことはありませんか?
自問したとき、頭の中でこのソリューションを開発し始めました。
ペネトレーションテストを実行中に、「攻撃」IP をブロックするセキュリティデバイスによる問題がよく発生します。
これには本当にイライラさせられたので、この問題を解決するスクリプトを作成しました。
多数の IP アドレスを使って攻撃を行うことで、特に Web アプリケーションファイアウォールのバイパス、ブルートフォース攻撃などを試みる場合、より良い結果が保証されます。
[Blackhat Asia] https://www.blackhat.com/asia-17/arsenal.html#pymultitor
[Owasp-IL Presentation] https://www.owasp.org/images/3/3d/OWASPIL-2016-02-02_PyMultiTor_TomerZait.pdf
[DigitalWhisper Article (ヘブライ語)] http://www.digitalwhisper.co.il/files/Zines/0x2E/DW46-3-PyMultitor.pdf

sudo apt install -y torsudo yum install -y torsudo dnf install -y tor{tor-win32-*_path}\Tor--tor-cmd 引数を使用してください(例: pymultitor --tor-cmd "c:\Pentest\Web\tor-win32-0.2.9.9\Tor\tor.exe")brew install torpip3 install pymultitor
docker pull realgam3/pymultitor
git clone https://github.com/realgam3/pymultitor.git
cd pymultitor
# Install python dependencies.
# Depending on your setup, one or both of these may require sudo.
pip3 install -r requirements.txt
python3 setup.py install
# Confirm that everything works
pymultitor --help
インストールに関するバグ報告は歓迎します!
pymultitor --on-string "Your IP Address Blocked" を実行します。http://127.0.0.1:8080) を使用します。Your IP Address Blocked が含まれている場合、別の IP アドレスから再送信されます。docker run --rm -p 8080:8080 realgam3/pymultitor --on-string "Your IP Address Blocked" を実行します。http://127.0.0.1:8080) を使用します。Your IP Address Blocked が含まれている場合、別の IP アドレスから再送信されます。PyMultiTor は、プロキシ ID を管理するための REST API を提供します。API を使用すると、必要に応じてプロキシ ID を変更できます。
API は Bearer トークンによる認証が必要です。トークンは以下の2つの方法で設定できます。
環境変数: PYMULTITOR_TOKEN 環境変数を設定します。
export PYMULTITOR_TOKEN="your-secret-token-here"
注意: PYMULTITOR_TOKEN が設定されていない場合、PyMultiTor はランダムなトークンを自動生成します。
コマンドライン: PyMultiTor の起動時:
pymultitor
ID 変更
/identityPOST使用例:
curl http://pymultitor/identity -X POST \
--header "Proxy-Authorization: Bearer {Token}" \
--proxy http://localhost:8080
ステータス
/statusGET使用例:
curl http://pymultitor/status \
--header "Proxy-Authorization: Bearer {Token}" \
--proxy http://localhost:8080
注意: {Token} は実際の認証トークンに置き換えてください。
pymultitor --help
usage: pymultitor.py [-h] [-v] [-lh LISTEN_HOST] [-lp LISTEN_PORT] [-s] [-a AUTH] [-i] [-d] [-p PROCESSES] [-c CMD] [-e CONFIG] [-t TIMEOUT] [-r TRIES]
[--request-timeout REQUEST_TIMEOUT] [--on-count ON_COUNT] [--on-string ON_STRING] [--on-regex ON_REGEX] [--on-rst] [--on-status-code [ON_STATUS_CODE ...]]
[--on-timeout]
options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-lh, --host LISTEN_HOST
proxy listen host. (default: 127.0.0.1)
-lp, --port LISTEN_PORT
proxy listen port (default: 8080)
-s, --socks use as socks proxy (not http proxy) (default: False)
-a, --auth AUTH set proxy authentication (format: 'username:pass') (default: )
-i, --insecure insecure ssl (default: False)
-d, --debug Debug Log. (default: False)
-p, --tor-processes PROCESSES
number of tor processes in the cycle (default: 2)
-c, --tor-cmd CMD tor cmd (executable path + arguments) (default: tor)
-e, --tor-config CONFIG
tor extended json configuration (default: {})
-t, --tor-timeout TIMEOUT
timeout in seconds for starting a tor instance; 0 disables timeout (default: 90)
-r, --tor-tries TRIES
number tries to start a tor instance before it fails (default: 5)
--request-timeout REQUEST_TIMEOUT
timeout in seconds for http requests; 0 disables timeout (default: 0)
--on-count ON_COUNT change ip every x requests (resources also counted) (default: 0)
--on-string ON_STRING
change ip when string found in the response content (default: )
--on-regex ON_REGEX change ip when regex found in The response content (default: )
--on-rst change ip when connection closed with tcp rst (default: False)
--on-status-code [ON_STATUS_CODE ...]
change ip when one of the specified status codes is returned (default: [])
--on-timeout change ip when request times out (default: False)