File ssl-cert
Script types:
portrule
Categories:
default, safe, discovery
Download: http://nmap.org/svn/scripts/ssl-cert.nse
User Summary
Retrieves a server's SSL certificate. The amount of information printed about the certificate depends on the verbosity level. With no extra verbosity, the script prints the validity period and the commonName, organizationName, stateOrProvinceName, and countryName of the subject.
443/tcp open https | ssl-cert: Subject: commonName=www.paypal.com/organizationName=PayPal, Inc.\ /stateOrProvinceName=California/countryName=US | Not valid before: 2009-05-28 00:00:00 |_ Not valid after: 2010-05-01 23:59:59
With -v it adds the issuer name and fingerprints.
443/tcp open https | ssl-cert: Subject: commonName=www.paypal.com/organizationName=PayPal, Inc.\ /stateOrProvinceName=California/countryName=US | Issuer: commonName=VeriSign Class 3 Extended Validation SSL CA\ /organizationName=VeriSign, Inc./countryName=US | Not valid before: 2009-05-28 00:00:00 | Not valid after: 2010-05-01 23:59:59 | MD5: c5b8 7ddd ccc7 537f 8861 b476 078d e8fd |_ SHA-1: dc5a cb8b 9eb9 b5de 7117 c536 8c15 0e75 ba88 702e
With -vv it adds the PEM-encoded contents of the entire
certificate.
443/tcp open https | ssl-cert: Subject: commonName=www.paypal.com/organizationName=PayPal, Inc.\ /stateOrProvinceName=California/countryName=US/serialNumber=3014267\ /1.3.6.1.4.1.311.60.2.1.3=US/streetAddress=2211 N 1st St\ /1.3.6.1.4.1.311.60.2.1.2=Delaware/postalCode=95131-2021\ /localityName=San Jose/organizationalUnitName=Information Systems\ /2.5.4.15=V1.0, Clause 5.(b) | Issuer: commonName=VeriSign Class 3 Extended Validation SSL CA\ /organizationName=VeriSign, Inc./countryName=US\ /organizationalUnitName=Terms of use at https://www.verisign.com/rpa (c)06 | Not valid before: 2009-05-28 00:00:00 | Not valid after: 2010-05-01 23:59:59 | MD5: c5b8 7ddd ccc7 537f 8861 b476 078d e8fd | SHA-1: dc5a cb8b 9eb9 b5de 7117 c536 8c15 0e75 ba88 702e | -----BEGIN CERTIFICATE----- | MIIFxzCCBK+gAwIBAgIQX02QuADDB7CVjZdooVge+zANBgkqhkiG9w0BAQUFADCB ...
Script Arguments
smbdomain, smbhash, smbnoguest, smbpassword, smbtype, smbusername
See the documentation for the smbauth library.Example Usage
nmap -sV -sC <target>
Script Output
443/tcp open https | ssl-cert: Subject: commonName=www.paypal.com/organizationName=PayPal, Inc.\ /stateOrProvinceName=California/countryName=US | Not valid before: 2009-05-28 00:00:00 |_ Not valid after: 2010-05-01 23:59:59
Requires
Author: David Fifield
License: Same as Nmap--See http://nmap.org/book/man-legal.html




