好文集ChatGPT Plus¥119

11 free tools to make Active Directory harder to attack

文章目录

Hardening and securing Active Directory is free, minus your time.

The problem is most people don’t know what to look for and where to look, to find issues.

I’m on a mission to change that.

Here are 11 free tools (and how to use them) to find misconfigurations and make your environment harder to attack.

Start with a baseline

1. PingCastle is the OG AD assessment tool. I use it on every pentest. Run a health check, then pay attention to the control paths section. Look for paths to critical resources like Domain Admins and administrative OUs. Its scan modules can also check things like SMB versions and the spooler service.

2. Purple Knight is another great way to assess AD. Run it, review the detailed findings, and use its grading system to track progress after fixes. Pick PingCastle or Purple Knight as your baseline and keep using it.

Find risky permissions

3. Locksmith checks Active Directory Certificate Services. If you run AD CS, use Invoke-Locksmith -Mode 2 to export findings to CSV. Review templates and enrollment settings that could let someone obtain a certificate they shouldn’t be able to use.

4. ScriptSentry is a tool I wrote to find dangerous logon scripts. Run Invoke-ScriptSentry and look for plaintext credentials, writable scripts and shares, or privileged users with logon scripts. Attackers love those mistakes.

5. ADeleg inventories AD delegations. Switch to index by trustees and check what broad groups like Domain Users and Authenticated Users can control. Full Control, Write Property, Reset Password, and replication rights deserve a closer look.

6. ADeleginator is my wrapper around ADeleg. Put ADeleg.exe beside the script and run Invoke-ADeleginator to surface insecure trustee and resource delegations. Investigate each finding before changing permissions.

Check what attackers can control

7. NetTools is one of my favorite AD troubleshooting tools. Use its access control tools to compare permissions and its GPO Explorer to see what applies in the domain. When you find a risky setting, ask who can change it and where that access came from.

8. AppLockerInspector checks for weak AppLocker rules. Run Invoke-AppLockerInspector against the effective policy or an exported XML file. Pay attention to broad allow rules and paths that regular users can modify. A rule that trusts a writable folder may give an attacker a way around your policy.

9. GPOZaurr reports on Group Policy issues. Run Invoke-GPOZaurr and review broken links, inconsistent GPOs, exposed passwords, and permissions that let the wrong accounts edit policies.

Find credentials on file shares

10. Snaffler finds sensitive files on accessible shares. Run Snaffler.exe -s -o snaffler.log from a domain-joined machine, then review hits for credentials, keys, and configuration files. Handle the log carefully; it may contain secrets.

The holy grain, full-on hardening

11. HardenAD includes checks, hardening tasks, and remediation scripts. Read its documentation and task sequence first. Test the changes that fit your environment and have a rollback plan, because some tasks modify AD and Group Policy.

You don’t need to run all 11 today.

Pick one area. Find one issue. Understand how an attacker could use it. Fix it. Check again.

Little by little. Day by day.

Get to work

All the best Spencer

PS - The tools are free. Figuring out which findings put your environment at risk is where most teams get stuck.

DM me “AD” and I’ll send you a link to book a call. We’ll talk through what you’re seeing and where to start.

全文完
查看原文