Get to grips with Vista's service hardening

Daily Newsletters

Sign up to ZDNet UK's daily newsletter.

Topics

Vista, Microsoft

ANALYSIS

The services that run in Windows provide functionality for users, but they also offer a point of potential attack because they're well known to hackers and, in the past, have been easy to exploit.

Network security experts have long recommended that administrators disable all unnecessary services on servers and workstations to reduce the chances of a service exploit. However, there are many services you can't disable because they must run for a computer to perform properly. That's where Windows service hardening comes in.

Service hardening refers to the process of making it more difficult for the bad guys to do damage to the system or network by exploiting Windows services, and it's one of the many security mechanisms Microsoft builds into Windows Vista.

Windows services: Why they're vulnerable
Windows services are programs, which in many cases are built into the operating system. But they're different from other applications in several ways:

  • Services usually start automatically and run continuously, rather than being opened and closed by the user.
  • Services are managed in Windows by the Service Control Manager (SCM), which maintains a database of the installed services and manages each service's state via control requests.
  • Services have traditionally run under accounts that have a very high level of privileges (typically the LocalSystem account).

Malicious software is often designed to exploit services by piggybacking on them, thus running at the same privilege level as the service it exploits. Attackers have taken advantage of this many times in the past — for example, with the Slammer, Code Red, and Blaster worms.

The purpose of service hardening
You might guess that service hardening is designed to prevent attackers from compromising services, but that's not really its purpose.

There are other security mechanisms in Vista, such as the Windows Firewall, that perform that "outer layer" protection.

Service hardening, on the other hand, reduces the chances that an attacker who does manage to compromise a service will be able to do damage. Think of it this way: in a multi-layered physical security plan, you might have a gated fence, with a large dog inside it, to keep burglars away from your front door. But if they do manage to get in, you also have deadbolts on the door itself. And if they manage to pick those locks, you have a security alarm system to scare them off. The alarm system does nothing to prevent entry into your house — that's the purpose of the fence, dog, and deadbolts. But it's there so that if intruders do compromise your outer layer security, they're less able to do damage (get away with your valuables). Service hardening is more like the alarm system, an inner-layer element of a multilayered security strategy.

What does service hardening do?
Just as User Account Control (UAC) is designed to ensure that user accounts — even administrator accounts — run with the lowest possible level of privileges to minimise any damage that can be done if they're exploited, Windows service hardening ensures that the services running in Windows run under the least privileged accounts possible. For example, many services that used to run under the LocalSystem account now run under the lower-privileged NetworkService or LocalService accounts. In addition, privileges that a service doesn't need, such as debugging, are removed to reduce the attack surface.

Services that run under lower-privileged accounts are referred to as restricted services. Both UACs and Windows service hardening's behaviour are examples of using the principle of least privilege, which states that every user (and program) should operate using the least set of privileges necessary to perform its job.

How it works
Windows Vista uses "isolation" techniques to protect services from exploit. Session 0 isolation prevents services and user applications from running in the same session, and service isolation makes it possible for services to separate themselves from other services and applications by means of a security identifier (SID). Session 0 is the session created when Windows starts. In prior operating systems, user applications could run in session 0. (In XP with Fast User Switching, the first user who logs on is assigned to session 0.) In Vista, only services and applications not associated with a user session are allowed to run in session 0.

Each service is assigned an SID, which is a unique value. You're probably already familiar with SIDs, as they are assigned to all users and groups in Windows. This means the familiar Windows access control model can be used to the control the access of services to resources in the same way it can be applied to user and group accounts. In other words, access control lists (ACLs) can now be assigned to services. An ACL is a set of Access control entries (ACEs). Each resource has a security descriptor that contains the ACLs assigned to it. Permissions defining who or what can access the object are stored in the ACL.

Network firewall policies can also be applied to services with the policy linked to the service SID, so that the service can't access the network in ways it's not supposed to. The Vista Firewall is integrated with the service hardening feature. Rules are defined in the service hardening platform as to how a specific service needs access to the network, Registry and file system. The firewall enforces those rules and blocks traffic that violates them. Unlike the XP Firewall, the Vista Firewall can enforce both outbound and inbound rules.

Specific services can be restricted so they can't make edits to the Registry or write to system files, and so on. Or a service can be restricted so that it can write to only specific areas of the Registry or file system or can't send outbound network traffic. Services can be prohibited from making changes to configuration settings and performing other actions that can do damage.

Each service included in the Vista operating system already has been assigned a service hardening profile, which defines what it should and shouldn't be allowed to do. The SCM then assigns those privileges it needs — and only those privileges — to the process. Thus, there's no configuration or administrative overhead required.

Summary
Windows service hardening is one component in Vista's new security arsenal that's built around the concept of the principle of least privilege. Working in conjunction with other new security mechanisms, such as User Account Control and the Vista Firewall, it helps provide a broad-based, multilayered defence against the harm that could otherwise be done by malicious software.

The service hardening feature leverages existing Windows security mechanisms, such as security identifiers and access control lists, extending their functionality for added protection. Perhaps best of all, service hardening is transparent to both users and administrators; it just works in the background and doesn't require any administrative attention.

Glossary

  • Access control list (ACL): A list of access control entries (ACEs) that contain permissions defining who or what can access the object to which it is applied
  • Piggybacking: A method used by viruses and other malicious software that exploits a legitimate account or process and runs with the same level of privileges
  • Principle of least privilege: A security model under which all accounts run with the lowest possible level of privileges that will allow them to do their jobs
  • Restricted services: Services that run under lower privileges
  • Security Identifier (SID): A unique value assigned to an object by which it is identified
  • Service Control Manager (SCM): The Windows component that maintains a database of installed services and manages each service's state
  • Service isolation: A Vista security mechanism enabling services to isolate themselves from other services
  • Services: Programs that are managed in Windows by the Service Control Manager (SCM)
  • Session 0 isolation: A Vista security mechanism that prevents user accounts and user applications from running in session 0, reserving it for services and other applications not associated with a user logon
  • User Account Control (UAC): A Vista security mechanism designed to ensure that user accounts, including administrator accounts, run with the least privilege to minimise the chance of exploit

Talkback

Very useful as vista is still in its infancy and will have many holes to be exploited for a while to come.

Trust me i can help 4 January, 2007 15:36
Reply

VMS, the operating system designed to run on DEC VAX computers in the 1970s had this kind of philosophy long ago. I think it was also present in ICL's George 3 and George 4 operating systems which I used for a while in the 1970s. Unix and Linux have allowed similar restrictions of functionality by allowing different users and different groups execution rights to different programs.
The development of computing has been seriously held back and much suffering caused because millions of people and companies were persuded to use an operating system that was designed for use by one person only.

aaron.sloman 4 January, 2007 16:35
Reply

Post your comment

In order to post a comment you need to be registered and logged in.

You can also log in with Facebook. Log in or create your ZDNet UK account below

  • Login

Will not be displayed with your comment

By signing up for this service, you indicate that you agree to our Terms and Conditions and have read and understood our Privacy Policy. Questions about membership? Find the answers in the Community FAQ

Get ZDNet UK's daily newsletter

Enter your email address to sign up

ZDNet UK Live

Paul Smyth

Is this classic FUD? One thing I would definitely have notice is a Mozilla threat to stop supporting GNU/Linux.

40 minutes ago by Paul Smyth via Facebook on Firefox rapid release improves Fedora Linux
UnderINK

I agree with the previous commenter wholeheartedly. I couldn't say it better myself. This is very 'Big Brother'. And while I agree with protecting...

5 hours ago by UnderINK on European e-identity plan to be unveiled this month
Simon Bisson and Mary Branscombe

Nice to see that Turing's idea of a general purpose computer doing once-hardware-powered tasks in software is now universal ;-) Mary

10 hours ago by Simon Bisson and Mary Branscombe on Software with everything
Jason Burchell

seriously now. I've only bothered to read a small bit of the comments. do me and the rest of the world a favour. stop saying it does not work or...

14 hours ago by Jason Burchell via Facebook on Music industry negotiating over 24-bit downloads
Philip Charles Cohen

Read about it and weep, John Donahoe ... In addition to Visa’s V.me, there is now MasterCard’s PayPass digital wallet soon to arrive; another...

18 hours ago by Philip Charles Cohen via Facebook on PayPal takes phone-based payments to the high street
apexwm

Leslie Satenstein : Where have you ever seen Mozilla even mention this? Firefox is the most popular browser in the GNU/Linux OS, so I don't see...

19 hours ago by apexwm on Firefox rapid release improves Fedora Linux
songmaster

SHleG: Do you remember building a clockwork scorpion kit (I'm pretty sure I have a photo of it somewhere) — I think it was called something like...

21 hours ago by songmaster on Software with everything
Chris Wortman

Good I love Yahoo! Their search engine is getting better than Google as of late. I find more of what I want on the first page, and usually within...

21 hours ago by Chris Wortman via Facebook on Linux Mint 13 ramps up for KDE release
PatrickG

openhgs has made the point for Windows 8 multiple monitors without realising it! With Windows 7 you have to switch the mouse and so your focus...

23 hours ago by PatrickG on Windows 8 could speed multi-monitor uptake
Leslie Satenstein

Mozilla has threatened to stop supporting Linux. I guess that UBUNTU is going with another browser. I indicated that if Mozilla stops supporting...

1 day ago by Leslie Satenstein via Facebook on Firefox rapid release improves Fedora Linux
Andy Bolstridge

Much as I abhor Microsoft's licensing practices, this is almost certainly down to purchasing IT equipment via 3rd party consultants - you get the...

1 day ago by Andy Bolstridge via Facebook on 6 million wasted licences and £1,200 PCs: welcome to government IT
Jack Schofield

@openhgs Windows users have had multiple desktops since Linus started writing Linux. They just haven't shipped as standard because not enough...

2 days ago by Jack Schofield on Windows 8 could speed multi-monitor uptake
Jack Schofield

@Phil at Cloud4 What, Microsoft gets £1,200 per PC and £1,622 per server? Gosh, I'm amazed....

2 days ago by Jack Schofield on 6 million wasted licences and £1,200 PCs: welcome to government IT
craigsc

You guys have no idea what is going on at Autonomy. Autonomy could have been a much more profitable organization. The sales operations at Autonomy...

2 days ago by craigsc on HP cuts 27,000 staff as Autonomy chief Lynch leaves
Moley

How does this impact on dual or multi booting? Seems to me to more or less prohibit this, from Windows 8 anyway. Will Grub 2 recognise Windows 8,...

2 days ago by Moley on Windows 8 start-up speed forces USB boot workaround
apexwm

I don't understand why there cannot be a slight pause during the boot process so the user can press a key. Many operating systems do this, even if...

2 days ago by apexwm on Windows 8 start-up speed forces USB boot workaround
Gavin Goodman

You can now buy the Xi3 modular computer in the UK at http://www.ocdistribution.com . This can be bought with the Tand3m software, pricing and...

2 days ago by Gavin Goodman on CES 2012: Xi3 microSERV3R
Phil at Cloud4

I agree: Mike Lynch can clearly build a business and manage strategy. I suspect the exit of Mike is more likely the end of a planned handover...

2 days ago by Phil at Cloud4 on HP cuts 27,000 staff as Autonomy chief Lynch leaves
Phil at Cloud4

This is unbeleivable government wastage with only one winner... Microsoft 1 - Tax payer Nil!

2 days ago by Phil at Cloud4 on 6 million wasted licences and £1,200 PCs: welcome to government IT
Mispam

So what do you do when you can't boot into windows? Why can't I just hold Shift while I power up instead of having to boot into windows and click a...

2 days ago by Mispam on Windows 8 start-up speed forces USB boot workaround