Linux command
add-computer.py 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Add
add-computer.py [domain]/[user]:[password] -computer-name [hostname]
Example
add-computer.py [domain]/[user]:[password] -computer-name [hostname] -computer-pass [password]
Example
add-computer.py -k [domain]/[user] -computer-name [hostname]
说明
add-computer.py is an Impacket tool for adding computer accounts to Active Directory domains. It exploits the default AD configuration that allows authenticated users to add up to 10 computer accounts to the domain. This is commonly used in penetration testing for resource-based constrained delegation attacks, as controlling a computer account provides additional attack vectors within an AD environment.
参数
- -dc-ip _ip_
- Domain controller IP address
- -computer-name _name_
- Name for the new computer account
- -computer-pass _password_
- Password for the computer account (auto-generated if not specified)
- -method _method_
- Method to add computer: SAMR or LDAPS (default SAMR).
- -dc-host _hostname_
- Domain controller hostname (FQDN). If omitted, derived from the domain argument.
- -baseDN _dn_
- Distinguished name base in LDAP. If omitted, derived from the domain.
- -domain-netbios _name_
- Domain NetBIOS name when the forest handles multiple domains.
- -no-add
- Only change an existing computer account password without adding a new one.
- -k
- Use Kerberos authentication (requires KRB5CCNAME ccache).
- -no-pass
- Don't prompt for password (use with -k).
- -hashes _LMHASH:NTHASH_
- Use NTLM hash for pass-the-hash authentication.
- -aesKey _key_
- AES128 or AES256 hex key for Kerberos pass-the-key authentication.
- -debug
- Enable verbose debug output.
FAQ
What is the add-computer.py command used for?
add-computer.py is an Impacket tool for adding computer accounts to Active Directory domains. It exploits the default AD configuration that allows authenticated users to add up to 10 computer accounts to the domain. This is commonly used in penetration testing for resource-based constrained delegation attacks, as controlling a computer account provides additional attack vectors within an AD environment.
How do I run a basic add-computer.py example?
Run `add-computer.py [domain]/[user]:[password] -computer-name [hostname]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -dc-ip _ip_ do in add-computer.py?
Domain controller IP address