password
status
date
icon
category
tags
slug
summary
oscp-like 打靶第一台
0x00 信息搜集
nmap 扫描
或者为了节约时间,使用 oscp 常用的自动化扫描工具,不包含利用所以可以在 oscp 考试中使用。
AutoRecon
Tib3rius • Updated Aug 30, 2023
这个靶机不需要啥别的扫描,就先不用 AutoRecon 了。
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F5d277a47-5958-4b5d-bcde-2da59f87cd9f%2FUntitled.png?table=block&id=73344ccd-969e-4615-9f0f-0c625d22391d)
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fe978e3a1-6d65-4fe5-90d2-0a37b994da75%2FUntitled.png?table=block&id=3d395d56-d46f-4f39-94e3-43296db976e4)
两个 rce 漏洞,msf应该可以秒杀,但是因为 oscp 限制 msf 的使用次数,故先不使用 msf。
0x01 路线一:Samba
利用 cve-2007-2447 漏洞
尽量不使用 msf
CVE-2007-2447
amriunix • Updated Aug 16, 2023
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F18b1493b-22cb-43f2-a7c7-f8311f8ced1f%2FUntitled.png?table=block&id=351bb661-31a1-43dc-8148-d2494f25d50c)
msf 的话就是乱杀
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F428b41b1-0887-41c3-9a6e-f5275274273d%2FUntitled.png?table=block&id=2b356e02-1eac-4beb-a14e-b068f2affe31)
0x02 路线二:vsftpd(失败)
vsftpd 2.3.4版本存在后门,通过在用户名中输入
:)
即可触发6200端口,直接连接即可访问后门。但是该靶机无法利用。
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fbbbb2b24-9579-4a01-a28a-4dfafb7bf1f3%2FUntitled.png?table=block&id=d5b27003-aa16-488b-bded-465efd28e360)
又使用 nmap 扫描确认了下,确实没有该漏洞
nmap --script=vuln -p 21 10.10.10.3
0x03 路线三:distccd
使用全端口扫描时能够发现靶机开放了 3632 端口
命令执行,ヾ(✿゚▽゚)ノ
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fb7a167c9-c92c-4e41-9590-d032c8a8b0e2%2FUntitled.png?table=block&id=d41e9caa-b15a-41ca-9a6d-273be597748c)
在 github 找了个 exp
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fa597fb8c-5a5d-4612-aa4e-8619fd4ed147%2FUntitled.png?table=block&id=afade679-ee19-4082-8f18-444ba9173385)
不是 root,得提权了
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fa17cbc17-372f-494c-b851-ea99cd6bbcde%2FUntitled.png?table=block&id=7eaaf450-8391-4d64-9b5c-9a9a760154ef)
有 python 环境,可以考虑用 python 弄个全功能 shell
python-pty-shells
infodox • Updated Aug 7, 2023
传输文件
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F82248d1b-2977-4e68-9979-9f75d83bd6e8%2FUntitled.png?table=block&id=66085cc7-69a3-4c24-baa1-5a870f2ad2cf)
可以补全的全功能 shell,get
可以手动执行命令搜集信息,但我这里使用辅助工具提高效率
LinEnum
rebootuser • Updated Aug 30, 2023
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F928d3643-76ce-49b0-82b8-5c37729c3e99%2FUntitled.png?table=block&id=3df057a8-4423-40d4-acaf-e15e9f60f6ed)
发现 nmap 为 suid file,参考
进行提权,因为是全功能 shell,所以可以使用交互模式进行提权
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F3a630cce-0d27-43ab-a689-897af9c5bff3%2FUntitled.png?table=block&id=9a5ad29f-d4fb-492b-9e44-a322328d79f3)
- 作者:fatekey
- 链接:https://blog.fatekey.icu/article/Lame
- 声明:本文采用 CC BY-NC-SA 4.0 许可协议,转载请注明出处。