[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [WEB SECURITY] Universal XSS with PDF files: highly dangerous
- From: "Billy Hoffman" <Billy.Hoffman@xxxxxxxxxxxxxxx>
- Subject: RE: [WEB SECURITY] Universal XSS with PDF files: highly dangerous
- Date: Thu, 4 Jan 2007 12:09:13 -0500
------_=_NextPart_001_01C73023.0F56A3CE
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
You cannot filter this URLs, because a URL fragment denotes something
inside of a resource. The server doesn't care what the fragment it. The
HTTP request sent when you click on a URL with a fragment doesn't
contain the fragment at all. This means a site cannot even implement a
web application firewall or IDS rule to not serve a PDF. They can't tell
the different between a PDF requested for legitimate reasons or a PDF
requested as part of an attack.
=20
Short of removing all PDF's from a website, that site cannot ensure they
are acting as an accomplice to exploit a user.
=20
Fun times,
Billy Hoffman
--
Lead Researcher, SPI Labs
SPI Dynamics Inc. - http://www.spidynamics.com
<http://www.spidynamics.com/>=20
Phone: 678-781-4800
Direct: 678-781-4845
________________________________
From: skarvin [mailto:skarvin@gmail.com]=20
Sent: Thursday, January 04, 2007 4:04 AM
To: bugtraq@securityfocus.com; websecurity@webappsec.org
Subject: Re: [WEB SECURITY] Universal XSS with PDF files: highly
dangerous
=20
Hi all,
Another possible solution is to use the Apache mod_security to filter
that kind of urls.
bye
2007/1/4, pdp (architect) < pdp.gnucitizen@googlemail.com
<mailto:pdp.gnucitizen@googlemail.com> >:
ahhh, fragment identifiers make sense to browsers only. they are not=20
send to the server
On 1/4/07, der wert <derwert@hotmail.com> wrote:
>
> The best solution I see would be to keep all pdf files in a non-web
> accessible location on the web server, then have all the pdf files
outputed=20
> through a script such as a php script. In php you can check the what
the
> REQUEST_URI is, if it isn't equal to what you were expecting which
would
> mean extra parameters were taken away or added then you could just
have the=20
> php script not output the pdf file since that would mean someone had
been
> tampering with the URI.
>
> D
>
> ________________________________
> Get free, personalized online radio with MSN Radio powered by Pandora.
Try=20
> it!
--
pdp (architect) | petko d. petkov
http://www.gnucitizen.org
------------------------------------------------------------------------
----
The Web Security Mailing List:=20
http://www.webappsec.org/lists/websecurity/
The Web Security Mailing List Archives:
http://www.webappsec.org/lists/websecurity/archive/=20
http://www.webappsec.org/rss/websecurity.rss [RSS Feed]
--=20
Un saludo,
This message was written entirely with recycled electrons.=20
blog: http://skarvin.blogspot.com
main(){int j=3D1234;char t[]=3D":@abcdefghijklmnopqrstuvwxyz.\n",*i=3D
"iqgbgxmsuspcpdofeqgbnek.";char *strchr(const char *,int);while(=20
*i){j+=3Dstrchr(t,*i++)-t;j%=3Dsizeof t-1;putchar(t[j]);} return 0;}
skarvin=20
------_=_NextPart_001_01C73023.0F56A3CE
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags" =
name=3D"PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dblue>
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>You cannot filter this URLs, =
because a URL
fragment denotes something inside of a resource. The server =
doesn’t care what
the fragment it. The HTTP request sent when you click on a URL with a =
fragment doesn’t
contain the fragment at all. This means a site cannot even implement a =
web
application firewall or IDS rule to not serve a PDF. They can’t =
tell the
different between a PDF requested for legitimate reasons or a PDF =
requested as
part of an attack.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Short of removing all PDF’s =
from a
website, that site cannot ensure they are acting as an accomplice to =
exploit a
user.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Fun =
times,<o:p></o:p></span></font></p>
<div>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Billy =
Hoffman<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>--<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Lead Researcher, <st1:PersonName =
w:st=3D"on">SPI
Labs</st1:PersonName><o:p></o:p></span></font></p>
<p class=3DMsoNormal><st1:PersonName w:st=3D"on"><font size=3D2 =
color=3Dnavy
face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>SPI
Dynamics</span></font></st1:PersonName><font size=3D2 color=3Dnavy =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:navy'> Inc. – <a
href=3D"http://www.spidynamics.com/">http://www.spidynamics.com</a><o:p><=
/o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Phone: =
678-781-4800<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Direct: =
678-781-4845</span></font><font
size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></p=
>
</div>
<div>
<div class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><font =
size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>
<hr size=3D2 width=3D"100%" align=3Dcenter tabindex=3D-1>
</span></font></div>
<p class=3DMsoNormal><b><font size=3D2 face=3DTahoma><span =
style=3D'font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font =
size=3D2
face=3DTahoma><span style=3D'font-size:10.0pt;font-family:Tahoma'> =
skarvin
[mailto:skarvin@gmail.com] <br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Thursday, January =
04, 2007
4:04 AM<br>
<b><span style=3D'font-weight:bold'>To:</span></b> =
bugtraq@securityfocus.com;
websecurity@webappsec.org<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> Re: [WEB =
SECURITY]
Universal XSS with PDF files: highly =
dangerous</span></font><o:p></o:p></p>
</div>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal style=3D'margin-bottom:12.0pt'><font size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>Hi all,<br>
<br>
Another possible solution is to use the Apache mod_security to filter =
that kind
of urls.<br>
<br>
bye<o:p></o:p></span></font></p>
<div>
<p class=3DMsoNormal><span class=3Dgmailquote><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'>2007/1/4, pdp (architect) <<a
href=3D"mailto:pdp.gnucitizen@googlemail.com"> =
pdp.gnucitizen@googlemail.com</a>>:</span></font></span><o:p></o:p></p=
>
<p class=3DMsoNormal style=3D'margin-bottom:12.0pt'><font size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>ahhh, fragment
identifiers make sense to browsers only. they are not <br>
send to the server<br>
<br>
On 1/4/07, der wert <<a =
href=3D"mailto:derwert@hotmail.com">derwert@hotmail.com</a>>
wrote:<br>
><br>
> The best solution I see would be to keep all pdf files in a =
non-web<br>
> accessible location on the web server, then have all the pdf files
outputed <br>
> through a script such as a php script. In php you can check the =
what the<br>
> REQUEST_URI is, if it isn't equal to what you were expecting which =
would<br>
> mean extra parameters were taken away or added then you could just =
have
the <br>
> php script not output the pdf file since that would mean someone =
had been<br>
> tampering with the URI.<br>
><br>
> D<br>
><br>
> ________________________________<br>
> Get free, personalized online radio with MSN Radio powered by =
Pandora. Try
<br>
> it!<br>
<br>
<br>
--<br>
pdp (architect) | petko d. petkov<br>
<a href=3D"http://www.gnucitizen.org">http://www.gnucitizen.org</a><br>
<br>
-------------------------------------------------------------------------=
---<br>
The Web Security Mailing List: <br>
<a =
href=3D"http://www.webappsec.org/lists/websecurity/">http://www.webappsec=
.org/lists/websecurity/</a><br>
<br>
The Web Security Mailing List Archives:<br>
<a =
href=3D"http://www.webappsec.org/lists/websecurity/archive/">http://www.w=
ebappsec.org/lists/websecurity/archive/
</a><br>
<a =
href=3D"http://www.webappsec.org/rss/websecurity.rss">http://www.webappse=
c.org/rss/websecurity.rss</a>
[RSS Feed]<o:p></o:p></span></font></p>
</div>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><br>
<br clear=3Dall>
<br>
-- <br>
Un saludo,<br>
<br>
This message was written entirely with recycled electrons. <br>
<br>
blog: <a =
href=3D"http://skarvin.blogspot.com">http://skarvin.blogspot.com</a><br>
main(){int j=3D1234;char =
t[]=3D":@abcdefghijklmnopqrstuvwxyz.\n",*i=3D<br>
"iqgbgxmsuspcpdofeqgbnek.";char *strchr(const char =
*,int);while( <br>
*i){j+=3Dstrchr(t,*i++)-t;j%=3Dsizeof t-1;putchar(t[j]);} return 0;}<br>
<br>
skarvin <o:p></o:p></span></font></p>
</div>
</body>
</html>
------_=_NextPart_001_01C73023.0F56A3CE--
Brought to you by http://www.webappsec.org
Search this site
|