Understanding Windows Security on System Objects: Pros and Cons Explained

  • Thread starter Thread starter h0dgey84bc
  • Start date Start date
  • Tags Tags
    Interview
Click For Summary

Discussion Overview

The discussion revolves around the security mechanisms employed by Windows for system objects such as processes and threads, specifically focusing on access tokens and Access Control Lists (ACLs). Participants explore the advantages and disadvantages of these security measures, as well as related concepts like Windows services.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant explains that access tokens contain security information related to the user and are crucial for determining access to system objects.
  • Another participant notes that ACLs define which users or groups have access to specific resources and the types of access they are granted.
  • Concerns are raised about the delay in propagating changes to group memberships, which can affect access rights until the user logs off and back on.
  • Impersonation is highlighted as an advantage, allowing processes to temporarily adopt the identity of another user, which can enhance security in multi-user environments.
  • Discussion shifts to Windows services, with one participant describing their characteristics and the reasons for using them, including their ability to run without an interactive user session.
  • Another participant expresses a personal opinion against the trend of breaking functionalities into multiple services, citing complexity and dependency issues.
  • Participants discuss the special considerations required for services, such as their inability to interact directly with users and the need for careful design to avoid security vulnerabilities.

Areas of Agreement / Disagreement

Participants present various viewpoints on the security mechanisms and services in Windows, with no clear consensus reached on the advantages and disadvantages of the approaches discussed.

Contextual Notes

Some limitations are noted regarding the dynamic propagation of group membership changes and the complexities involved in managing multiple services and their dependencies.

Who May Find This Useful

This discussion may be useful for individuals interested in Windows security mechanisms, system architecture, and the management of services within the Windows operating system.

h0dgey84bc
Messages
159
Reaction score
0
Hi, I was asked this at an interview recently, "How does Windows impose security on system objects such as processes and threads? What are the pros and cons of this approach?"

Anyone have any ideas?

thanks.
 
Technology news on Phys.org
Starting with Windows NT, Microsoft uses the concept of "access tokens" and ACL (Access Control Lists).

An access token contains all the security information related to the user who has started a session. This token is created when the user logs on and destroyed upon logoff. The access token contains the SID (Security IDentifier) of the user and each group it belongs to. It also contains special privileges that the user my use (like the ability of shutting down the computer, debugging programs, ...). Each process and thread executed by the user contains a copy of this token.

An ACL is associated to every protected object or resource. It contains the list of SID that have access to it and which type of access (Full Control, Read/Write, Read Only, ...). Normally ACL define allowed rights, but it may also contain explicit denies.

When a thread tries to access any kernel object (mutex, semaphore, event, process, thread, ...) or resource (file, registry key, ...) the system compares the ACL of the object with the token associated with the thread requesting access. If a matching is found, the access is allowed, otherwise denied (somewhat simplified)

The main problem is that any change in the group membership of the user is not dinamically propagated. This means that the user can't get instant access to new resources, but even worse, the administrator can't inmediately deny access to some resource by removing the user from the appropiate group. The user must logoff and log on again to get an updated token with the new list of SID's.

One of the advantages is the impersonation (the ability of a process or thread to temporarily take the personality of another user if it has the right to do so). The access token is duplicated on every process and thread, so one thread might impersonate another user without modifying the rights of other threads or processes. This is specially important in services that handle requests from many users. Using impersonation, the service can use the rights of each user instead of the user who started the service (normally SYSTEM or Administrator). This increases security against bugs or malicious users.

It's a little simplified, but I think you can see the concept.
 
Dude, you got the job!

What would have said to this one "What is a Windows Service and when might you use one? What special consideration do Services require?"

I think I got this one correct, although my answer was probably a little rough around the edges, especially on the second part of the question.
 
It's me who is taking the interview ?

Services is a big topic in Windows. There are many types of services and many reasons to create one. For example, internally Windows also treats device drivers as services (although with some special characteristics).

A service in Windows is a process that runs in the background in the context of a preconfigured account. It is not associated with any interactive user session (although it can run with the credentials of any user) and it can be running even if there isn't any user authenticated to the server or workstation. Windows allows multiple services to be running inside one process to save resources (this is the case of svchost.exe that hosts multiple Windows services at once).

Basically you use a service when you need to offer access to shared resources (files, databases, web resources, printers, ...), but there are other reasons not always so obvious. When you design a new program you should eveluate its needs and decide how it should run.

Microsoft is tending to move some management functions to services and even breaking some functionalities into different services (specially in Windows Vista). Personally I don't like this approach because forces you to have many services running. There are many dependencies between services, so it's very difficult to stop some of them without breaking the functionalities you really want.

What special consideration do services require ? a lot. Probably the most obvious is that it cannot interact with any interactive user directly (before Windows Vista this possibility existed). If it needs to interact, you also need to develop some kind of client. The internal structure of a service is quite different from a normal user process. Also, it runs with a fixed set of credentials that generally have elevated privileges, so extremely care must be taken while designing and implementing the service to avoid security holes.

Well, I think this is enough as an introduction. Services is an extensive topic to talk about them generally.
 
I think you should apply for this job, haha, you definitley are more qualified than me anyway...I am just a lowly physics grad, no idea why the recruitment guy sent me for this, seems definitley more suited to a comp sci grad.
 
If you get the job, doesn't he get the commission?! :)
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
3
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
11
Views
2K