Re: Let's exploit this

From: Serg B. (sergicles@gmail.com)
Date: Thu Aug 03 2006 - 00:17:56 EDT


You could just try inputing hexidecimal encoded strings. Chances are
they would get converted to "real" strings on the way out - hello XSS.

On 03/08/06, James Harless <jharless@kidwellcompanies.com> wrote:
> Hmm...
>
> Knowing that all apostrophes are escaped with backlsashes...and that is the
> only character checked for...my first instinct is to put a backslash before
> the apostrophe.ie 'Nancy\'s' as the input.
>
> So, then the function would add another escape character, correct? Then you
> would essentially escape the backslash and leave the apostrophe intact,
> right? Or..am I off base here?
>
> I'm picturing the final function looking like:
>
> MyFunc('Nancy\\'s','hamster');
>
> It seems like that could be put to evil use.
>
> James
>
> On 8/2/06 7:57 AM, "Tim" <tim-pentest@sentinelchicken.org> wrote:
>
> > Hello list,
> >
> > After a discussion with our moderator about list content, I decided I'll
> > try to encourage some more in-depth technical discussion about the
> > exploitation certain quirky bugs. So, here's one that I came across a
> > while back.
> >
> > It is an exploitable XSS bug, but it isn't immediately obvious (at least
> > it wasn't to me) how it can be exploited. Suppose we have a dynamically
> > generated web page which contains the following line of JavaScript:
> >
> > myFunc('FOO', 'BAR');
> >
> > In this page, the user can control both the values of FOO and BAR. In
> > other words, this JavaScript is dynamically generated. Here's the
> > catch: The values FOO and BAR are both checked for apostrophe (single
> > quote) characters. Any instances of these are escaped with backslashes.
> > For instance, if a user supplied values "Nancy's" and "hamster" for FOO
> > and BAR, respectively, then the following line would be generated:
> >
> > myFunc('Nancy\'s', 'hamster');
> >
> > Apostrophe is the only character checked for, in all it's variants
> > (unicode?). Let us suppose an attacker can inject arbitrary binary data
> > in those strings.
> >
> > Now, like I said, I know of one way to exploit this behavior to inject
> > almost arbitrary JavaScript. I'm hoping this will prompt an interesting
> > discussion on the topic of browser behavior and perhaps learn of other
> > ways it can be exploited.
> >
> > cheers,
> > tim
> >
> > ------------------------------------------------------------------------------
> > This List Sponsored by: Cenzic
> >
> > Concerned about Web Application Security?
> > Why not go with the #1 solution - Cenzic, the only one to win the Analyst's
> > Choice Award from eWeek. As attacks through web applications continue to rise,
> > you need to proactively protect your applications from hackers. Cenzic has the
> > most comprehensive solutions to meet your application security penetration
> > testing and vulnerability management needs. You have an option to go with a
> > managed service (Cenzic ClickToSecure) or an enterprise software
> > (Cenzic Hailstorm). Download FREE whitepaper on how a managed service can
> > help you: http://www.cenzic.com/news_events/wpappsec.php
> > And, now for a limited time we can do a FREE audit for you to confirm your
> > results from other product. Contact us at request@cenzic.com for details.
> > ------------------------------------------------------------------------------
> >
>
>
> ------------------------------------------------------------------------------
> This List Sponsored by: Cenzic
>
> Concerned about Web Application Security?
> Why not go with the #1 solution - Cenzic, the only one to win the Analyst's
> Choice Award from eWeek. As attacks through web applications continue to rise,
> you need to proactively protect your applications from hackers. Cenzic has the
> most comprehensive solutions to meet your application security penetration
> testing and vulnerability management needs. You have an option to go with a
> managed service (Cenzic ClickToSecure) or an enterprise software
> (Cenzic Hailstorm). Download FREE whitepaper on how a managed service can
> help you: http://www.cenzic.com/news_events/wpappsec.php
> And, now for a limited time we can do a FREE audit for you to confirm your
> results from other product. Contact us at request@cenzic.com for details.
> ------------------------------------------------------------------------------
>
>

------------------------------------------------------------------------------
This List Sponsored by: Cenzic

Concerned about Web Application Security?
Why not go with the #1 solution - Cenzic, the only one to win the Analyst's
Choice Award from eWeek. As attacks through web applications continue to rise,
you need to proactively protect your applications from hackers. Cenzic has the
most comprehensive solutions to meet your application security penetration
testing and vulnerability management needs. You have an option to go with a
managed service (Cenzic ClickToSecure) or an enterprise software
(Cenzic Hailstorm). Download FREE whitepaper on how a managed service can
help you: http://www.cenzic.com/news_events/wpappsec.php
And, now for a limited time we can do a FREE audit for you to confirm your
results from other product. Contact us at request@cenzic.com for details.
------------------------------------------------------------------------------



This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 10:56:31 EDT