Rules to Better Active Directory - 15 Rules
You can upload staff profile pictures into Active Directory. Exchange and Lync will automatically use these profile pictures.
Using a free third party tool AD Photo Edit tool which can be downloaded from cjwdev.co.uk you can upload staff profile pictures into AD. You need to run the application with Domain Admin rights. After you have uploaded the picture for a user it will take some time for the change to be replicated through to Exchange and Lync if you have use these solutions.
When a user is created in Active Directory (AD), a Global Unique Identifier (GUID) is also created. As the name suggests this is unique for each user and is never duplicated in a domain.
When adding a user to CRM, they are assigned with an Employee ID that is linked to the AD account’s GUID.
When a user leaves, many companies go through the process of disabling the CRM account and then deleting the AD User.
This creates problems if the employee comes back to the company and a new AD account is created for them - they are no longer able to be associated with the previously created CRM account. Instead, they will need a new CRM user with a different Employee ID.
This makes reporting on a user that has returned more difficult. To get around this problem, it is better to disable and move the user to a "Disabled Users" OU in AD, so that if they return, the AD and CRM user can just be re-enabled.
It is an RFC mandated specification email address use to identify the administrator of a mail server. Any errors in email processing are directed to the postmaster address.
The email received at this address is sent to the mail server administrator, in our case the SysAdmins.
At SSW we have configured email@example.com as a distribution group, with mail server administrators as members of this distribution group.
The use of standardized group names is a simple yet crucial step towards easier management. Reducing the number of AD groups will make it simpler to manage and allow new staff to figure out what's what faster.
You can save yourself countless confused conversations by standardizing AD Group Names.
For example, this is a list of AD groups associated with products:
Figure: Bad Example – It is difficult to know the correct name for an AD group
Figure: Good Example – By standardizing the names of AD groups it saves confusion
::: infoNote: For large organizations, a better way is to use a type of group (eg. Local or Global)... then the entity it is associated to… then the resource (or service).
- L-LocalGroupName-SYD-EntityName-SP-Sharepoint- becomes L-SYD-SP-SSW-Users
- G-GlobalGroupName-SYD-EntityName-SP-Sharepoint- becomes G-SYD-SP-SSW-Users :::
It is recommended by default to have two AD groups per product. The following table should be used as a guide for naming them:
Name Type Purpose SSW<ProductName> Distribution group This email is used to send emails to the development team for a product. SSW <ProductName>Events Mailbox Acts as the collection point for all automatic notifications. For example notifications from Elmah and/or application insights.
It is also important to differentiate between Distribution groups (or other groups with mail enabled), and Security groups. Distribution groups should have names that are clear, that work well for an email address - for example, SSWRulesDevs. Security groups should have the prefix It is SEC_, so that it is clear they are security groups (and cannot receive email), e.g. SEC_VPNUsers.
Group Policy is simply the easiest way to reach out and configure computer and user settings on network based on Active Directory Domain Services (AD DS). If your business is not using Group Policy, you are missing a huge opportunity to reduce costs, control configuration, keep users productive and happy, and harden security. Think of Group Policy as "touch once, configure many."
You can manage all aspects of Group Policy by using the Group Policy Management Console (GPMC). You start the GPMC from the Start menu: Click Start, All Programs, Administrative Tools, Group Policy Management. You can also click Start, type Group Policy Management, and then click Group Policy Management in the Programs section of the Start menu. Windows Server 2008 onwards include the GPMC when they are running the AD DS role.
Figure: Group Policy Management Console showing GPO
It is important as a Network Administrator to know when and where failed login attempts are coming from. Through Group Policy you can enable "Audit logon events".
- Create a group policy called 'Logon Auditing Policy'
- Right click on 'Logon Auditing Policy' and click on Edit to bring up Group Policy Management Editor
- Select 'Audit account logon events' from Computer Configuration | Policies | Windows Settings | Local Policies | Audit Policy and set to Success, Failure
- Select 'Audit logon events' from Computer Configuration | Policies | Windows Settings | Local Policies | Audit Policy and set to Success, Failure
- Select 'Audit: Force audit policy...' from Computer Configuration | Policies | Windows Settings | Local Policies | Security Options and set to Enabled
Now when you will have access to seeing success/failed login attempts on user accounts, these can then be captured and audited with your own internal process or a third party application such as Whats Up Gold, see: Do you monitor failed login attempts?
Group Policy is a fast and effective way to configure Hibernate on multiple PC's.
To enable Hibernate option in Group Policy open up Group Policy Management.
- Create a new Group Policy Object and name it "EnableHibernate"
- Right click on "EnableHibernate" and click on Edit to bring up Group Policy Management Editor
- Select 'Show hibernate in the power options menu' from Computer Configuration | Policies | Administrator Templates | Windows Component | File Explorer and set to Enabled
- Back in Group Policy Management Enable Link for "EnableHibernate"
- Wait for a few moment for GPO to refresh and apply. Alternatively manually force a GP Update through Command Prompt - GPUpdate /force. Check that Hibernate Option is now in Start Menu
When using a single account for normal user login and admin tasks the first thing that comes to mind is all of the Group Policy settings associated with that account. This could include scripts, software installations, drive mappings, printers and many other settings that would apply when you log on to a computer in the domain. You wouldn’t want all of these to apply when log on to a Domain Controller of any other servers.
Another reason is you may step away from your computer and forget to lock the computer. This will expose your computer for your co-workers and tinker with your system and as a consequence if that account has domain administrator privilege they can change system security and settings on any Domain Controller and other servers.
To prevent this, at SSW we create a separate Administrator account, with the prefix Admin. This signifies that it is an Admin account and does have administrator privileges. The Admin account is also placed in a separate OU to ensure that it is not receiving unnecessary Group Policies. This allows us to setup permissions easier, only provide access to machines required, and also makes the user aware that they are doing something dangerous so they are inheritably more careful. A standard account (Non Admin prefix account) does not and should not have access to any servers.
When using service accounts, you should have a specific AD account for each major service.
"Active directory is quickly becoming a critical failure point in any big sized company, as it is both complex and costly to secure..." - PingCastle
PingCastle is an Active Directory auditing tool. It checks your accounts, computers and configuration in AD and gives you a great report on things that should be addressed. It is a tool that should be run periodically - every 3-6 months - to keep AD secure.
PingCastle is easy to install and run - see their documentation for more information. It is free to use in your own environment, or there are paid versions for MSPs and larger enterprises.
Once you have run it, you get a great report on your Active Directory security health, with detailed recommendations of what you need to fix.
It is important to know what to do with your employees' accounts when they leave. Getting this wrong can create security vulnerabilities - or it can make life difficult for everyone if the employee comes back to work for you again.
You should create a list of instructions that are followed whenever an employee leaves so that the experience is consistent for all and to make sure you don't miss any steps. Here are some important ones - you will need to add more to suit your environment.
- Change their mailbox to a shared mailbox and check if the email count in the inbox is near 0 (to be done with their manager)
- Inspect their personal devices such as mobile phones to ensure that company Data has been removed and OneDrive is also removed as per the security measures.
Power Automate flows - Remove ex-employees from the primary owner and add someone else who is eligible to own the flow.
a. Change the owner - Click on Edit | Under owner remove yourself | Add someone else who is eligible to own the flow
b. Share all the flows with System Administrators and any other groups - Click Share | Type in "Groups you want to share" under Owners | Click OK
- Backup data. Make sure you have a backup of the employee's work. This might include:
- Outlook PST file
- OneDrive, Google Drive, etc
- Files from their computer
- Remove their AD user account from any group membership
- Disable their AD account - and any other accounts they have:
- Move their account to a "disabled users" OU
- Don't delete their account, this can cause issues in the future!
- Forward their emails to another employee
- Make sure they return any IT equipment they have and delete their computer account/s from AD
- Remove any security/automation access
Keeping your Active Directory environment tidy is helpful to keep things running smoothly, but it is also important to improve your security posture.
Computer accounts in AD are similar to user accounts - they can be used to access other systems and data in your domain. Since computer accounts do not hold any useful information, it is safe to delete them when a computer is decommissioned. It is also very easy to re-join a computer to the domain if needed, so there is no reason to leave computers in a "disabled" state.
Keeping your Active Directory (AD) environment secure is paramount for your overall security posture, so it is important to keep track of changes that are made in AD - and to have alerts for when potentially damaging changes are made.
Auditing your Active Directory environment with third-party tools offers several advantages. While this can be done with a SIEM such as Splunk or Microsoft Sentinel, these might be overkill for some companies.
There are dedicated tools just for AD Auditing, such as ManageEngine ADAudit Plus. Let’s delve into the benefits of using such tools, focusing on visibility, alerting, and reporting:
Third-party AD auditing tools provide deeper insights into your environment. They allow you to track changes, monitor user activity, and understand permissions more comprehensively. Here’s how enhanced visibility benefits your organization:
- Granular Tracking: These tools capture detailed information about user logon/logoff activity, group membership changes, and modifications to AD objects. You gain visibility into who did what and when.
- Real-Time Monitoring: With real-time monitoring, you can detect suspicious or unauthorized activities promptly. Whether it’s an unexpected privilege escalation or an unusual login pattern, these tools keep you informed.
- Identifying Stale Accounts: By identifying inactive or stale accounts, you can improve security and reduce clutter in your AD environment.
Effective alerting mechanisms are crucial for timely incident response. Third-party AD auditing tools offer customizable alerts based on specific events or conditions:
- Threshold Alerts: Set thresholds for critical events (e.g., failed logins, privilege changes). When these thresholds are exceeded, receive alerts via email or other channels.
- Privileged Group Changes: Get notified when users are added to or removed from privileged groups (e.g., Domain Admins). This helps prevent unauthorized access.
- Suspicious Behavior: Receive alerts for unusual patterns, such as multiple failed logins or access from unexpected locations.
Reporting is essential for compliance, audits, and management decision-making. Third-party tools provide pre-built reports and customizable templates:
- Change Reports: Track modifications to AD objects (users, groups, OUs) over time. Examples include user creation/deletion, password changes, and group membership updates.
- Security Reports: Assess security settings across your AD environment. Identify vulnerabilities like weak passwords or excessive permissions.
- Compliance Reports: Generate reports aligned with industry standards (e.g., PCI DSS, HIPAA). Demonstrate adherence to regulations.
Here are some notable third-party AD auditing solutions:
ManageEngine ADAudit Plus:
- Offers comprehensive auditing capabilities for AD.
- Tracks changes in real-time.
- Provides pre-built reports and customizable dashboards.
- URL: ManageEngine ADAudit Plus
SolarWinds Access Rights Manager:
- Covers compliance audits and permission auditing.
- Enhances AD management with time-saving features.
- URL: SolarWinds Access Rights Manager
- Offers change management features.
- Provides detailed reports on AD changes.
- URL: Netwrix Auditor
Remember that the choice of tool depends on your organization’s specific needs, budget constraints, and scalability requirements. Evaluate different options to find the best fit for your environment!
To detect and mitigate a cyber attack, the right set of events need to be collected from your domain controllers. The audit policy is a compromise between collecting too many and too few events. Logs are useful for detecting security events, but if there is too much noise, you'll miss the important information.
To enable advanced auditing on your domain controllers, use group policy. The settings are in Computer Configuration | Windows Settings | Security Settings | Advanced Audit Policy Configuration | Audit Policies.
adsecurity.org has great recommendations for what you should be auditing on your domain controllers (as well as a heap of other useful information!). Here is their list:
- Audit Credential Validation: Success & Failure
- Audit Kerberos Authentication Service: Success & Failure
- Audit Kerberos Service Ticket Operations: Success & Failure
- Audit Computer Account Management: Success & Failure
- Audit Other Account Management Events: Success & Failure
- Audit Security Group Management: Success & Failure
- Audit User Account Management: Success & Failure
- Audit DPAPI Activity: Success & Failure
- Audit Process Creation: Success & Failure
- Audit Directory Service Access: Success & Failure
- Audit Directory Service Changes: Success & Failure
Logon and Logoff
- Audit Account Lockout: Success
- Audit Logoff: Success
- Audit Logon: Success & Failure
- Audit Special Logon: Success & Failure
- Audit IPsec Driver: Success & Failure
- Audit Security State Change: Success & Failure
- Audit Security System Extension: Success & Failure
- Audit System Integrity : Success & Failure
See the list in context, and more information here: https://adsecurity.org/?p=3377
It is best practice to limit the number of administrator accounts in your environment, including local administrators on users' computers. However, it is necessary to have a local administrator account so the computer can be accessed if it loses connection to the domain. Local Administrator Password Solution (LAPS) is a great way to manage this account.
LAPS provides management of local account passwords of domain joined computers. Passwords are stored in Active Directory (AD) and protected by ACL, so only eligible users can read it or request for it to be reset. The passwords are automatically changed regularly - the default is every 30 days, but this can be changed. LAPS is provided by Microsoft, and can be downloaded here: https://www.microsoft.com/en-us/download/details.aspx?id=46899
The download includes a comprehensive operations guide, with step-by-step installation instructions. The high level steps are:
- Install the management components on management computers (i.e. SysAdmins)\
- Install LAPS on computers to be managed - this can be done by GPO\
- Create the AD attributes that will securely store the password\
- Configure permissions (i.e. make sure only the right people can view passwords)\
- Enable and configure LAPS by GPO (you can configure password complexity & duration, and more)
To view the password you can use the LAPS UI tool (included with the standard installer), view it in AD Users and Computers, or with PowerShell. You can reset the password with the UI tool or with PowerShell.