PageRenderTime 20ms CodeModel.GetById 41ms RepoModel.GetById 0ms app.codeStats 0ms

/plugins/google-hack-honeypot.rb

https://github.com/yehgdotnet/WhatWeb
Ruby | 39 lines | 16 code | 8 blank | 15 comment | 1 complexity | 1fe832d265c81b80d2479b54b73fa65f MD5 | raw file
  1. ##
  2. # This file is part of WhatWeb and may be subject to
  3. # redistribution and commercial restrictions. Please see the WhatWeb
  4. # web site for more information on licensing and terms of use.
  5. # http://www.morningstarsecurity.com/research/whatweb
  6. ##
  7. Plugin.define "Google-Hack-Honeypot" do
  8. author "Brendan Coles <bcoles@gmail.com>" # 2010-06-13
  9. version "0.1"
  10. description "Google Hack Honeypot is the reaction to a new type of malicious web traffic: search engine hackers. - homepage: http://ghh.sourceforge.net/"
  11. examples %w|
  12. http://ghh.sourceforge.net/demo/GHH%20-%20PHP%20Ping/php-ping.php
  13. |
  14. # About 184 results @ 2010-06-13
  15. # "Enter ip" inurl:"php-ping.php"
  16. def passive
  17. m=[]
  18. if @body =~ /<title>The WorldsEnd.NET - Free Ping Script, written in PHP<\/title><\/head><body bgcolor="#FFFFFF" text="#000000"><\/body><p><font size="2">Your IP is: [\d\.]*<\/font><\/p><form methode="post" action="[\ \/\'\+\-\.a-zA-Z0-9]*"> Enter IP or Host <input type="text" name="host" value="127.0.0.1"><\/input> Enter Count <input type="text" name="count" size="2" value="4"><\/input> <input type="submit" name="submit" value="Ping!"><\/input><\/form><br><b><\/b><\/body><\/html>/
  19. version="PHP-Ping"
  20. m << {:name=>"default html",:version=>version}
  21. end
  22. m
  23. end
  24. end
  25. # an aggressive plugin could look for:
  26. # xml.inc
  27. # xmlrpc.inc
  28. # xmlrpcs.inc
  29. # ghhserver.php
  30. # config.php
  31. # CreateDatabase.sql