
Dirstalk は、Web サーバー上のパスをブルートフォースするために設計されたマルチスレッドアプリケーションです。
このツールには、dirbuster や dirb が提供するものと同様の機能が含まれています。
このアプリケーションは自己文書化されており、dirstalk -h と実行すると、すべての利用可能なコマンドと簡単な説明が表示されます。各コマンドのヘルプは dirstalk <command> -h で取得できます。
例: dirstalk result.diff -h
スキャンを実行するには、少なくとも辞書と URL を指定する必要があります:
dirstalk scan http://someaddress.url/ --dictionary mydictionary.txt
前述の通り、スキャンコマンドで利用可能なすべてのフラグを確認するには、-h フラグを付けてコマンドを呼び出すだけです:
dirstalk scan -h
dirstalk scan http://someaddress.url/ \
--dictionary mydictionary.txt \
--http-methods GET,POST \
--http-timeout 10000 \
--scan-depth 10 \
--threads 10 \
--socks5 127.0.0.1:9150 \
--cookie name=value \
--use-cookie-jar \
--user-agent my_user_agent \
--header "Authorization: Bearer 123"
--cookie stringArray cookie to add to each request; eg name=value (can be specified multiple times)
-d, --dictionary string dictionary to use for the scan (path to local file or remote url)
--header stringArray header to add to each request; eg name=value (can be specified multiple times)
-h, --help help for scan
--http-cache-requests cache requests to avoid performing the same request multiple times within the same scan (EG if the server reply with the same redirect location multiple times, dirstalk will follow it only once) (default true)
--http-methods strings comma separated list of http methods to use; eg: GET,POST,PUT (default [GET])
--http-statuses-to-ignore ints comma separated list of http statuses to ignore when showing and processing results; eg: 404,301 (default [404])
--http-timeout int timeout in milliseconds (default 5000)
--out string path where to store result output
--scan-depth int scan depth (default 3)
--socks5 string socks5 host to use
-t, --threads int amount of threads for concurrent requests (default 3)
--use-cookie-jar enables the use of a cookie jar: it will retain any cookie sent from the server and send them for the following requests
--user-agent string user agent to use for http requests
docker run -d -p 127.0.0.1:9150:9150 stefanoj3/tordock:latest を実行し、スキャン起動時に --socks5 127.0.0.1:9150 フラグを指定するだけです)Dirstalk は独自の辞書を生成することもできます。これは、例えば特定のファイルセットが特定の Web サーバーで利用可能かどうかを確認したい場合に便利です。
dirstalk dictionary.generate /path/to/local/files --out mydictionary.txt
--out フラグが指定されていない場合、結果は標準出力に出力されます。
こちら からリリースをダウンロードするか、Docker イメージを使用できます (例: docker run stefanoj3/dirstalk dirstalk <cmd>)。
Arch ベースの Linux ディストリビューションを使用している場合は、AUR から取得できます: https://aur.archlinux.org/packages/dirstalk/
例:
yay -S aur/dirstalk
ローカル開発に必要なのは、make と golang が利用可能であり、GOPATH が正しく設定されていることだけです。
その後、プロジェクトをクローンしてフォルダーに移動し、以下を実行します:
make dep # to fetch dependencies
make tests # to run the test suite
make check # to check for any code style issue
make fix # to automatically fix the code style using goimports
make build # to build an executable for your host OS (not tested under windows)
make help
と実行すると、Makefile で利用可能なすべてのコマンドの説明が表示されます。
機能を追加したいですか?バグを修正しますか?フォークして PR を作成してください。