ssl-cert
脚本使用类型:
portrule
脚本所属分类:
default, safe, discovery
脚本下载地址: http://nmap.org/svn/scripts/ssl-cert.nse
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: 2011-03-23 00:00:00 |_Not valid after: 2013-04-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 | Public Key type: rsa | Public Key bits: 2048 | Not valid before: 2011-03-23 00:00:00 | Not valid after: 2013-04-01 23:59:59 | MD5: bf47 ceca d861 efa7 7d14 88ad 4a73 cb5b |_SHA-1: d846 5221 467a 0d15 3df0 9f2e af6d 4390 0213 9a68
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/1.3.6.1.4.1.311.60.2.1.2=Delaware\ /postalCode=95131-2021/localityName=San Jose/serialNumber=3014267\ /streetAddress=2211 N 1st St/1.3.6.1.4.1.311.60.2.1.3=US\ /organizationalUnitName=PayPal Production/businessCategory=Private Organization | 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 | Public Key type: rsa | Public Key bits: 2048 | Not valid before: 2011-03-23 00:00:00 | Not valid after: 2013-04-01 23:59:59 | MD5: bf47 ceca d861 efa7 7d14 88ad 4a73 cb5b | SHA-1: d846 5221 467a 0d15 3df0 9f2e af6d 4390 0213 9a68 | -----BEGIN CERTIFICATE----- | MIIGSzCCBTOgAwIBAgIQLjOHT2/i1B7T//819qTJGDANBgkqhkiG9w0BAQUFADCB ... | 9YDR12XLZeQjO1uiunCsJkDIf9/5Mqpu57pw8v1QNA== |_-----END CERTIFICATE-----
执行格式
nmap -sV -sC <target>
443/tcp open https | ssl-cert: Subject: commonName=www.paypal.com/organizationName=PayPal, Inc.\ /stateOrProvinceName=California/countryName=US | Not valid before: 2011-03-23 00:00:00 |_Not valid after: 2013-04-01 23:59:59
Author: David Fifield
License: VER007 整理 http://www.ver007.com