HackMyVM-Slackware


目录

信息收集

arp-scan

nmap

nikto

whatweb

WEB

web信息收集

gobuster

wfuzz

hydra

ssh连接

提权

系统信息收集

get root

信息收集

arp-scan
┌──(root㉿0x00)-[~/HackMyVM]
└─# arp-scan -l
Interface: eth0, type: EN10MB, MAC: 08:00:27:9d:6d:7b, IPv4: 192.168.9.150
Starting arp-scan 1.10.0 with 256 hosts (https://github.com/royhills/arp-scan)

192.168.9.160   08:00:27:42:9b:78       PCS Systemtechnik GmbH


1 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.10.0: 256 hosts scanned in 2.073 seconds (123.49 hosts/sec). 8 responded


nmap
端口信息扫描

┌──(root㉿0x00)-[~/HackMyVM]
└─# nmap -p- 192.168.9.160 --min-rate 10000 -oA ports
Starting Nmap 7.94 ( https://nmap.org ) at 2024-04-28 12:49 CST
Stats: 0:00:03 elapsed; 0 hosts completed (1 up), 1 undergoing SYN Stealth Scan
SYN Stealth Scan Timing: About 35.39% done; ETC: 12:49 (0:00:05 remaining)
Nmap scan report for 192.168.9.160
Host is up (0.00052s latency).
Not shown: 65533 closed tcp ports (reset)
PORT  STATE SERVICE
1/tcp open  tcpmux
2/tcp open  compressnet
MAC Address: 08:00:27:42:9B:78 (Oracle VirtualBox virtual NIC)

Nmap done: 1 IP address (1 host up) scanned in 14.29 seconds

版本服务信息扫描

┌──(root㉿0x00)-[~/HackMyVM]
└─# nmap -sC -sV -O -p 1,2 192.168.9.160 --min-rate 10000      
Starting Nmap 7.94 ( https://nmap.org ) at 2024-04-28 12:50 CST
Nmap scan report for 192.168.9.160
Host is up (0.00051s latency).

PORT  STATE SERVICE VERSION
1/tcp open  ssh     OpenSSH 9.3 (protocol 2.0)
| ssh-hostkey: 
|   256 e2:66:60:79:bc:d1:33:2e:c1:25:fa:99:e5:89:1e:d3 (ECDSA)
|_  256 98:59:c3:a8:2b:89:56:77:eb:72:4a:05:90:21:cb:40 (ED25519)
2/tcp open  http    Apache httpd 2.4.58 ((Unix))
| http-methods: 
|_  Potentially risky methods: TRACE
|_http-title: Tribute to Slackware
|_http-server-header: Apache/2.4.58 (Unix)
MAC Address: 08:00:27:42:9B:78 (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
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 hop

OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 12.85 seconds

端口好奇怪!1端口是ssh服务,2端口是http服务!


nikto
┌──(root㉿0x00)-[~/HackMyVM]
└─# nikto -h 192.168.9.160:2                             
- Nikto v2.5.0
---------------------------------------------------------------------------
+ Target IP:          192.168.9.160
+ Target Hostname:    192.168.9.160
+ Target Port:        2
+ Start Time:         2024-04-28 12:53:59 (GMT8)
---------------------------------------------------------------------------
+ Server: Apache/2.4.58 (Unix)
+ /: 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)
+ OPTIONS: Allowed HTTP Methods: POST, OPTIONS, HEAD, GET, TRACE .
+ /: HTTP TRACE method is active which suggests the host is vulnerable to XST. See: https://owasp.org/www-community/attacks/Cross_Site_Tracing
+ 8101 requests: 0 error(s) and 4 item(s) reported on remote host
+ End Time:           2024-04-28 12:54:18 (GMT8) (19 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tested


      *********************************************************************
      Portions of the server's headers (Apache/2.4.58) are not in
      the Nikto 2.5.0 database or are newer than the known string. Would you like
      to submit this information (*no server specific data*) to CIRT.net
      for a Nikto update (or you may email to sullo@cirt.net) (y/n)? y

+ ERROR:  -> 
+ ERROR: Update failed, please notify sullo@cirt.net of the previous line.


whatweb
┌──(root㉿0x00)-[~/HackMyVM]
└─# whatweb -v http://192.168.9.160:2/                                           
WhatWeb report for http://192.168.9.160:2/
Status    : 200 OK
Title     : ,Tribute to Slackware
IP        : 192.168.9.160
Country   : RESERVED, ZZ

Summary   : Apache[2.4.58], HTTPServer[Unix][Apache/2.4.58 (Unix)]

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.58 (from HTTP Server Header)
        Google Dorks: (3)
        Website     : http://httpd.apache.org/

[ HTTPServer ]
        HTTP server header string. This plugin also attempts to 
        identify the operating system from the server header. 

        OS           : Unix
        String       : Apache/2.4.58 (Unix) (from server string)

HTTP Headers:
        HTTP/1.1 200 OK
        Date: Sun, 28 Apr 2024 02:54:45 GMT
        Server: Apache/2.4.58 (Unix)
        Last-Modified: Sun, 10 Mar 2024 19:03:14 GMT
        ETag: "1d57-6135313b36080"
        Accept-Ranges: bytes
        Content-Length: 7511
        Connection: close
        Content-Type: text/html


WEB

web信息收集


gobuster
┌──(root㉿0x00)-[~/HackMyVM]
└─# gobuster dir -u http://192.168.9.160:2 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt 
===============================================================
Gobuster v3.6
by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)
===============================================================
[+] Url:                     http://192.168.9.160:2
[+] Method:                  GET
[+] Threads:                 10
[+] Wordlist:                /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt
[+] Negative Status codes:   404
[+] User Agent:              gobuster/3.6
[+] Timeout:                 10s
===============================================================
Starting gobuster in directory enumeration mode
===============================================================
/getslack             (Status: 301) [Size: 240] [--> http://192.168.9.160:2/getslack/]
/robots.txt           (Status: 200) [Size: 21]
Progress: 220561 / 220562 (100.00%)
===============================================================
Finished
===============================================================

提示:在此处搜索

可能是需要我们fuzz一下,普通fuzz不行,我们必须加上robots.txt里面的参数!

wfuzz
┌──(root㉿0x00)-[~/HackMyVM]
└─# wfuzz -u http://192.168.9.160:2/getslack/FUZZ.7z.001 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -t 50 --hc 403,404
 /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.9.160:2/getslack/FUZZ.7z.001
Total requests: 220561

=====================================================================
ID           Response   Lines    Word       Chars       Payload                                                                                                                                                                    
=====================================================================
                                                                                                                                                                     
000083709:   200        80 L     794 W      19474 Ch    "twitter"                                                                                                                                                                  

Total time: 100.4681
Processed Requests: 220561
Filtered Requests: 220547
Requests/sec.: 2195.332

找到了!访问url就会下载一个文件!

这个文件只是7z的一个分卷,我们需要找到所有的才行!

我一直下载到15就404了说明只有14个文件!

这个时候,我们就可以解压了!
┌──(root㉿0x00)-[~/HackMyVM/123]
└─# 7z x twitter.7z.001

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=C.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs Intel(R) Core(TM) i9-14900HX (B0671),ASM,AES-NI)

Scanning the drive for archives:
1 file, 20480 bytes (20 KiB)

Extracting archive: twitter.7z.001
--         
Path = twitter.7z.001
Type = Split
Physical Size = 20480
Volumes = 14
Total Physical Size = 268100
----
Path = twitter.7z
Size = 268100
--
Path = twitter.7z
Type = 7z
Physical Size = 268100
Headers Size = 130
Method = LZMA2:384k
Solid = -
Blocks = 1

Everything is Ok

Size:       267951
Compressed: 268100

解压成功!记得解压001哈!

我们得到一个图片文件!我们查看一下是否存在隐写!

trYth1sPasS1993

这个应该就是密码!

try this pass1993

那么用户名呢??

查看图片发现这个人是Slackware的开发者!

那么猜测,用户名可能是:

Patrick
patrick
Volkerding
volkerding
Patrick_Volkerding
Patrick_volkerding
patrick_Volkerding
patrick_volkerding
Slackware
slackware
Slack
slack


hydra
┌──(root㉿0x00)-[~/HackMyVM]
└─# cat username      
Patrick
patrick
Volkerding
volkerding
Patrick_Volkerding
Patrick_volkerding
patrick_Volkerding
patrick_volkerding
Slackware
slackware
Slack
slack

哈哈哈,猜对了!

ssh连接
┌──(root㉿0x00)-[~/HackMyVM]
└─# ssh patrick@192.168.9.160 -p 1
(patrick@192.168.9.160) Password: 
Last login: Sun Apr 28 06:18:07 2024 from 192.168.9.150
Linux 5.15.145.
patrick@slackware:~$ id
uid=1000(patrick) gid=1000(patrick) groups=1000(patrick),1001(kretinga)
patrick@slackware:~$ 


提权

系统信息收集

这么多用户啊??

ls -alR .

patrick@slackware:/home/claor$ sudo -l

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

For security reasons, the password you type will not be visible.

Password: 
Sorry, user patrick may not run sudo on slackware.
patrick@slackware:/home/claor$ 

patrick用户没有sudo权限!我们查看另外几个用户!

经过测试,我发现这kretinga、claor两个用户也没有sudo -l权限!

继续信息收集!
patrick@slackware:/home/claor$ find / -perm -u=s -type f 2>/dev/null
/bin/su
/bin/ping
/bin/mount
/bin/umount
/bin/ntfs-3g
/bin/fusermount
/usr/bin/at
/usr/bin/cu
/usr/bin/ksu
/usr/bin/rcp
/usr/bin/rsh
/usr/bin/uux
/usr/bin/chfn
/usr/bin/chsh
/usr/bin/newuidmap
/usr/bin/sudo
/usr/bin/uucp
/usr/bin/crontab
/usr/bin/chage
/usr/bin/afppasswd
/usr/bin/fusermount3
/usr/bin/fdmount
/usr/bin/expiry
/usr/bin/newgrp
/usr/bin/passwd
/usr/bin/gpasswd
/usr/bin/pkexec
/usr/bin/rlogin
/usr/bin/uuname
/usr/bin/uustat
/usr/bin/procmail
/usr/bin/newgidmap
/usr/lib/polkit-1/polkit-agent-helper-1
/usr/sbin/uuxqt
/usr/sbin/uucico
/usr/libexec/lxc/lxc-user-nic
/usr/libexec/dbus-daemon-launch-helper
/usr/libexec/ssh-keysign
/sbin/unix_chkpwd
/sbin/mount.nfs

找了一圈并没有发现可疑信息!

直到我看到了这个....

id=1000是当前用户,id=1001是下一个用户!

果然,我们需要一直重复这个动作!

一直重复这个动作,直到找到user.txt为止!

累死我了,一直找到第43个用户才找到user.txt!

rpj7@slackware:~$ cat user.txt 
HMV{Th1s1s1Us3rFlag}                                                           
                                                                               
                                                                    
                                                                          
                                                                         
                                                                 
                         
rpj7@slackware:~$ echo -n "HMV{Th1s1s1Us3rFlag}" | base64
SE1We1RoMXMxczFVczNyRmxhZ30=

rpj7@slackware:~$ cat user.txt | base64
SE1We1RoMXMxczFVczNyRmxhZ30JICAgICAJICAgICAgCSAJICAgCSAgICAgCSAgICAgICAJICAg
ICAgIAogICAgCSAgICAgIAkJICAgIAkgICAgICAgCQkJIAkgICAJICAgICAgIAogICAgICAgCSAJ
ICAgICAJICAgICAgIAkgICAgICAJICAgIAkgICAgICAJICAgICAJICAgIAoJICAgICAJICAgIAkg
CSAgICAJICAgICAJICAgICAgCSAgICAgICAJICAgCSAgCiAgICAgCSAgIAkgICAJICAgICAJICAg
ICAJICAgCSAJCSAgICAgIAkgCiAgICAgCSAgICAgICAJICAgICAgIAkgICAgCSAgICAgIAkgICAg
CSAgICAgCSAgCSAKCSAgICAgICAJICAgICAJIAo=


我发现这个user.txt并不是简单的text文件!我们下载到本地分析!


get root
我们使用stegsnow工具把隐藏内容提取出来!

┌──(root㉿0x00)-[~/HackMyVM]
└─# stegsnow user.txt 
+��/嚠�                                                                                                                                                                                                                                            
┌──(root㉿0x00)-[~/HackMyVM]
└─# stegsnow -C user.txt
To_Jest_Bardzo_Trudne_Haslo  

尝试登录root用户

patrick@slackware:~$ su root
Password: 
root@slackware:/home/patrick# 

root@slackware:~# ls
roo00oot.txt
root@slackware:~# cat roo00oot.txt 
There is no root flag here, but it is somewhere in the /home directory.

好家伙,都要结束了都不给我flag!自己找吧!
root@slackware:~# grep  -Pnir 'HMV' /home
/home/rpj7/user.txt:1:HMV{Th1s1s1Us3rFlag}                                                             
/home/0xh3rshel/.screenrc:19:# Here is a flag for root: HMV{SlackwareStillAlive}


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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

Linux提权--SUID提权内核漏洞本地用户提权

免责声明:本文仅做技术交流与学习,请不要乱搞破坏... 目录 SUID提权 漏洞成因 提权过程: 手工命令探针: 参考利用: 脚本探针: LinEnum.sh traitor linuxprivchecker等等... Linux命令的利用: find命令 利用nc反弹 利用python反弹--棱角 内核漏洞本地用…

鲲鹏华为云--OBS

文章目录 1.创建桶2.上传对象3.下载对象4.分享对象5. 删除对象6.删除桶 1.创建桶 创建桶 2.上传对象 点击创建的桶–“上传对象” 拖拽本地文件或文件夹至“上传对象”区域框内添加待上传的文件。 也可以通过单击“上传对象”区域框内的“添加文件”,选择本地…

智慧校园建设新取向与新规范

通过对智慧校园建设与应用的相关文献进行研究以及对已发布的智慧校园建设规范标准进行内容分析,智慧校园建设呈现出新的价值取向和规范。 落实立德树人根本任务 党的十九大报告中指出,“要全面贯彻党的教育方针,落实立德树人根本任务&#xf…

二叉树的遍历算法

目录 1.二叉树结构 2.广度优先搜索二叉树(迭代算法) 3.深度优先搜索二叉树(递归算法) 1.二叉树结构 一个父结点,至多可以连接左右两个子节点 Java构造树结构——其实是 自定义树结点类型 public class TreeNode {in…

【笔记1】从零开始做一个男头的流程(超级详细)

目录 大体 眼窝 鼻子 脖子 耳朵 嘴巴1 颧骨 嘴巴2 眼睛 头 开始细化 大体 眼窝 嘴巴 鼻子 大体 注意!!先整体后局部,一开始不要加太多的线,尽量先用最少的线调整出一个大体的结构。 1.准备好参考图,在…

新一代大数据平台,为什么选择中国移动梧桐数据库?

个人介绍:艺名司镜233,是中国移动梧桐数据库研发团队成员,从事相关的技术开发近5年了。最让我觉得自豪的不是在研发这款数据库,而是我们用代码,切实地帮助企业解决数据的困扰,切实地解决社会的问题。 本篇文…

MySQL Binlog 闪回与分析

文章目录 前言1. 修改 event 实现闪回1.1 binlog 结构1.2 闪回案例1.3 方法总结 2. 解析文本闪回2.1 mysqlbinlog2.2 闪回案例2.3 方法总结 3. 在线订阅闪回3.1 mysql-replication3.2 binlog2sql3.3 方法总结 4. Binlog 分析方法4.1 分析场景4.2 辅助定位事务4.3 方法总结 5. 平…

二维码门楼牌管理应用平台:智慧城市的新引擎

文章目录 前言一、数据管理:打造智慧城市的数据基石二、数据应用:推动城市管理的智能化升级三、展望未来:构建更加智慧的城市管理体系 前言 随着城市化的快速推进,城市管理面临着前所未有的挑战。二维码门楼牌管理应用平台作为一…

【SpringBoot】Spring Boot自动配置概览

目录 背景自动装配/自动配置springboot是如何实现自动配置的核心注解AutoConfigurationImportSelector 类的继承体系Spring Boot 提供的条件注解示例注意版本 背景 没有 Spring Boot 的情况下,我们引入第三方依赖之后,需要手动配置。 比如需要手动将引入…

基于Android Studio 制作仿微信APP界面完成在线聊天发布朋友圈等功能

🍅文章末尾有获取完整项目源码方式🍅 目录 一、引言 二、视频效果 三、前期准备 四、详细设计与实现 1.启动页 2.登陆注册页 3.登录页 4.注册页 5.首页 6.聊天页面 7.通讯录页面 8.发现页面 9.我的页面 10. 个人信息页面 11.修改昵…

Spring Boot | Spring Security ( SpringBoot安全管理 )、Spring Security中 的 “自定义用户认证“

目录 : Spring Boot 安全管理 :一、Spring Security 介绍二、Spring Security 快速入门2.1 基础环境搭建 :① 创建Spring Boot 项目② 创建 html资源文件③ 编写Web控制层 2.2 开启安全管理效果测试 :④ 添加 spring-boot-starter-security 启动器⑤ 项目启动测试 三…

Dockerfile部署LNMP

目录 一、项目模拟 1. 项目环境 2. 服务器环境 3. 任务需求 二、Linux系统基础镜像 三、Nginx 1. 建立工作目录 2. 编写Dockerfile脚本 3. 准备nginx.conf配置文件 4. 生成镜像 5. 创建自定义网络 6. 启动镜像容器 7. 验证nginx 四、Mysql 1. 建立工作目录 2. …

# 使用 spring boot 时,@Autowired 注解 自动装配注入时,变量报红解决方法:

使用 spring boot 时,Autowired 注解 自动装配注入时,变量报红解决方法: 1、使用 Resource 代替 Autowired 注解,根据类型注入改为根据名称注入(建议)。 2、在 XXXMapper 上添加 Repository 注解&#xff0…

(2024,一致性模型,强化学习,MDP,DDPO)一致性模型的强化学习:更快的奖励引导文本到图像生成

RL for Consistency Models: Faster Reward Guided Text-to-Image Generation 公和众和号:EDPJ(进 Q 交流群:922230617 或加 VX:CV_EDPJ 进 V 交流群) 部分图像上传缓慢,可看原论文或在 EDPJ 查看 目录 …

2024/4/29 英语每日一段

Many have turned to cheaper, hand-rolled tobacco instead of normal cigarettes, with young women telling The Times that the habit was a social way to get rid of “anxious energy”. The news comes as the government voted on Tuesday to phase out smoking in Br…

RCE复习(ctfhub下)

先了解一下命令注入的知识点: 知识点 1、常见的拼接符 A ; B 先执行A,再执行BA & B 简单的拼接A | B 显示B的执行结果A&&B A执行成功之后才会执行BA || B A执行失败之后才会执行B , 在特殊情况下可代替空格…

pytorch 实现语义分割 PSPNet

语意分割是指一张图片上包含多个物体,通过语义分割可以识别物体分类、物体名称、像素识别的任务。和物体检测不同,他不会将物体框出来,而是根据像素的归属把物体标注出来。PSPNet 的输入是一张图片,例如300500,那么输出…

Redis基本數據結構 ― List

Redis基本數據結構 ― List 介紹常用命令範例1. 將元素推入List中2. 取得List內容3. 彈出元素 介紹 Redis中的List結構是一個雙向鏈表。 LPUSH LPOP StackLPUSH RPOP QueueLPUSH BRPOP Queue(消息隊列) 常用命令 命令功能LPUSH將元素推入列表左端RPUSH將元素推入列表右…

特别推荐一个学习开发编程的网站

http://www.somecore.cn/ 为开发人员提供一系列好看的技术备忘单,方便开发过程中速查基本语法、快捷键、命令,节省查找时间,提高开发效率。 【人生苦短,抓住重点】

Java 面向对象—重载和重写/覆盖(面试)

重载和重写/覆盖: 重载(overload): Java重载是发生在本类中的,允许同一个类中,有多个同名方法存在,方法名可以相同,方法参数的个数和类型不同,即要求形参列表不一致。重载…
最新文章