LoginSignup
2

More than 5 years have passed since last update.

OWASP ZAP Tips & Tricks コマンドラインでプロキシ設定

Last updated at Posted at 2017-03-30

OWASP ZAPの外部プロキシ設定

OWASP ZAP自身の外部プロキシ設定は以下の場所で設定できます。

「ツール」->「オプション...」->「ネットワーク」

image

図の「外部プロキシサーバ」にチェックを入れ、「アドレス/ドメイン名」と「ポート(例:8080)」にZAPが接続する外部プロキシの情報を入力します。

コマンドラインのオプションでプロキシ設定

「ローカル・プロキシ」および「ネットワーク」設定は、コマンドラインのオプションでも指定可能です。

zap-user-dir.bat (Windows)

zap-user-dir.bat
set ZAP_USER_DIR="C:\Users\hoge\path\to\dir"
set ZAP_PROXY_HOST=127.0.0.1
set ZAP_PROXY_PORT=57777
set ZAP_PROXY_CHAIN_ENABLED=true
set ZAP_PROXY_CHAIN_HOSTNAME=127.0.0.1
set ZAP_PROXY_CHAIN_PORT=58888

java -jar    zap-2.6.0.jar ^
     -dir    %ZAP_USER_DIR% ^
     -host   %ZAP_PROXY_HOST% ^
     -port   %ZAP_PROXY_PORT% ^
     -config connection.proxyChain.enabled=%ZAP_PROXY_CHAIN_ENABLED% ^
     -config connection.proxyChain.hostName=%ZAP_PROXY_CHAIN_HOSTNAME% ^
     -config connection.proxyChain.port=%ZAP_PROXY_CHAIN_PORT%

zap-user-dir.sh (OS X, Ubuntu, CentOS, ...)

zap-user-dir.sh
ZAP_USER_DIR=/home/hoge/path/to/dir
ZAP_PROXY_HOST=127.0.0.1
ZAP_PROXY_PORT=57777
ZAP_PROXY_CHAIN_ENABLED=true
ZAP_PROXY_CHAIN_HOSTNAME=127.0.0.1
ZAP_PROXY_CHAIN_PORT=58888

java -jar    zap-2.6.0.jar \
     -dir    $ZAP_USER_DIR \
     -host   $ZAP_PROXY_HOST \
     -port   $ZAP_PROXY_PORT \
     -config connection.proxyChain.enabled=$ZAP_PROXY_CHAIN_ENABLED \
     -config connection.proxyChain.hostName=$ZAP_PROXY_CHAIN_HOSTNAME \
     -config connection.proxyChain.port=$ZAP_PROXY_CHAIN_PORT

コマンドラインのオプションや変数の意味

オプション 例の変数名 意味 値の例
-dir ZAP_USER_DIR ZAPの作業ディレクトリ "C:\Users\hoge\path\to\dir"
-host ZAP_PROXY_HOST ZAP自身の待受ホスト名またはIPアドレス 127.0.0.1
-port ZAP_PROXY_PORT ZAP自身の待受ポート 57777
-config connection.proxyChain.enabled ZAP_PROXY_CHAIN_ENABLED 外部プロキシに接続する場合にtrue true
-config connection.proxyChain.hostName ZAP_PROXY_CHAIN_HOSTNAME 外部プロキシのホスト名またはIPアドレス 127.0.0.1
-config connection.proxyChain.port ZAP_PROXY_CHAIN_PORT 外部プロキシのポート 58888

参考

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2