Skip to content

Commit 14b218d

Browse files
committed
Make hashdump compatible with meterpreter
1 parent 73fdc06 commit 14b218d

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

modules/post/linux/gather/hashdump.rb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@ def initialize(info={})
1616
'Name' => 'Linux Gather Dump Password Hashes for Linux Systems',
1717
'Description' => %q{ Post Module to dump the password hashes for all users on a Linux System},
1818
'License' => MSF_LICENSE,
19-
'Author' => [ 'Carlos Perez <carlos_perez[at]darkoperator.com>'],
20-
'Platform' => [ 'linux' ],
21-
'SessionTypes' => [ 'shell' ]
19+
'Author' => ['Carlos Perez <carlos_perez[at]darkoperator.com>'],
20+
'Platform' => ['linux'],
21+
'SessionTypes' => ['shell', 'meterpreter']
2222
))
23-
2423
end
2524

2625
# Run Method for when run command is issued
@@ -43,11 +42,9 @@ def run
4342
# Save pwd file
4443
upassf = store_loot("linux.hashes", "text/plain", session, john_file, "unshadowed_passwd.pwd", "Linux Unshadowed Password File")
4544
print_good("Unshadowed Password File: #{upassf}")
46-
4745
else
4846
print_error("You must run this module as root!")
4947
end
50-
5148
end
5249

5350
def unshadow(pf,sf)
@@ -63,6 +60,8 @@ def unshadow(pf,sf)
6360
end
6461
end
6562
end
66-
return unshadowed
63+
64+
unshadowed
6765
end
66+
6867
end

0 commit comments

Comments
 (0)