Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Vuln-Dev
[Top] [All Lists]

ZRCSA-200503 - ktools Buffer Overflow Vulnerability

Subject: ZRCSA-200503 - ktools Buffer Overflow Vulnerability
Date: 27 Nov 2005 04:32:32 -0000
ZRCSA-200503 - ktools Buffer Overflow Vulnerability

Zone-H Research Center Security Advisory 200503
http://www.zone-h.fr

Date of release: 27/11/2005
Software: ktools (http://konst.org.ua/ktools)
Affected versions: <= 0.3
Risk: Medium
Discovered by: Mehdi Oudad "deepfear" and Kevin Fernandez "Siegfried" from the 
Zone-H Research Team

Background (from http://konst.org.ua/ktools)
----------
ktools is a library which I wrote for my own programming needs, though its main 
purpose is to provide various text-mode user interface controls without a need 
to write too much code.

Details
--------
There is a buffer overflow in kkstrtext.h : 

#define VGETSTRING(c, fmt) \
    { \
        va_list vgs__ap; char vgs__buf[1024]; \
        va_start(vgs__ap, fmt); \
        vsprintf(vgs__buf, fmt, vgs__ap); c = vgs__buf; \
        va_end(vgs__ap); \
    }

This library is used in the following softwares:
centericq
orpheus
motor
groan

(see http://konst.org.ua/en/konstware)

It can be exploited for example in centericq when editing a contact's details 
with a detail field longer than 1024 chars (a <description> field of a rss feed 
for example).

Details:

- centericq.cc :

 case ACT_EDITUSER:
                c->save();
                /***************** here************/
                if(face.updatedetails(c, c->getdesc().pname)) {
                    if(c->getdesc().pname == infocard)
                        c->setdispnick(c->getnick());

...
...

- icqdialogs.cc :

bool icqface::updatedetails(icqcontact *c, protocolname upname) {

...
...
  while(!finished) {;
        gendetails(db.gettree(), c);
...
...


gendetails()
..
if((capab.count(hookcapab::flexiblereg) && ri.params.empty()) || 
!capab.count(hookcapab::flexiblereg)) {
        i = tree->addnode(_(" About "));
        
        tree->addleaff(i, 0, 39, " %s ", about.c_str());



- treeview.cc :

int treeview::addleaff(int parent, int color, int ref, const char *fmt, ...) {
    string buf;
    VGETSTRING(buf, fmt);
    return addleaf(parent, color, (void *) ref, buf);
}



- kkstrtext.h :

#define VGETSTRING(c, fmt) \
    { \
        va_list vgs__ap; char vgs__buf[1024]; \
        va_start(vgs__ap, fmt); \
        vsprintf(vgs__buf, fmt, vgs__ap); c = vgs__buf; \
        va_end(vgs__ap); \
    }


Solution
---------
None. Vendor contacted on 18/11 and 25/11, no answer.

Original advisories:
English version: http://www.zone-h.org/en/advisories/read/id=8480/
French: http://www.zone-h.fr/fr/advisories/read/id=685

<Prev in Thread] Current Thread [Next in Thread>
  • ZRCSA-200503 - ktools Buffer Overflow Vulnerability, siegfried <=