Merge branch 'adduser_tabs' of https://github.com/ChrisJohnRiley/metasploit-framework into ChrisJohnRiley-adduser_tabs
commit
11e6a09cb0
|
@ -20,7 +20,15 @@ module Metasploit3
|
||||||
super(merge_info(info,
|
super(merge_info(info,
|
||||||
'Name' => 'Windows Execute net user /ADD CMD',
|
'Name' => 'Windows Execute net user /ADD CMD',
|
||||||
'Version' => '$Revision$',
|
'Version' => '$Revision$',
|
||||||
'Description' => 'Create a new user and add them to local administration group',
|
'Description' => %q{
|
||||||
|
Create a new user and add them to local administration group.
|
||||||
|
|
||||||
|
Note: The specified password is checked for common complexity
|
||||||
|
requirements to prevent the target machine rejecting the user
|
||||||
|
for failing to meet policy requirements.
|
||||||
|
|
||||||
|
Complexity check: 8-14 chars (1 UPPER, 1 lower, 1 digit/special)
|
||||||
|
},
|
||||||
'Author' => ['hdm','scriptjunkie','Chris John Riley'],
|
'Author' => ['hdm','scriptjunkie','Chris John Riley'],
|
||||||
'License' => MSF_LICENSE,
|
'License' => MSF_LICENSE,
|
||||||
'Platform' => 'win',
|
'Platform' => 'win',
|
||||||
|
@ -38,7 +46,7 @@ module Metasploit3
|
||||||
register_options(
|
register_options(
|
||||||
[
|
[
|
||||||
OptString.new('USER', [ true, "The username to create", "metasploit" ]),
|
OptString.new('USER', [ true, "The username to create", "metasploit" ]),
|
||||||
OptString.new('PASS', [ true, "The password for this user", "metasploit" ]),
|
OptString.new('PASS', [ true, "The password for this user", "Metasploit$1" ]),
|
||||||
OptString.new('CUSTOM', [ false, "Custom group name to be used instead of default", '' ]),
|
OptString.new('CUSTOM', [ false, "Custom group name to be used instead of default", '' ]),
|
||||||
OptBool.new('WMIC', [ true, "Use WMIC on the target to resolve administrators group", false ]),
|
OptBool.new('WMIC', [ true, "Use WMIC on the target to resolve administrators group", false ]),
|
||||||
], self.class)
|
], self.class)
|
||||||
|
@ -69,6 +77,7 @@ module Metasploit3
|
||||||
print_good "Password: #{pass} passes complexity checks"
|
print_good "Password: #{pass} passes complexity checks"
|
||||||
elsif complexity
|
elsif complexity
|
||||||
print_error "Password: #{pass} doesn't meet complexity requirements and may cause issues"
|
print_error "Password: #{pass} doesn't meet complexity requirements and may cause issues"
|
||||||
|
print_error "The password should idealy be 8-14 chars (1 UPPER, 1 lower, 1 digit/special)"
|
||||||
end
|
end
|
||||||
|
|
||||||
if not cust.empty?
|
if not cust.empty?
|
||||||
|
|
|
@ -27,7 +27,15 @@ module Metasploit3
|
||||||
super(update_info(info,
|
super(update_info(info,
|
||||||
'Name' => 'Windows Execute net user /ADD',
|
'Name' => 'Windows Execute net user /ADD',
|
||||||
'Version' => '$Revision$',
|
'Version' => '$Revision$',
|
||||||
'Description' => 'Create a new user and add them to local administration group',
|
'Description' => %q{
|
||||||
|
Create a new user and add them to local administration group.
|
||||||
|
|
||||||
|
Note: The specified password is checked for common complexity
|
||||||
|
requirements to prevent the target machine rejecting the user
|
||||||
|
for failing to meet policy requirements.
|
||||||
|
|
||||||
|
Complexity check: 8-14 chars (1 UPPER, 1 lower, 1 digit/special)
|
||||||
|
},
|
||||||
'Author' => ['hdm','Chris John Riley'],
|
'Author' => ['hdm','Chris John Riley'],
|
||||||
'License' => MSF_LICENSE,
|
'License' => MSF_LICENSE,
|
||||||
'Platform' => 'win',
|
'Platform' => 'win',
|
||||||
|
@ -38,7 +46,7 @@ module Metasploit3
|
||||||
register_options(
|
register_options(
|
||||||
[
|
[
|
||||||
OptString.new('USER', [ true, "The username to create", "metasploit" ]),
|
OptString.new('USER', [ true, "The username to create", "metasploit" ]),
|
||||||
OptString.new('PASS', [ true, "The password for this user", "metasploit" ]),
|
OptString.new('PASS', [ true, "The password for this user", "Metasploit$1" ]),
|
||||||
OptString.new('CUSTOM', [ false, "Custom group name to be used instead of default", '' ]),
|
OptString.new('CUSTOM', [ false, "Custom group name to be used instead of default", '' ]),
|
||||||
OptBool.new('WMIC', [ true, "Use WMIC on the target to resolve administrators group", false ]),
|
OptBool.new('WMIC', [ true, "Use WMIC on the target to resolve administrators group", false ]),
|
||||||
], self.class)
|
], self.class)
|
||||||
|
@ -70,6 +78,7 @@ module Metasploit3
|
||||||
print_good "Password: #{pass} passes complexity checks"
|
print_good "Password: #{pass} passes complexity checks"
|
||||||
elsif complexity
|
elsif complexity
|
||||||
print_error "Password: #{pass} doesn't meet complexity requirements and may cause issues"
|
print_error "Password: #{pass} doesn't meet complexity requirements and may cause issues"
|
||||||
|
print_error "The password should idealy be 8-14 chars (1 UPPER, 1 lower, 1 digit/special)"
|
||||||
end
|
end
|
||||||
|
|
||||||
if not cust.empty?
|
if not cust.empty?
|
||||||
|
|
Loading…
Reference in New Issue