How to List Deleted Objects in Active Directory?

If you are an IT administrator and need to list deleted objects in Active Directory, you can do so either by writing custom LDAP scripts to do so or using Free Active Directory Reporting Tools to do so.

 

As you may know, when an object is deleted in Active Directory, it is first logically deleted for a specific interval of time to allow replication of the deletion to occur, and after this time has elapsed it is physically deleted. For more information on how to List Deleted Objects in Active Directory, you can refer to the Active Directory Security dot com website, where you will also find pointers to free tools that you can use to list deleted objects in your Active Directory for free. A logically deleted Active Directory object is referred to as a Tombstone, and all tombstones reside in the Deleted Objects container in Active Directory.

 

For completeness, it should be mentioned that the Deleted Objects Container and its contents are hidden by default, and require special permissions to view. By default, only the System account and members of the Administrators group can view the contents of this container. Administrators however can configure permissions on this container to enable other users or applications that might have a need to view Deleted Objects in Active Directory, to do so.

Active Directory LDAP Filters

Active Directory is a standards-compliant directory service and the standard access protocol used to query Active Directory is the LDAP (Lightweight Directory Access Protocol) protocol.

 

Active Directory is also the primary enterprise store for vital IT resources (user accounts, security groups, computer accounts and group policies) that play a central role in enterprise wide security, IT management and security audit and compliance reporting.

 

IT personnel often need to generate Active Directory based security reports that document the state of these IT resources, and to do so they can either user a set of Active Directory Reporting Tools that automate the generation of these reports, or a variety of LDAP clients, such as dsquery (provided by Microsoft) to generate these reports.

 

When IT admins choose to use LDAP tools, they are required to write LDAP filters which specify the parameters to use based on which the LDAP queries return this data. While most organizations choose to use automated tools because they are almost always more reliable and efficient to use, many IT admins also choose to create their own LDAP filters.

 

For organizations and IT personnel who wish to write their own scripts to generate custom reports, there are many helpful resources out there that can provide information on common LDAP filters.


What is delegation of administration in Active Directory?

An IT infrastructure is typically comprised of many IT assets such as user accounts, computers, files and databases, applications and services all of which need to be administered. In such IT infrastructures, it is not possible for a handful of administrators to adequately administer all aspects of the IT infrastructure.

 

Thus, in most IT infrastructures, administrative responsibilities for managing the various IT assets that together comprise the IT infrastructure are distributed (or delegated) amongst an adequate and typically greater number of less-privileged administrators, who are then responsible for managing smaller specific portions of the IT infrastructure.

 

Delegation of administration is the act of distributing and delegating an administrative task for various aspects of IT management amongst an adequate number of administrators.

 

The act of delegating administration involves granting one or more users or Active Directory security groups the necessary Active Directory security permissions as appropriate so as to able to allow the delegated administrator to carry out these tasks.

 

In the interest of security, after delegating an administrative task, IT personnel should always also verify delegation in Active Directory, so as to be sure that the task was delegated accurately. The process of verifying a delegation in Active Directory is rather complicated but with the right Active Directory Reporting Tool, IT personnel can accomplish this task efficiently and reliably.

 

Done right, Active Directory's powerful administrative delegation capabilities let organizations securely, efficiently and cost-effectively delegate administrative authority for identity and access management in their IT infrastructures thereby reducing cost and enhancing security.

 

Source - Active Directory Security Technical Reference


A Guide to the Active Directory Security Model

Active Directory's security model secures and protects every object stored in Active Directory, including domain user accounts and domain computer accounts, domain security groups and group policies. The Active Directory Security model allows administrators to specify who has what access to which object to a high degree of control. It also allows administrators to specify access for an entire group of users so as to simply security management.

 

The following is an overview of how Active Directory's security model protects stored content –

  1. Each object is protected by a component known as a Security Descriptor

  2. Each security descriptor contains amongs other compronents, an Access Control List (ACL)

  3. Each ACL contains one or more Access Control Entries (ACEs)

  4. Each ACE allows or denies specific security permissions to some security principal

  5. Security groups can be specified and be part of security groups

  6. ACEs can be explicit or inherited; explicit ACEs override inherited ACEs

  7. Access is specified in the form of low–level technical permissions

  8. These low-level permissions can be standard permissions, or special permissions such as extended rights or validated writes

  9. Active Directory's current object visibility mode impacts list access requests

  10. The access check takes into account the object's ACL and the user's token and determines resultant access for user on the object

In this manner, Active Directory's security model secures and protects Active Directory content.


How to Generate True Last Logon Security Reports in Active Directory

As an IT administrator you may need to determine the last time a user used their Active Directory domain user account to logon. For instance, last logon values are required to generate and furnish a list of stale domain user accounts.

 

Active Directory stores the last logon time of a domain user account in a specific attribute on the user object called lastLogon, but this is not a replicated attribute, so IT administrators need to query each DC in the domain for the local lastLogon value on the user's account, then compare each of these values to determine the latest one, and report that as the user's true last logon time. The actual last user logon value is also commonly referred to as True Last Logon. There are two steps to determining the true last logon time of a domain user account. The first step involves obtaining the value from each DC in the domain, and the second step involves comparing these values (taking into account Integer8 syntax) to arrive at the true last logon value for the user.

In order to read the lastLogon attribute, you must have appropriate Active Directory security permissions as well, because without it you will not be able to read the value of this attribute. Fortunately, the security descriptor is replicated so you don't need to worry about the permissions being replicated.

 

There are many Active Directory Reporting Tools that can help IT administrators automatically generate True Last Logon reports. Some of these tools are also available in Free Editions, and can help IT admins instantly fulfill their Active Directory security reporting needs for audit and compliance.

 

True Last Logon reports are essential for security, and can help organizations identity and clean up stale/inactive domain user accounts in their Active Directory. Automated tools provide an advantage over many queries or over semi-automated PowerShell scripts.

What are Active Directory Extended Rights?

Active Directory's security model secures and protects every object stored in Active Directory, including domain user accounts and domain computer accounts, domain security groups and group policies and in the Active Directory security model, permissions specify, govern and control the ability of a security principal to perform a technical operation on the Active Directory object it serves to protect.
 
While standard operations on objects stored in and protected by Active Directory are governed by standard Active Directory permissions, there are certain operations that have special significance, and require special or extended permissions for their authorization. These special or extended permissions govern the ability of a user to perform specific Active Directory operations, or Active Directory based identity and access management operations, and are often referred to as Active Directory extended rights.
 
In addition, Active Directory Property Sets refer to a group of related properties (attributes) for which access control can be collectively specified in a single ACE. The ability to collectively specify access on a related set of properties simplifies access specification and management.
 
While standard Active Directory permissions govern standard operations on objects stored in and protected by Active Directory, certain operations require additional validation prior to being committed, above and beyond basic Schema based structure enforcement validation. Active Directory Validated Writes represent a special type of permission that facilitates pre-commit validation during write attempts to certain properties on certain Active Directory objects.

How to determine the True Last Logon Value in Active Directory

IT administrators often need to determine the last time a user may used their Active Directory domain user account to logon. To do so, IT administrators need to query the Active Directory and obtain the values of the attribute that stores this value on domain user accounts.
 
In fact, Active Directory stores the last logon time of a domain user account in a specific attribute on the user object called lastLogon. However, this is not a replicated attribute, which means that Active Directory does not replicate its value amongst all the DCs of a domain.
 
Thus, in practice, in order to determine a domain user account's true last logon time, IT administrators need to query each DC in the domain for the local lastLogon value on the user's account, then compare each of these values to determine the latest one, and report that as the user's true last logon time. The actual last user logon value is also commonly referred to as True Last Logon in Active Directory.
 
IT administrators often write scripts to make this determination or use 3rd party scripts. The problem with writing scripts is that they are prone to error and are time-consuming to customize and maintain, and the problem with unsupported using 3rd party scripts is that they are not reliable and thus cannot always be trusted to deliver the accurate values every time. Accuracy is very important because many a time, these reports are furnished as evidence to demonstrate the regulatory compliance and constitute a part of Active Directory compliance reports.
 
The best alternative then is to use reliably 3rd party tools that completely automate this process and that can be trusted. Care must be taken however to ensure that these tools are from a trustworthy vendor and that they are developed by proficient developers and as far as possible built in the USA.