Eloquia
Executive summary — Eloquia is an Insane Windows box with a sophisticated web+AD chain. A custom OAuth 2.0 IdP (
qooqle.htb) without astateparameter allows an account-linking CSRF: a Flask server mints a fresh code and a<meta refresh>in an article redirects the admin bot to the callback, taking over its account. With the Django panel (SQL Explorer) we abuse SQLite'sload_extension()to load a reverse-shell DLL (AppLocker bypass) aseloquia\web(user flag). Another SQLite DLL calls CryptUnprotectData (DPAPI) to pull Edge's master key and decrypt saved credentials offline →Olivia.KATover WinRM. Finally, the Failure2Ban service (LocalSystem) has a binary writable by Olivia: replacing it runs as SYSTEM on restart. Path: OAuth CSRF → SQLite RCE → DPAPI → Olivia → Failure2Ban → SYSTEM.
| Platform | Hack The Box |
| Operating system | Windows Server 2019 (IIS 10.0, WinRM, AppLocker enabled) |
| Difficulty | Insane |
| Status | Retired |
| Target IP | <TARGET_IP> |
| Stack | Django 3.2.18 · SQLite · AngularJS · custom OAuth 2.0 |
| vhosts | eloquia.htb (Django CRM + SQL Explorer) · qooqle.htb (OAuth IdP) |
Attack map
[1] Recon -- IIS(80) + WinRM(5985); vhosts eloquia.htb (Django+SQL Explorer) / qooqle.htb (OAuth IdP)
|
[2] OAuth CSRF -- falta el parametro state -> account-linking CSRF
Flask genera code fresco + <meta refresh> en articulo -> admin bot -> callback
+-> takeover de admin -> panel Django + SQL Explorer
|
[3] RCE -- SQL Explorer -> SQLite load_extension() carga DLL reverse shell (bypassea AppLocker)
+-> eloquia\web -> user.txt
|
[4] Lateral -- DLL SQLite con CryptUnprotectData -> DPAPI master key de Edge ->
descifrar AES-256-GCM de Login Data -> Olivia.KAT
+-> evil-winrm -> Olivia.KAT
|
[5] Root -- servicio Failure2Ban (LocalSystem) con binario ESCRIBIBLE por Olivia ->
sustituir binario + loop de overwrite -> reinicio -> SYSTEM -> root.txt
1. Reconnaissance
nmap -sC -sV -Pn <TARGET_IP>
echo "<TARGET_IP> eloquia.htb qooqle.htb" | sudo tee -a /etc/hosts
80/tcp open http IIS 10.0 (Django CRM / Qooqle OAuth IdP)
5985/tcp open http WinRM
eloquia.htb turns out to be Django 3.2.18 (an article-driven CRM) with an SQL Explorer plugin installed — high-value surface, since it lets you run raw SQL from the panel. qooqle.htb is a custom OAuth 2.0 IdP acting as SSO between both sites.
SQLite itself has
load_extension()enabled, already an RCE vector on its own if you can execute SQL. AngularJS ships a CSP ofdefault-src 'self'that restricts loading external resources, but not navigation — a detail that becomes key in phase 2.
Root Access unlocks the content you can't see — everything else on the site is already open.
See Root Access plansNo account? Create one free then upgrade from your console.