Skip to content

Commit ee8a974

Browse files
committed
Add some debug print calls to investigate Auto platform selection.
1 parent 60fdf48 commit ee8a974

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

modules/exploits/multi/browser/firefox_svg_plugin.rb

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ def initialize(info = {})
5050
},
5151
'License' => MSF_LICENSE,
5252
'Targets' => [
53-
['Automatic', {}],
53+
['Automatic',
54+
{
55+
'Platform' => ['win', 'osx', 'linux'],
56+
'Arch' => ARCH_X86
57+
}
58+
],
5459
[ 'Windows x86 (Native Payload)',
5560
{
5661
'Platform' => 'win',
@@ -70,7 +75,6 @@ def initialize(info = {})
7075
}
7176
]
7277
],
73-
'Platform' => ['win', 'osx', 'linux'],
7478
'DefaultTarget' => 0,
7579
'Author' =>
7680
[
@@ -121,22 +125,28 @@ def on_request_uri(cli, request)
121125
end
122126

123127
def dropped_file_contents(cli, my_target)
124-
regenerate_payload(cli, my_target.arch, my_target.platform, my_target).encoded_exe
128+
p = regenerate_payload(cli, my_target.arch, my_target.platform, my_target).encoded_exe
129+
puts "PAYLOAD"
130+
puts my_target.name
131+
puts my_target.platform.names
132+
puts my_target.arch
133+
puts my_target == target
134+
p
125135
end
126136

127137
def get_target(agent)
128138
return target if target.name != 'Automatic'
129139
if agent =~ /windows/i
130140
print_status 'Windows detected.'
131-
targets[1]
141+
return targets[1]
132142
elsif agent =~ /linux/i
133143
print_status 'Linux detected.'
134-
targets[2]
144+
return targets[2]
135145
elsif agent =~ /macintosh/i and agent =~ /intel/i
136146
print_status 'OSX detected.'
137-
targets[3]
147+
return targets[3]
138148
else
139-
nil
149+
return target
140150
end
141151
end
142152

0 commit comments

Comments
 (0)