Skip to content

Commit 0be367b

Browse files
committed
Improve options
1 parent 059d241 commit 0be367b

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

nxc/modules/change-password.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,24 @@ class NXCModule:
1616

1717
def options(self, context, module_options):
1818
"""
19-
Module options for password change
19+
Required (one of):
20+
NEWPASS The new password of the user.
21+
NEWNTHASH The new NT hash of the user.
2022
21-
Required options:
23+
Optional:
24+
OLDPASS The old password of the user (if not specified, the current password will be used)
25+
OLDNTHASH The old NT hash of the user (if not specified, the current password will be used)
26+
USER The user account if the target is not the current user.
27+
28+
Examples
29+
--------
2230
If STATUS_PASSWORD_MUST_CHANGE or STATUS_PASSWORD_EXPIRED (Change password for current user)
2331
netexec smb <DC_IP> -u username -p oldpass -M change-password -o OLDPASS='oldpass' NEWPASS='newpass'
2432
netexec smb <DC_IP> -u username -H oldnthash -M change-password -o OLDNTHASH='oldnthash' NEWPASS='newpass'
2533
2634
If want to change other user's password (with forcechangepassword priv or admin rights)
2735
netexec smb <DC_IP> -u username -p password -M change-password -o USER='target_user' NEWPASS='target_user_newpass'
2836
netexec smb <DC_IP> -u username -p password -M change-password -o USER='target_user' NEWNTHASH='target_user_newnthash'
29-
30-
NEWPASS or NEWHASH
3137
"""
3238
self.context = context
3339
self.newpass = module_options.get("NEWPASS")

0 commit comments

Comments
 (0)