Active scan

June 18, 2026 ยท View on GitHub

fanything-tls.nse is the active collector. It creates its own network interaction with the target and emits canonical features without a mode component. The active mode is carried in the FAN/1 fingerprint prefix and in output metadata:

fingerprint: fan1:tls:server:active:<base64url-features>:sha256:<digest>
features: tls|server|v=<legacy_version>|c=<selected_cipher>|e=<extensions>|sv=<selected_supported_version>

The active TLS scanner exposes protocol-version probes:

  • TLSv1.3: TLS 1.3 probe.
  • TLSv1.2: TLS 1.2 probe.
  • TLSv1.1: TLS 1.1 probe.
  • TLSv1.0: TLS 1.0 probe.
  • SSLv3: SSLv3 probe.
  • SSLv2: SSLv2 probe.

Force one protocol version:

nmap -Pn -p443 --script ./fanything-tls.nse \
  --script-args fanything-tls.tls-version=TLSv1.3 <target>

Without fanything-tls.tls-version, the scanner tries protocol versions from TLS 1.3 down to SSLv2 and stops at the first full server fingerprint. This means default output is the highest successful protocol in that order, not a full compatibility matrix.

Source References

The scripts name cipher tables by protocol version. Firefox/NSS references are used only to choose and document cipher-suite order. As of 2026-06-18, the latest Firefox LTS/ESR baseline used here is the Firefox ESR 140 series: Mozilla's release list includes the current ESR point release 140.12.0, and the source branch is mozilla-esr140.

  • TLS 1.3 and TLS 1.2 use Firefox ESR 140 source as the modern NSS reference:
    • security.tls.version.min = 3 means minimum TLS 1.2.
    • security.tls.version.max = 4 means maximum TLS 1.3.
    • security.tls.version.enable-deprecated = false.
    • Enabled security.ssl3.* prefs define which TLS 1.2 and below suites are enabled.
    • NSS SSL_ImplementedCiphers[] defines the cipher-suite ordering.
  • DTLS 1.3 and DTLS 1.2 active probes use the same Firefox ESR 140 / NSS cipher ordering as the TLS active probes. DTLS 1.3 sends the TLS 1.3 suites first, then the TLS 1.2 compatibility list.
  • TLS 1.1, TLS 1.0, and SSLv3 use Firefox 33-era source as the historical NSS reference.

References:

This is not a Firefox ClientHello emulator. The script uses protocol-version tables and active scanner behavior; Firefox/NSS source is only the cipher-order reference.

TLS 1.3

Firefox ESR 140 allows TLS 1.3 and NSS orders the TLS 1.3 suites as follows. DTLS 1.3 active probing uses the same three TLS 1.3 suite values before the TLS 1.2 compatibility list. Nmap's TLS library uses TLS_AKE_* names for TLS 1.3 suites.

OrderIANA cipher suiteNmap nameValue
1TLS_AES_128_GCM_SHA256TLS_AKE_WITH_AES_128_GCM_SHA2564865 (0x1301)
2TLS_CHACHA20_POLY1305_SHA256TLS_AKE_WITH_CHACHA20_POLY1305_SHA2564867 (0x1303)
3TLS_AES_256_GCM_SHA384TLS_AKE_WITH_AES_256_GCM_SHA3844866 (0x1302)

The scanner also includes the TLS 1.2 suite list in the TLS 1.3 ClientHello for compatibility, matching normal TLS negotiation behavior. The supported_versions extension advertises only TLS 1.3 and TLS 1.2.

Expected active feature shape when the server selects TLS 1.3:

tls|server|v=771|c=<selected_tls13_cipher>|e=<server_extensions>|sv=772

v=771 is the TLS 1.2 legacy version in TLS 1.3 ServerHello. sv=772 identifies the selected supported version, TLS 1.3.

TLS 1.2

The TLS 1.2 probe uses the enabled Firefox ESR 140/NSS suite order below.

OrderCipher suiteValue
1TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA25649195 (0xc02b)
2TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA25649199 (0xc02f)
3TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA25652393 (0xcca9)
4TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA25652392 (0xcca8)
5TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA38449196 (0xc02c)
6TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA38449200 (0xc030)
7TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA49162 (0xc00a)
8TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA49161 (0xc009)
9TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA49171 (0xc013)
10TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA49172 (0xc014)
11TLS_RSA_WITH_AES_128_GCM_SHA256156 (0x009c)
12TLS_RSA_WITH_AES_256_GCM_SHA384157 (0x009d)
13TLS_RSA_WITH_AES_128_CBC_SHA47 (0x002f)
14TLS_RSA_WITH_AES_256_CBC_SHA53 (0x0035)

Expected active feature shape when the server selects TLS 1.2:

tls|server|v=771|c=<selected_tls12_cipher>|e=<server_extensions>|sv=

sv is empty for normal TLS 1.2 ServerHello because the TLS 1.3 supported_versions extension is not used to select TLS 1.2 in that response.

TLS 1.1, TLS 1.0, SSLv3, SSLv2

Modern Firefox ESR 140 does not actively probe these protocols in normal configuration, but fanything-tls.nse can probe them explicitly as active scanner behavior:

ProtocolActive scanner behaviorFirefox ESR 140 reference
TLS 1.1probed by fanything-tls.tls-version=TLSv1.1, or by default only if TLS 1.3 and TLS 1.2 failbelow security.tls.version.min = 3
TLS 1.0probed by fanything-tls.tls-version=TLSv1.0, or by default only if higher versions failbelow security.tls.version.min = 3
SSLv3probed by fanything-tls.tls-version=SSLv3, or by default only if higher versions failobsolete
SSLv2probed by fanything-tls.tls-version=SSLv2, or by default only if higher versions failobsolete, no modern Firefox TLS policy

Default active scan stops at the first full success:

nmap -Pn -p443 --script ./fanything-tls.nse <target>

Legacy probes should be interpreted as active scanner behavior, not Firefox ESR 140 behavior.

Historical SSL Sources

For SSL-calibrated cipher ordering, the source reference must go back in Firefox/NSS history. Firefox ESR 140 is the wrong reference for SSLv3 because it has minimum TLS 1.2 and no SSL behavior.

Source-reference split:

Protocol tableProtocol targetBrowser/NSS anchorStatus
TLS13_CIPHERSTLS 1.3Firefox ESR 140implemented
TLS12_CIPHERSTLS 1.2Firefox ESR 140implemented
LEGACY_CIPHERSTLS 1.1, TLS 1.0, SSLv3Firefox 33 era, before Firefox 34 disabled SSLv3 after POODLEimplemented
SSLV2_CIPHERSSSLv2Nmap SSLv2 library, no Firefox calibrationimplemented as scanner measurement

This matters for cipher suites:

  • TLS 1.3 and TLS 1.2 can use the Firefox ESR 140/NSS SSL_ImplementedCiphers[] order documented above.
  • TLS 1.1 and TLS 1.0 should use a pre-Firefox-78 NSS source if browser fidelity is required. Firefox 78 release notes document that TLS 1.0 and TLS 1.1 were disabled in that release.
  • SSLv3 should use a pre-Firefox-34 source. Firefox 34 release notes document Disabled SSLv3, and Mozilla's POODLE post explains the shutdown plan.
  • SSLv2 should not be inferred from modern Firefox. It needs a separate old NSS source audit before claiming a Firefox-equivalent cipher order. OpenSSL 3.x also lacks practical s_server SSLv2 coverage, so local validation needs an older SSL stack or a purpose-built SSLv2 test server.

Firefox 33-Era Legacy Source

The legacy cipher table exists because SSLv3 calibration needs older browser behavior. Firefox 33 source uses security.tls.version.min = 0 and security.tls.version.max = 3, meaning SSLv3 through TLS 1.2. It also uses sCipherPrefs defaults for enabled suites. The scanner orders those enabled suites using Firefox 33 NSS SSL_ImplementedCiphers[].

TLS 1.2 uses this enabled Firefox 33-era order:

OrderCipher suiteValue
1TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA25649195 (0xc02b)
2TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA25649199 (0xc02f)
3TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA49162 (0xc00a)
4TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA49161 (0xc009)
5TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA49171 (0xc013)
6TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA49172 (0xc014)
7TLS_ECDHE_ECDSA_WITH_RC4_128_SHA49159 (0xc007)
8TLS_ECDHE_RSA_WITH_RC4_128_SHA49169 (0xc011)
9TLS_DHE_RSA_WITH_AES_128_CBC_SHA51 (0x0033)
10TLS_DHE_DSS_WITH_AES_128_CBC_SHA50 (0x0032)
11TLS_DHE_RSA_WITH_AES_256_CBC_SHA57 (0x0039)
12TLS_RSA_WITH_AES_128_CBC_SHA47 (0x002f)
13TLS_RSA_WITH_AES_256_CBC_SHA53 (0x0035)
14TLS_RSA_WITH_3DES_EDE_CBC_SHA10 (0x000a)
15TLS_RSA_WITH_RC4_128_SHA5 (0x0005)
16TLS_RSA_WITH_RC4_128_MD54 (0x0004)

TLS 1.1, TLS 1.0, and SSLv3 use the same Firefox 33-era enabled order without TLS 1.2-only GCM suites:

OrderCipher suiteValue
1TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA49162 (0xc00a)
2TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA49161 (0xc009)
3TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA49171 (0xc013)
4TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA49172 (0xc014)
5TLS_ECDHE_ECDSA_WITH_RC4_128_SHA49159 (0xc007)
6TLS_ECDHE_RSA_WITH_RC4_128_SHA49169 (0xc011)
7TLS_DHE_RSA_WITH_AES_128_CBC_SHA51 (0x0033)
8TLS_DHE_DSS_WITH_AES_128_CBC_SHA50 (0x0032)
9TLS_DHE_RSA_WITH_AES_256_CBC_SHA57 (0x0039)
10TLS_RSA_WITH_AES_128_CBC_SHA47 (0x002f)
11TLS_RSA_WITH_AES_256_CBC_SHA53 (0x0035)
12TLS_RSA_WITH_3DES_EDE_CBC_SHA10 (0x000a)
13TLS_RSA_WITH_RC4_128_SHA5 (0x0005)
14TLS_RSA_WITH_RC4_128_MD54 (0x0004)

SSLV2_CIPHERS does not claim Firefox equivalence. Firefox 33 NSS still lists SSLv2 cipher IDs, but the Firefox 33 version defaults start at SSLv3, not SSLv2.

Test harness

Run active scan tests against local OpenSSL servers:

test/nse-openssl.sh

The harness validates TLS 1.3, TLS 1.2, TLS 1.1, and TLS 1.0 against local OpenSSL servers. It also starts a multi-version TLS 1.0-to-1.2 server and checks that default scan output contains exactly one TLS server fingerprint. SSLv3 and SSLv2 are skipped when the local OpenSSL build no longer provides those server modes.