盾怪网教程:是一个免费提供流行杀毒软件教程、在线学习分享的学习平台!

对于SSH crc32 compensation attack detector exploit 的区分

时间:2024/10/30作者:未知来源:盾怪网教程人气:

[摘要]+------------+------------+----------+----------+-----------+ 鉴于此情况,编译整理David A. Dittrich <dittr...

+------------+------------+----------+----------+-----------+

鉴于此情况,编译整理David A. Dittrich <dittrich@cac.washington.edu> 文章(http://staff.washington.edu/dittrich/misc/ssh-analysis.txt)供大家参考和修补。

-------------------------------------------------------------------------------

概述
==================

此漏洞最开始由CORE-SDI组织在securityfocus.com上的BUGTRAQ上发布了他们安全
公告CORE-20010207,日期为2001,2月8号:

http://www.securityfocus.com/advisories/3088

漏洞的简单描述就是:ssh1守护程序中所带的一段代码中存在一个整数溢出问题。问题出在
deattack.c,此程序由CORE SDI开发,用来防止SSH1协议受到CRC32补偿攻击。

由于在detect_attack()函数中错误的将一个16位的无符号变量当成了32位变量来使用,导致表索引溢出问题。

这将允许一个攻击者覆盖内存中的任意位置的内容,攻击者可能远程获取root权限。

其他组织也陆续公布了一些对这个SSH 漏洞的分析和建议如:

  http://xforce.iss.net/alerts/advise100.php
  http://razor.bindview.com/publish/advisories/adv_ssh1crc.html
  http://www.securityfocus.com/bugid=2347

而在2001年10月21号Jay Dyson在incidents@securityfocus.com邮件列表上声明
有不少信息显示有人在扫描RIPE 网络段的SSH服务器:

  http://www.securityfocus.com/cgi-bin/archive.pl?id=75&start=2001-10-27&end=2001-11-02&mid=221998&threads=1

然后更甚的是在vuln-dev@securityfocus.com邮件列表中提示Newsbytes.com中
有新闻描述有人愿付$1000美金的人提供此攻击工具。还有没有确认的传闻针对
Solaris 8/SPARC SSH.com 1.2.26-31 系统的攻击代码也存在。著名的安全站点
securitynewsportal.com就被这个漏洞攻击,下面地址是被黑截图:

  http://defaced.alldas.de/mirror/2001/10/24/www.securitynewsportal.com/

最近TESO发布了关于这些攻击代码的信息,你可以在下面的地址查看:

  http://www.team-teso.org/sshd_statement.php


下面是受影响的SSH版本:

SSH Communications Security SSH 2.x and 3.x (if SSH Version 1 fallback is enabled)
SSH Communications Security SSH 1.2.23-1.2.31
F-Secure SSH versions prior to 1.3.11-2
OpenSSH versions prior to 2.3.0 (if SSH Version 1 fallback is enabled)
OSSH 1.5.7

不过供应商已经为系统提供补丁信息,大家可以参考如下地址:

  http://www.ssh.com/products/ssh/advisories/ssh1_crc-32.cfm
  http://openssh.org/security.html
  http://www.cisco.com/warp/public/707/SSH-multiple-pub.html


---------------------------------------------------------------------------

攻击行为的分析
=====================

2001年10月6日,攻击者从Netherlands网络段使用crc32 compensation attack
detector漏洞攻击程序入侵了一台UW网络中使用了OpenSSH 2.1.1的Redhat linux
系统,漏洞描述如CERT VU#945216所述:

  http://www.kb.cert.org/vuls/id/945216

系统中一系列操作系统命令被替换成木马程序以提供以后再次进入并清除了所有
日志系统。第二台SSH服务器运行在39999/tcp高端口,系统入侵后被用来扫描其他
UW以外的网络以获得更多的运行OpenSSH 2.1.1的系统。

通过一些恢复操作对这个漏洞程序进行了分析:

这个攻击代码基于OpenSSH 2.2.0版本(这个是2.1.1之后的版本,对crc32
compensation attack detection function进行了修补),不过针对OpenSSH
2.1.1进行攻击,其攻击代码也可以使用在ssh.com 1.2.31版本(针对其他SSH
协议1 和版本的测试尚无完成)。

攻击代码对针对如下系统:

  linux/x86 ssh.com 1.2.26-1.2.31 rhl
  linux/x86 openssh 1.2.3 (maybe others)
  linux/x86 openssh 2.2.0p1 (maybe others)
  freebsd 4.x, ssh.com 1.2.26-1.2.31 rhl

虽然这个攻击代码可以对多个平台系统进行攻击,这里攻击者只扫描22/tcp端口,
然后连接这些系统获得响应的版本程序并只对"OpenSSH_2.1.1"继续进一步操作。
这些扫描使用快速SYN扫描,使用来自t0rn root kit中的工具。

对破坏的系统进行分析发现已经有47067个地址被扫描,而在这些地址中,有1244
个主机被鉴别存在此漏洞,攻击者成功的在8月8日系统离线之前利用此漏洞进入
4个主机。

这个攻击者代码对使用访问控制限制(如, SSH.com的"AllowHosts" 或者 "DenyHosts"
设置) 或者包过滤(如, ipchains, iptables, ipf) 的系统不能正常工作,因为这些
会要求交换Public keys。

-------------------------------------------------------------------------

对攻击者代码实时的分析
============================

此攻击代码在隔离的网络段进行测试,使用了网络地址为10.10.10.0/24,攻击
主机使用了10.10.10.10 而有漏洞的服务主机为 10.10.10.3。

有漏洞的服务主机系统运行了在Red Hat Linux6.0(Kernel 2.2.16-3 on an i586)
的SSH.com的 1.2.31 版本。

而攻击主机运行了Fred Cohen's PLAC[1] (从CD-ROM引导的Linux 2.4.5 系统),
文件使用"nc"(Netcat)[2]拷贝到系统中.

攻击一方再现
=========================

当以没有任何参数运行攻击代码的时候会显示使用信息:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
root@plac /bin >> ./ssh



linux/x86 sshd1 exploit by zip/TESO (zip@james.kalifornia.com) - ripped from
openssh 2.2.0 src


greets: mray, random, big t, sh1fty, scut, dvorak
ps. this sploit already owned cia.gov :/


**please pick a type**


Usage: ./ssh host [options]
Options:
  -p port
  -b base Base address to start bruteforcing distance, by default 0x1800,
goes as high as 0x10000
  -t type
  -d debug mode
  -o Add this to delta_min


types:


0: linux/x86 ssh.com 1.2.26-1.2.31 rhl
1: linux/x86 openssh 1.2.3 (maybe others)
2: linux/x86 openssh 2.2.0p1 (maybe others)
3: freebsd 4.x, ssh.com 1.2.26-1.2.31 rhl
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

被测试系统在系统端口2222上运行着SSH.com version 1.2.31 (未修补)程序,并
把syslog日志重定向独立的文件sshdx.log.

这里选择了类型type 0和2222 攻击端口:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
root@plac /bin >> ./ssh 10.10.10.3 -p 2222 -t 0



linux/x86 sshd1 exploit by zip/TESO (zip@james.kalifornia.com) - ripped from
openssh 2.2.0 src


greets: mray, random, big t, sh1fty, scut, dvorak
ps. this sploit already owned cia.gov :/


...........................
bruteforced distance: 0x3200
bruteforcing distance from h->partial packet buffer on stack
..............^[[A................

关键词:对于SSH crc32 compensation attack detector exploit 的区分




Copyright © 2012-2018 盾怪网教程(http://www.dunguai.com) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版