intrigue-ident 0.2 → 0.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (484) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +21 -0
  3. data/.gitignore +3 -0
  4. data/.ruby-version +1 -0
  5. data/Dockerfile +39 -0
  6. data/Gemfile +10 -3
  7. data/Gemfile.lock +35 -20
  8. data/LICENSE.md +12 -0
  9. data/README.md +79 -0
  10. data/checks/ftp/base.rb +15 -0
  11. data/checks/ftp/filezilla.rb +28 -0
  12. data/checks/ftp/microsoft.rb +27 -0
  13. data/checks/ftp/proftp.rb +28 -0
  14. data/checks/ftp/pureftpd.rb +27 -0
  15. data/checks/ftp/vsftp.rb +28 -0
  16. data/checks/http/123reg.rb +31 -0
  17. data/checks/http/acme.rb +28 -0
  18. data/checks/http/acquia.rb +28 -0
  19. data/checks/http/adeptia.rb +30 -0
  20. data/checks/http/adobe.rb +168 -0
  21. data/checks/http/advantshop.rb +33 -0
  22. data/checks/http/afrihost.rb +29 -0
  23. data/checks/http/aftermarketpl.rb +46 -0
  24. data/checks/http/agility.rb +34 -0
  25. data/checks/http/akamai.rb +88 -0
  26. data/checks/http/alkacon.rb +30 -0
  27. data/checks/http/allegro.rb +28 -0
  28. data/checks/http/almuba.rb +30 -0
  29. data/checks/http/amazon.rb +263 -0
  30. data/checks/http/amirocms.rb +30 -0
  31. data/checks/http/anelectron.rb +29 -0
  32. data/checks/http/anquanbao.rb +32 -0
  33. data/checks/http/aol.rb +29 -0
  34. data/checks/http/apache.rb +358 -0
  35. data/checks/http/appdynamics.rb +43 -0
  36. data/checks/http/arris.rb +30 -0
  37. data/checks/http/artifactory.rb +30 -0
  38. data/checks/http/aruba.rb +27 -0
  39. data/checks/http/atlassian.rb +152 -0
  40. data/checks/http/auth0.rb +44 -0
  41. data/checks/http/automattic.rb +292 -0
  42. data/checks/http/axinom.rb +30 -0
  43. data/checks/http/axios.rb +29 -0
  44. data/checks/http/axis.rb +27 -0
  45. data/checks/http/axway.rb +33 -0
  46. data/checks/http/backdrop.rb +30 -0
  47. data/checks/http/banu.rb +30 -0
  48. data/checks/http/barracuda.rb +99 -0
  49. data/checks/http/base.rb +139 -0
  50. data/checks/http/beehive.rb +30 -0
  51. data/checks/http/bigcartel.rb +33 -0
  52. data/checks/http/bigcommerce.rb +33 -0
  53. data/checks/http/binarysec.rb +47 -0
  54. data/checks/http/bitly.rb +40 -0
  55. data/checks/http/blackboard.rb +44 -0
  56. data/checks/http/blueimp.rb +27 -0
  57. data/checks/http/bomgar.rb +27 -0
  58. data/checks/http/bootstrap.rb +27 -0
  59. data/checks/http/bower.rb +28 -0
  60. data/checks/http/broadcom.rb +29 -0
  61. data/checks/http/brocade.rb +39 -0
  62. data/checks/http/browsermedia.rb +29 -0
  63. data/checks/http/bsm.rb +29 -0
  64. data/checks/http/bynder.rb +31 -0
  65. data/checks/http/calibre.rb +33 -0
  66. data/checks/http/centos.rb +28 -0
  67. data/checks/http/cerberus.rb +28 -0
  68. data/checks/http/charity_engine.rb +27 -0
  69. data/checks/http/checkpoint.rb +56 -0
  70. data/checks/http/cherokee.rb +29 -0
  71. data/checks/http/cisco.rb +134 -0
  72. data/checks/http/citrix.rb +137 -0
  73. data/checks/http/cloud_city.rb +30 -0
  74. data/checks/http/cloudflare.rb +219 -0
  75. data/checks/http/cmsimple.rb +30 -0
  76. data/checks/http/codeigniter.rb +26 -0
  77. data/checks/http/communigate.rb +32 -0
  78. data/checks/http/concrete5.rb +30 -0
  79. data/checks/http/contenido.rb +33 -0
  80. data/checks/http/content/analytics.rb +40 -0
  81. data/checks/http/content/authentication.rb +111 -0
  82. data/checks/http/content/content.rb +92 -0
  83. data/checks/http/content/security_headers.rb +70 -0
  84. data/checks/http/cpanel.rb +56 -0
  85. data/checks/http/cradlepoint.rb +30 -0
  86. data/checks/http/craft.rb +42 -0
  87. data/checks/http/crazydomains.rb +31 -0
  88. data/checks/http/crowdstrike.rb +27 -0
  89. data/checks/http/dan.rb +30 -0
  90. data/checks/http/danneo.rb +30 -0
  91. data/checks/http/day.rb +31 -0
  92. data/checks/http/debian.rb +27 -0
  93. data/checks/http/dell.rb +43 -0
  94. data/checks/http/dev_php.rb +30 -0
  95. data/checks/http/discourse.rb +30 -0
  96. data/checks/http/discuz!.rb +30 -0
  97. data/checks/http/distil.rb +27 -0
  98. data/checks/http/django.rb +27 -0
  99. data/checks/http/dmanager.rb +29 -0
  100. data/checks/http/dns_made_easy.rb +29 -0
  101. data/checks/http/docuwiki.rb +27 -0
  102. data/checks/http/docverify.rb +29 -0
  103. data/checks/http/domain_parking_ru.rb +31 -0
  104. data/checks/http/domainname_shop.rb +30 -0
  105. data/checks/http/dosarrest.rb +29 -0
  106. data/checks/http/dreamhost.rb +31 -0
  107. data/checks/http/drupal.rb +91 -0
  108. data/checks/http/duo.rb +45 -0
  109. data/checks/http/dyn.rb +41 -0
  110. data/checks/http/dynamicweb.rb +29 -0
  111. data/checks/http/dynatrace.rb +40 -0
  112. data/checks/http/easyname.rb +44 -0
  113. data/checks/http/eclipse.rb +64 -0
  114. data/checks/http/enservio.rb +29 -0
  115. data/checks/http/envoy.rb +26 -0
  116. data/checks/http/epiccom.rb +31 -0
  117. data/checks/http/ergon.rb +31 -0
  118. data/checks/http/expressjs.rb +27 -0
  119. data/checks/http/ezproxy.rb +28 -0
  120. data/checks/http/f5.rb +122 -0
  121. data/checks/http/facebook.rb +27 -0
  122. data/checks/http/fastly.rb +67 -0
  123. data/checks/http/first_domains.rb +31 -0
  124. data/checks/http/flywheel.rb +30 -0
  125. data/checks/http/forgerock.rb +43 -0
  126. data/checks/http/fortinet.rb +29 -0
  127. data/checks/http/fresh_service.rb +30 -0
  128. data/checks/http/frontify.rb +29 -0
  129. data/checks/http/generic.rb +272 -0
  130. data/checks/http/github.rb +40 -0
  131. data/checks/http/gitlab.rb +30 -0
  132. data/checks/http/glimpse.rb +32 -0
  133. data/checks/http/globalscape.rb +27 -0
  134. data/checks/http/goahead.rb +31 -0
  135. data/checks/http/godaddy.rb +31 -0
  136. data/checks/http/google.rb +164 -0
  137. data/checks/http/google_cloud.rb +27 -0
  138. data/checks/http/grafana.rb +27 -0
  139. data/checks/http/gunicorn.rb +30 -0
  140. data/checks/http/haskell.rb +31 -0
  141. data/checks/http/heroku.rb +77 -0
  142. data/checks/http/hikvision.rb +29 -0
  143. data/checks/http/hp.rb +27 -0
  144. data/checks/http/hubspot.rb +104 -0
  145. data/checks/http/ibm.rb +182 -0
  146. data/checks/http/icewarp.rb +29 -0
  147. data/checks/http/impresspages.rb +30 -0
  148. data/checks/http/imunify360.rb +28 -0
  149. data/checks/http/incapsula.rb +54 -0
  150. data/checks/http/ingram_micro.rb +28 -0
  151. data/checks/http/innovative_interfaces_inc.rb +27 -0
  152. data/checks/http/inside_sales.rb +27 -0
  153. data/checks/http/instra.rb +61 -0
  154. data/checks/http/intercom.rb +27 -0
  155. data/checks/http/ivanti.rb +28 -0
  156. data/checks/http/jamf.rb +31 -0
  157. data/checks/http/jekyll.rb +31 -0
  158. data/checks/http/jenkins.rb +59 -0
  159. data/checks/http/jetbrains.rb +27 -0
  160. data/checks/http/jetty.rb +27 -0
  161. data/checks/http/jforum.rb +27 -0
  162. data/checks/http/jitbit.rb +30 -0
  163. data/checks/http/jive.rb +27 -0
  164. data/checks/http/joomla.rb +43 -0
  165. data/checks/http/jquery.rb +58 -0
  166. data/checks/http/jupyter.rb +28 -0
  167. data/checks/http/kentico.rb +27 -0
  168. data/checks/http/kerio.rb +34 -0
  169. data/checks/http/kibana.rb +56 -0
  170. data/checks/http/kong.rb +32 -0
  171. data/checks/http/kubernetes.rb +66 -0
  172. data/checks/http/laravel.rb +27 -0
  173. data/checks/http/lastpass.rb +27 -0
  174. data/checks/http/lcn.rb +27 -0
  175. data/checks/http/leadpages.rb +29 -0
  176. data/checks/http/lighttpd.rb +31 -0
  177. data/checks/http/limelight_networks.rb +43 -0
  178. data/checks/http/limesuvey.rb +27 -0
  179. data/checks/http/link1.rb +31 -0
  180. data/checks/http/linksys.rb +38 -0
  181. data/checks/http/litespeed.rb +29 -0
  182. data/checks/http/lithium.rb +43 -0
  183. data/checks/http/lotus.rb +55 -0
  184. data/checks/http/magento.rb +96 -0
  185. data/checks/http/magnolia.rb +27 -0
  186. data/checks/http/mailchimp.rb +27 -0
  187. data/checks/http/manage_engine.rb +27 -0
  188. data/checks/http/markmonitor.rb +27 -0
  189. data/checks/http/mbf_bioscience.rb +29 -0
  190. data/checks/http/mcafee.rb +27 -0
  191. data/checks/http/media_temple.rb +27 -0
  192. data/checks/http/mediawiki.rb +54 -0
  193. data/checks/http/mhcsoftwareinc.rb +29 -0
  194. data/checks/http/microsoft.rb +1325 -0
  195. data/checks/http/mikrotik.rb +44 -0
  196. data/checks/http/modwsgi.rb +30 -0
  197. data/checks/http/mojolicious.rb +32 -0
  198. data/checks/http/moodle.rb +28 -0
  199. data/checks/http/mura.rb +30 -0
  200. data/checks/http/nagios.rb +27 -0
  201. data/checks/http/namesilo.rb +31 -0
  202. data/checks/http/nationbuilder.rb +30 -0
  203. data/checks/http/nec.rb +32 -0
  204. data/checks/http/netlify.rb +40 -0
  205. data/checks/http/netobjects_inc.rb +30 -0
  206. data/checks/http/netscape.rb +29 -0
  207. data/checks/http/neustar.rb +29 -0
  208. data/checks/http/new_relic.rb +27 -0
  209. data/checks/http/nexicom.rb +44 -0
  210. data/checks/http/nginx.rb +82 -0
  211. data/checks/http/nisource.rb +29 -0
  212. data/checks/http/nodejs.rb +79 -0
  213. data/checks/http/okta.rb +53 -0
  214. data/checks/http/ookla.rb +28 -0
  215. data/checks/http/openbsd.rb +30 -0
  216. data/checks/http/openresty.rb +41 -0
  217. data/checks/http/openscholar.rb +27 -0
  218. data/checks/http/opensolution.rb +46 -0
  219. data/checks/http/openssl.rb +43 -0
  220. data/checks/http/opentext.rb +46 -0
  221. data/checks/http/openvpn.rb +27 -0
  222. data/checks/http/opscode.rb +43 -0
  223. data/checks/http/oracle.rb +335 -0
  224. data/checks/http/orion_technology.rb +30 -0
  225. data/checks/http/ovh.rb +46 -0
  226. data/checks/http/palo_alto.rb +27 -0
  227. data/checks/http/pantheon.rb +54 -0
  228. data/checks/http/papercut.rb +29 -0
  229. data/checks/http/parallels.rb +44 -0
  230. data/checks/http/pardot.rb +44 -0
  231. data/checks/http/parkingcrew.rb +47 -0
  232. data/checks/http/pbworks.rb +27 -0
  233. data/checks/http/perfectsense.rb +28 -0
  234. data/checks/http/perl.rb +62 -0
  235. data/checks/http/pfsense.rb +27 -0
  236. data/checks/http/php.rb +72 -0
  237. data/checks/http/phpmyadmin.rb +40 -0
  238. data/checks/http/phpwind.rb +30 -0
  239. data/checks/http/phusion.rb +59 -0
  240. data/checks/http/ping_identity.rb +28 -0
  241. data/checks/http/pivotal_software.rb +97 -0
  242. data/checks/http/pjax.rb +40 -0
  243. data/checks/http/plesk.rb +58 -0
  244. data/checks/http/porkbun.rb +31 -0
  245. data/checks/http/progress.rb +30 -0
  246. data/checks/http/proofpoint.rb +30 -0
  247. data/checks/http/pulsesecure.rb +91 -0
  248. data/checks/http/python.rb +30 -0
  249. data/checks/http/qnap.rb +43 -0
  250. data/checks/http/qualys.rb +69 -0
  251. data/checks/http/rapid7.rb +27 -0
  252. data/checks/http/rbs.rb +30 -0
  253. data/checks/http/readmeio.rb +28 -0
  254. data/checks/http/red_hat.rb +95 -0
  255. data/checks/http/redmine.rb +38 -0
  256. data/checks/http/restlet.rb +30 -0
  257. data/checks/http/ritecms.rb +30 -0
  258. data/checks/http/roadiz.rb +30 -0
  259. data/checks/http/rock.rb +30 -0
  260. data/checks/http/rollbar.rb +27 -0
  261. data/checks/http/roundcube.rb +42 -0
  262. data/checks/http/ruby.rb +92 -0
  263. data/checks/http/ruckus_wireless.rb +26 -0
  264. data/checks/http/sailpoint.rb +30 -0
  265. data/checks/http/salesforce.rb +28 -0
  266. data/checks/http/sap.rb +149 -0
  267. data/checks/http/seamless_cms.rb +30 -0
  268. data/checks/http/securi.rb +54 -0
  269. data/checks/http/sedo.rb +63 -0
  270. data/checks/http/segment.rb +27 -0
  271. data/checks/http/sencha.rb +31 -0
  272. data/checks/http/sentry.rb +27 -0
  273. data/checks/http/serendipity.rb +30 -0
  274. data/checks/http/shopfactory.rb +30 -0
  275. data/checks/http/sip.rb +29 -0
  276. data/checks/http/sitecore.rb +39 -0
  277. data/checks/http/smartling.rb +27 -0
  278. data/checks/http/smf.rb +30 -0
  279. data/checks/http/snews.rb +30 -0
  280. data/checks/http/software_ag.rb +47 -0
  281. data/checks/http/soha.rb +66 -0
  282. data/checks/http/solarwinds.rb +41 -0
  283. data/checks/http/sonatype.rb +43 -0
  284. data/checks/http/sonicwall.rb +63 -0
  285. data/checks/http/sophos.rb +40 -0
  286. data/checks/http/southriver.rb +43 -0
  287. data/checks/http/splash.rb +29 -0
  288. data/checks/http/splunk.rb +27 -0
  289. data/checks/http/springfox.rb +43 -0
  290. data/checks/http/squarespace.rb +41 -0
  291. data/checks/http/stackpath.rb +29 -0
  292. data/checks/http/stibo_systems.rb +35 -0
  293. data/checks/http/subrion.rb +29 -0
  294. data/checks/http/symantec.rb +27 -0
  295. data/checks/http/synacor.rb +26 -0
  296. data/checks/http/tableau_software.rb +42 -0
  297. data/checks/http/telerik.rb +46 -0
  298. data/checks/http/tengine.rb +29 -0
  299. data/checks/http/tibco.rb +57 -0
  300. data/checks/http/townnews.rb +33 -0
  301. data/checks/http/tridium.rb +28 -0
  302. data/checks/http/twiki.rb +27 -0
  303. data/checks/http/typo3.rb +27 -0
  304. data/checks/http/uberflip.rb +28 -0
  305. data/checks/http/ucoz.rb +31 -0
  306. data/checks/http/umbraco.rb +29 -0
  307. data/checks/http/unbounce.rb +28 -0
  308. data/checks/http/united_domains.rb +27 -0
  309. data/checks/http/vanilla_forums.rb +27 -0
  310. data/checks/http/varnish.rb +79 -0
  311. data/checks/http/vbulletin.rb +66 -0
  312. data/checks/http/verizon.rb +27 -0
  313. data/checks/http/vmware.rb +53 -0
  314. data/checks/http/vue_js.rb +27 -0
  315. data/checks/http/webflow.rb +44 -0
  316. data/checks/http/webgui.rb +30 -0
  317. data/checks/http/webmin.rb +44 -0
  318. data/checks/http/webpagetest_project.rb +30 -0
  319. data/checks/http/wftpserver.rb +28 -0
  320. data/checks/http/wildfly.rb +29 -0
  321. data/checks/http/wix.rb +28 -0
  322. data/checks/http/woltlab_gmbh.rb +30 -0
  323. data/checks/http/wordpress/ithemes.rb +50 -0
  324. data/checks/http/wordpress/john_godley.rb +29 -0
  325. data/checks/http/wordpress/pixelcraft.rb +31 -0
  326. data/checks/http/wordpress/rocklobster.rb +29 -0
  327. data/checks/http/wordpress/team_heateor.rb +31 -0
  328. data/checks/http/wordpress/w3_total_cache.rb +30 -0
  329. data/checks/http/wordpress/wp_fastest_cache.rb +30 -0
  330. data/checks/http/wordpress/wp_super_cache.rb +46 -0
  331. data/checks/http/wordpress/wpbakery.rb +30 -0
  332. data/checks/http/world4you.rb +46 -0
  333. data/checks/http/wp_engine.rb +57 -0
  334. data/checks/http/xcms.rb +30 -0
  335. data/checks/http/xelion.rb +27 -0
  336. data/checks/http/xerox.rb +27 -0
  337. data/checks/http/xmb.rb +30 -0
  338. data/checks/http/xtec.rb +30 -0
  339. data/checks/http/yaf.rb +30 -0
  340. data/checks/http/yaws.rb +30 -0
  341. data/checks/http/yoast.rb +31 -0
  342. data/checks/http/zeit.rb +30 -0
  343. data/checks/http/zendesk.rb +41 -0
  344. data/checks/http/zengenti.rb +30 -0
  345. data/checks/http/zoho.rb +69 -0
  346. data/checks/http/zscaler.rb +30 -0
  347. data/checks/smtp/base.rb +16 -0
  348. data/checks/smtp/exim.rb +30 -0
  349. data/checks/snmp/base.rb +15 -0
  350. data/checks/snmp/cisco.rb +59 -0
  351. data/checks/ssh/array_networks.rb +28 -0
  352. data/checks/ssh/base.rb +16 -0
  353. data/checks/ssh/openssh.rb +26 -0
  354. data/checks/telnet/base.rb +16 -0
  355. data/checks/telnet/huawei.rb +26 -0
  356. data/data/logos/acquia.png +0 -0
  357. data/data/logos/amazon_cloudfront.png +0 -0
  358. data/data/logos/apache_coyote.png +0 -0
  359. data/data/logos/apache_tomcat.png +0 -0
  360. data/data/logos/atlassian_bamboo.png +0 -0
  361. data/data/logos/atlassian_bitbucket.png +0 -0
  362. data/data/logos/atlassian_confluence.png +0 -0
  363. data/data/logos/atlassian_crowd.png +0 -0
  364. data/data/logos/atlassian_crucible.png +0 -0
  365. data/data/logos/atlassian_fisheye.png +0 -0
  366. data/data/logos/atlassian_jira.png +0 -0
  367. data/data/logos/atlassian_sourcetree.png +0 -0
  368. data/data/logos/automattic_wordpress.png +0 -0
  369. data/data/logos/calibre.png +0 -0
  370. data/data/logos/cisco_ssl_vpn.png +0 -0
  371. data/data/logos/citrix_netscaler_gateway.png +0 -0
  372. data/data/logos/cloudflare_cdn.png +0 -0
  373. data/data/logos/drupal.png +0 -0
  374. data/data/logos/f5_big-ip.png +0 -0
  375. data/data/logos/f5_big-ip_apm.png +0 -0
  376. data/data/logos/fastly.png +0 -0
  377. data/data/logos/generic.png +0 -0
  378. data/data/logos/gitlab.png +0 -0
  379. data/data/logos/ibm_axway_securetransport.png +0 -0
  380. data/data/logos/lithium.png +0 -0
  381. data/data/logos/microsoft_asp.net.png +0 -0
  382. data/data/logos/microsoft_iis.png +0 -0
  383. data/data/logos/microsoft_outlook_web_access.png +0 -0
  384. data/data/logos/microsoft_sharepoint.png +0 -0
  385. data/data/logos/microtik_routeros.png +0 -0
  386. data/data/logos/mikrotik_routeros.png +0 -0
  387. data/data/logos/newrelic.png +0 -0
  388. data/data/logos/nginx.png +0 -0
  389. data/data/logos/okta.png +0 -0
  390. data/data/logos/oracle_glassfish.png +0 -0
  391. data/data/logos/oracle_java_application_server.png +0 -0
  392. data/data/logos/oracle_java_server_pages.png +0 -0
  393. data/data/logos/oracle_weblogic.png +0 -0
  394. data/data/logos/phpmyadmin.png +0 -0
  395. data/data/logos/tableau.png +0 -0
  396. data/data/logos/vmware_esxi.png +0 -0
  397. data/data/logos/vmware_horizon.png +0 -0
  398. data/data/logos/zendesk.png +0 -0
  399. data/data/logos/zimbra_server.png +0 -0
  400. data/data/microsoft_sharepoint_versions.csv +224 -0
  401. data/intrigue-ident.gemspec +8 -7
  402. data/lib/banner_helpers.rb +36 -0
  403. data/lib/ftp/check_factory.rb +24 -0
  404. data/lib/ftp/content.rb +13 -0
  405. data/lib/ftp/ftp.rb +52 -0
  406. data/lib/ftp/matchers.rb +26 -0
  407. data/lib/http/browser.rb +260 -0
  408. data/lib/http/check_factory.rb +47 -0
  409. data/lib/http/content.rb +45 -0
  410. data/lib/http/http.rb +463 -0
  411. data/lib/http/matchers.rb +132 -0
  412. data/lib/ident.rb +263 -0
  413. data/lib/recog_wrapper.rb +70 -0
  414. data/lib/simple_socket.rb +41 -0
  415. data/lib/smtp/check_factory.rb +24 -0
  416. data/lib/smtp/content.rb +13 -0
  417. data/lib/smtp/matchers.rb +28 -0
  418. data/lib/smtp/smtp.rb +53 -0
  419. data/lib/snmp/check_factory.rb +24 -0
  420. data/lib/snmp/content.rb +13 -0
  421. data/lib/snmp/matchers.rb +25 -0
  422. data/lib/snmp/snmp.rb +55 -0
  423. data/lib/ssh/check_factory.rb +24 -0
  424. data/lib/ssh/content.rb +13 -0
  425. data/lib/ssh/matchers.rb +26 -0
  426. data/lib/ssh/ssh.rb +52 -0
  427. data/lib/telnet/check_factory.rb +24 -0
  428. data/lib/telnet/content.rb +13 -0
  429. data/lib/telnet/matchers.rb +26 -0
  430. data/lib/telnet/telnet.rb +52 -0
  431. data/lib/utils.rb +19 -0
  432. data/lib/version.rb +3 -0
  433. data/lib/vulndb_client.rb +43 -0
  434. data/util/console.rb +9 -0
  435. data/util/docker.sh +2 -0
  436. data/util/ident.rb +375 -0
  437. data/util/list_paths.rb +12 -0
  438. data/util/tags.rb +36 -0
  439. data/utils.rb +19 -0
  440. metadata +487 -55
  441. data/ident.rb +0 -319
  442. data/lib/check_factory.rb +0 -22
  443. data/lib/checks/akamai.rb +0 -22
  444. data/lib/checks/amazon.rb +0 -26
  445. data/lib/checks/aruba.rb +0 -20
  446. data/lib/checks/asp_net.rb +0 -70
  447. data/lib/checks/atlassian.rb +0 -55
  448. data/lib/checks/base.rb +0 -13
  449. data/lib/checks/chef.rb +0 -31
  450. data/lib/checks/cisco.rb +0 -33
  451. data/lib/checks/citrix.rb +0 -24
  452. data/lib/checks/cloudflare.rb +0 -59
  453. data/lib/checks/cloudfront.rb +0 -41
  454. data/lib/checks/cpanel.rb +0 -23
  455. data/lib/checks/django.rb +0 -22
  456. data/lib/checks/drupal.rb +0 -26
  457. data/lib/checks/f5.rb +0 -24
  458. data/lib/checks/fastly.rb +0 -22
  459. data/lib/checks/generic.rb +0 -23
  460. data/lib/checks/gitlab.rb +0 -22
  461. data/lib/checks/google.rb +0 -23
  462. data/lib/checks/grafana.rb +0 -22
  463. data/lib/checks/jenkins.rb +0 -40
  464. data/lib/checks/joomla.rb +0 -23
  465. data/lib/checks/limesuvey.rb +0 -22
  466. data/lib/checks/lithium.rb +0 -30
  467. data/lib/checks/magento.rb +0 -22
  468. data/lib/checks/mcafee.rb +0 -22
  469. data/lib/checks/mediawiki.rb +0 -38
  470. data/lib/checks/microsoft.rb +0 -69
  471. data/lib/checks/nagios.rb +0 -22
  472. data/lib/checks/oracle.rb +0 -38
  473. data/lib/checks/palo_alto.rb +0 -23
  474. data/lib/checks/pardot.rb +0 -22
  475. data/lib/checks/pfsense.rb +0 -25
  476. data/lib/checks/phpmyadmin.rb +0 -22
  477. data/lib/checks/rabbitmq.rb +0 -29
  478. data/lib/checks/spring.rb +0 -31
  479. data/lib/checks/team_city.rb +0 -22
  480. data/lib/checks/telerik.rb +0 -25
  481. data/lib/checks/tomcat.rb +0 -22
  482. data/lib/checks/varnish.rb +0 -27
  483. data/lib/checks/wordpress.rb +0 -120
  484. data/lib/checks/wp_engine.rb +0 -22
@@ -0,0 +1,26 @@
1
+ module Intrigue
2
+ module Ident
3
+ module Telnet
4
+ module Matchers
5
+
6
+ require_relative 'telnet'
7
+ include Intrigue::Ident::Telnet
8
+
9
+ require_relative 'content'
10
+ include Intrigue::Ident::Telnet::Content
11
+
12
+ def match_telnet_response_hash(check,response_hash)
13
+
14
+ if check[:type] == "fingerprint"
15
+ if check[:match_type] == :content_banner
16
+ puts "Banner: #{_banner(response_hash)}"
17
+ match = _construct_match_response(check,response_hash) if (_banner(response_hash) =~ check[:match_content])
18
+ end
19
+ end
20
+
21
+ end
22
+
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,52 @@
1
+ module Intrigue
2
+ module Ident
3
+ module Telnet
4
+
5
+ include Intrigue::Ident::SimpleSocket
6
+
7
+ def generate_telnet_request_and_check(ip, port=23, debug=false)
8
+
9
+ # do the request (store as string and funky format bc of usage in core.. and json conversions)
10
+ banner_string = grab_banner_telnet(ip,port)
11
+ details = {
12
+ "details" => {
13
+ "banner" => banner_string
14
+ }
15
+ }
16
+
17
+ results = []
18
+
19
+ # generate the checks
20
+ checks = Intrigue::Ident::Telnet::CheckFactory.checks.map{ |x| x.new.generate_checks }.compact.flatten
21
+
22
+ # and run them against our result
23
+ checks.each do |check|
24
+ results << match_telnet_response_hash(check,details)
25
+ end
26
+
27
+ { "fingerprints" => results.uniq.compact, "banner" => banner_string, "content" => [] }
28
+ end
29
+
30
+ private
31
+
32
+ def grab_banner_telnet(ip, port, timeout=30)
33
+
34
+ if socket = connect_tcp(ip, port, timeout)
35
+ #socket.writepartial("HELO friend.local\r\n\r\n")
36
+ begin
37
+ out = socket.readpartial(2048, timeout: timeout)
38
+ rescue Socketry::TimeoutError
39
+ puts "Error while reading! Timeout."
40
+ out = nil
41
+ end
42
+ else
43
+ out = nil
44
+ end
45
+
46
+ out
47
+ end
48
+
49
+
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,19 @@
1
+ module Intrigue
2
+ module Ident
3
+ module Utils
4
+
5
+ ## Helpers
6
+ def encode_string(string)
7
+ return string unless string.kind_of? String
8
+ string.encode("UTF-8", :undef => :replace, :invalid => :replace, :replace => "?")
9
+ end
10
+
11
+ def encode_hash(hash)
12
+ return hash unless hash.kind_of? Hash
13
+ hash.each {|k,v| hash[k] = encode_string(v) if v.kind_of? String }
14
+ hash
15
+ end
16
+
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,3 @@
1
+ module Ident
2
+ VERSION = "0.9.9"
3
+ end
@@ -0,0 +1,43 @@
1
+ require 'json'
2
+
3
+ module Intrigue
4
+ module Vulndb
5
+ class Client
6
+
7
+ include Intrigue::Ident
8
+
9
+ def self.query(api_key, cpe_string)
10
+
11
+ begin
12
+ # api uri
13
+ uri = "https://app.intrigue.io/api/vulndb/match_cpe/#{cpe_string}?key=#{api_key}"
14
+
15
+ # go query the api
16
+ response = ident_http_request :get, uri
17
+
18
+ # catch timeout
19
+ if response[:timeout]
20
+ puts "Error, timed out fetching vulnerabiltiies!"
21
+ return nil
22
+ end
23
+
24
+ # if the API is down, we'll get a nil response, so handle that case gracefully
25
+ unless response[:response_body]
26
+ puts "Error, no response... (do you need a key? email hello@intrigue.io)"
27
+ return nil
28
+ end
29
+
30
+ # parse the body
31
+ result = JSON.parse(response[:response_body])
32
+
33
+ # return our normal hash
34
+ rescue JSON::ParserError => e
35
+ puts "ERROR, unable to parse vulns response"
36
+ end
37
+
38
+ result || []
39
+ end
40
+
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'pry'
4
+ require_relative '../lib/ident'
5
+
6
+ ###
7
+ ### Define the prompt & drop into pry repl
8
+ ###
9
+ Pry.start(self, :prompt => [proc{"ident>"}])
@@ -0,0 +1,2 @@
1
+ #!/bin/bash
2
+ bundle exec ruby ./util/ident.rb $@
@@ -0,0 +1,375 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative "../lib/ident"
3
+ require 'slop'
4
+ require 'thread'
5
+
6
+ include Intrigue::Ident
7
+ include Intrigue::Ident::Utils
8
+
9
+ def allowed_protocols
10
+ ["ftp", "smtp", "snmp", "ssh"]
11
+ end
12
+
13
+ def check_single_ip(opts)
14
+
15
+ unless opts[:proto]
16
+ puts "Unable to continue, protocol must be specified!"
17
+ puts "Use the --proto option!"
18
+ return
19
+ end
20
+
21
+ ip = opts[:ip]
22
+ port = opts[:port]
23
+
24
+ if opts[:proto] == "ftp"
25
+ results = generate_ftp_request_and_check(ip, port || 21)
26
+ elsif opts[:proto] == "snmp"
27
+ results = generate_snmp_request_and_check(ip, port || 161)
28
+ elsif opts[:proto] == "smtp"
29
+ results = generate_smtp_request_and_check(ip, port || 25)
30
+ elsif opts[:proto] == "ssh"
31
+ results = generate_ssh_request_and_check(ip, port || 22)
32
+ elsif opts[:proto] == "telnet"
33
+ results = generate_telnet_request_and_check(ip, port || 23)
34
+ else
35
+ puts "Error! Unknown protocol!"
36
+ puts "We know about the following: #{allowed_protocols.join(", ")}"
37
+ end
38
+
39
+ puts "Got Results:"
40
+ puts results.inspect
41
+
42
+ end
43
+
44
+ def check_file_urls(opts)
45
+
46
+ filepath = opts[:file]
47
+ debug = opts[:debug]
48
+
49
+ # push all urls into a queue
50
+ work_q = Queue.new
51
+ output_q = Queue.new
52
+
53
+ puts "Parsing file #{filepath}" if debug
54
+ File.open(filepath,"r").each_line{|x| work_q << x.chomp }
55
+
56
+ #puts "Checking: #{work_q.inspect}" if debug
57
+ num_threads = opts[:threads] || 3
58
+ workers = (0...num_threads).map do
59
+ Thread.new do
60
+ begin
61
+ while x = work_q.pop(true)
62
+
63
+ thread_name = "thread-#{rand(9999999)}"
64
+ puts "#{thread_name} checking: #{x}" if debug
65
+
66
+ check_result = generate_http_requests_and_check(x,opts)
67
+
68
+ out = {}
69
+ out["url"] = check_result["url"]
70
+
71
+ # get the fingerprint component, uniq it
72
+ if check_result["fingerprint"]
73
+ out["fingerprint"] = []
74
+ check_result["fingerprint"].each do |x|
75
+
76
+ # Make sure not to include dupes, unless we're debugging
77
+ next if out["fingerprint"].include?(x) unless debug
78
+
79
+ out["fingerprint"] << x
80
+ end
81
+ end
82
+
83
+ # get all the content check values as hash entries
84
+ if check_result["content"]
85
+ out["content"] = {}
86
+ check_result["content"].each do |x|
87
+ out["content"]["#{x["name"]}"] = x["result"]
88
+ end
89
+ end
90
+
91
+ puts "#{thread_name} #{x} gave result: #{out}" if debug
92
+
93
+ output_q << out
94
+
95
+ end # while
96
+ rescue StandardError => e
97
+ puts "EXCEPTION! #{e}"
98
+ rescue ThreadError
99
+ end # begin
100
+ end # thread
101
+ end; "ok" # workers
102
+ workers.map(&:join); "ok"
103
+
104
+ # Write the file
105
+ write_simple_csv(output_q)
106
+
107
+ end
108
+
109
+ def check_single_url(opts)
110
+
111
+ query_vulns = opts[:vulnerabilities] || false
112
+ debug = opts[:debug]
113
+ json = opts[:json] || false
114
+
115
+ if opts[:url]
116
+
117
+ url = opts[:url]
118
+
119
+ unless url =~ /^http[s]?:\/\/.*$/
120
+ puts "Unable to parse URL (#{url}), please append http or https in front."
121
+ exit
122
+ end
123
+
124
+ check_result = generate_http_requests_and_check(url, opts)
125
+
126
+ if debug
127
+ puts "Ran #{check_result["initial_checks"].first["count"]} checks against base URL"
128
+ if !check_result["followon_checks"].empty?
129
+ puts "Also checked the following urls due to initial fingerprint:"
130
+ check_result["followon_checks"].each{|x| puts " - #{x["url"]}\n" }
131
+ end
132
+ end
133
+
134
+ unless check_result
135
+ puts "Error... unable to get matches!"
136
+ exit -1
137
+ end
138
+
139
+ #
140
+ # Handle debug output
141
+ #
142
+ if debug
143
+ i= 0
144
+ if check_result["requests"]
145
+
146
+ # delete any existing file
147
+ File.delete "debug.txt" if File.exist? "debug.txt"
148
+
149
+ check_result["requests"].sort_by{|r| "#{r[:request_type].to_s.upcase}"}.each do |x|
150
+
151
+ safex = encode_hash x
152
+
153
+ # increment the request number
154
+ i+=1
155
+
156
+ # print it
157
+ puts "#{i}) #{x[:request_type].to_s.upcase} #{x[:request_method].to_s.upcase} #{x[:start_url]} -> #{x[:final_url]} (#{x[:request_attempts_used] || 1}/#{x[:request_attempts_limit]||1})"
158
+
159
+ # write the contents to a file
160
+ File.open("requests.txt","a") do |f|
161
+ f.puts "Request #{i}\n #{JSON.pretty_generate (safex)}\n\n\n\n"
162
+ end
163
+
164
+ end
165
+ end
166
+ end
167
+
168
+ puts "Fingerprint:"
169
+ if check_result["fingerprint"]
170
+ uniq_matches = []
171
+ check_result["fingerprint"].each do |x|
172
+
173
+ # Make sure not to include dupes, unless we're debugging
174
+ #next if uniq_matches.include? "#{x["vendor"]} #{x["product"]} #{x["version"]} #{x["update"]}" #unless debug
175
+
176
+ uniq_matches << "#{x["vendor"]} #{x["product"]} #{x["version"]} #{x["update"]}"
177
+
178
+ # otherwise, print it out
179
+ puts " - #{x["vendor"]} #{x["product"]} #{x["version"]} #{x["update"]} - #{x["match_details"]} (CPE: #{x["cpe"]}) (Tags: #{x["tags"]}) (Hide: #{x["hide"]})"
180
+ if query_vulns
181
+ vulns = Intrigue::Vulndb::Client.query(nil, x["cpe"]) || []
182
+ vulns.sort_by{|x| x["cvss_v3_score"] || 0 }.reverse.first(5).each do |v|
183
+ puts " - Vuln: #{v["cve"]} (CVSSv3: #{v["cvss_v3_score"]})"
184
+ end
185
+ end
186
+ end
187
+ end
188
+
189
+ if opts[:content]
190
+ puts "Content Checks:"
191
+ if check_result["content"]
192
+ check_result["content"].each do|x|
193
+ puts " - #{x["name"]}: #{x["result"]}"
194
+ end
195
+ end
196
+ end
197
+
198
+ puts JSON.pretty_generate(check_result) if json
199
+ end
200
+ end
201
+
202
+ # Write the file
203
+ def write_simple_csv(output_q)
204
+ headings = []
205
+ headings << "URL"
206
+ headings << "Fingerprint"
207
+ File.open("output.csv","w") { |f| f.puts headings.join(", ") }
208
+
209
+ while output_q.size > 0 do
210
+
211
+ # get a result
212
+ o = output_q.pop
213
+
214
+ # get our url, fingerprint and tags
215
+ out = ""
216
+ o["fingerprint"].uniq.map do |f|
217
+ out << "#{o["url"]}, #{f["vendor"]} #{f["product"]} #{f["version"]} #{f["update"]}\n"
218
+ end
219
+
220
+ # print it out!
221
+ File.open("output.csv","a"){ |f| f.puts out }
222
+ end
223
+
224
+ puts
225
+ puts "============================"
226
+ puts "Find results in: output.csv"
227
+ puts "============================"
228
+
229
+
230
+ end
231
+
232
+ def write_standard_csv(output_q)
233
+
234
+ # first grab headings & add those to the file
235
+ f = output_q.pop(true)
236
+
237
+ headings = []
238
+ headings << "URL"
239
+ headings << "Fingerprint"
240
+ headings << "Tags"
241
+ headings.concat f["content"].keys
242
+ File.open("output.csv","w") { |f| f.puts headings.join(",") }
243
+ output_q.push f # put it back on the queue
244
+
245
+ # then, using that header ordering, iterate through out and grab each value
246
+ while output_q.size > 0 do
247
+ o = output_q.pop
248
+
249
+ # get our url, fingerprint and tags
250
+ out = "#{o["url"]},"
251
+ out << o["fingerprint"].map{ |f| "#{f["vendor"]} #{f["product"]} #{f["version"]} #{f["update"]}"}.uniq.join(" | ")
252
+ out << ","
253
+ out << o["fingerprint"].map{ |f| "#{f["tags"].join(" ")} "}.uniq.join(" ")
254
+ out << ","
255
+
256
+ # dynamically dump all config values in the correct orders
257
+ config_values = []
258
+ headings[3..-1].each do |h|
259
+ config_values << "#{o["content"][h]}"
260
+ end
261
+ out << config_values.join(",")
262
+
263
+ # print it out!
264
+ File.open("output.csv","a"){ |f| f.puts out }
265
+ end
266
+
267
+ puts
268
+ puts "============================"
269
+ puts "Find results in: output.csv"
270
+ puts "============================"
271
+
272
+ end
273
+
274
+ def list_checks
275
+ Intrigue::Ident::Http::CheckFactory.checks.map{|x| x.new.generate_checks("[uri]") }.concat(
276
+ Intrigue::Ident::Ftp::CheckFactory.checks.map{|x| x.new.generate_checks}).concat(
277
+ Intrigue::Ident::Smtp::CheckFactory.checks.map{|x| x.new.generate_checks}).concat(
278
+ Intrigue::Ident::Snmp::CheckFactory.checks.map{|x| x.new.generate_checks}).concat(
279
+ Intrigue::Ident::Ssh::CheckFactory.checks.map{|x| x.new.generate_checks}).flatten
280
+ end
281
+
282
+ def main
283
+
284
+ begin
285
+ ###
286
+ ### Parse options
287
+ ###
288
+ opts = Slop.parse do |o|
289
+
290
+ # url input
291
+ o.string '-u', '--url', 'a url to check'
292
+ o.string '-f', '--file', 'a file of urls, one per line'
293
+
294
+ # ip input
295
+ o.string '--ip', 'an ip to check'
296
+ o.string '--proto', 'protocol to check'
297
+ o.string '--port', 'port to check'
298
+
299
+ # export
300
+ #o.bool '--csv', 'export to csv'
301
+ o.bool '--json', 'export to json'
302
+
303
+ # behavior
304
+ o.string '-i', '--include', 'include checks from this directory (can be used multiple times)'
305
+ o.integer '-t', '--threads', 'number of threads to use when checking a file (default: 3)'
306
+ o.bool '-v', '--vulnerabilities', 'query intrigue.io api for top vulnerabilities'
307
+ o.bool '-c', '--content', 'show content checks'
308
+ o.bool '-b', '--only-check-base-url', 'only base url '
309
+ o.bool '-d', '--debug', 'enable debug mode'
310
+ o.bool '-l', '--list-checks', 'just list checks'
311
+
312
+ o.on "-h", "--help" do
313
+ puts o
314
+ exit
315
+ end
316
+
317
+ o.on '--version', 'print the version' do
318
+ puts Ident::VERSION
319
+ exit
320
+ end
321
+
322
+ end
323
+ rescue Slop::MissingArgument => e
324
+ puts "Error! #{e}"
325
+ return
326
+ end
327
+
328
+ ## include external checks
329
+ if opts[:include]
330
+ puts "Including checks from path: #{opts[:include]}" if opts[:debug]
331
+
332
+ # follow directory structure from ident
333
+ Dir.glob("#{opts[:include]}/checks/*/*.rb").each do |p|
334
+ puts "Requiring include path: #{p}" if opts[:debug]
335
+ require p
336
+ end
337
+
338
+ end
339
+
340
+ if opts[:'list-checks']
341
+ list_checks.sort_by{|c| "#{c[:type]}" }.each {|c|
342
+ puts " - #{c[:type]} ... #{c[:name]} #{c[:vendor]} #{c[:product]} #{c[:version]}" +
343
+ " (Version detection: #{!c[:dynamic_version].nil?})" +
344
+ " (Hide: #{c[:hide]})" +
345
+ " (Vulns: #{c[:inference]})" +
346
+ " #{c[:paths]} ... #{c[:tags]}"}
347
+ return
348
+ end
349
+
350
+
351
+ unless opts[:url] || opts[:file] || opts[:ip]
352
+ puts "Error! At least one of --file, --url, or --ip must be specified"
353
+ return
354
+ end
355
+
356
+ ## handle url input
357
+ if opts[:url]
358
+ puts "Checking URL: #{opts[:url]}" if opts[:debug]
359
+ check_single_url(opts)
360
+ end
361
+
362
+ ## handle file input
363
+ if opts[:file]
364
+ puts "Checking File: #{opts[:file]}" if opts[:debug]
365
+ check_file_urls(opts)
366
+ end
367
+
368
+ ## handle ip input
369
+ if opts[:ip]
370
+ puts "Checking IP: #{opts[:ip]}" if opts[:debug]
371
+ check_single_ip(opts)
372
+ end
373
+ end
374
+
375
+ main