Skip to content

Commit d65ed54

Browse files
committed
Check STARTUP_FOLDER option
1 parent 2c633e4 commit d65ed54

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/exploits/windows/mysql/mysql_start_up.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ def upload_file(bin, dest)
102102
end
103103

104104
def exploit
105+
unless datastore['STARTUP_FOLDER'].start_with?('/') && datastore['STARTUP_FOLDER'].end_with?('/')
106+
fail_with(Failure::BadConfig, "STARTUP_FOLDER should start and end with '/' Ex: /programdata/microsoft/windows/start menu/programs/startup/")
107+
end
108+
105109
print_status("#{peer} - Attempting to login as '#{datastore['USERNAME']}:#{datastore['PASSWORD']}'")
106110
begin
107111
m = mysql_login(datastore['USERNAME'], datastore['PASSWORD'])

0 commit comments

Comments
 (0)