
dirbuster/dirb의 현대적인 대안
Dirstalk은 웹 서버에서 경로를 무차별 대입(brute force)하도록 설계된 멀티 스레드 애플리케이션입니다.
이 도구는 dirbuster 및 dirb에서 제공하는 기능과 유사한 기능을 포함합니다.
애플리케이션은 자체 문서화되어 있으며, dirstalk -h를 실행하면 사용 가능한 모든 명령어와 간단한 설명이 출력됩니다. 각 명령어에 대한 도움말은 distalk <command> -h를 통해 확인할 수 있습니다.
예: dirstalk result.diff -h
스캔을 수행하려면 최소한 사전(dictionary)과 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은 자체 사전을 생성할 수도 있습니다. 예를 들어 특정 파일 세트가 특정 웹 서버에서 사용 가능한지 확인하려는 경우 유용합니다.
dirstalk dictionary.generate /path/to/local/files --out mydictionary.txt
결과는 out 플래그가 지정되지 않은 경우 표준 출력(stdout)으로 출력됩니다.
릴리즈는 여기에서 다운로드하거나 Docker 이미지를 사용할 수 있습니다. (예: docker run stefanoj3/dirstalk dirstalk <cmd>)
Arch 기반 리눅스 배포판을 사용하는 경우 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을 생성하세요.