<?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 Elmurimi on Medium]]></title>
        <description><![CDATA[Stories by Elmurimi on Medium]]></description>
        <link>https://medium.com/@elmurimi?source=rss-3cc7463b057d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*dIPRS9PaS_xGCfeR</url>
            <title>Stories by Elmurimi on Medium</title>
            <link>https://medium.com/@elmurimi?source=rss-3cc7463b057d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 17:25:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@elmurimi/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[Free Virtual Private Server for Ethical Hacking: GitHub CodeSpaces]]></title>
            <link>https://medium.com/@elmurimi/free-virtual-private-server-for-ethical-hacking-github-codespaces-e423f001a79b?source=rss-3cc7463b057d------2</link>
            <guid isPermaLink="false">https://medium.com/p/e423f001a79b</guid>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[vps-hosting]]></category>
            <category><![CDATA[vps]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[ssh]]></category>
            <dc:creator><![CDATA[Elmurimi]]></dc:creator>
            <pubDate>Sun, 11 May 2025 16:48:16 GMT</pubDate>
            <atom:updated>2025-05-11T17:01:42.305Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://medium.com/@elmurimi/free-virtual-private-server-for-ethical-hacking-github-codespaces-e423f001a79b?source=friends_link&amp;sk=ebedaf8df78611a5b1e9b0567683dbfa"><strong>FREE LINK</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Mv059UtWjwPPp-KQ" /><figcaption>Photo by <a href="https://unsplash.com/@stefangall?utm_source=medium&amp;utm_medium=referral">Stefan Gall</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>Summary:</strong><br>With <a href="https://docs.github.com/en/codespaces/about-codespaces/what-are-codespaces">GitHub Codespaces</a>, you can spin up a free, cloud-based “VPS” loaded with Kali tooling, accessible via your local Parrot OS terminal, and hide your home IP behind GitHub’s dynamic addresses. Although it is not marketed as a VPS, a <a href="https://github.com/features/codespaces">codespace </a>can be used as a VPS. In this guide, you’ll walk away with actionable knowledge covering folder structures, Docker files, batch scripting, dynamic IP, and SSH access.</p><h3>Why GitHub Codespaces Rocks for Ethical Hackers</h3><ul><li><strong>Free compute &amp; storage</strong>: Every personal GitHub Free account gets <strong>120 core-hours</strong> (or 60 hours on a 2-core machine) and <strong>15 GB</strong> of storage per month — enough to run dozens of scans without paying a cent. These limits are higher for GitHub Pro accounts. You can get free Pro using GitHub for Students.</li><li><strong>Dynamic IP anonymity</strong>: Your scans (e.g., Nuclei, Subfinder, Gobuster) originate from GitHub’s IP, not yours — great for privacy and avoiding getting blacklisted by websites, firewalls, and your Internet Service Provider.</li><li><strong>Any-where hacking</strong>: Fire up your lab in seconds from any device — no more “it works on my machine” excuses. This is great even for CTFs.</li><li><strong>Faster scans: </strong>If your current hardware is an issue e.g. speed/space, then the codespace will provide you with a fast environment to run heavy tools.</li></ul><h3>How It All Fits Together</h3><p>Below is the <strong>folder structure</strong> you’ll create in your repo. This keeps everything neat and versioned:</p><pre>/<br>├── .devcontainer/    # Codespaces config<br>│   ├── devcontainer.json<br>│   └── Dockerfile<br>├── scripts/          # scan.sh (automation script)<br>├── configs/          # custom tool configs (e.g., Nuclei templates)<br>├── wordlists/        # SecLists, rockyou.txt, etc.<br>└── outputs/          # timestamped scan results</pre><h3>Step 1: Dockerfile for Your Kali-Based Lab</h3><p>Create .devcontainer/Dockerfile:</p><pre>#BASE IMAGE <br>FROM kalilinux/kali-rolling<br><br>#NON-INTERACTIVE APT DURING INSTALLING PROCESS<br>ENV DEBIAN_FRONTEND=noninteractive<br><br>#UPDATE + INSTALL APT TOOLS. YOU CAN ADD DIFFERENT TOOLS HERE<br>RUN apt update &amp;&amp; apt install -y \<br>    git               \  <br>    curl wget unzip   \<br>    python3 python3-pip \<br>    nmap              \<br>    amass             \<br>    wfuzz             \<br>    whatweb           &amp;&amp; apt clean<br><br>#INSTALL GO <br>RUN curl -LO https://go.dev/dl/go1.21.1.linux-amd64.tar.gz &amp;&amp; \<br>    tar -C /usr/local -xzf go1.21.1.linux-amd64.tar.gz &amp;&amp; \<br>    rm go1.21.1.linux-amd64.tar.gz<br><br>ENV PATH=&quot;/usr/local/go/bin:$PATH&quot;<br><br>#INSTALL GO-BASED PENTEST TOOLS. YOU CAN ADD DIFFERENT TOOLS HERE<br>RUN go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest \<br>    &amp;&amp; mv $HOME/go/bin/subfinder /usr/local/bin/ \<br>    &amp;&amp; go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest \<br>    &amp;&amp; mv $HOME/go/bin/httpx /usr/local/bin/ \<br>    &amp;&amp; go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest \<br>    &amp;&amp; mv $HOME/go/bin/nuclei /usr/local/bin/ \<br>    &amp;&amp; go install -v github.com/OJ/gobuster/v3@latest \<br>    &amp;&amp; mv $HOME/go/bin/gobuster /usr/local/bin/<br><br>#USER ALIASES &amp; SHELL SETUP <br>RUN echo &#39;alias ll=&quot;ls -la&quot;&#39; &gt;&gt; /root/.bashrc</pre><p>This file rebuilds automatically in Codespaces, giving you tools in /usr/local/bin without runtime installs.</p><h3>Step 2: devcontainer.json to Auto-Provision</h3><p>Create .devcontainer/devcontainer.json:</p><pre>{<br>  &quot;name&quot;: &quot;Hacking VPS&quot;,<br>  &quot;build&quot;: { &quot;dockerfile&quot;: &quot;Dockerfile&quot; },<br>  &quot;postCreateCommand&quot;: &quot;mkdir -p scripts configs wordlists outputs&quot;,<br>  &quot;customizations&quot;: {<br>    &quot;vscode&quot;: {<br>      &quot;extensions&quot;: [&quot;ms-azuretools.vscode-docker&quot;],<br>      &quot;settings&quot;: {<br>        &quot;terminal.integrated.defaultProfile.linux&quot;: &quot;bash&quot;<br>      }<br>    }<br>  },<br>  &quot;remoteUser&quot;: &quot;root&quot;<br>}</pre><p>The postCreateCommand uses mkdir -p so <strong>existing folders and scan results stay safe </strong>when you stop or restart the codespace. It means that the command will not create new folders during the build if they already exist.</p><h3>Step 3: Automation with scan.sh</h3><p>Place scripts/scan.sh with features: single-domain, batch mode, timestamped results;</p><pre>#!/bin/bash<br># This example script automates running subfinder, httpx, and nuclei tools on a target domain or list of domains.<br># It supports running each tool individually or chaining them together in a workflow.<br><br># Usage: ./script.sh &lt;domain|file&gt; &lt;subfinder|httpx|nuclei|chain&gt;<br><br>INPUT=$1    # First argument: domain name or path to file containing domains<br>MODE=$2     # Second argument: mode of operation (which tool or chain to run)<br>TIMESTAMP=$(date +&quot;%Y%m%d_%H%M%S&quot;)  # Current timestamp for unique output directory naming<br><br># Check if both INPUT and MODE are provided<br>if [[ -z $INPUT || -z $MODE ]]; then<br>  echo &quot;Usage: $0 &lt;domain|file&gt; &lt;subfinder|httpx|nuclei|chain&gt;&quot;<br>  exit 1<br>fi<br><br># Check if INPUT is a file (batch mode)<br>if [[ -f $INPUT ]]; then<br>  # Read each line (domain) from the file and recursively call this script on each domain<br>  while IFS= read -r domain; do<br>    # Only process non-empty lines<br>    [[ $domain ]] &amp;&amp; bash &quot;$0&quot; &quot;$domain&quot; &quot;$MODE&quot;<br>  done &lt; &quot;$INPUT&quot;<br>  exit 0<br>fi<br><br># If not batch mode, treat INPUT as a single domain<br>TARGET=$INPUT<br>OUT=&quot;outputs/$TARGET/$TIMESTAMP&quot;   # Define output directory path for this run<br>mkdir -p &quot;$OUT&quot;                    # Create output directory (including parent directories if needed)<br><br>echo &quot;[*] $MODE on $TARGET → $OUT&quot;  # Informational message about current operation<br><br># Select operation based on MODE argument<br>case $MODE in<br><br>  # Run subfinder to discover subdomains of TARGET<br>  subfinder)<br>    subfinder -d &quot;$TARGET&quot; -silent -o &quot;$OUT/subs.txt&quot;<br>    ;;<br><br>  # Run httpx to probe discovered subdomains for live HTTP services<br>  httpx)<br>    # Find the most recent subs.txt file for the target domain<br>    L=$(find outputs/$TARGET -name subs.txt | sort | tail -1)<br>    # Check if subs.txt file exists<br>    if [[ -f $L ]]; then<br>      httpx -l &quot;$L&quot; -silent -o &quot;$OUT/httpx.txt&quot;<br>    else<br>      echo &quot;Run subfinder first&quot;<br>      exit 1<br>    fi<br>    ;;<br><br>  # Run nuclei vulnerability scanner on live hosts found by httpx<br>  nuclei)<br>    # Find the most recent httpx.txt file for the target domain<br>    L=$(find outputs/$TARGET -name httpx.txt | sort | tail -1)<br>    # Check if httpx.txt file exists<br>    if [[ -f $L ]]; then<br>      nuclei -l &quot;$L&quot; -o &quot;$OUT/nuclei.txt&quot;<br>    else<br>      echo &quot;Run httpx first&quot;<br>      exit 1<br>    fi<br>    ;;<br><br>  # Chain mode: run all three tools sequentially on the target domain<br>  chain)<br>    subfinder -d &quot;$TARGET&quot; -silent -o &quot;$OUT/subs.txt&quot;<br>    httpx -l &quot;$OUT/subs.txt&quot; -silent -o &quot;$OUT/httpx.txt&quot;<br>    nuclei -l &quot;$OUT/httpx.txt&quot; -o &quot;$OUT/nuclei.txt&quot;<br>    ;;<br><br>  # Handle invalid mode argument<br>  *)<br>    echo &quot;Invalid mode&quot;<br>    exit 1<br>    ;;<br>esac<br><br>echo &quot;[✔] Done!&quot;   # Indicate completion of the operation</pre><p>This script preserves <strong>every</strong> prior run in its own timestamped folder, and every domain gets its own scan results folder. Now you have your results arranged nicely for every scan.</p><p>You can now run your script straight from the Codespace terminal by first making it executable and then passing a domain or list of domains. For example;</p><pre>chmod +x scan.sh<br>./scan.sh example.com chain  # to try the chain method on a single domain<br>./scan.sh domains.txt subfinder # to find subdomains for a list of domains</pre><p>You will see the scan running in the terminal and an output folder will appear with the results.</p><p>You may have noticed that we did not address the configs and wordlists folders. That is because the contents of these folders are custom to your needs. You can add your configuration files e.g. <strong>nuclei</strong> templates or <strong>waymore</strong> config file and word-lists from popular repositories like <strong>Seclists</strong>. These can then be passed as arguments when writing your commands.</p><p>If you are not used to the Codespace terminal or prefer working from your local terminal, let me sort you out.</p><h3>Step 4: SSH from Parrot OS terminal (can be any OS)</h3><p>The steps below are for Parrot OS. Please search the GitHub documentation for steps meant for your chosen OS. You can learn more about setting up SSH into GitHub <a href="https://docs.github.com/en/enterprise-cloud@latest/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent">here.</a></p><ol><li><strong>Install GitHub CLI</strong>:</li></ol><pre>sudo apt update &amp;&amp; sudo apt install gh<br>gh auth login    #prefer to use ssh for credentials not username/password</pre><p>2<strong>. List and ssh into your Codespace:</strong></p><pre>gh codespace list   #follow the given prompt to authorize SSH for codespaces<br>gh codespace ssh --codespace NAME  #also automatically starts the codespace if shutdown</pre><p>Now you are in an ssh shell in your Kali VM that is running on the Codespace. You can run your commands here depending on your hosted scripts and tools.</p><p>You may see connection errors related to Live Server timeouts. Stop and start the codespace again and make sure to have the latest GitHub CLI installation. Also check your internet speed and firewall rules, if any.</p><h3><strong>Conclusion</strong></h3><p><strong>There you have it</strong> — a free and fun GitHub Codespaces “VPS” for your ethical hacking lab. Create your repo, follow the steps, and you’ll be pentesting from the cloud while protecting your home IP and your pocket.</p><p>Feel free to customize the folders/tools/scripts, share with your hacking buddies, and leave comments of your thoughts or any questions.</p><p>Thank you for reading.</p><p>⚠️ <strong>Disclaimer</strong><br> This article is intended <strong>strictly for educational purposes</strong> and to promote <strong>ethical hacking</strong> practices. All techniques and tools demonstrated here should only be used in <strong>legal environments</strong> — such as your own systems or systems you have <strong>explicit permission</strong> to test (e.g., through bug bounty platforms or authorized lab environments).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e423f001a79b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>