Gmail Cross Site Scripting

El dia de hoy les traigo un pequeño descubrimiento, una vulnerabilidad en el sistema de Presentaciones (para los burros, powerpoint) en linea de Google Mail. El problema es sencillo, y no le tomara mucho tiempo arreglar a los de Mountain View, pero hay algo que me preocupa más. Describire el problema de Gmail rapidamente para poder pasar al detalle del plugin de flash. Google Slideshows no esta filtrando los hipervinculos de las presentaciones cuyo destino es una URI javascript:, con solo crear un simple enlace, colocarle como destino javascript:alert(1) e insertarlo en la presentacion, es posible ejecutar javascript en el contexto de mail.google.com. Para los que quieran verlo en funcionamiento he preparado un sencillo poc que envia las cookies a un sitio remoto (que no existe), tendrian que enviarse este archivo por correo, y luego verlo en modo de Presentacion desde Gmail. ...

May 4, 2008 · 2 min

Cada vez más cerca Firefox 3

Ya se encuentra disponible la beta 5 del que considero es, el mejor navegador libre (no, no he usado nada basado en webkit todavia). Entre las nuevas caracteristicas que vienen con el lanzamiento de esta version sobresalen: Mejoras en el uso de memoria: Es algo que se puede sentir sin la necesidad de usar algun tipo de benchmarks. Esta clase de progreso ayuda especialmente a escritorios como Gnome, que para ser sinceros es algo mas exigente con respecto al hardware que otras alternativas libres, pero aun asi, es (y probablemente seguira siendo) uno de los Desktop Environments mas usados. Y pone a Firefox a competir directamente con otros como Opera, y Safari. Interfaz grafica integrada con el Sistema operativo: Me gusta especialmente el trabajo que se ha hecho en la version de Linux, en la cual, Firefox utilizara los iconos del tema de nativo de GTK, para sus barras de herramientas y menues. Estandares W3: La prueba Acid2 pasada completamente y el resultado de la Acid3 mejora considerablemente con respecto a Firefox 2. Barra de direcciones inteligente. Según informacion entregada por Mozilla, la version final estaría disponible para el mes de junio. Jugueteando con el navegador, me di cuenta que existe un problema de seguridad en todas las versiones del Firefox 3, es una regresion de un bug reportado hace mas de 3 años por Michael Krax, el cual afecta las plataformas Windows, personalmente no considero que sea peligroso. Lo reporte a Mozilla, y ya tienen disponible un patch en trunk, el proximo release ya deberia venir con este problema corregido. Un detalle que no me gusta de Firefox 3, es el hecho que la barra de direcciones ahora muestra la URL despues de haberla ‘urldecodeado’, y si somos de los que jugamos con las URLs manualmente, esto puede ser un inconveniente.

April 9, 2008 · 2 min

Security Bookmarklets

I took a couple of days from my school vacation to write 3 bookmarklets that will help me when auditing web sites, I’d like to share them here because I know that they’ll help some of my friends, and probably one of the two readers of this blog. [Text2SQLChar](javascript:(function(){ x=prompt(‘Input text:’,’’);l=x.length;t=x.charCodeAt(0);for (i = 1;i<l;i++) t = t +’,’+x.charCodeAt(i);prompt(‘Output: ‘, ‘Char(’+t+’)’); })();) Converts an string into a CHAR() mysql, usefull when magic_quotes is on. [SQLIncrement](javascript:(function(){url=decodeURI(location);if (url.indexOf(‘select 1’)==-1) { alert(‘Inject a simple 'union select 1' first.’);return; }max=url.substring(url.indexOf(‘select 1’)).split(’,’).length;if (max>1) zx = (max-1)+’,’+max; else zx = ‘select 1’;tmp=url.indexOf(zx);location=encodeURI(url.substring(0, tmp+zx.length)+’,’+(max+1)+url.substring(tmp+zx.length));})()) Increments automatically the number of columns of the injected select query. [SQLDecrement](javascript:(function(){url=decodeURI(location);if (url.indexOf(‘select 1’)==-1) { alert(‘Inject a simple 'union select 1' first.’);return; }max=url.substring(url.indexOf(‘select 1’)).split(’,’).length;if (max>2) zx = (max-2)+’,’+(max-1); else { if (max==2) zx=‘select 1’; else return; } tmp=url.indexOf(zx);dx = ‘,’+max;location=encodeURI(url.substring(0, tmp+zx.length)+url.substring(tmp+zx.length+dx.length));})()) Decrements automatically the number of columns of the injected select query. [Increment](javascript:(function(){ var e,s; IB=1; function isDigit(c) { return (‘0’ <= c && c <= ‘9’) } L = decodeURI(location.href); LL = L.length; for (e=LL-1; e>=0; –e) if (isDigit(L.charAt(e))) { for(s=e-1; s>=0; –s) if (!isDigit(L.charAt(s))) break; break; } ++s; if (e<0) return; oldNum = L.substring(s,e+1); newNum = ’’ + (parseInt(oldNum,10) + IB); while (newNum.length < oldNum.length) newNum = ‘0’ + newNum; location.href = L.substring(0,s) + newNum + L.slice(e+1); })();) Allows you to navigate up html files or images that have a number in them. [Decrement](javascript:(function(){ var e,s; IB=-1; function isDigit(c) { return (‘0’ <= c && c <= ‘9’) } L = decodeURI(location.href); LL = L.length; for (e=LL-1; e>=0; –e) if (isDigit(L.charAt(e))) { for(s=e-1; s>=0; –s) if (!isDigit(L.charAt(s))) break; break; } ++s; if (e<0) return; oldNum = L.substring(s,e+1); newNum = ’’ + (parseInt(oldNum,10) + IB); while (newNum.length < oldNum.length) newNum = ‘0’ + newNum; location.href = L.substring(0,s) + newNum + L.slice(e+1); })();) Allows you to navigate down html files or images that have a number in them. base64 Firefox only, base64 with no padding ...

January 28, 2008 · 3 min

Firefox 2.0.0.10 released

Mozilla Corporation just released Firefox 2.0.0.10 which includes fixes against JAR uri attacks. This issue affected browsers that used Gecko engine, a quick check showed me that only K-meleon browser was also updated, however there are several Gecko based web browsers that need to get fixed: Gecko-based browsers. Update: Let’s make that, Firefox 2.0.0.11, which also fixes some regressions.

November 27, 2007 · 1 min

Google Gadgets XSS (IE6/Opera)

There is a recent discussion on ha.ckers.org regarding a possible CSRF that could allow an attacker to inject an evil gadget on someobdy else’s iGoogle page. After checking the format of the xml file used to define the gadgets properties, I noticed a couple of attributes that could be used as point of injections to active content, the thumbnail and screenshot attribute. Only one of them is vulnerable, the screenshot attribute, by using a javascript URI as value you can execute active content on certain browsers such as IE6. This is a poc that shows an alert with the current document.domain value: ...

November 25, 2007 · 1 min

Firefox jar: Protocol Vulnerability

I just came across pdp’s finding jar protocol vulnerability on Mozilla Firefox, I think its a big issue, and the fact that it has been on bugzilla (#369814) for way more than ten fuck*ng days is not a good thing. According to pdp, this issue makes vulnerable to Cross-site scripting applications that allow users uploading compressed ZIP, and JAR files. After a couple of minutes messing around the poc’s, I figured out that sites with open redirect issues are vulnerable too. I’ve created this poc that attacks Gmail, it’s based on my previous post and it will only show your contacts list, it’s not being logged server side or anything (as some people thought that my previous poc did. Credit to tx for discovering the open redirect issue used to exploit Google / Firefox): ...

November 10, 2007 · 2 min

Google Vulnerability

Yesterday, I found a new Google.com XSS vulnerability that can be abused to steal information from Gmail accounts, I’ve done responsible disclosure of at least 3 vulns to Google, but since I haven’t got enough ‘motivation’, I’ll go full disclosure now. The vulnerability exists in Blogspot polls feature, I had already disclosed a vulnerability on this system. The ‘font’ parameter was not being sanitized before being used inside an STYLE tag, so you could inject IE’s expression() and Mozilla’s -moz-binding. They fixed it, however they didn’t check enough the rest of the code, the new XSS is: ...

September 24, 2007 · 2 min