Disassembly of ippsec’s youtube video HackTheBox - Arctic. Focus on Windows and basic enumeration, intercepting an application communications via burp. Shell creation with Unicorn and powershell usage along with windows enumeration.
Legal Usage: The information provided by execute@will is to be used for educational purposes only. The website creator and/or editor is in no way responsible for any misuse of the information provided. All the information on this website is meant to help the reader develop penetration testing and vulnerability aptitude to prevent attacks discussed. In no way should you use the information to cause any kind of damage directly or indirectly. Information provided by this website is to be regarded from an “ethical hacker” standpoint. Only preform testing on systems you OWN and/or have expressed written permission. Use information at your own risk.
By continued reading, you acknowledge the aforementioned user risks/responsibilities.
This series of write-up will contain comprehensive write-ups of hackthebox machines. In an effort to sharpen reporting techniques and help solidify the understand and methodologies used during penetration testing.
Port 135 = Windows RPC Port 8500 = doesn’t know what it is Port 49154 = Windows RPC
page takes a significant amount of time to load possibly why the name Arctic.
an “administrator” page is found.
if page loads correct should say Cold Fusion 8
we have results pointing to the version 8.x.x but are cross site scripting. But there is
which is a metasploit file upload, a possible way to get a foothold into the box.
exploit/windows/http/coldfusion_fckeditor looks like the same exploit from the searchsploit.
almost immediately fails due to the response time that needs to be adjusted in metasploit.
Modify advanced options
hoping to see a POST request and a server response.
If the module doesn’t support a proxy script we can push the module/communications to burp:
setup burp to intercept application
proxy tab > options > add proxy listeners
bind to 8500
tick box for running:
go to web browser
every time we connect to 8500 we get redirected to 10.10.10.11:8500
Turn intercept on:
and at this point we are now redirecting through burp (forward first request) then:
see the request metasploit is trying to make. Next send to repeater and send:
how this exploit works is that the Post request is sent to CurrentFolder and a .jsp file is added but with a %00 null byte at the end which confuses the web-server and allows for the file to upload.
Finished 200 response:
Futhermore, the script is going to try to open a connection to our local box on port 4444 thus we need to have a listener setup to catch the connection.
navigate to the k.jsp page
wait the 20-30s for the connection to establish.
Reverse Shell - RCE
a connection is established via the K.jsp file to port 4444:
this is just a reverse shell and we need to upgrade it.
unicorn to upgrade shell
Github Link: https://github.com/trustedsec/unicorn
output’s two files when it’s done.
First file: unicorn.rc - all commands to load unicorn in metasploit Second file: powershell_attack.txt = unicorn powershell exploit
command is very long but can return a shell. Sending this all through one terminal might not be the best call the better option would be to have the file sent to target.
load metasploit w/ unicorn command
create powershell_attack to html
create a new file with a pasted clipboad of the exploit and named it
delete the double quote in the beginning and the end of the powershell script to have a pure version of it. Now we have a script that has been obfuscated to evade antivirus.
setup local SimpleHTTPServer
On target shell:
box hits the web-server:
firstly, check the sysinfo to see architecture and the meterpreter session is in a 32bit session.
search suggest - checks KBs on box and recommended exploits
first ran in a 32bit bit process and then migrate to a x64 as different exploits become available. Run PowerUp.ps1 if nothing returns. (results)
save results as a copy locally.
migrate to 64bit
Looking for a process with an x64 and a 1 as that means its interactive and there is more leverage on the things it has the ability to do. None in this case.
migrate to conhost:
Run “sysinfo” to verify were on a x64 process:
confirmed x64, background with ctrl+z show options # check for suggester run
returns only one that appears to be vulnerable. Save to notes
ms10_092_schelevator reported on both architectures. Which should be a stong first to try.
in this scenairo it actually used a local 172. IP which was not intendted as so the set LHOST 10.10.12.194 was sent again and ran.
session 2 was successfully opened
Achieved NT AUTHORITY\SYSTEM
If you don’t know who ippsec is check him out at:
Youtube: https://www.youtube.com/channel/UCa6eh7gCkpPo5XXUDfygQQA Twitter: https://twitter.com/ippsec