Skip to content

Commit f572ce6

Browse files
author
RageLtMan
committed
Revert "post/local_admin_search_enum~Regex fails,module 2"
This reverts commit 595e538.
1 parent 7e9ad4a commit f572ce6

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

modules/post/windows/gather/local_admin_search_enum.rb

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def initialize(info={})
2121
super(update_info(info,
2222
'Name' => 'Windows Gather Local Admin Search',
2323
'Description' => %q{
24-
This module will identify systems in a given range that the
24+
This module will identify systems in a given range that the
2525
supplied domain user (should migrate into a user pid) has administrative
2626
access to by using the Windows API OpenSCManagerA to establishing a handle
2727
to the remote host. Additionally it can enumerate logged in users and group
@@ -80,16 +80,10 @@ def setup
8080

8181
# Check if RSOP data exists, if not disable group check
8282
unless res =~ /does not have RSOP data./
83-
dc_applied = /Group Policy was applied from:\s*(.*)\s*/.match(res)
84-
if dc_applied
85-
@domain_controller = dc_applied[1].strip
86-
else
87-
@dc_error = true
88-
print_error("Could not read RSOP data, will not enumerate users and groups. Manually specify DC.")
89-
end
83+
@domain_controller = /Group Policy was applied from:\s*(.*)\s*/.match(res)[1].chomp
9084
else
9185
@dc_error = true
92-
print_error("User never logged into device, will not enumerate users and groups. Manually specify DC.")
86+
print_error("User never logged into device, will not enumerate groups or manually specify DC.")
9387
end
9488
end
9589
end
@@ -261,4 +255,4 @@ def db_loot(host, user, type)
261255
p = store_loot(type, 'text/plain', host, "#{host}:#{user}", 'hosts_localadmin.txt', user)
262256
vprint_status("User data stored in: #{p}")
263257
end
264-
end
258+
end

0 commit comments

Comments
 (0)