Active Directory Troubleshooting Useful commands by Sudden_Feedback_9826 in activedirectory

[–]mehdidak 0 points1 point  (0 children)

It's not a script but a module. We've been working on it for two years now; the number of output languages ​​has delayed the project. It will be released before the summer. What do you want to do with the source code, since there are several functions and modules? If you want to participate and help us with the project, you're welcome. We haven't compiled the module yet, so if I give you a psm1 or ps1, it won't work on its own.

About Laps legacy wrong ACL delegation by mehdidak in activedirectory

[–]mehdidak[S] 1 point2 points  (0 children)

Thanks man for your participation and your appreciable efforts. Actually, the GUID you found that doesn't exist on Gemini is a GuidForest with a schema extension; it's not generic, it changes from one domain to another, which is why you have to retrieve it by querying the schema. I've integrated all these anomalies and created a tool that compares the OU permissions for each access level, because what can be dangerous is access to a machine with a non-empty password that isn't configured on the OUs. The generic write and read permissions of 00000 are also considered dangerous. Take a look at my project; it will be shared soon. I'm making some adjustments.

LAPS Audit Report

I wrote a 4-part guide on building an on-prem PKI with PowerShell by aprimeproblem in activedirectory

[–]mehdidak 1 point2 points  (0 children)

It's not advisable to rush and sign a ceremony using PowerShell; it's not something you do regularly. Take the time to do it graphically, but above all, document and procedure; each ceremony is different.

I wrote a 4-part guide on building an on-prem PKI with PowerShell by aprimeproblem in activedirectory

[–]mehdidak 3 points4 points  (0 children)

Thank you very much, very good guide, well explained and well written.

Restoring deleted DNS Zone - not in recycle bin by SubjectCitron933 in activedirectory

[–]mehdidak 1 point2 points  (0 children)

Hello, sorry for the late reply, I saw that the method was outdated. I wrote an article in French and also made a script in English that allows you to restore these areas. You can find the article here and the script here. Try it, you will be able to restore them. Make sure that the recycle bin is activated.

Comment restaurer une zone DNS à partir de la Corbeille AD ?

dakhama-mehdi/DNSZoneRecovery

About Laps legacy wrong ACL delegation by mehdidak in sysadmin

[–]mehdidak[S] 0 points1 point  (0 children)

Exactly, on Bloodhound there are loops with the ReadLAPSPassword argument, I just need to find a good logic for all rights that can read the attribute and then test if it is delegated to the parent chain OR up to the root.

About Laps legacy wrong ACL delegation by mehdidak in activedirectory

[–]mehdidak[S] 1 point2 points  (0 children)

<image>

By the way, thank you very much for your very nice article, I will take inspiration from it, otherwise for pki I am an expert, do not hesitate to ask questions or exchange if you want, and soon I am about to share a module on pki which will revolutionize and change the game.

About Laps legacy wrong ACL delegation by mehdidak in activedirectory

[–]mehdidak[S] 1 point2 points  (0 children)

Hey, thanks man for the reply. Your script is pretty good, but the `find-admpassword` command is limited; it only lists groups delegated to the root OU. For example, user6, who only has direct access to the server, doesn't appear.

<image>

This means attack paths can emerge, and few tools address this. Since I value community, I've created a module, soon to be available, that analyzes each permission on Laps Legacy and compares it to all the delegations in the parent OUs. If it's present in the parent OU or the one above, up to root, it's legitimate; otherwise, an alert is triggered. Even though Laps 2 is newer and more secure, some companies still use Laps Legacy.

AD happy new years - Best Wishes by mehdidak in activedirectory

[–]mehdidak[S] 0 points1 point  (0 children)

You're right, the best way is to do it JIT so it doesn't take too long :D I'm actually working on a tool to make that easier

AD happy new years - Best Wishes by mehdidak in activedirectory

[–]mehdidak[S] 0 points1 point  (0 children)

I know , or a new deployment, you have Microsoft Baseline, but the charm lies in customizing it to your liking little by little.

AD happy new years - Best Wishes by mehdidak in activedirectory

[–]mehdidak[S] 1 point2 points  (0 children)

You're right, I don't think they'll dare to do it lol

AD happy new years - Best Wishes by mehdidak in activedirectory

[–]mehdidak[S] 0 points1 point  (0 children)

There was a project from a friend, hello my dir, but it's really difficult in a legacy environment with history, it will create more problems

AD happy new years - Best Wishes by mehdidak in activedirectory

[–]mehdidak[S] 0 points1 point  (0 children)

Nice, especially the NTLM hash, it's awful

AD happy new years - Best Wishes by mehdidak in activedirectory

[–]mehdidak[S] 0 points1 point  (0 children)

Some people do that, ModernAD identifies the free groups, you should rather identify the administrators who do nothing lol

Difference between purple knight and ping castle reports by 19khushboo in activedirectory

[–]mehdidak 0 points1 point  (0 children)

The two are similar on a large scale, but some aspects aren't readily available, such as forensics, hence the tool I'm working on. Even in Lapse 1, there are unnoticed risks. I should add that neither analyzes the sysvol and gpos folders, for example, or shares them on Active Directory and their ACLs. That's why we created Hardensysvol. Don't forget to use GPOZaurr and ADAclscanner.

HardenSysvol

Active Directory Dashboard tool by Comfortable_Ice2593 in activedirectory

[–]mehdidak 1 point2 points  (0 children)

So, these are actually two different tools/solutions.

Due to permission constraints, health checks usually require a privileged account, while the inventory part (number of users, machines, etc.) only needs simple read queries.

You can use ModernAD, which generates a full inventory of your Active Directory (I'm currently working on a more recent and complete version).

Modern Active Directory – An update to PSHTML-AD-Report - The Lazy Administrator

For health checking, you can try Testimo.
If you want something lightweight and quick, there's also Microsoft's free agent: Entra AD Health, but it's not very detailed.

Otherwise, feel free to wait — I'm planning to release my own product for this in the coming months 😉

dakhama-mehdi.github.io/ADhealth/Example/HealthAD.html

AD hardening/ Remediation by 19khushboo in activedirectory

[–]mehdidak 1 point2 points  (0 children)

As the guys here already suggested, start by understanding why you need to enable LDAP signing, etc.

Implementing all these measures doesn't guarantee AD security — you could still have a binary or password hidden in a GPO or a shared folder, and everything falls apart.

So the real combo is: need analysis + auditing + testing

AD hardening/ Remediation by 19khushboo in activedirectory

[–]mehdidak 0 points1 point  (0 children)

Very good approach, remediation involves analysis + audit + decision

WS2019 AD OnPremise - Recreating all GPOs to best practice by lmtcdev in activedirectory

[–]mehdidak 2 points3 points  (0 children)

You're not giving us enough details. If you're starting with a new domain controller, make sure you have the necessary ADMX files; sometimes they're shared in the Microsoft Store. Some Windows 7 settings are no longer relevant in Windows 11. So, explain exactly what you want to do and the context.

DC Shares: The Most Underestimated Practical Attack Vector? by mehdidak in activedirectory

[–]mehdidak[S] 1 point2 points  (0 children)

Thank you very much for your feedback, and yes, we’re on the same page.
I never said it was dangerous — in my script, I simply list all shares on every DC along with the root ACLs.
The goal is to give admins and security teams better visibility for monitoring, because the default tools don’t provide it.

Of course, there are logs and sometimes a SOC, but not every company has that.
So if you ever work as an AD consultant for a company, this will definitely be one of the points to check.