Notification :

1. Assalamualaikum.

2. Hello.

3. Welcome tom my blog.

4. Nothing but something.

15 Website Untuk Belajar Designing

Comments : 0
Posted: Feb 2, 2014
Find some wordpress site and add ~/wp-plugins/ to find the vuln

Code :-
  1. <?php
  2. /*
  3.   http://127.0.0.1/wp.php?url=
  4.   Beach Please ~fts
  5.   Paan Hensem tpi danial lagi hensem ~fap
  6.   Credit To : Ahlspiess
  7.   Original Code : http://rempah-proj.googlecode.com/svn/trunk/PHP/wpdetect.php  
  8. */
  9. $url = $_GET['url'];
  10. $jMe = new WordpressScanner($url);
  11. class WordpressScanner {
  12.     public $url;
  13.     function __construct($url){
  14.         $this->url = $url;
  15.         $this->init();
  16.     }
  17.    
  18.     function init() {
  19.         $content = $this->cURL($this->url);
  20.         if(!preg_match("/200 OK/", $content)) {
  21.             $this->msg("[-] Error! 404 Not Found");
  22.             exit;
  23.         } else {
  24.             print $this->wpscan($content);
  25.         }
  26.     }
  27.    
  28.     function wpscan($content) {
  29.        $dupe = array();
  30.                 $nstack = array();
  31.                 preg_match_all("/wp-content\/themes\/(.*?)\/style\.css/", $content, $ret_1);
  32.                 preg_match_all("/Theme URI: (.+)/", $this->cURL($this->argv[1]."/".$ret_1[0][0]), $ret_2);
  33.                 preg_match_all("/\<meta name=\"generator\" content=\"WordPress (.*?)\" \/\>/", $content, $ret_3);
  34.                 $this->msg("[+] Using Wordpress Version: ".trim($ret_3[1][0]));
  35.                 $this->msg("[+] Using ".trim($ret_1[1][0])." Theme. Url --> ".trim($ret_2[1][0]));
  36.                 preg_match_all("/wp-content\/plugins\/(.*?)\//", $content, $stack);
  37.                 foreach($stack[1] as $unstack) {
  38.                         if(!isset($dupe[$unstack]) and !is_null($unstack) and !empty($unstack)) {
  39.                                 if(preg_match("/200 OK/", $this->cURL("http://svn.wp-plugins.org/".trim($unstack)."/"))) {
  40.                                         $this->msg("[+] Founded {$unstack} Plugins");
  41.                                         $this->msg(" --> Plugin URL --> http://svn.wp-plugins.org/".trim($unstack)."/");
  42.                                 } else {
  43.                                         $this->msg("[+] Founded {$unstack} Plugins.");
  44.                                 }
  45.                                 $nstack[] = $unstack;
  46.                                 $dupe[$unstack] = true;
  47.                         }
  48.                 }
  49.         //echo "[Debug]".__fVULN__."\n";
  50.         $this->fVuln($nstack);
  51.     }
  52.    
  53.     function fVuln($c = array()) {
  54.         $content = "";
  55.         foreach($c as $com) {
  56.             $content .= $this->cURL("http://www.exploit-db.com/search/?action=search&filter_page=1&filter_description={$com}&filter_exploit_text=&filter_author=&filter_platform=31&filter_type=6&filter_lang_id=0&filter_port=&filter_osvdb=&filter_cve=");
  57.         }
  58.         preg_match_all("/\<a  href=\"http\:\/\/www\.exploit\-db\.com\/exploits\/(.*?)\"\>(.*?)\n/", $content,$me);
  59.         for($i=0;$i<count($me[1]);$i++) {
  60.             $this->msg("[+] ".trim(str_replace("</a>", "", $me[2][$i]))."\n --> http://www.exploit-db.com/exploits/".trim($me[1][$i]));
  61.         }
  62.        
  63.     }
  64.    
  65.     function cURL($url) {
  66.         $ch = curl_init();
  67.         curl_setopt($ch, CURLOPT_HEADER, 1);
  68.         curl_setopt($ch, CURLOPT_TIMEOUT, 15);
  69.         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  70.         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  71.         curl_setopt($ch, CURLOPT_URL, $url);
  72.         curl_setopt($ch, CURLOPT_USERAGENT, "~fap~fap");
  73.         curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  74.         $data = curl_exec($ch);
  75.         if($data) {
  76.             return $data;
  77.         } else {
  78.             return 0;
  79.         }
  80.     }
  81.    
  82.     function msg($x) {
  83.         printf("%s<br />", $x);
  84.     }
  85. }
  86.  ?>
save as wp.php or etc
run the file at localhost/website , example abgdanial.com/wp.php?url=1malaysia.com.my
search the vuln plugins at google.com/exploit-db.com/1337day.org

credits to 0b0xed for the tut.

Wordpress Vulnerability Scanner by Ahlspiess

Comments : 0

Popular Posts

Total Pageviews

- Copyright © 2013 Nothing but Something - Danial - - Powered by Blogger - Designed by Johanes Djogan -