what you don't know can hurt you
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
https://www.venustech.com.cn
https://www.xfocus.org
https://www.xfocus.net
Login or Register to add favorites

File Archive:

November 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close