[Full-disclosure] Compuware Softice (DbgMsg driver) Local Denial Of Service

From: Piotr Bania (bania.piotr_at_gmail.com)
Date: 05/29/05

  • Next message: Stejerean, Cosmin: "Re: [Full-disclosure] Cygwin Bash Buffer Overflow (Cosmin Stejerean)"
    Date: Sun, 29 May 2005 13:40:42 +0200
    To: SBUGTRAQ <bugtraq@securityfocus.com>, FULLDISC <full-disclosure@lists.grok.org.uk>, vuln@secunia.com
    
    

    Compuware Softice (DbgMsg driver) Local Denial Of Service
    by Piotr Bania <bania.piotr@gmail.com>
    http://pb.specialised.info

    Original location: http://pb.specialised.info/all/adv/sice-adv.txt

    Severity: Low / Medium - BSOD (Blue Screen Of Death) DOS

    Software affected: Tested on Softice from DriverStudio 3.2 and 3.1.
                            However all version with DbgMsg.sys driver
                            installed should be marked as vulnerable.

            

    I. BACKGROUND

    SoftICE is a powerful system-wide debugger that supports source level
    debugging of any software, driver, service, and most bios code on either
    a single or dual machine configuration.

    II. DESCRIPTION

    On NT based operating systems Debug Messages are being sent by executing
    the OutputDebugString API (ring3 applications) or by executing
    DbgPrint() function (also known as KdPrint(), mostly used by ring0
    "applications").

    However not only kernel mode stuff can execute DbgPrint() since it is
    exported by NTDLL.DLL - so called native calls. If we go forward we will
    see that actually the final pass of the Debug Message is done by
    executing INT 2Dh, like following example shows:

            
    ----// SNIP SNIP //-------------------------------------------------
            
    mov ecx,offset some_string ; Debug Message offset
    xor edx,edx ; second Param (NULL in this case)
    mov eax,1 ; Service Type here defined as
                                    ; BREAKPOINT_PRINT (=1)

    int 2dh
    int 3
    nop <--- int 2dh returns here not to int 3

    ----// SNIP SNIP //-------------------------------------------------

    When Softice is installed - DbgMsg.sys driver is loaded (user should
    also notice that even when Softice is not active, the system is still
    vulnerable), executed 2d interrupt will be firstly filtered by
    DbgMsg.sys routine. This is probably provided to capture are flying
    Debug Messages and display them into the debugger window.

    However the driver doesn't validate the Debug Message pointer properly,
    this can cause an machine crash when the pointer is invalid.

            
    III. IMPACT

    Executing special crafted "int 2dh" request will cause local machine
    crash on system with DbgMsg.sys driver installed, *even* when Softice is
    not active. This attack can be also used as a very nasty anti-debugging
    trick against Softice users.

    IV. POC CODE

    Sample POC code was developed.

    best regards,
    Piotr Bania

    -- 
    --------------------------------------------------------------------
    Piotr Bania - <bania.piotr@gmail.com> - 0xCD, 0x19
    Fingerprint: 413E 51C7 912E 3D4E A62A  BFA4 1FF6 689F BE43 AC33
    http://pb.specialised.info  - Key ID: 0xBE43AC33
    --------------------------------------------------------------------
    _______________________________________________
    Full-Disclosure - We believe in it.
    Charter: http://lists.grok.org.uk/full-disclosure-charter.html
    Hosted and sponsored by Secunia - http://secunia.com/
    

  • Next message: Stejerean, Cosmin: "Re: [Full-disclosure] Cygwin Bash Buffer Overflow (Cosmin Stejerean)"

    Relevant Pages

    • Compuware Softice (DbgMsg driver) Local Denial Of Service
      ... Compuware Softice (DbgMsg driver) Local Denial Of Service ... On NT based operating systems Debug Messages are being sent by executing ... Debug Messages and display them into the debugger window. ...
      (Bugtraq)
    • [NT] Compuware SoftICE Local DoS (DbgMsg Driver)
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... Compuware's SoftICE is "a powerful system-wide debugger that supports ... executing the OutputDebugString API or by executing ... the driver DbgMsg.sys is loaded (user ...
      (Securiteam)
    • Re: Game server and SSC
      ... Since the apple is already running the driver, ... Unfortunately I'm getting directly to the problem: beeps from Apple ... Loading but not executing in the script. ... wonderful debugger -- also free. ...
      (comp.sys.apple2)
    • Re: Driver Expert
      ... > SoftICE and Visual SoftICE ... > Bounds Checker ... understand WDM and your own driver model very very well. ... WinDBG. ...
      (microsoft.public.development.device.drivers)
    • Re: question about oneys samples
      ... I have stated this on a number of forums, SoftIce has problems: ... debug your driver on the latest version you are SOL ... system reboots and have WinDBG load it for you. ... By using Microsoft's> central symbol server and a 1394 cable, WinDBG is just a "no brainer" for> me. ...
      (microsoft.public.development.device.drivers)