Updated Dec 2, 2026

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

53 inputs
NameTypeFlagDescription
inputSTRING·One host or IP to grab.
input-fileFILE·File of hosts or IPs, one per line.
portSTRING--portPort to connect to (default 80).
use-httpsBOOLEAN--use-httpsStart the connection over TLS.
max-redirectsSTRING--max-redirectsRedirects to follow before the grab ends (default 0).
endpointSTRING--endpointPath to request (default /).
methodSTRING--methodHTTP method (default GET).
timeoutSTRING--timeoutConnection timeout (default 10s; 0 means none).

Showing key inputs. zgrab2 exposes 53 inputs in total.

Full flag reference (53 inputs)
NameTypeFlagDescription
sctBOOLEAN--sctRequest Signed Certificate Timestamps during TLS Handshake
portSTRING--portSpecify port to grab on (default: 80)
timeSTRING--timeExplicit request time to use, instead of clock. YYYYMMDDhhmmss format.
debugBOOLEAN--debugInclude debug fields in the output.
flushBOOLEAN--flushFlush after each line of output.
inputSTRING·Input target
methodSTRING--methodSet HTTP request method type (default: GET)
no-sniBOOLEAN--no-sniDo not send domain name in TLS Handshake regardless of whether known
sendersSTRING--sendersNumber of send goroutines to use (default: 1000)
timeoutSTRING--timeoutSet connection timeout (0 = no timeout) (default: 10s)
triggerSTRING--triggerInvoke only on targets with specified tag
endpointSTRING--endpointSend an HTTP request to an endpoint (default: /)
max-sizeSTRING--max-sizeMax kilobytes to read in response to an HTTP request (default: 256)
maxbytesSTRING--maxbytesMaximum byte read limit per scan (0 = defaults)
no-ecdheBOOLEAN--no-ecdheDo not allow ECDHE handshakes
root-casFILE--root-casSet of certificates to use when verifying server certificates
use-httpsBOOLEAN--use-httpsPerform an HTTPS connection on the initial host
gomaxprocsSTRING--gomaxprocsSet GOMAXPROCS (default: 0)
heartbleedBOOLEAN--heartbleedCheck if server is vulnerable to Heartbleed
input-fileFILE·Input file
prometheusSTRING--prometheusAddress to use for Prometheus server (e.g. localhost:8080). If empty, Prometheus is disabled
user-agentSTRING--user-agentSet a custom user agent (default: Mozilla/5.0 zgrab/0.x)
dsa-enabledBOOLEAN--dsa-enabledAccept server DSA keys
max-versionSTRING--max-versionThe maximum SSL/TLS version that is acceptable. 0 means use the highest supported value.
min-versionSTRING--min-versionThe minimum SSL/TLS version that is acceptable. 0 means that SSLv3 is the minimum.
next-protosFILE--next-protosA list of supported application-level protocols
retry-httpsBOOLEAN--retry-httpsIf the initial request fails, reconnect and try with HTTPS.
server-nameSTRING--server-nameServer name used for certificate verification and (optionally) SNI
certificatesFILE--certificatesSet of certificates to present to the server
cipher-suiteSTRING--cipher-suiteA comma-delimited list of hex cipher suites to advertise.
client-helloSTRING--client-helloSet an explicit ClientHello (base64 encoded)
client-randomSTRING--client-randomSet an explicit Client Random (base64 encoded)
max-redirectsSTRING--max-redirectsMax number of redirects to follow (default: 0)
session-ticketBOOLEAN--session-ticketSend support for TLS Session Tickets and output ticket if presented
with-body-sizeBOOLEAN--with-body-sizeEnable the body_size attribute, for how many bytes actually read
certificate-mapFILE--certificate-mapA file mapping server names to certificates
extended-randomBOOLEAN--extended-randomSend TLS Extended Random Extension
keep-client-logsBOOLEAN--keep-client-logsInclude the client-side logs in the TLS handshake
curve-preferencesSTRING--curve-preferencesA list of elliptic curves used in an ECDHE handshake, in order of preference.
heartbeat-enabledBOOLEAN--heartbeat-enabledIf set, include the heartbeat extension
override-sig-hashBOOLEAN--override-sig-hashOverride the default SignatureAndHashes TLS option with more expansive default
redirects-succeedBOOLEAN--redirects-succeedRedirects are always a success, even if max-redirects is exceeded
fail-http-to-httpsBOOLEAN--fail-http-to-httpsTrigger retry-https logic on known HTTP/400 protocol mismatch responses
read-limit-per-hostSTRING--read-limit-per-hostMaximum total kilobytes to read for a single host (default 96kb) (default: 96)
connections-per-hostSTRING--connections-per-hostNumber of times to connect to each host (results in more output) (default: 1)
custom-headers-namesFILE--custom-headers-namesCSV of custom HTTP headers to send to server
signature-algorithmsSTRING--signature-algorithmsSignature and hash algorithms that are acceptable
custom-headers-valuesFILE--custom-headers-valuesCSV of custom HTTP header values to send to server. Should match order of custom-headers-names
extended-master-secretBOOLEAN--extended-master-secretOffer RFC 7627 Extended Master Secret extension
custom-headers-delimiterSTRING--custom-headers-delimiterDelimiter for customer header name/value CSVs
verify-server-certificateBOOLEAN--verify-server-certificateail if the server certificate does not match the server-name, or does not chain to a trusted root.
follow-localhost-redirectsBOOLEAN--follow-localhost-redirectsFollow HTTP redirects to localhost
compute-decoded-body-hash-algorithmSTRING--compute-decoded-body-hash-algorithmChoose algorithm for BodyHash field (sha256 or sha1)

example

zgrab2 command examples

zgrab2 · command
# 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
Run on Dec 2, 2026 against Trickest-owned hosts
{"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.

ToolPick it when
zgrab2-httpThe Trickest node for the http module: full response JSON per host.
zgrab2-tlsThe Trickest node for the tls module: certificate chain and handshake only.
zgrab2-jarmThe Trickest node for JARM TLS fingerprints.
zgrab2-multipleThe Trickest node that runs several modules from one .ini file.
httpxHTTP prober with tech detection and a compact JSONL line per URL.

faq

zgrab2 FAQ

zmap scans layer 4: it tells you which hosts answer on a port. zgrab2 works at layer 7: it connects to those hosts, completes the protocol handshake and records it. The ZMap project builds both to run as one pipeline, zmap first.

--max-redirects defaults to 0, so a 301, 302 or 307 response ends the grab with status application-error and the message Too many redirects. In our run, www.trickest.com and docs.trickest.io both did this. Set --max-redirects to follow them.

No. zgrab2 collects what any standard client sees without authenticating and aborts each handshake before authentication. The project does not accept modules that brute-force credentials.

The zgrab2-http and zgrab2-jarm nodes run commit 82b0038 (August 2024). zgrab2-tls, zgrab2-multiple and zgrab2-http-simple run commit 911c86f (March 2023). Upstream's latest release is v1.0.0, from December 2025, so a build from source is newer than any of the nodes.

Write an .ini file whose first section is [Application Options] and add one section per module, then run zgrab2 multiple -c config.ini. On Trickest, the zgrab2-multiple node takes that file as its config-file input.

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.