Windows 8 Security in Action: Part 3

(This is the third and final part of my Windows 8 Security in Action article featured in last month’s Hakin9 magazine. Part One was a general introduction to the new look of Windows 8. In Part Two we looked at some of the new security features, and saw how it responds to basic Java attacks. In this last section we continue to analyze how Windows 8 responds to online and local attacks.)

SET PowerShell Attack

I next tried the SET PowerShell attack2. This attack has worked in all previous versions of Windows that I have tested, including Windows 7. SET creates a PowerShell command that includes an encrypted shell. Once the script is executed in PowerShell on the target system, it connects out to the remote system.

I ran the program creating the PowerShell script, and started the listener service on the Backtrack system. I then ran the script and… Nothing!

The Backtrack system did not detect any connection attempts and the Windows 8 PowerShell threw out a “Program has stopped running” error and closed. The PowerShell script that SET creates runs in a hidden Window so you can’t see what it is doing. When I ran the shell again with the hidden feature turned off, I got this screen of errors in PowerShell (Figure 15):

Figure 15 – PowerShell remote Shell attack stopped by Windows 8

Arithmetic operation resulted in an overflow.” – Windows 8 did not allow the malicious code to connect out to the attacker system completely thwarting the attack.

So far, Windows 8 is batting a thousand; none of the attacks have been successful!

Windows 8 against the latest Flash Threats

Recently a Computerworld article3 stated that Windows 8 was vulnerable to a new Flash exploit that was just discovered, and apparently will not be patched until October due to the way that Flash is integrated into the new Internet Explorer.

Just today (September 12th) Computerworld announced that Microsoft changed their minds and will release a security patch right away:

“In light of Adobe’s recently released security updates for its Flash Player, Microsoft is working closely with Adobe to release an update for Adobe Flash in IE10 to protect our mutual customers,” Yunsun Wee, director of the company’s Trustworthy Computing Group, said in a Tuesday statement. “This update will be available shortly.”

I actually tried a couple of the earlier Flash attacks against Windows 8. Not the one mentioned in the Computerworld article, but one that was only a few weeks old (Mid-August). Windows Defender caught it and stopped it. (Figure 16)

Figure 16 –Windows Defender showing Attacks that were stopped

Overall the new Windows seems very good at standing up to common online script based attacks.

Credential Harvesting Attacks

Next I ran credential harvesting attacks against the Windows 8 machine. This creates a bogus website that looks like a regular webpage, like G-Mail or Facebook. Then when someone tries to enter their credentials it takes and stores the user’s login information and forwards them to the real page.

Windows 8 was able to block all of the Java based harvesters that I tried.

But on a harvesting page that did not use Java, it worked flawlessly and I was able to recover any credentials that were typed into the bogus webpage.

Though not really a security fault of Windows 8’s – the user is entering their credentials on a bogus webpage – but with the tight integration of Windows 8 with Microsoft Account numbers and Live E-mail, this could be an issue.

Man-in-the-Middle Attacks

I tried running a Man-in-the-Middle (MitM) attack against the system. A MitM attack goes after the underlying TCP/IP communication stack and modifies the target’s ARP table. The Address Resolution Protocol table simply maps IP Addresses to network card physical MAC addresses. A system running the MitM attack inserts itself into the communication path between a system and the gateway/ router by telling the target system that it is the gateway and the gateway that it is the target system. Any information transferred in or out of the system can be monitored and stored.

Surprisingly the MitM attack I attempted worked flawlessly. I was able to watch what websites the Windows 8 system went to from my attacking system and was able to view communication data.

I thought this type of attack would be addressed in Windows 8, but as in Windows 7 and previous versions, this still seems to work.

Physical Attacks

As mentioned earlier, Windows 8 now comes with a new boot method, called Unified Extensible Firmware Interface (UEFI). This helps protect against malware boot attacks and root kits, and some other common attempts at modifying the boot process. This is a huge improvement over previous versions of Windows.

But it is not perfect, let me explain.

Even Windows 7 included a feature that recovers system files that are changed while the computer is running. So if you tried to change certain system files, it would revert back the next time the system rebooted.

But there is a file modification process that has been around a very long time that attacks the system files by booting from another OS, like Linux. This file modification attack allows a System level command prompt that can be opened at the login screen. The System level credential is the highest level of authority on a Windows box. It is higher than the “Administrator” user and is similar to Root access on a Unix/Linux box.

And this system level terminal runs without anyone physically logged onto the machine! This entire process was actually explained on a Microsoft TechNet Forum on Windows Server back in 2009 as a way to get into your server if you lost the Admin login credentials:

http://social.technet.microsoft.com/Forums/en-US/windowsserver2008r2general/thread/11facbbf-d7c5-4507-89ae-d828d11eaa73

But what has been allowed to remain in Windows (it works in all versions of Windows including Desktops), could also be used by a bad guy in a physical attack.

It only takes a few seconds to perform this attack using a Linux boot disk. Basically you boot the Windows box with a Linux Boot disk, modify a couple executable files in the system32 directory and reboot. Then on reboot, at the main login screen, you hit a key combination and up pops a System level command prompt!

Figure 17 –System level Command Prompt at Login Screen

At this point you can run any system commands, including adding users or whatever you want to do. In the image below I just created a user named “Fred” with the ultra-secure password of “fred” (no one would ever guess that!).

Figure 18 –Adding a new User at Login Screen

I then reboot and we now have two users on this system:

Figure 19 –User added from Login Command Prompt Shows up in Login Screen

And of course I can now login to the system with our new user Fred.

Don’t get me wrong, this isn’t some high level hack. It is a valid way to legitimately get access to a system where someone has forgotten the password.

We have used it in a corporate environment before where users have left and did not leave their current password. The systems were not network attached and unfortunately an administrator did not create an account on them. And of course the systems had data on them so the machines could not be wiped.

But as I mentioned before, malicious users could also use the same tactic if they have physical access to the machine.

Conclusion

Again, I just used standard testing tools in the creation of this article. There are several ways to bypass anti-virus on older versions of Windows by modifying the payloads in Metasploit. I did not do this; I just wanted to test it using some of the most common security techniques that are in use today.

My intent on writing this article was not to show how to bypass Window 8 security, but how the out-of-the-box features stood up to average internet attacks , which it did extremely well.

I was able to get an initial remote shell with the Alphanumeric shell attack. And though it was not completely functional, a version could possibly be made in the future to bypass Windows 8 security features. Flash vulnerabilities still seem to be a concern according to the Computerworld article. One credential harvesting attack also worked, and so did the physical login prompt trick.

Hopefully this article demonstrates to you that Windows 8 security is indeed better than Windows 7. But user training about online threats and phishing defense needs to remain in place. The standard advice of not running unknown or unsolicited attachments, or visiting suspicious websites, and all the normal Social Engineering defense training remains the same.

Running a script blocker program like FireFox’s “NoScript” is still highly recommended to stop scripts from automatically running.

Also physical security of systems is still very important. Keep important servers and workstations in a secured area. Do not allow other people to access your system. Always verify the identity of service personal who want to perform maintenance on your system.

Will Windows 8 sweep the enterprise world by swarm? I am not sure. The security features (especially the increased memory protection) are a big boost and are needed. But the switch to the new interface may be a turn off to many overtaxed IT departments that do not have the time to help users through the learning curve of a new desktop.

Many corporate users still are using Windows XP believe it or not. Will they switch to Windows 7 or jump to the more secure Windows 8?

Only time will tell.

References

1 –Microsoft’s Secure Password FAQ – http://www.microsoft.com/security/online-privacy/passwords-create.aspx

2 – PowerShell Attack – https://cyberarms.wordpress.com/2012/08/02/social-engineering-toolkit-bypassing-anti-virus-using-powershell/

3 – “Adobe confirms Windows 8 users vulnerable to active Flash exploits” -http://www.computerworld.com/s/article/9231076/Adobe_confirms_Windows_8_users_vulnerable_to_active_Flash_exploits

4 – “Microsoft backpedals, promises to patch Windows 8’s Flash ‘shortly’” http://www.computerworld.com/s/article/9231185/Microsoft_backpedals_promises_to_patch_Windows_8_s_Flash_shortly_

Advertisements

Windows 8 Security in Action: Part 2

This is Part 2 of the 3 part article “Windows 8 Security in Action” featured in this month’s issue of Hakin9 Exploiting Software. Part one is available here.

Changes in Microsoft’s Password Policy

I have noticed some changes in the way Microsoft handles their different service account passwords over the past few weeks. It first started a while back when using Microsoft Live mail. One day when I typed in my legitimate password to my e-mail account, I received this error message (Figure 8):

Figure 8 – Microsoft Live Login Screen requesting Fewer Characters

“If you have been using password longer than 16 characters, please enter the first 16”?

Sure enough, I put in the first 16 characters of the password and I was in. So in effect, it looks like they just went through their password database and truncated all the passwords down to 16.

But that is not all.

Recently I went to login to my Microsoft mail and got the good old “It’s time to change your password” message. No problem!

Well, yes there was. I use several special characters and when I tried to use some of them (which were in my existing password!) I received this message (Figure 9):

Figure 9 – Microsoft Login Special Character Message

It seemed to accept some of the special characters, but didn’t like others that I have used since I created the Hotmail Live account!

I wondered what was going on, and then I remembered, Windows 8 is being released and they want you to tie it in to an email address/ Microsoft account. As you can see in the Windows 8 install screen below (Figure 10):

Figure 10 – A View of the Windows 8 install Screen requesting an E-Mail Address

Sure you can use a different e-mail account, or even log in with a local password but they still want you to connect in to a Microsoft account (Xbox, Live, etc.) for Windows 8′s other features. And of course don’t forget the new Microsoft Marketplace…

What then is the reason for shortening the passwords? Looks like Windows 8 is capped at a 16 character limit for compatibility with existing Microsoft services. But is that long enough for secured passwords?

Let’s check Microsoft’s FAQ for strong passwords1:

 “Length. Make your passwords long with eight or more characters.”

Okay, we are good there, but what should our password look like? Well, here are some of the password examples from Microsoft’s strong password FAQ (Figure 11):

Figure 11 – Microsoft’s Secure Password Examples

Wait a minute… They are all over 16 characters long!

As length increases so does the cracking time. Passwords longer than 10 characters take an exponentially longer time to crack. So in all reality, 16 really shouldn’t be a problem. But all of my passwords are longer than that. And with the decrease of the character set, by limiting special characters for compatibility with Microsoft’s other services, the passwords are less secure than they were before.

I am curious if Microsoft will change this in the future.

Microsoft trying to tie all their services together in the cloud is an interesting concept though. With doing this, no matter where you log in, you will get a consistent look and feel, with all of your data available.

All right, enough of an overview, let’s see Windows 8 security in action!

Testing Windows 8 Security

I took Windows 8 and ran a couple common security tests against it to see how well it would hold up. I used the Backtrack platform, SET and the Metasploit Framework. As a straight test from a security tester’s point of view, I did not use any modified payloads, uncommon techniques or exploits that were not included with the Metasploit platform.

My goal was to test to see how the new security features make the system more secure than previous versions of Windows.

The Windows 8 Enterprise VM was tested as installed with no additional security programs or anti-virus running except the included Microsoft Windows Defender. Also the latest version of Java was installed (version 7 update 7).

Malicious Shell Code verses Windows 8

Let’s take a look at a standard Java attack against Windows 8. I created a test page using the Social Engineering Toolkit (SET) in Backtrack 5, so that when a user connects, it displays an obviously bogus “Letter from the CEO” page, and it offers a backdoored Java applet to the visitor. If the user allows the Java app to run, we get a remote session.

Figure 12 – Malicious Java Security Warning

As you can see form the screenshot above (Figure 12), you see a security warning explaining, “This application runs with unrestricted access which may put your computer and personal information at risk.” If we click the box to accept the risks, and run the malicious Java We instantly receive a Windows Defender pop-up warning (Figure 13) that Malware was detected and it stopped the attack.

Figure 13 – “Malware Detected” by Windows Defender

Okay, that was an easy one; next I tried SET’s Alphanumeric shell code attack. This one is a little sneakier and can still bypass some AVs. When I pulled up the test CEO webpage on the SET machine, I didn’t get a Malware warning like I did with the earlier attack.

When I ran the attack, I got a shell!

Okay, just a shell notification (Figure 14) on the Backtrack side…

Figure 14 – Viewing connected session in Meterpreter

But once I tried to connect to the shell in Backtrack I couldn’t run any commands. It may have been able to create a channel to the Windows 8 machine, but the security features of 8 stopped it (Notice the Timeout errors) so I could not get a working remote shell.

Okay, am I impressed yet at the new security features? No, not really. A Windows 7 system running a good up to date AV/ Internet security solution will give similar results to what we have experienced so far. But for an out of the box install, it is not bad at all.

(Stay Tuned for Part 3)

GFI Cloud Management for Antivirus, Asset Tracking & Network Management

Wouldn’t it be nice to have Anti-Virus, Network Management and Asset Tracking services via the Cloud?

Well, now you can:

GFI Cloud gives you control of your IT environment in 10 minutes or less. Whether you have 5 or 500 employees, its simple web-based interface offers integrated antivirus, asset and network management across your workstations and servers. With an expanding range of award-winning software services, GFI Cloud provides a single integrated solution to streamline IT management.”

Check out GFI Cloud!

Why Patch Management Is Vital to Your Business Network Security

If your business has any IT resources at all and is connected to the Internet, it’s not a question of if you will suffer a security incident; it’s just a matter of when. Just how bad such an incident will be comes down to your patch management strategy. Patch management is critical in any size company, from the sole proprietorship to the international enterprise, and keeping up with the patching on every single server and workstation on your network is the most effective thing you can do to minimize your exposure to the threats facing your network.

There are several different ways that malicious attackers can compromise your network. Malware infected email attachments and downloads, worms that propagate from system to system, and compromised websites that deliver harmful scripts to browsers, all tend to take advantage of unpatched vulnerabilities in your operating systems, web browsers and other applications to do their damage. Guessing passwords and finding unsecured ways into networks are still out there, but it is much easier to probe for an unpatched webserver, and that same activity is usually much more difficult to detect. Once an attacker finds a flaw, they can easily exploit it with any number of canned attacks. There are even frameworks where people can create “hack in a box” type plug-ins that anyone can use, with no programming experience required.

These sorts of attacks rely on the victims to have unpatched systems running on their network. Patch management is the most effective, and the easiest way to defend against such threats. Operating system and software application vendors regularly release patches for their products, and notify their customers who have registered whenever an update is available. Some, but unfortunately not all, even provide ways for users to set their computers up to automatically download those updates to make it as easy as possible to receive and install the patches. Using patch management enables admins to deploy patches in a controlled fashion, testing them before wide scale deployment, and also to ensure that all systems are up-to-date on their patches. Patch management gives you the control you should have, to ensure that your systems are secured. Patch management also provides you a way to patch those applications that the vendors don’t provide an automated way to handle.

Patch management systems enable you to maintain full control of your systems’ patching activities. You can deploy security patches to test machines, and then push them out to all the rest of your machines, and also run reports to ensure that you have 100% compliance across all servers and workstations. You can use your patch management system to provide reports up to management and to auditors as well, so you can make sure management knows what is going on, and that auditors’ requests are easy to meet.

With patch management, you can also quickly and easily push emergency patches out to all your systems. While testing patches and deploying them in a planned manner is preferable, every so often a zero day exploit is discovered that necessitates pushing a patch out to all systems as quickly as possible. Without a patch management system, you may have to run from machine to machine, or worse still, rely upon your users to patch their own systems. With patch management, you can deploy an update from the comfort of your desk, and know that you have all your machines covered.

For the security of your network, and to ensure quick and efficient deployment of security patches to all workstations and servers, deploy a patch management application on your network today. The ease with which you can patch your systems, the reporting that it provides, and the peace of mind that comes with knowing that you are not subject to exploits of unpatched systems makes a patch management system a vital component of your network management suite.

About the author: Casper Manes writes for GFI Software Ltd, a leading software developer that provides a single source for network administrators to address their network security, content security and messaging needs.

All product and company names herein may be trademarks of their respective owners.