Re: [Full-disclosure] Extending JavaScript Portscanning to Include Banner Grabbing



On 3/4/07, mark <mark@xxxxxxxxxxxxx> wrote:
There's a new paper/advisory at: http://bindshell.net/papers/ftppasv

Here's a quick summary:

A common implementation flaw in FTP clients allows FTP servers
to cause clients to connect to other hosts. This seemly small
vulnerability has some interesting consequences for web browser security
(namely in Firefox, Opera and Konqueror).

This paper discusses the FTP client flaw in detail and demonstrates how
it can be used to attack web browsers. Proof of concept code is
presented that extends existing JavaScript port-scanning techniques to
scan any TCP port from Firefox (even though it now implements
"port banning" restrictions). Because of the way the same-origin policy
is applied it is also possible to perform banner-grabbing scans against
arbitrary hosts. Finally, for services that don't return a banner an
alternative fingerprinting technique is demonstrated which measures
the time it takes servers to close inactive TCP connections.

I love how clever the recent exploits of Firefox have been. They're
really fun to play with.

I took a look at this technique this morning, compared to the older
style of HTTP connections for JavaScript scanning, and I think that a
very important note is that this PASV technique allows for one to use
web browsers to scan for you, without it being immediately obvious to
the target what you're up to (since there's no request headers being
pushed to the open ports). While it is indeed quite slow, I think it
serves as a much cleaner way to scan, from the perspective of how
quiet it is with its interaction with the target. I guess it's a
trade-off if you want to poke at the ports a little more by sending
some data.

I've posted some pcap dumps illustrating the difference, in case
anyone wants to see without having to go through all the set-up:

http://www.mcgrewsecurity.com/blog/?p=8

So, awesome work! It's a shame your notification to security@ for
mozilla got filtered as spam :)

--
Robert Wesley McGrew
http://mcgrewsecurity.com

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/



Relevant Pages

  • Re: Linksys Router and PASV FTP
    ... listen on this port for the data. ... firewalls, so that's exactly what PASV mode is for. ... and most FTP clients support it. ... I suppose an FTP client could use UPNP to set up the router to open the ...
    (comp.security.firewalls)
  • Re: FTP works from a command Window, but not from GUI
    ... As I knew, port number over 5000 need to add the key value into the registry.Also, FTP client transfer mode table is provided to you. ... The following table lists the FTP clients provided by Microsoft, and the connection mode that each client supports: ... > to do with Port Forwarding on my router since it did not work locally on the ...
    (microsoft.public.inetserver.iis.ftp)
  • Re: Is it possible to access an FTP behind a Linksys befsr41 in passive mode?
    ... > Most FTP clients work great in PORT mode, but most of my users use IE, ... > upon a port 20 outbound from my server application. ...
    (comp.security.firewalls)
  • Is it possible to access an FTP behind a Linksys befsr41 in passive mode?
    ... Most FTP clients work great in PORT mode, but most of my users use IE, ... I have tried forwarding TCP ports to the server machine, ...
    (comp.security.firewalls)