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

ASNflashsky.txt

ASNflashsky.txt
Posted Feb 21, 2004
Authored by FlashSky | Site xfocus.org

Detailed analysis on how the MS ASN library has stack overflows as well as integer overflows.

tags | advisory, overflow
SHA-256 | 8137f224477e7ea1c4b1106a733fe24279c482a6489a01cf4789e7f6d4c93c28

ASNflashsky.txt

Change Mirror Download



MS ASN library is fraught not only with integer overflow, but also with stack overflow.


After eEye published the vulnerability with ASN library, many people discussed it, and focused on whether we can exploit it and gain privilege.

Theoretically speaking, we can gain privilege, but in fact, it's very difficult, because it needs a very LARGE value to cause an integer overflow. This happened when copying data into heap buffer, and will cause an error with writting buffer firstly, so it's difficult to be exploited. If an example can deal with above 512M data when bit string heap corruption, it's possible to exploit it.

To some special ASN library functions, they exist stack overflow. If this kind of ASN function is used by some programs or services, we can exploit it. But it's regrettable, because we don't find this kind of programs or services. If these programs exist, it's easy to exploit(only stack overflow).

This is ASN1BERDecDouble function in ASN1 library(not Win2K+SP4):


call ASN1BERDecTag
test eax, eax
jz error
lea eax, [ebp+arg_4]
push edi
push eax
push ebx
call ASN1BERDecLength 〈-----When the value is bigger than 0X10C, trigger a stack overflow
test eax, eax
jz error
mov edx, [ebp+arg_4]
cmp edx, edi
jnz short l1

l1:
mov eax, [ebx+20h]
lea ecx, [edx+eax]
lea esi, [eax+1]
mov [ebx+20h], ecx
movzx ecx, byte ptr [eax] <-------Pay attention to EAX. We can control it to fit to condition, not the 0X84.

test cl, 80h
mov [ebp+var_8], ecx
jz l2

l2:
test cl, 40h
jz short l3

l3:
lea ecx, [edx-1]
lea edi, [ebp+var_10C] 〈--This is stack not heap. If ECX bigger than 0X10C, it causes to overwrite stack.
mov eax, ecx
push 2Ch
shr ecx, 2
repe movsd
####################################################

But this vulnerability is fixed in Win2K+SP4. We found another similar function: ASN1PERDecDouble. It can be exploited in W2K+SP4, but the new hotfix has fixed it.

Although we don't find system program that calls ASN1PERDecDouble or ASN1BERDecDouble, but if these programs call THIS two functions and not be fixed, we can exploit to gain privilege without doubt. Especially to ASN1PERDecDouble, it's dangerous in WIN2K+SP4.

The next thing is only to find these applies or services.






flashsky@xfocus.org
http://www.venustech.com.cn
http://www.xfocus.org
http://www.xfocus.net
Login or Register to add favorites

File Archive:

August 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    15 Files
  • 2
    Aug 2nd
    22 Files
  • 3
    Aug 3rd
    0 Files
  • 4
    Aug 4th
    0 Files
  • 5
    Aug 5th
    15 Files
  • 6
    Aug 6th
    11 Files
  • 7
    Aug 7th
    43 Files
  • 8
    Aug 8th
    42 Files
  • 9
    Aug 9th
    36 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    0 Files
  • 12
    Aug 12th
    27 Files
  • 13
    Aug 13th
    18 Files
  • 14
    Aug 14th
    50 Files
  • 15
    Aug 15th
    33 Files
  • 16
    Aug 16th
    23 Files
  • 17
    Aug 17th
    0 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    0 Files
  • 20
    Aug 20th
    0 Files
  • 21
    Aug 21st
    0 Files
  • 22
    Aug 22nd
    0 Files
  • 23
    Aug 23rd
    0 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    0 Files
  • 27
    Aug 27th
    0 Files
  • 28
    Aug 28th
    0 Files
  • 29
    Aug 29th
    0 Files
  • 30
    Aug 30th
    0 Files
  • 31
    Aug 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close