Archive for June, 2009

Horseshoes and Hand Grenades

Like the old saying goes, “Close only counts in horseshoes and hand grenades.”

I’ve developed a corollary this week, “The ‘number of flaws’ only matters to VA scanners and journalists.”

I’ve read many news releases this week talking about the record number of flaws/vulnerabilities that Microsoft fixed in the June ’09 Patch Tuesday release. For the record, I’m saying ‘Not Relevant’.

Let’s take MS09-019 as an example. MS09-019 is a cumulative update for Microsoft Internet Explorer. The Microsoft bulletin details eight individual flaws that were addressed by the patches referenced in the security bulletin. Each flaw can be exploited in the same manner – visit an evil website and the evil website can run code on your system. And the closely related ‘the evil code will run in the context of the currently logged on user’.

As a Systems Administrator, one thing is clear to me: if my users visit an evil website, their machine’s can be exploited. How do I rectify this? I can apply the suggested patch.

Do I care that there were eight different underlying flaws that would lead to the evil code execution? No.

Do I need to take eight different steps to protect myself from this vulnerability? No.

Can I patch my systems to protect them from only 7 of the 8 vulnerabilities? No.

What I do care about is the amount of effort required to protect my machines from this issue. That answer is ‘1’. 1 patch will protect me from these issues – whether there is only 1 listed flaw, or 17 listed flaws. One patch does the trick.

Microsoft issued ten security bulletins covering some much larger number of flaws (I won’t list that number here, because I can’t be bothered to count something that is irrelevant). As a Systems Administrator, I should look at my maximum effort as something up to ’10’. Some of the bulletins may be for products that don’t impact me; therefore, the number could be somewhat lower. Some months, Microsoft has released more than 10 bulletins. That tells me more work is required. Other months, Microsoft has only released one bulletin – therefore seemingly less effort required to fix my systems then when 10 bulletins appear.

If Microsoft only released one bulletin in a month, and that bulletin addressed 52 issues, does that mean it’s almost twice as much effort to remediate my systems vs. a month that had 10 bulletins but a purported lower number of vulnerabilities? No.

Could Microsoft manipulate the way that they call out the flaws in their bulletins? Sure. Does Microsoft list out all of the additional variants that they found internally when researching the externally reported flaw? No sir. This could hike the flaw numbers much higher. Could Microsoft combine like flaws into single reported flaws? Yes – though they’d need to appease the individuals who reported the items to them, so they each get their day in the sun.

And how about those VA scanners?
Each of the flaws discussed above gets a unique CVE number. Vulnerability Scanner vendors input definitions to their products by CVE number. When I scan my system that is missing just one patch (MS09-019) I get 8 ‘vulnerabilities’ flagged on my machine – one for each of the ‘flaws’ in the 09-019 bulletin. Doesn’t help me remediate my system. Makes it look like a lot of work to get these items remediated, when in reality, it just needs one patch.

All of the above is irrelevant. I care about the number of patches.

To that end, how many patches were released on the June 2009 patch day? Have any journalists mentioned this? Not that I’ve seen. The number of patches released is, at the end of the day, a better reflection of the amount of effort required to make your company secure.

I frequently hear people ask “how many patches did Microsoft release today?” and the answer is something along the lines of “10 today”. No, this is the number of security bulletins released. The number of patches is something else entirely.

For June 2009, Microsoft released 64 unique security bulletin-related patches. This includes English x86 and x64 (but not ia64.) 362 meg, if you care to know. (multi-national organizations need to multiply the number of patches by the number of languages they manage)

Worst case, I have a subset of up to 64 different patches to apply to each of my systems. The tough part is figuring out which ones go to which systems. Those companies that do patch management by hand are in a world of hurt – there’s no way to manage each of these by hand. But I digress…

Let’s start a new trend – let’s talk about the true numbers on patch day – those that reflect the actual level of effort – not those that allow journalists to go for sensationalism or help Mozilla justify themselves vs. Microsoft.

Leave a comment »

Reflections on June 2009 Patch Day

Microsoft released 10 security bulletins this month. Eight of the ten were assigned exploitability indices of ‘1 – Consistent Exploit Code Likely’. This means hackers could have access to exploit code fairly soon – which means the patches should be installed sooner rather than later. Five of the ten security bulletins discuss ‘server-side’ vulnerabilities (vs. client-side vulnerabilities). More on server-side vs. client-side in a future post.

See the end of this post for recommendations on which to install first.

MS09-018: Vulnerabilities in Active Directory Could Allow Remote Code Execution (971055)
MS09-018 is a Critical server-side vulnerability in the Active Directory services of Windows 2000 and Windows Server 2003 domain controllers (or Active Directory Application Mode on XP and WS03 servers). By submitting a specially formatted LDAP request to the AD server, the attacker can execute code of their code on Windows 2000 AD servers (what I call a true ‘remote code execution’ vulnerability). On Windows Server 2003, the attacker can cause a Denial of Service condition and otherwise make a mess of an ordinarily pleasant day.

For the attack to be successful against Windows 2000 DCs, the attacker simply needs to target their attack against LDAP ports (tcp 389, 636, 3268, or 3269). While these ports are traditionally blocked at Internet firewalls, these ports are wide open for attack on most internal networks. The attacker doesn’t need any special authentication to attack Windows 2000 servers. Once they launch the code, they can take any action they wish against the domain controller. If I were the attacker, I’d go after the SAM database that contains all of the Domain User’s password hashes.

For Windows Server 2003, the attack is somewhat mitigated in that the attacker must have some level of credentials to the domain controller. In most instances, this means the attacker must be a member of the domain which he or she is attacking. The vulnerability is rated Important in WS03 as it doesn’t allow code execution – it just jams up the server from doing what it should.

I’d recommend patching Windows 2000 AD servers as soon as possible. I’d also patch Windows Server 2003 systems quickly, as you don’t want disgruntled employees launching the tool of the week to down your domain controllers.

MS09-019: Cumulative Security Update for Internet Explorer (969897)
Another month, another Critical IE cumulative patch. This particular patch corrects a flaw uncovered at the recent CanSecWest conference that enabled someone to hack a Vista machine via IE8. It also corrects a handful of other issues identified in all versions of Internet Explorer.

The IE8 issue impacts Windows XP systems when browsing evil Internet websites. Vista and WS08 systems are protected against evil Internet sites because of DEP and ASLR built-in protections. Vista systems can be vulnerable to evil Intranet sites if other security configs on the Vista box have been weakened. In any event, it’s nice that this zero-day flaw in IE8 has been corrected. Go apply the patch.

The remaining issues addressed in the bulletin impact IE versions 5, 6 and 7. Exploitation can range from information disclosure to what Microsoft calls remote code execution (and I call local code execution). Workaround: don’t visit evil websites.

This is a client-side collection of vulnerabilities as they require someone at the target system to take an action on the machine in order to allow the vulnerabilities to execute. Therefore, this attack is more likely to impact your end-user workstations than your datacenter servers.

MS09-020: Vulnerabilities in Internet Information Services (IIS) Could Allow Elevation of Privilege (970483)
Another patch for a zero-day vulnerability, this bulletin addresses the IIS WebDAV issue announced by Microsoft last month. This vulnerability allows remote attackers to bypass the WebDAV authentication settings on an IIS server, potentially allowing them to read files on the webserver. The issue is somewhat mitigated, however, because the file system ACLs are still observed.

While this vulnerability doesn’t allow the attacker to write files to or execute code on the server, it might allow them to read enough information from the server that they can exploit other services on the box (think SQL server). See my prior post, New Microsoft IIS Zero-Day Vulnerability, on this issue for more information.

MS09-021: Vulnerabilities in Microsoft Office Excel Could Allow Remote Code Execution (969462)
In the fifth Excel patch we’ve seen since last August, Microsoft is hoping they’ve nailed the door shut on malicious file parsing bugs. Multiple vulnerabilities with Excel file parsing were addressed in the 09-021 patch.

The Excel 2000 platform is rated as Critical, whereas Excel 2002-2007, SharePoint, and Excel converters are rated Important. Excel 2000 is rated Critical because it lacks the open dialog confirmation window that exists in later releases. This means if you have Excel 2000 installed and you visit an evil web page, the web page can open Excel and launch the evil document without your knowledge. You’re hacked. In Excel 2002 and later, the evil document wouldn’t open automatically; rather, it would prompt you if you wish to open the file. If the evil file does execute, it runs under the context of the currently logged on user (typical of a client-side vulnerability).

MS09-022: Vulnerabilities in Windows Print Spooler Could Allow Remote Code Execution (961501)
MS09-022 is a server-side vulnerability that can be exploited by sending RPC packets to the print spooler on the target system. RPC is the same mechanism used in the Blaster\Sasser\Conficker worms. Remote RPC uses tcp ports 139 and/or 445.

In this instance, the attacker can execute code on Windows 2000 systems remotely; however, the attacker must first install a print server on their own machine, then send RPC packets to the target system, instructing the target to connect to the rogue print server. When the target system enumerates the sharename of the rogue server, the attacker’s code can execute on the remote system.

Windows XP and later systems aren’t vulnerable to this attack; however, they are vulnerable to several other attacks. In the first, a locally logged on user can read or print any file on the system, even if they don’t have access to the file. The local attacker can specify the file they want to read as a separator page – thus allowing it to be viewed. The second attack is a privilege escalation attack. The attacker can send RPC packets to the target system, convincing it to load an evil printdriver dll. Once this happens, the attacker can execute code on the system. In order for this to happen the attacker must have the ‘manage printers’ capability (which is granted to locally logged on users).

For Windows 2000, this is a Critical issue. For Vista and WS08, this is Important. For XP and WS03 systems, this is rated Moderate.

MS09-023: Vulnerability in Windows Search Could Allow Information Disclosure (963093)
If a user running Windows XP or Windows Server 2003 performs a Windows Search on their machine, the search results could cause malicious scripts to execute that would display information from the target system. This attack requires that the target system be running Windows Search. It also requires that the attacker place a specially crafted file on the target user’s computer.

If this evil file is indexed by the search engine (whether it be an email message, document, or data file) AND appears at the top of a search result (performed by the user) html script embedded in the evil file can execute on the target system. The attacker’s script could access data on the system and forward this back to the attacker. Alternatively, if the evil file is not returned at the top search result, the script will still execute if the user selects and previews the search result for the evil file.

The above scenario is seemingly complex – probably what helped to get it rated Moderate rather than Important. Also, Windows Search is not installed on these platforms by default. If you’re a hacker looking to read data on a system, I’d look to other exploits before attempting this one. Windows Search has had two prior security updates: MS09-015 and MS08-075.

MS09-024: Vulnerability in Microsoft Works Converters Could Allow Remote Code Execution (957632)
This is a client-side vulnerability that could allow an attacker to execute on a user’s computer should they open a malformed Works document (.wps). As with other Office vulnerabilities, Office 2000 is rated Critical as the malformed document could open automatically and without warning when the user visits an evil website. For Office 2002, Office 2003, Office 2007 SP1, and users running Works 8.5 or 9, the malformed Works file wouldn’t open automatically, but would present an open confirmation dialog box before opening. The attacker could also email the malformed document to other users. When the unsuspecting users (and those not trained to not open unusual files from unknown individuals) open the Works document, it will execute code on their system.

The code will execute with the same level of permissions as the currently logged on user (administrator, in many cases) and can do anything the logged on user can do. This patch replaces MS08-072 for Works 8.5.

MS09-025: Vulnerabilities in Windows Kernel Could Allow Elevation of Privilege (968537)
Microsoft refers to MS09-025 as a local code execution vulnerability. In other words, the attacker must be logged on to the local machine and execute code locally in order for the vulnerability to be exploited. Once the attackers code has been initiated, it will run as LocalSystem and can grant the attacker administrative access.

While this exploit might be most beneficial to (the few) computer users who don’t have admin permissions to their local systems, the exploit can also be leveraged by folks who do terminal services to remote computers, and in some cases, to users who have code upload capabilities to hosted web servers.

Because it requires that the user have some level of access to execute code on the target system, Microsoft has rated this Important. Microsoft also says that proof of concept code has been released for several of the vulnerabilities addressed by this patch. This patch replaces MS09-006 (which was Critical).

MS09-026: Vulnerability in RPC Could Allow Elevation of Privilege (970238)
RPC vulnerabilities usually scare the pants off of me. In this instance though, it’s not so bad. Microsoft assures us that their Operating Systems are not vulnerable to this attack by default – none of their RPC services suffer from this issue. They mention that third party products could be vulnerable as they leverage an RPC runtime file that could be susceptible to this issue.

In order to pull off this attack, a remote attacker would need to send carefully constructed packets to a vulnerable RPC service on the target machine. Third party apps can choose any tcp or udp ports to use for their services – it’s not as easy as saying tcp 139 or 445. Third party services that implement tight authentication and security over their RPC services are less likely to be susceptible to exploitation. To be sure that you’re safe, install this patch and ask your vendors if they include any code that looks like the examples here:

MS09-027: Vulnerabilities in Microsoft Office Word Could Allow Remote Code Execution (969514)
Same type of issue as MS09-021. Open a malformed Word document and it hacks your system. I’m tired of these. ‘Nuff said.

Recommended order of deployment:

First: MS09-018 (Win2K), MS09-019 (IE), MS09-020 (IIS)

After: all the rest

Disclaimer: adjust these recommendations for the assets on your network

Leave a comment »