Vulnerable Active Directory Scripts (Part 1)

 




About

There are different types of Vulnerable Active Directory Scripts that make AD environment vulnerable to various kinds of attacks. Every script is written in PowerShell. 

ACL

In Active Directory, this is used to establish an Organizational Unit and configure Access Control Lists (ACLs). The script's first two lines import the Active Directory module, which sets the current location to the AD disc and offers the cmdlets required to operate with AD.   

The script then defines the "SetAcl" function, which has four parameters: $right, $inheritance, $for, and $to." The username of the user for whom the ACL is being set is represented by the $for parameter, the name of the OU to which the ACL is being applied is represented by the $to parameter, and the right being granted to the user is represented by the $right parameter. To indicate if the access rule should be inherited by child objects, use the $inheritance argument. Additionally, the function contains an extra input called $extendedRight that can be used to define an extended right.

AnonymousLDAP

In an AD system, this script is used to set the anonymous LDAP bind user and enable anonymous LDAP access. The script's initial line imports the Active Directory module, which offers the cmdlets required to work with AD. 

ASRPRoasting

This PowerShell command can be used to change an AD user account's settings. This command specifically sets the "DoesNotRequirePreAuth" value of the user account "korin.z" to true using the Set-ADAccountControl cmdlet.

The "DoesNotRequirePreAuth" attribute determines whether or not the user account pre-authentication step is required by the Kerberos authentication protocol. The user can authenticate to the domain without supplying any evidence of their prior domain authentication when this attribute is set to true, indicating that the user account does not require pre-authentication. Because anyone can authenticate to the domain as the designated user without having to provide a working password or other kind of identity verification, this lowers security.

Note- This command only affects the account on the Kerberos authentication protocol, and does not affect other authentication protocols such as NTLM or LDAP. 

Conclusion

This topic talks about different Vulnerable Active Directory Scripts and their uses. 



































































Comments

Popular posts from this blog

Query, Visualize, & Monitor Data in Azure Sentinel

Planning for Implementing SAP Solutions on Azure (Part 2 of 5)

Work with String Data Using KQL Statements