Home > Articles > Security > Software Security

Software [In]security: Assume Nothing

  • Print
  • + Share This
According to software security expert Gary McGraw, co-author of Exploiting Software, Microsoft may be forgetting the old mantra of thinking like an attacker by deciding not to patch a vulnerability in the Virtual PC Hypervisor.
Like this article? We recommend

Like this article? We recommend

Is Microsoft Forgetting a Crucial Security Lesson?

One of the central lessons of Exploiting Software is that attackers often do whatever they can to uncover and undermine assumptions made by system developers. In fact, the mantra "assume nothing" is an important part of seeing things from the attacker's perspective. Regardless of whether or not developers and architects themselves should all be taught to think like an attacker (an ongoing debate), it is certainly the case that security analysts must! Microsoft seems to have forgotten that lesson of late, with potentially dire consequences going forward.

Software Security Progress at Microsoft

Before we get started, a big tip of the (white) hat: Microsoft has made a huge amount of progress on software security since the inception of the Trustworthy Computing Initiative way back in 2001 — and their current generation of products reflects that. The difference in security posture between Windows 95/98 (which had no kernel) and Windows 7 is like night and day. Kudos to Microsoft for the very real security progress they have made.

At least a portion of the improved security is due to various security mechanisms that serve to make software exploit harder. Data execution prevention and randomized memory mapping are among those mechanisms. If a given application is mapped into memory differently by the operating system, or if data segments are marked non-executable, then computing offset tables, building attack payloads, and crafting exploits that work every time becomes much harder for attackers. Given the propensity of targets out there, making your software only a modicum harder to attack may well cause the bad guys to move along to something easier to attack.

Combined with static code analysis, world-class penetration testing, threat modeling (or architectural risk analysis, depending on your favorite software security religion), and other software security activities, security mechanisms make a big difference in Microsoft's attack surface and the ease of crafting an exploit. Microsoft has an exceptionally impressive BSIMM result, serving to emphasize the very real progress they have made in software security.

Sound good so far? The problem is that Microsoft appears to be resting on its hard-earned software security laurels. Here's why.

Time Warp to Broken Security

Earlier this year, Nicolás Economou from Core Security, whose founder and CTO is an author of this article, discovered a design flaw in the Virtual PC Hypervisor made by Microsoft. (A complete description of the problem can be found in the Core Advisory, but we'll provide the technical gist of it here.) The Virtual PC Hypervisor is important because, among many other things, it allows Windows 7 users to run applications designed for previous versions of Windows (e.g., Windows XP SP3). This is a critical factor in enterprise adoption of Windows 7.

A vulnerability in the memory management of the Virtual Machine Monitor (VMM) makes memory pages mapped above two gigabytes (GB) available with read or read/write access to user-space programs running in a Guest operating system. That's bad. Operating systems based on Microsoft Windows NT technologies provide a flat 32-bit virtual address space that describes four GB of virtual memory to 32-bit processes. The address space is used to map a process's executable code and the data it uses during runtime. For performance and efficiency reasons, the process address space is usually split so that 2 GB of address space are directly accessible by a user-mode application process, and the other 2 GB are used to map the code and data of the operating system and are thus only accessible to kernel code. Any attempt from a user-space process to dereference and use memory contents mapped at addresses above the 2GB boundary are supposed to trigger an exception and terminate the offending process. The vulnerability changes all that.

Incorrect memory management by the VMM of Virtual PC makes portions of the VMM worker memory available for read or read/write access to user-space processes running in a Guest OS. Leaked memory pages are mapped on the Guest OS at virtual addresses above the 2GB limit — memory that shouldn't be accessible for user-space programs.

Using this vulnerability, it is possible to bypass security mechanisms of the operating system such as Data Execution Prevention (DEP), Safe Structured Error Handling (SafeSEH) and Address Space Layout Randomization (ASLR) which are designed to prevent the exploit of security bugs in applications running on Windows.

The upshot of this problem is that applications with bugs that are not exploitable when running in non-virtualized operating systems become exploitable if they are run on the (very same) Guest OS virtualized in Virtual PC. To give a specific example, an application running on Windows 7 in XP Mode may well be exploitable while the same application running directly on a Windows XP SP3 system is not.

Speaking as security consultants who make decisions about bug severity and which problems should and should not be fixed all the time (yes, sadly there are many known bugs that go unpatched), we are worried. You see, software bugs that in most cases would not be considered security-relevant (because of the security mechanisms we discussed above) and for that reason not prioritized for mitigation will suddenly become exploitable security bugs in the context of this vulnerability. This is like taking a time machine back so you can run on early (and problematic) Windows operating systems that are unprotected.

We do admit that developing an exploit for this situation is one notch more complicated than normal. The particular vulnerability must be used in combination with another, completely distinct application bug in an application running on the Guest OS in Virtual PC. There are two ways to find such applications: 1) find an unpatched version of the application (far fetched and lame) or 2) find a version of the application with an existing bug that was deemed not worth mitigating due to the existence of no-longer-present security mechanisms (much more likely). In the case of 2, what we have is a classic case of assumptions disappearing and security problems popping to the surface like Styrofoam in the ocean.

Zooming Out to Assume Nothing

The vulnerability that Core found does not seem to worry Microsoft who has decided (so far) not to issue a security bulletin or patch the problem. (The report timeline section of Core's Advisory makes particularly interesting reading.) This may be because using the vulnerability to execute code in the context of the non-virtualized OS (host) does not seem possible. However, use of the vulnerability to implement covert inter-process communications within the virtualized OS or to establish inter-VM communication both seem very likely.

We're less worried about this particular vulnerability than we are about the now-exposed (incorrect) assumption that various security mechanisms will always be in place. It's obvious that a complete re-calibration of exploit potential for uncategorized bugs will become necessary if vulnerabilities like the one described here remain in our fielded systems. Not so good for Windows 7.

In our view, design and architecture decisions made for Virtual PC completely invalidate some basic assumptions about processes in modern Windows operating systems. Like falling dominos, this in turn invalidates almost all anti-exploit mechanisms that Microsoft has built into their OS over the past decade, which then topples over and turns an entire class of bugs deemed un-exploitable on non-virtualized systems into potential vulnerabilities on virtualized systems. Backwards time warp and a table full of fallen dominos.

The practical knowledge to extract from this story is that modern software always relies on a layered number of software and hardware components "underneath" to run properly. In the design and actual implementation of each one of these layers, assumptions are always made about how the other layers work and what type of facilities are and are not exposed. In this particular case, OS security mechanisms were built with a number of assumptions about how process memory mapping, memory protection, and processor privilege levels interact with each other on Windows operating systems.

We should always try to develop a good understanding of the mechanics of the other components that our software relies on. Even further, we should call out the assumptions we may be implicitly relying on about other components. Both of these activities are crucial to assessing risk and impact accurately when the inevitable cracks begin to appear.

These Are Not the Droids You're Looking For

Microsoft claims that the Virtual PC problem "isn't a vulnerability per se" because the problem described only affects "security-in-depth" mechanisms and attackers would need to find and exploit an actual implementation bug to leverage it. Even if Microsoft is right on that count (which we don't think they are), they are ignoring the bigger issue of assumptions. Bugs previously deemed non-exploitable for anything other than crashing systems are now potentially exploitable under a virtualized OS. Because of the way bugs are slated for mitigation in the real world, a majority of those bugs remain unpatched — a problem of prioritization and the enormity of the bug pile in applications.

Another issue is likely in play as well. Windows 7 is a smash hit, and even a whiff of a security issue will do adoption no good.

Regardless of such considerations, in our view, Microsoft should check its assumptions at the door and fix this problem properly.

  • + Share This
  • 🔖 Save To Your Account

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020