Understanding Windows Security on System Objects: Pros and Cons Explained

  • Thread starter h0dgey84bc
  • Start date
  • Tags
    Interview
In summary, Windows uses access tokens and ACL to impose security on system objects. An access token contains the security information related to the user who has started a session, and each process and thread executed by the user contains a copy of this token. ACL is associated to every protected object or resource, and 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
  • #1
h0dgey84bc
160
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
  • #2
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.
 
  • #3
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.
 
  • #4
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.
 
  • #5
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.
 
  • #6
If you get the job, doesn't he get the commission?! :)
 

1. What is the purpose of asking "tricky" interview questions?

Tricky interview questions are used by employers to assess a candidate's critical thinking skills, problem-solving abilities, and ability to handle unexpected or challenging situations. They also help the employer to understand a candidate's approach to problem-solving and their ability to remain calm and composed under pressure.

2. How should I approach a tricky interview question?

First and foremost, take a deep breath and stay calm. Listen carefully to the question and ask for clarification if needed. Take a moment to think before answering and don't be afraid to ask for some time to gather your thoughts. Be honest and transparent in your approach, and explain your thought process out loud to the interviewer.

3. What should I do if I don't know the answer to a tricky question?

If you don't know the answer, don't panic. Instead, try to break down the question and identify any information or keywords that may help you. You can also ask the interviewer for hints or more information. If all else fails, be honest and explain how you would go about finding the answer or tackling the problem.

4. Can I use personal experiences or examples to answer a tricky question?

Yes, using personal experiences or examples can be a great way to showcase your skills and problem-solving abilities. However, make sure the examples you provide are relevant and appropriate for the question being asked. Additionally, be concise and focus on the key points of your example rather than getting lost in unnecessary details.

5. How can I prepare for tricky interview questions?

Preparing for tricky interview questions can be challenging since they are designed to be unexpected. However, it can be helpful to practice common types of tricky questions, such as brainteasers or hypothetical scenarios. Additionally, make sure to research the company and the position you are applying for, as the questions may be tailored to the specific role. Lastly, trust in your abilities and stay confident during the interview.

Similar threads

  • Programming and Computer Science
Replies
11
Views
1K
  • Programming and Computer Science
Replies
1
Views
499
  • Programming and Computer Science
Replies
4
Views
399
Replies
3
Views
323
  • Programming and Computer Science
Replies
6
Views
1K
  • Computing and Technology
Replies
8
Views
2K
  • Programming and Computer Science
Replies
4
Views
1K
  • Programming and Computer Science
Replies
11
Views
874
  • Programming and Computer Science
Replies
1
Views
663
  • Programming and Computer Science
Replies
8
Views
1K
Back
Top