Metasploitable2

信息收集

  1. 获取ip

    知道网段就直接获取存活的ip

    image-20240619155008781

    ip: 192.168.79.189

  2. 端口信息获取

    image-20240619170553805

21

弱口令

直接尝试使用msf 进行扫描

image-20240619160041307

匿名登录

  1. nc

    1
    2
    3
    nc 192.168.79.189 21
    USER anonymous
    PASS

    image-20240619161106776

  2. ftp 指令

    image-20240619161342257

    image-20240619161503734

笑脸漏洞后门

发现 vsftpd 的版本是2.3.4 存在笑脸漏洞后门

image-20240619165939107

成功执行

尝试进一步利用

  1. 生成一个payload

    image-20240619170924834

  2. 开启一个python 服务

    image-20240619171127127

  3. 开启一个监听

    image-20240619171112547

  4. 使用wget 下载

    image-20240619171350772

  5. 使用curl 下载

    image-20240619171446895

  6. 给权限,运行

    image-20240619171553063

  7. 换成86位

    image-20240619171650981

  8. 问题

    遇到了莫名其妙的问题,导致无法rever

  9. 尝试bind

22

NFS共享目录配置漏洞

  1. 检查nfs 是否开启

    image-20240624000244045

  2. 创建一个目录用于挂载root 的根目录

    image-20240624000442884

    挂载成功

  3. 覆盖公钥

  4. 由于ssh 版本不一致导致

23

telnet 服务尝试弱口令

msfadmin:msfadmin

25

image-20240623234928924

仅仅是连上了,可以尝试邮件伪造

邮件伪造的方式还可以是spf

80

image-20240623235203879

目录扫描

image-20240624001753020

发现了一个phpinfo 目录

漏洞扫描

image-20240624002219238

php-cgi-cve-2012-1823-rce

image-20240624002333147

image-20240624002427939

直接就出了

twiki

服务端任意文件读取:

http://192.168.79.189/bin/viewfile/TWiki/TWikiDocGraphics?rev=1;filename=../../../../../etc/passwd

image-20240624110028963

不存在该漏洞

139/445

exploit/multi/samba/usermap_script

尝试失败

512/513/514

一个类似于ssh 可以用于远程登录的协议 rlogin

尝试使用弱密码进行登录

image-20240624110530861

1099/1090

rmi 就是java remote Method Invocation 远程方法调用

原理就是一个jvm 可以调用其他jvm 的方法

image-20240624161303732

1524

Ingreslock后门漏洞

因为许多的攻击脚本需要安装一个后门的shell 于这个端口

image-20240624161641536

直接连接

2049

也是nfs 一个端口

2121

image-20240624163553629

3306

mysql

弱口令

3632

distcc_exec 漏洞

5432

postgresql 尝试弱密码

image-20240625001357561

默认的密码字典,一下跑出来了

5900

vnc

先尝试弱口令

image-20240625001555224

6000

x11

6667/6697

irc

image-20240627161936678

反正就是使用这个模块攻击就行了

我这里没有成功复现

8009

tomcat 幽灵猫漏洞

image-20240627164416082

成功实现了任意文件读取的操作

8180

弱口令

image-20240627165139503

image-20240627165234953

部署war 包

8787

Distributed Ruby

这个端口是ruby 的一个分布式系统使用的端口

针对于这个,可以使用nmap 进行详细的版本获取

image-20240627171853079

image-20240627171921906

使用-p 查看详细的信息

image-20240627172043580


Metasploitable2
https://tsy244.github.io/2024/06/19/靶场记录/Metasploitable2/
Author
August Rosenberg
Posted on
June 19, 2024
Licensed under