Recon
Grab HTTP and TLS handshakes from a host list
zgrab2 is a fast, modular application-layer network scanner from the ZMap project, built to complete large internet-wide surveys by recording full protocol handshakes as JSON.
installgit clone https://github.com/zmap/zgrab2.git && cd zgrab2 && makedocker pull ghcr.io/zmap/zgrab2docker pull quay.io/trickest/zgrab2-http:82b0038
commit 82b0038 on Trickest · Go
Free plan: 1 user, 3 execution slots, no card.
overview
What zgrab2 does
zgrab2 takes hosts on stdin and runs one of its 30 protocol modules against each, from AMQP and HTTP to SSH and TLS. zmap finds which hosts answer on a port; zgrab2 completes the handshake on that port and writes the whole transcript as one JSON line per host.
Choose the module by the question you have. http records status, headers and body, tls records the certificate chain and cipher choice, jarm fingerprints the TLS stack, and multiple runs several modules from one .ini file. zgrab2 stops every handshake before authentication.
Trickest runs zgrab2 as five Recon nodes: zgrab2-http, zgrab2-http-simple, zgrab2-tls, zgrab2-jarm and zgrab2-multiple. Each takes a host or a file of hosts and writes its results as a file, so you can chain it after zmap or naabu and query the output downstream.
source github.com/zmap/zgrab2 · commit 82b0038 on Trickest
image quay.io/trickest/zgrab2-http:82b0038
use cases
zgrab2 use cases
Grab HTTP banners after a port scan
Pipe the open web ports from zmap or naabu into the http module and keep each service's full response as JSON.
Inventory TLS certificates
Run the tls module across a host list to record certificate chains and negotiated ciphers in one pass.
Fingerprint TLS stacks with JARM
Use the jarm module to cluster hosts by TLS server implementation, a quick way to spot one appliance type across many IPs.
Run several protocols in one scan
Describe http and ssh grabs in an .ini file and run them together with the multiple module.
reference
zgrab2 inputs and flags
| Name | Type | Flag | Description |
|---|---|---|---|
| input | STRING | · | One host or IP to grab. |
| input-file | FILE | · | File of hosts or IPs, one per line. |
| port | STRING | --port | Port to connect to (default 80). |
| use-https | BOOLEAN | --use-https | Start the connection over TLS. |
| max-redirects | STRING | --max-redirects | Redirects to follow before the grab ends (default 0). |
| endpoint | STRING | --endpoint | Path to request (default /). |
| method | STRING | --method | HTTP method (default GET). |
| timeout | STRING | --timeout | Connection timeout (default 10s; 0 means none). |
Showing key inputs. zgrab2 exposes 53 inputs in total.
Full flag reference (53 inputs)
| Name | Type | Flag | Description |
|---|---|---|---|
| sct | BOOLEAN | --sct | Request Signed Certificate Timestamps during TLS Handshake |
| port | STRING | --port | Specify port to grab on (default: 80) |
| time | STRING | --time | Explicit request time to use, instead of clock. YYYYMMDDhhmmss format. |
| debug | BOOLEAN | --debug | Include debug fields in the output. |
| flush | BOOLEAN | --flush | Flush after each line of output. |
| input | STRING | · | Input target |
| method | STRING | --method | Set HTTP request method type (default: GET) |
| no-sni | BOOLEAN | --no-sni | Do not send domain name in TLS Handshake regardless of whether known |
| senders | STRING | --senders | Number of send goroutines to use (default: 1000) |
| timeout | STRING | --timeout | Set connection timeout (0 = no timeout) (default: 10s) |
| trigger | STRING | --trigger | Invoke only on targets with specified tag |
| endpoint | STRING | --endpoint | Send an HTTP request to an endpoint (default: /) |
| max-size | STRING | --max-size | Max kilobytes to read in response to an HTTP request (default: 256) |
| maxbytes | STRING | --maxbytes | Maximum byte read limit per scan (0 = defaults) |
| no-ecdhe | BOOLEAN | --no-ecdhe | Do not allow ECDHE handshakes |
| root-cas | FILE | --root-cas | Set of certificates to use when verifying server certificates |
| use-https | BOOLEAN | --use-https | Perform an HTTPS connection on the initial host |
| gomaxprocs | STRING | --gomaxprocs | Set GOMAXPROCS (default: 0) |
| heartbleed | BOOLEAN | --heartbleed | Check if server is vulnerable to Heartbleed |
| input-file | FILE | · | Input file |
| prometheus | STRING | --prometheus | Address to use for Prometheus server (e.g. localhost:8080). If empty, Prometheus is disabled |
| user-agent | STRING | --user-agent | Set a custom user agent (default: Mozilla/5.0 zgrab/0.x) |
| dsa-enabled | BOOLEAN | --dsa-enabled | Accept server DSA keys |
| max-version | STRING | --max-version | The maximum SSL/TLS version that is acceptable. 0 means use the highest supported value. |
| min-version | STRING | --min-version | The minimum SSL/TLS version that is acceptable. 0 means that SSLv3 is the minimum. |
| next-protos | FILE | --next-protos | A list of supported application-level protocols |
| retry-https | BOOLEAN | --retry-https | If the initial request fails, reconnect and try with HTTPS. |
| server-name | STRING | --server-name | Server name used for certificate verification and (optionally) SNI |
| certificates | FILE | --certificates | Set of certificates to present to the server |
| cipher-suite | STRING | --cipher-suite | A comma-delimited list of hex cipher suites to advertise. |
| client-hello | STRING | --client-hello | Set an explicit ClientHello (base64 encoded) |
| client-random | STRING | --client-random | Set an explicit Client Random (base64 encoded) |
| max-redirects | STRING | --max-redirects | Max number of redirects to follow (default: 0) |
| session-ticket | BOOLEAN | --session-ticket | Send support for TLS Session Tickets and output ticket if presented |
| with-body-size | BOOLEAN | --with-body-size | Enable the body_size attribute, for how many bytes actually read |
| certificate-map | FILE | --certificate-map | A file mapping server names to certificates |
| extended-random | BOOLEAN | --extended-random | Send TLS Extended Random Extension |
| keep-client-logs | BOOLEAN | --keep-client-logs | Include the client-side logs in the TLS handshake |
| curve-preferences | STRING | --curve-preferences | A list of elliptic curves used in an ECDHE handshake, in order of preference. |
| heartbeat-enabled | BOOLEAN | --heartbeat-enabled | If set, include the heartbeat extension |
| override-sig-hash | BOOLEAN | --override-sig-hash | Override the default SignatureAndHashes TLS option with more expansive default |
| redirects-succeed | BOOLEAN | --redirects-succeed | Redirects are always a success, even if max-redirects is exceeded |
| fail-http-to-https | BOOLEAN | --fail-http-to-https | Trigger retry-https logic on known HTTP/400 protocol mismatch responses |
| read-limit-per-host | STRING | --read-limit-per-host | Maximum total kilobytes to read for a single host (default 96kb) (default: 96) |
| connections-per-host | STRING | --connections-per-host | Number of times to connect to each host (results in more output) (default: 1) |
| custom-headers-names | FILE | --custom-headers-names | CSV of custom HTTP headers to send to server |
| signature-algorithms | STRING | --signature-algorithms | Signature and hash algorithms that are acceptable |
| custom-headers-values | FILE | --custom-headers-values | CSV of custom HTTP header values to send to server. Should match order of custom-headers-names |
| extended-master-secret | BOOLEAN | --extended-master-secret | Offer RFC 7627 Extended Master Secret extension |
| custom-headers-delimiter | STRING | --custom-headers-delimiter | Delimiter for customer header name/value CSVs |
| verify-server-certificate | BOOLEAN | --verify-server-certificate | ail if the server certificate does not match the server-name, or does not chain to a trusted root. |
| follow-localhost-redirects | BOOLEAN | --follow-localhost-redirects | Follow HTTP redirects to localhost |
| compute-decoded-body-hash-algorithm | STRING | --compute-decoded-body-hash-algorithm | Choose algorithm for BodyHash field (sha256 or sha1) |
example
zgrab2 command examples
# run on 2026-12-02 against Trickest's own hosts, in quay.io/trickest/zgrab2-http:82b0038
zgrab2 http --use-https --port 443 < hosts.txt \
| jq -c '{domain, status: .data.http.status, code: .data.http.result.response.status_code, error: .data.http.error}' # 3 hosts, 1.5 s{"domain":"www.trickest.com","status":"application-error","code":302,"error":"Too many redirects"}
{"domain":"docs.trickest.io","status":"application-error","code":307,"error":"Too many redirects"}
{"domain":"trickest.com","status":"success","code":200,"error":null}
{"statuses":{"http":{"successes":1,"failures":2}},"start":"2026-12-02T17:56:58Z","end":"2026-12-02T17:56:59Z","duration":"465.143727ms"}guidance
zgrab2 vs alternatives
Use zgrab2 after a port scan, when you need the full handshake record for each open service. For HTTP probing with tech detection and a short summary line per URL, httpx is quicker to read. For the TLS certificate alone, the zgrab2-tls node or tlsx is enough.
| Tool | Pick it when |
|---|---|
| zgrab2-http | The Trickest node for the http module: full response JSON per host. |
| zgrab2-tls | The Trickest node for the tls module: certificate chain and handshake only. |
| zgrab2-jarm | The Trickest node for JARM TLS fingerprints. |
| zgrab2-multiple | The Trickest node that runs several modules from one .ini file. |
| httpx | HTTP prober with tech detection and a compact JSONL line per URL. |
faq
zgrab2 FAQ
related
More Recon tools
amass-intel
OWASP Amass intel: map an organization's root domains and ranges.
bbot
Modular OSINT recon that chains modules from a seed target.
cloud-enum
Multi-cloud public name enumeration for AWS, Azure, and GCP.
findmytakeover
Multi-cloud dangling DNS detection via zone-to-inventory diff, not wordlists.
findomain
Passive subdomain enumeration with optional resolve and HTTP checks.
gobuster-dns
DNS subdomain brute force with wildcard handling.
Run zgrab2 yourself
A CIDR range feeds zmap, which finds open web ports and passes them to zgrab2 so each service's handshake lands as a queryable JSON output.
Facts on this page come from the live Trickest tool library.