{"id":335,"date":"2017-06-23T22:02:02","date_gmt":"2017-06-23T21:02:02","guid":{"rendered":"https:\/\/www.attackdebris.com\/?p=335"},"modified":"2017-06-23T22:41:15","modified_gmt":"2017-06-23T21:41:15","slug":"335","status":"publish","type":"post","link":"https:\/\/www.attackdebris.com\/?p=335","title":{"rendered":"Nmap-ssl-parser"},"content":{"rendered":"<p><strong>Nmap-ssl-parser<\/strong><\/p>\n<p>Nessus and Nmap both do a decent job of enumerating supported SSL protocols and ciphers from remote servers. However, I usually find myself also utilising other 3rd party SSL scanning tools. To that end I wanted an easy way to quickly parse out SSL services to an output file for input into other tools.<\/p>\n<p>Nmap-ssl-parser is a python script designed to query nmap XML output and provide a list of usable ssl services in the format <code>host:port<\/code><\/p>\n<p>The nmap-ssl-parser script parses an nmap.xml output file, extracts all SSL services and writes them to a filename of your choice.<\/p>\n<p><strong>Step 1 &#8211; Create a valid nmap .xml fil<\/strong>e:<\/p>\n<p>Note: Some form of Nmap version scanning must be utilised to create the XML ouput i.e. <code>-sV<\/code> or <code>-A<\/code> (In order to determine whether the service is SSL enabled)<\/p>\n<p><a href=\"https:\/\/www.attackdebris.com\/wp-content\/uploads\/2017\/06\/nmap-xml.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-338\" src=\"https:\/\/www.attackdebris.com\/wp-content\/uploads\/2017\/06\/nmap-xml.jpg\" alt=\"\" width=\"859\" height=\"311\" srcset=\"https:\/\/www.attackdebris.com\/wp-content\/uploads\/2017\/06\/nmap-xml.jpg 859w, https:\/\/www.attackdebris.com\/wp-content\/uploads\/2017\/06\/nmap-xml-300x109.jpg 300w, https:\/\/www.attackdebris.com\/wp-content\/uploads\/2017\/06\/nmap-xml-768x278.jpg 768w\" sizes=\"auto, (max-width: 859px) 100vw, 859px\" \/><\/a><\/p>\n<p><strong>Step 2 &#8211; Parse the nmap .xml file with nmap-ssl-parser.py:<\/strong><\/p>\n<p><a href=\"https:\/\/www.attackdebris.com\/wp-content\/uploads\/2017\/06\/nmap-ssl-parser.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-339\" src=\"https:\/\/www.attackdebris.com\/wp-content\/uploads\/2017\/06\/nmap-ssl-parser.jpg\" alt=\"\" width=\"874\" height=\"75\" srcset=\"https:\/\/www.attackdebris.com\/wp-content\/uploads\/2017\/06\/nmap-ssl-parser.jpg 874w, https:\/\/www.attackdebris.com\/wp-content\/uploads\/2017\/06\/nmap-ssl-parser-300x26.jpg 300w, https:\/\/www.attackdebris.com\/wp-content\/uploads\/2017\/06\/nmap-ssl-parser-768x66.jpg 768w\" sizes=\"auto, (max-width: 874px) 100vw, 874px\" \/><\/a><\/p>\n<p>That&#8217;s effectively job done, as can be seen below our output file &#8220;my_output_file.txt&#8221; contains our <code>host:port<\/code> formatted list ready for importing into any other tool of choice:<\/p>\n<p><a href=\"https:\/\/www.attackdebris.com\/wp-content\/uploads\/2017\/06\/nmap-parser-output.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-340\" src=\"https:\/\/www.attackdebris.com\/wp-content\/uploads\/2017\/06\/nmap-parser-output.jpg\" alt=\"\" width=\"582\" height=\"59\" srcset=\"https:\/\/www.attackdebris.com\/wp-content\/uploads\/2017\/06\/nmap-parser-output.jpg 582w, https:\/\/www.attackdebris.com\/wp-content\/uploads\/2017\/06\/nmap-parser-output-300x30.jpg 300w\" sizes=\"auto, (max-width: 582px) 100vw, 582px\" \/><\/a><\/p>\n<p>The code and installation instructions can be found here: <a href=\"https:\/\/github.com\/attackdebris\/nmap-ssl-parser\">https:\/\/github.com\/attackdebris\/nmap-ssl-parser<\/a><\/p>\n<p>Also check out auto-sslscan, which takes this process a step further by automating sslscans from the parsed list of SSL services: <a href=\"https:\/\/github.com\/attackdebris\/auto-sslscan\">https:\/\/github.com\/attackdebris\/auto-sslscan<\/a><\/p>\n<p>Credit\u00a0 &#8211; The base code I used to create nmap-ssl-parser: <a href=\"https:\/\/github.com\/DanMcInerney\/nmap-parser\/blob\/master\/nmap-parser.py\">https:\/\/github.com\/DanMcInerney\/nmap-parser\/blob\/master\/nmap-parser.py<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nmap-ssl-parser Nessus and Nmap both do a decent job of enumerating supported SSL protocols and ciphers from remote servers. However, I usually find myself also utilising other 3rd party SSL scanning tools. To that end I wanted an easy way to quickly parse out SSL services to an output file for input into other tools. &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"https:\/\/www.attackdebris.com\/?p=335\">Continue reading<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[1],"tags":[12],"class_list":["post-335","post","type-post","status-publish","format-standard","hentry","category-tools","tag-tools","item-wrap"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/s3MDvd-335","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.attackdebris.com\/index.php?rest_route=\/wp\/v2\/posts\/335","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.attackdebris.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.attackdebris.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.attackdebris.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.attackdebris.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=335"}],"version-history":[{"count":9,"href":"https:\/\/www.attackdebris.com\/index.php?rest_route=\/wp\/v2\/posts\/335\/revisions"}],"predecessor-version":[{"id":347,"href":"https:\/\/www.attackdebris.com\/index.php?rest_route=\/wp\/v2\/posts\/335\/revisions\/347"}],"wp:attachment":[{"href":"https:\/\/www.attackdebris.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=335"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.attackdebris.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=335"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.attackdebris.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=335"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}