1. Why the directory is the most delicate point
In most corporate networks the directory decides who can access what. If an attacker has obtained administrative privileges, they may have created new accounts, modified groups, changed delegations or planted hidden access mechanisms. Rebuilding everything else without cleaning up this layer means bringing back online systems that still trust compromised identities. This applies even when the attack seems limited, because the presence of privileged access is already a serious matter to handle.
For this reason, the directory should not be treated as an ordinary server to restart. It requires a dedicated strategy, a team with specific experience and a clear timeline of who did what. Haste is the main risk: a directory reactivated too early can become the channel through which the attack returns, even if all other systems are clean. The service may also contain trust configurations between systems, and these must be considered part of the identity.
2. Before touching anything: what to save and how
Before any change, preserve the current state of the directory and the configuration copies made before the attack. The traces are important both for the incident analysis and for comparing what has changed. Do not delete suspicious accounts until they have been documented: their presence is useful information about how the access occurred. Also keep the available authentication logs, because they show when and from where the first anomalous accesses took place.
Check which copies of the directory exist, from what date and in what state. A copy that includes the attacker's changes is of no use, and it is essential to know which is the last version known to be clean. This assessment should be made with those who have specific expertise, because choosing the wrong copy is one of the most costly errors in the whole recovery.
3. Verifying privileged accounts
The first check concerns accounts with elevated privileges, that is, those that can modify the directory or access many systems. For each one, verify who uses it, when it was created, whether it has been used recently and from where. Service accounts, often forgotten, deserve particular attention because their passwords have not changed for a long time. Also check memberships of groups with administrative permissions, which often grow over time without anyone noticing.
Privileged credentials must be reset, and the new ones should be kept differently from everyday ones. Do not reuse old passwords with minor variations, and do not grant temporary exceptions without recording them. Any account that cannot be justified must be disabled and recorded, not hastily deleted. For each account on the register, note the reason for its existence and who the owner is who can confirm it.
- Complete list of privileged accounts, with the owner of each.
- Service accounts registered, with purpose and the systems that use them.
- Privileged passwords reset from a clean workstation.
- Active sessions closed before reactivation.
- Recent changes to groups and delegations compared with the reference copy.
- Unjustified accounts disabled and recorded.
4. Restore or rebuild: the choice
There are two main routes. The first is to restore the directory from a copy made before the intrusion, verified as clean, and then reapply only the legitimate changes made in the meantime. The second is to rebuild the structure from scratch, with a new environment and a controlled migration of users and permissions. Neither is always the better option: it depends on the trust you have in the copies and the complexity of the environment.
Whichever route you choose, the decision must be written down with the reasons, the risks accepted and who approved it. A hasty rebuild may leave traces of the attack in inherited permissions, while a restore from a copy risks bringing back configurations that are already compromised. Ask the supplier to explain the pros and cons of their proposal for your specific case. Also ask how long it would take to return to the previous situation, in case the choice proves to be wrong.
5. Reactivating the services that depend on the directory
Once the directory has been verified or rebuilt, many other systems must be reconnected: workstations, file servers, applications and mail services. Reconnection should be done gradually, a group of systems at a time, checking that authentication works and permissions are correct. Do not reactivate everything at once, because an error would spread everywhere. Each reconnected group must be observed before moving to the next, without exceptions, even when departments ask to speed things up.
Monitor the environment after each step for anomalous access, failed authentication attempts and unexpected changes. A system that reconnects in an odd way must be stopped and analysed before proceeding. This phase requires patience, but it avoids having to repeat the work across the entire network. A delay of a few hours in reactivation is a manageable cost, whereas access reopened too early may cost far more.
6. How to start: the first inventory this week
The first concrete step is to take an inventory of the privileged accounts and of the groups that contain them, with the owner of each. If no up-to-date list exists, creating one is more urgent than any reorganisation project. Even a simple table, shared with the supplier, immediately shows where the biggest risks are. Once the inventory is written, have it read by someone who did not compile it, to spot omissions straight away.
Then ask the supplier which configuration copies of the directory exist, from what date and how they are verified. Document the answer together with the owner of each connected system. This information determines the route to follow if an incident actually occurs, and it is better to have it beforehand. In the same week, set a date for the first review and ask whoever approves it to confirm it in writing.
Frequently Asked Questions
Can I reactivate the directory without rebuilding it?
Only if you have a copy verified as clean and you are sure the attacker's changes have been identified and removed. Without this certainty, a simple restore risks bringing the attacker's access back. The decision must be taken after the analysis, not during the crisis, and must be documented.
How long does a rebuild take?
It depends on the size of the environment, the quality of the documentation and the number of systems connected to the directory. There is no standard time. Ask the supplier for an estimate based on a written scope, and distinguish between the verification phase, the restore phase and the service reconnection phase.
Do service accounts always need to be changed immediately?
Not always immediately, but they must be registered and assessed. A password change that interrupts a critical service can cause a longer outage than the attack itself. The plan should be agreed with the service owner, with a sequence that provides for controlled replacement and monitoring after each change.
Do I need an external consultant?
In most cases at least specialist advice is advisable, because the directory is a point where an error can affect the whole network. An internal technician can coordinate and document, but the analysis of the compromise and the verification of privileges require specific experience. First check the supplier's competence requirements.
How do you stop the attacker from coming back?
There is no absolute guarantee, but the risk is reduced by a few measures: separate privileged credentials, limited and logged administrative access, monitoring of changes to the directory and periodic review of groups. These measures should be chosen according to your environment and verified with the supplier.