LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

addcomputer.py

Create machine accounts in Active Directory

TLDR

Add computer to Active Directory
$ addcomputer.py [domain]/[user]:[password] -computer-name [hostname]
copy
Specify domain controller IP
$ addcomputer.py [domain]/[user]:[password] -dc-ip [192.168.1.1] -computer-name [hostname]
copy
Use pass-the-hash authentication
$ addcomputer.py [domain]/[user] -hashes :[NTHASH] -computer-name [hostname]
copy
Add computer with a specific password using LDAP method
$ addcomputer.py [domain]/[user]:[password] -computer-name [hostname] -computer-pass [password] -method LDAPS
copy

SYNOPSIS

addcomputer.py domain/user:password -computer-name name [options]

DESCRIPTION

addcomputer.py (also known as add-computer.py) is an Impacket script for creating machine accounts in Active Directory. It leverages the default AD permission that allows any authenticated user to add computer accounts to the domain.This capability is useful in penetration testing for setting up resource-based constrained delegation attacks or gaining additional footholds in the domain.

PARAMETERS

-dc-ip ip

IP address of the domain controller
-computer-name name
Name of the computer account to create
-computer-pass password
Password for the computer account
-method SAMR|LDAPS
Protocol to use for adding the computer (default: SAMR)
-hashes LMHASH:NTHASH
Authenticate using NT hash
-k, --kerberos
Use Kerberos authentication
-no-pass
Don't prompt for password
-dc-host hostname
Hostname of the domain controller

INSTALL

sudo apk add py3-impacket
copy

CAVEATS

For authorized security testing only. The default ms-DS-MachineAccountQuota of 10 can be modified or set to 0 by administrators. Computer accounts created this way are visible to domain administrators.

HISTORY

Part of the Impacket suite maintained by SecureAuth, this tool gained prominence in security testing as resource-based constrained delegation attacks became more widely understood after 2018.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid