TheFrizz

Recon

nmap_scan.log

HTTP (80)

frizz.htb redirects to frizzdc.frizz.htb which is just a landing page website.

Writeup.png

Gibbon LMS

/Gibbon-LMS/ is serving Staff Login panel.

Writeup-1.png

LFI

Gibbon v25.0.0 is vulnerable to a Local File Inclusionarrow-up-right - CVE-2023-34598arrow-up-right

Test: http://frizzdc.frizz.htb/Gibbon-LMS/?q=gibbon.sqlarrow-up-right

Writeup-2.png

Download files

Nothing in the database..

Except maybe potential username format used in DC?

Writeup-3.png

We basically have access to all files from repository: https://github.com/GibbonEdu/core/tree/v25.0.00arrow-up-right

.. is blocked, so no LFI outside application.

https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=Gibbonarrow-up-right

Arbitrary File Write

CVE-2023-45878arrow-up-right: GibbonEdu Gibbon version 25.0.1 and before allows Arbitrary File Write because rubrics_visualise_saveAjax.phps does not require authentication. The endpoint accepts the img, path, and gibbonPersonID parameters. The img parameter is expected to be a base64 encoded image. If the path parameter is set, the defined path is used as the destination folder, concatenated with the absolute path of the installation directory. The content of the img parameter is base64 decoded and written to the defined file path. This allows creation of PHP files that permit Remote Code Execution (unauthenticated).

https://github.com/advisories/GHSA-r526-pvv3-w6p8arrow-up-right -> https://herolab.usd.de/security-advisories/usd-2023-0025/arrow-up-right

File exists

Use PoC to upload a shell

Test uploaded shell

HTB cronjob deletes the web shell so it's better to upload reverse shell.

Note: Make sure you have a listener and webserver up and running.

Reverse Shell (w.webservice)

Get application config

Interestingly access to /Users is disabled, and mysql binary doesn't seem to exist on system.

Correction, mysql exists but it's not included in PATH

Creds: f.frizzle:Jenni_Luvs_Magic23

HTTP (80) (Authenticated)

Credentials work for Gibbon, but there's nothing too interesting

Writeup-4.png

Hmm... something about migrations

Writeup-5.png

SMB

STATUS_NOT_SUPPORTED usually means Kerberos is required to authenticate in DC.

Fix clock skew and login

netexec winrm was failing to login 🤔

WinRM (f.frizzle)

Configure kerberos (configure_krb5.pyarrow-up-right)

From the future: TIL NetExec > SMB protocol Enumeration > Generate krb5 conf filearrow-up-right


From the future about SSH -> Weird flex from Windows I guess

Works: faketime -f +7h ssh f.frizzle@frizzdc.frizz.htb Doesn't Work: faketime -f +7h ssh f.frizzle@frizz.htb (No DC)

https://media1.tenor.com/m/X13wwMFZN2YAAAAd/dies-cat.gif

Also note about SSH, if you make yourself admin you no longer can SSH... 😳


User.txt

WinRM (M.SchoolBus)

Enumerate with winpeas

Recycle Bin

Cronjob:

The above file doesn't exist and after waiting for few minutes it doesn't appear so there's no cronjob which does backups or smth.

Using the Shell.Application COM object, $shell.Namespace(0xA) refers to the Recycle Bin.

But there's something else in Recycle Bin

I wasn't able to make impacket-smbserver work, so to download I created simple server which accepts files.

WAPT

Unzip

Project seems to be using https://github.com/tranquilit/WAPTarrow-up-right: WAPT is an established method for managing the lifecycle of an installed base of Windows applications. WAPT has many similarities with Debian's APT software manager, thus its name. WAPT is particularly useful to system administrators who are tired of repetitive and low value tasks.

Not sure what kind of modifications have been made to project, but there's configuration which contains password

Writeup-6.png

It's somewhat password like password ?

Password Reuse

Get other users

Test for password reuse.

Shell

Get data for bloodhound

Writeup-7.png

The owned users don't have any outbound permissions, let's check groups.

Group Policy Creator Ownersarrow-up-right: This group is authorized to create, edit, and delete Group Policy Objects in the domain. By default, the only member of the group is Administrator.

https://www.thehacker.recipes/ad/movement/group-policiesarrow-up-right

Note: Use the version provided in HackerRecipies, because latest PowerView doesn't have this function.

With PowerView nothing was changed or updated...

pyGPOAbusearrow-up-right also kept failing due to connection errors

Still nothing. After going over few things I found https://github.com/3gstudent/Homework-of-Powershell/tree/master?tab=readme-ov-file#new-gpoimmediatetaskps1. New-GPO only creates GPO and never applies to domain itself, hence it was failing since it was never listed in GPO Update.

Root.txt

Bonkers

Instead of becoming admin I wanted to add a highest level administrator with Remote PS ability.

Use base64 to write to file, since text editors don't exist for Windows (?)

Note: For some god damn reason Out-File (or > redirection) use Unicode encoding by default... To avoid extra bytes use ASCII encoding.

Run the script

Login

Last updated