adws
Active Directory Web Services (ADWS) operations. ADWS is the transport layer used by PowerShell’sActiveDirectory module — it communicates over port 9389 using SOAP/NBFS rather than raw LDAP. R4t implements ADWS as a fully-featured alternative to the ldap command.
Usage
| Flag | Short | Description |
|---|---|---|
--verify | -V | Verify the operation succeeded by re-reading the modified object |
Subcommands
adws query
Execute an arbitrary LDAP filter query via ADWS.
| Flag | Short | Description |
|---|---|---|
--filter | -F | LDAP filter [required] |
--attrs | -A | Attributes to return (repeatable) |
--max | -M | Maximum results (default: 100) |
adws get
Query specific AD object types.
Object Types
| Type | Argument | Description |
|---|---|---|
users | — | All user accounts |
computers | — | All computer accounts |
groups | — | All security and distribution groups |
ous | — | All Organizational Units |
maq | — | Machine Account Quota |
passpol | — | Domain password policy |
funclvl | — | Domain/forest functional level |
domain | — | Domain information |
forest | — | Forest information |
dcs | — | All domain controllers |
trusts | — | Domain trust relationships |
user | <samAccountName> | Specific user |
computer | <samAccountName> | Specific computer |
group | <samAccountName> | Specific group |
ou | <name> | Specific OU |
dn | — | Object by DN (--dn required) |
dacl | <object> | DACL on an object |
dacls | — | DACLs for all high-value objects |
gplink | <object> | GPO links on a container |
gplinks | — | All GPO links in the domain |
Flags
| Flag | Description |
|---|---|
--attrs | Comma-separated attributes to return |
--active | Filter to only active/enabled objects (for users, computers) |
--person | Filter to only person-type users (for users) |
--no-truncate | Don’t truncate long values (for group) |
--dn | Distinguished Name to look up (for dn) |
--resolve | Resolve SID/GUID to names (for dacl, dacls) |
--as-user | Show effective rights as a specific user (for dacl, dacls) |
--as-group | Show effective rights as a group member (for dacl, dacls) |
Examples
adws create
Create new AD objects.
| Type | Arguments | Description |
|---|---|---|
user | <samAccountName> <password> | Create a new user account |
computer | <hostname> <password> | Create a new computer account |
group | <samAccountName> | Create a new security group |
ou | <name> | Create a new Organizational Unit |
| Flag | Description |
|---|---|
--ou | Parent OU DN for the new object (for user, computer, group) |
--parent | Parent DN for the new OU |
Examples
adws modify
Modify existing AD objects.
| Subcommand | Arguments | Description |
|---|---|---|
user | <samAccountName> | Modify user attributes |
computer | <hostname> | Modify computer attributes |
group | <samAccountName> | Modify group attributes |
ou | <name> | Modify OU attributes |
attr | — | Modify a specific attribute by DN |
remove-group-member | <groupName> | Remove a member from a group |
dacl | <object> | Modify the DACL of an object |
gplink | <object> | Modify GPO links on a container |
Flags for modify user/computer/group/ou
| Flag | Description |
|---|---|
--attrs | Attributes to set in key=value format [required] |
Flags for modify attr
| Flag | Description |
|---|---|
--dn | DN of the object to modify [required] |
--attr | Attribute name to modify [required] |
--value | New value |
--op | Operation: replace, add, delete |
Flags for modify remove-group-member
| Flag | Description |
|---|---|
--member-dn | DN of the member to remove [required] |
Flags for modify dacl
| Flag | Description |
|---|---|
--trustee | Account to grant/revoke rights to |
--generic-all | Grant GenericAll |
--dcsync | Grant DCSync rights (Replicating Directory Changes All) |
--rbcd | Grant Resource-Based Constrained Delegation rights |
--shadow-cred | Grant shadow credential write rights |
--set-owner | Set as owner of the object |
--restore | Restore original DACL |
Flags for modify gplink
| Flag | Description |
|---|---|
--gpo-guid | GUID of the GPO |
--link | Create a new GPO link |
--unlink | Remove a GPO link |
--enforced | Set the GPO link as enforced |
--restore | Restore original GPO links |
Examples
adws delete
Delete AD objects.
| Subcommand | Arguments | Description |
|---|---|---|
dn | — | Delete by DN (--dn required) |
user | <samAccountName> | Delete a user |
computer | <hostname> | Delete a computer |
group | <samAccountName> | Delete a group |
ou | <name> | Delete an OU |
adws laps
Interact with LAPS (Local Administrator Password Solution) via ADWS.
| Subcommand | Arguments | Description |
|---|---|---|
enabled | [computer] | List computers with LAPS enabled (or check a specific one) |
dump | [computer] | Dump readable LAPS passwords (or for a specific computer) |
permissions | [computer] | Show principals with LAPS read access |
set | <computer> <password> | Set the LAPS password for a computer |
ADWS vs LDAP
| Feature | adws | ldap |
|---|---|---|
| Port | 9389 | 389 / 636 |
| Protocol | SOAP over NBFS | Raw LDAP |
| Detection profile | Lower (mimics PowerShell AD module) | Standard LDAP queries |
| Query obfuscation | Via ADWS transport | Via el-dap |
| Coverage | Full parity | Full parity |

