{"id":3602,"date":"2015-09-22T10:48:32","date_gmt":"2015-09-22T08:48:32","guid":{"rendered":"http:\/\/www.laurentmarot.fr\/wordpress\/?p=3602"},"modified":"2015-09-30T07:30:44","modified_gmt":"2015-09-30T05:30:44","slug":"my-very-first-nexpose-custom-check","status":"publish","type":"post","link":"https:\/\/www.laurentmarot.fr\/wordpress\/?p=3602","title":{"rendered":"My very first Nexpose Custom Check"},"content":{"rendered":"<p>Writing Nexpose Vulnerability Checks will soon hurt you &#8230;<br \/>So, if you need some help, I&rsquo;m your guy \ud83d\ude09<\/p>\n<p>Thanks to Rapid7 community for <a href=\"https:\/\/community.rapid7.com\/docs\/DOC-1256\" target=\"_blank\">the basics<\/a>. Let&rsquo;s see how to set it up in four steps.<\/p>\n<p><strong>step 1 :<\/strong> write  locally with your own text editor 2 files (vulnerability desccriptor = .xml file &#038; vulnerability check = .vck file)<\/p>\n<p><strong>Vulnerablity descriptor file<\/strong> contains any information about your specific vulnerability (title, description, severity, CVE IDs, CVSS score, etc.).<br \/>\n<div id=\"attachment_3607\" style=\"width: 310px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.laurentmarot.fr\/wordpress\/wp-content\/uploads\/2015\/09\/xml.png\" rel=\"lightbox[3602]\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3607\" src=\"http:\/\/www.laurentmarot.fr\/wordpress\/wp-content\/uploads\/2015\/09\/xml-300x170.png\" alt=\"editing  xml vulnerability descriptor file\" width=\"300\" height=\"170\" class=\"size-medium wp-image-3607\" srcset=\"https:\/\/www.laurentmarot.fr\/wordpress\/wp-content\/uploads\/2015\/09\/xml-300x170.png 300w, https:\/\/www.laurentmarot.fr\/wordpress\/wp-content\/uploads\/2015\/09\/xml-1024x579.png 1024w, https:\/\/www.laurentmarot.fr\/wordpress\/wp-content\/uploads\/2015\/09\/xml.png 1192w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-3607\" class=\"wp-caption-text\">editing  xml vulnerability descriptor file<\/p><\/div><\/p>\n<p>You may have several <strong>vulnerability check files<\/strong> containing multiple tests which are compiled at runtime and used by Nexpose to verify the existence (or non-existence) of your vulnerability described in the descriptor.<\/p>\n<p><strong>step 2 :<\/strong> put the files in Nexpose files system<br \/>Depending upon your system, you may juste have to pscp the files with Putty client<br \/>As it&rsquo;s always a pitty to remember those commands, I just give it to you in plain text below so you&rsquo;ll just have to copy\/paste<\/p>\n<p><b>C:\\Program Files (x86)\\PuTTY>pscp \u00ab\u00a0c:\\logs\\nexpose\\cmty-http-wordpress-wplinks-opml-info-leak.vck\u00a0\u00bb nexpose@192.168.1.205:\/home\/nexpose<br \/>\nnexpose@192.168.1.205&rsquo;s password:<br \/>\ncmty-http-wordpress-wplin | 0 kB |   0.4 kB\/s | ETA: 00:00:00 | 100%<\/p>\n<p>C:\\Program Files (x86)\\PuTTY>pscp \u00ab\u00a0c:\\logs\\nexpose\\cmty-http-wordpress-wplinks-opml-info-leak.xml\u00a0\u00bb nexpose@192.168.1.205:\/home\/nexpose<br \/>\nnexpose@192.168.1.205&rsquo;s password:<br \/>\ncmty-http-wordpress-wplin | 1 kB |   1.5 kB\/s | ETA: 00:00:00 | 100%<\/b><\/p>\n<p><div id=\"attachment_3603\" style=\"width: 310px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.laurentmarot.fr\/wordpress\/wp-content\/uploads\/2015\/09\/pscp1.png\" rel=\"lightbox[3602]\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3603\" src=\"http:\/\/www.laurentmarot.fr\/wordpress\/wp-content\/uploads\/2015\/09\/pscp1-300x26.png\" alt=\"pscp your vulnerability description file\" width=\"300\" height=\"26\" class=\"size-medium wp-image-3603\" srcset=\"https:\/\/www.laurentmarot.fr\/wordpress\/wp-content\/uploads\/2015\/09\/pscp1-300x26.png 300w, https:\/\/www.laurentmarot.fr\/wordpress\/wp-content\/uploads\/2015\/09\/pscp1.png 684w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-3603\" class=\"wp-caption-text\">pscp your vulnerability description file<\/p><\/div><br \/>\n<strong>step 3 <\/strong>: deploy this vulnerability check into Nexpose by simply copying your .xml and corresponding .vck file into the following directory:<\/p>\n<p><b>\/opt\/rapid7\/nexpose\/plugins\/java\/1\/HttpScanner\/1\/<\/b><\/p>\n<p><strong>step 4<\/strong> : restart your Nexpose Security Console and browse to your brand new vulnerability<\/p>\n<p> <a href=\"https:\/\/192.168.1.205:3780\/vulnerability\/vuln-summary.jsp?vulnid=cmty-http-wordpress-wplinks-opml-info-leak\" target=\"_blank\">https:\/\/192.168.1.205:3780\/vulnerability\/vuln-summary.jsp?vulnid=cmty-http-wordpress-wplinks-opml-info-leak<\/a><\/p>\n<p><div id=\"attachment_3625\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.laurentmarot.fr\/wordpress\/wp-content\/uploads\/2015\/09\/vuln.png\" rel=\"lightbox[3602]\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3625\" src=\"http:\/\/www.laurentmarot.fr\/wordpress\/wp-content\/uploads\/2015\/09\/vuln-300x229.png\" alt=\"vuln display\" width=\"300\" height=\"229\" class=\"size-medium wp-image-3625\" srcset=\"https:\/\/www.laurentmarot.fr\/wordpress\/wp-content\/uploads\/2015\/09\/vuln-300x229.png 300w, https:\/\/www.laurentmarot.fr\/wordpress\/wp-content\/uploads\/2015\/09\/vuln.png 958w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-3625\" class=\"wp-caption-text\">vuln display<\/p><\/div><br \/>\n<div id=\"attachment_3626\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.laurentmarot.fr\/wordpress\/wp-content\/uploads\/2015\/09\/putty.png\" rel=\"lightbox[3602]\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3626\" src=\"http:\/\/www.laurentmarot.fr\/wordpress\/wp-content\/uploads\/2015\/09\/putty-300x240.png\" alt=\"wanna see my putty ?\" width=\"300\" height=\"240\" class=\"size-medium wp-image-3626\" srcset=\"https:\/\/www.laurentmarot.fr\/wordpress\/wp-content\/uploads\/2015\/09\/putty-300x240.png 300w, https:\/\/www.laurentmarot.fr\/wordpress\/wp-content\/uploads\/2015\/09\/putty.png 694w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-3626\" class=\"wp-caption-text\">wanna see my putty ?<\/p><\/div><\/p>\n<hr\/>\n<p>Download <a href=\"\/wordpress\/wp-content\/uploads\/lm\/cmty-http-wordpress-wplinks-opml-info-leak.xml\" target=\"_blank\">vulnerability descriptor file<\/a><br \/>\nDownload <a href=\"\/wordpress\/wp-content\/uploads\/lm\/cmty-http-wordpress-wplinks-opml-info-leak.vck\" target=\"_blank\">vulnerability check file<\/a><\/p>\n<p>Notes: I just wrote this post as a proof of concept for one of my customers.<br \/>\nIt&rsquo;s always funny when you want to write a post to discover that you can&rsquo;t do it the simple way you dream of it : impossible to upload xml\/vck file, outdated filezilla client you have to upgrade, WordPress formatting nightmare &#8230;<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>Writing Nexpose Vulnerability Checks will soon hurt you &#8230;So, if you need some help, I&rsquo;m your guy \ud83d\ude09 Thanks to Rapid7 community for the basics. Let&rsquo;s see how to set it up in four steps. step 1 : write locally with your own text editor 2 files (vulnerability desccriptor = .xml file &#038; vulnerability check [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"_links":{"self":[{"href":"https:\/\/www.laurentmarot.fr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3602"}],"collection":[{"href":"https:\/\/www.laurentmarot.fr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.laurentmarot.fr\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.laurentmarot.fr\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.laurentmarot.fr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3602"}],"version-history":[{"count":25,"href":"https:\/\/www.laurentmarot.fr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3602\/revisions"}],"predecessor-version":[{"id":3631,"href":"https:\/\/www.laurentmarot.fr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3602\/revisions\/3631"}],"wp:attachment":[{"href":"https:\/\/www.laurentmarot.fr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.laurentmarot.fr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3602"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.laurentmarot.fr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}