Skip to main content

Image of Dorkbot

dorkbot

Scan Google (or other) search results for vulnerabilities.

dorkbot is a modular command-line tool for performing vulnerability scans against sets of webpages returned by Google search queries or other supported sources. It is broken up into two sets of modules:

  • Indexers - modules that return a list of targets
  • Scanners - modules that perform a vulnerability scan against each target

Targets are stored in a database as they are indexed. Once scanned, a standard JSON report is produced containing any vulnerabilities found. Indexing and scanning processes can be run separately or combined in a single command (up to one of each).

Quickstart

$ pip3 install dorkbot wapiti3
$ dorkbot -i google_api -o key=your_api_credential_here -o engine=your_engine_id_here -o query="filetype:php inurl:id"
$ dorkbot -s wapiti

Usage

usage: dorkbot [-h] [-c CONFIG] [-r DIRECTORY] [--log LOG] [-v] [-V]
                  [-d DATABASE] [-u] [-l] [--list-unscanned]
                  [--add-target TARGET] [--delete-target TARGET]
                  [--flush-targets] [-i INDEXER] [-o INDEXER_OPTION]
                  [-s SCANNER] [-p SCANNER_OPTION] [-f] [-b BLACKLIST]
                  [--list-blacklist] [--add-blacklist-item ITEM]
                  [--delete-blacklist-item ITEM] [--flush-blacklist]

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        Configuration file
  -r DIRECTORY, --directory DIRECTORY
                        Dorkbot directory (default location of db, tools,
                        reports)
  --log LOG             Path to log file
  -v, --verbose         Enable verbose logging (DEBUG output)
  -V, --version         Print version

database:
  -d DATABASE, --database DATABASE
                        Database file/uri
  -u, --prune           Apply fingerprinting and blacklist without scanning

targets:
  -l, --list-targets    List targets in database
  --list-unscanned      List unscanned targets in database
  --add-target TARGET   Add a url to the target database
  --delete-target TARGET
                        Delete a url from the target database
  --flush-targets       Delete all targets

indexing:
  -i INDEXER, --indexer INDEXER
                        Indexer module to use
  -o INDEXER_OPTION, --indexer-option INDEXER_OPTION
                        Pass an option to the indexer (can be used multiple
                        times)

scanning:
  -s SCANNER, --scanner SCANNER
                        Scanner module to use
  -p SCANNER_OPTION, --scanner-option SCANNER_OPTION
                        Pass an option to the scanner (can be used multiple
                        times)

fingerprints:
  -f, --flush-fingerprints
                        Delete all fingerprints of previously-scanned items

blacklist:
  -b BLACKLIST, --blacklist BLACKLIST
                        Blacklist file/uri
  --list-blacklist      List blacklist entries
  --add-blacklist-item ITEM
                        Add an ip/host/regex pattern to the blacklist
  --delete-blacklist-item ITEM
                        Delete an item from the blacklist
  --flush-blacklist     Delete all blacklist items

Requirements

Tools

As needed, dorkbot will search for tools in the following order:

  • Directory specified via relevant module option
  • Located in tools directory (within current directory, by default), with the subdirectory named after the tool
  • Available in the user's PATH (e.g. installed system-wide)

Files

All SQLite3 databases, tools, and reports are saved in the dorkbot directory, which by default is the current directory. You can force a specific directory with the --directory flag. Default file paths within this directory are as follows:

  • SQLite3 database file: dorkbot.db
  • External tools directory: tools/
  • Scan report output directory: reports/

Configuration files are by default read from ~/.config/dorkbot/ (Linux / MacOS) or in the Application Data folder (Windows), honoring $XDG_CONFIG_HOME / %APPDATA%. Default file paths within this directory are as follows:

  • Dorkbot configuration file: dorkbot.ini

Config File

The configuration file (dorkbot.ini) can be used to prepopulate certain command-line flags.

Example dorkbot.ini:

[dorkbot]
database=/opt/dorkbot/dorkbot.db

Blacklist

The blacklist is a list of ip addresses, hostnames, or regular expressions of url patterns that should not be scanned. If a target url matches any item in this list it will be skipped and removed from the database. By default the blacklist is stored in the dorkbot database, but a separate database or file can be specified by passing the appropriate connection uri or file path to --blacklist. Note: --add-blacklist-item / --delete-blacklist-item are not implemented for file-based blacklists, and --flush-blacklist deletes the file.

Supported external blacklists:

  • postgresql://[server info]
  • phoenixdb://[server info]
  • sqlite3:///path/to/blacklist.db
  • /path/to/blacklist.txt

Example blacklist items:

regex:^[^\?]+$
regex:.*login.*
regex:^https?://[^.]*.example.com/.*
host:www.google.com
ip:127.0.0.1

The first item will remove any target that doesn't contain a question mark, in other words any url that doesn't contain any GET parameters to test. The second attempts to avoid login functions, and the third blacklists all target urls on example.com. The fourth excludes targets with a hostname of www.google.com and the fifth excludes targets whose host resolves to 127.0.0.1.

Indexer Modules

google

Search for targets in a Google Custom Search Engine (CSE) via custom search element.

Requirements: PhantomJS

Options:

  • engine - CSE id
  • query - search query
  • phantomjs_dir - phantomjs base directory containing bin/phantomjs (default: tools/phantomjs/)
  • domain - limit searches to specified domain

google_api

Search for targets in a Google Custom Search Engine (CSE) via JSON API.

Requirements: none

Options:

  • key - API key
  • engine - CSE id
  • query - search query
  • domain - limit searches to specified domain

commoncrawl

Search for targets within commoncrawl.org results.

Requirements: none

Options:

  • domain - pull all results for given domain or subdomain
  • index - search a specific index, e.g. CC-MAIN-2019-22 (default: latest)
  • filter - query filter to apply to the search
  • retries - number of times to retry fetching results on error (default: 10)
  • threads - number concurrent requests to commoncrawl.org (default: 10)

wayback

Search for targets within archive.org results.

Requirements: none

Options:

  • domain - pull all results for given domain or subdomain
  • filter - query filter to apply to the search
  • from - beginning timestamp
  • to - end timestamp

bing_api

Search for targets via Bing Web Search API.

Requirements: none

Options:

  • key - API key
  • query - search query

stdin

Read targets from standard input, one per line.

Requirements: none

Options: none

Scanner Modules

(general options)

These options are applicable regardless of module chosen

  • report_dir - directory to save vulnerability report (default: reports/)
  • label - friendly name field to include in vulnerability report
  • count - number of urls to scan, or -1 to scan all urls (default: -1)
  • random - scan urls in random order

arachni

Scan targets with Arachni command-line scanner.

Requirements: Arachni

Options:

  • arachni_dir - arachni base directory containing bin/arachni and bin/arachni_reporter (default: tools/arachni/)
  • args - space-delimited list of additional arguments, e.g. args="--http-user-agent Dorkbot/1.0 --timeout 00:15:00"

wapiti

Scan targets with Wapiti command-line scanner.

Requirements: Wapiti

Options:

  • wapiti_dir - wapiti base directory containing bin/wapiti (default: tools/wapiti/)
  • args - space-delimited list of additional arguments

Prune

The prune flag iterates through all targets, computes the fingerprints in memory, and marks subsequent matching targets as scanned. Additionally it deletes any target matching a blacklist item. The result is a database where --list-unscanned returns only scannable urls. It honors (a subset of) the options specified in SCANNER_OPTIONS as follows:

  • random - evaluate urls in random order when computing fingerprints

Release files for dorkbot 0.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dorkbot 0.2.6
File Size Uploaded
dorkbot-0.2.6.tar.gz 23.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dorkbot 0.2.6
File Interpreter ABI Platform
dorkbot-0.2.6-py3-none-any.whl Python 3 none any Details

Total release size: 49.1 kB

Release files / dorkbot-0.2.6.tar.gz

Download URL dorkbot-0.2.6.tar.gz
Size 23.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4e5431b3df8d303595c11bf17ba00a5949a2955c54a02edf69d369730955f8de
BLAKE2b-256 checksum
How to use checksums
b38d2a1ca2cad4c3c3625faa93a58b281f7c496a4c16a6a443161ecb5a1d84d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/3.7.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release files / dorkbot-0.2.6-py3-none-any.whl

Download URL dorkbot-0.2.6-py3-none-any.whl
Size 25.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b3cc642f8c3c38ecb0d5bea59605036e80a205697d05d6a6c1f006b2471da23
BLAKE2b-256 checksum
How to use checksums
25798f4bfb7ca64facffab0a70a4ab3d506899b69a614890ae6e53ef922e81b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/3.7.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release history Release notifications | RSS feed

1.11.0

2 release files

1.10.2

2 release files

1.10.1

2 release files

1.10.0

2 release files

1.9.1

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.2

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.3

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.5

2 release files

1.5.4

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.9.9

2 release files

0.9.8

2 release files

0.9.7

2 release files

0.9.6

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.9

2 release files

0.7.8

2 release files

0.7.7

2 release files

0.7.6

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

This release

0.2.6 This release

2 release files

0.2.5

2 release files

0.2.4

1 release file

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.5

3 release files

0.0.4

3 release files

0.0.3

3 release files

0.0.2

3 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page