Skip to content

You can get a lifetime of FREE VPS using GitHub Codespaces with Kali Linux Docker image installed on github workspace terminal.

License

Notifications You must be signed in to change notification settings

0xrobiul/github-vps

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 

Repository files navigation

Github-VPS

Facebook X Medium Docker Kali



neofetch

📜 Description

GitHub Codespaces allows developers and hackers to create and utilize their coding environments directly from GitHub in the cloud. As a CTF player or pentester, you can also leverage GitHub Codespaces similarly to a VPS (Virtual Private Server). This makes it easy to work on projects from anywhere with the flexibility of a portable development setup using Docker.

📚 Table of Contents

🔥 What's Nice

  • Offers more power with 2-vCPUs, 8GB-RAM, and a temporary 32GB-SSD storage drive.
  • Higher performance with 4-vCPUs, 16GB-RAM, and a temporary 32GB-SSD storage drive. machine_type

🐳 Installation


starting

# pulling images 
$ docker pull docker.io/kalilinux/kali-rolling

# Option 1: Priviliged mode (recommended for ctf players)
$ docker run --privileged -it kalilinux/kali-rolling /bin/bash

# Option 2: Interactive mode
$ docker run --tty --interactive kalilinux/kali-rolling
 
$ apt update && apt install -y kali-linux-default

$ apt update && apt install -y install kali-linux-headless

Installation without errors

Tip

Refer to default installation Guide

Configuration

Starting Docker Kali Image

# Display
$ docker ps -a

# Rename 
$ docker rename <current_name> <new_name>

# Status details 
$ docker inspect <container id>

# Start 
$ docker start <container id> (e.q) d36922fa21e8

# Attach 
$ docker attach <container id>

# Stop  
$ docker stop <container id>

# Remove
$ docker rm <container id>

Adding non-root user

non-root

$ sudo apt update && sudo apt upgrade -y

# option 1:
$ adduser l0n3m4n

# option 2:
$ useradd -m -s /bin/bash l0n3m4n

# option 1: replace to your username
l0n3m4n ALL=(ALL:ALL) ALL

# option 2: 
$  echo "l0n3m4n ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers/l0n3m4n

# switching to non-root user
$ su - l0n3m4n

# verify
$ whoami

Diskspace Monitoring

# view ram details
$ free

# view disk space 'du'
$ du -h --max-depth=1 /

# view disk space GB
$ df -h

Docker Privileged

Important

The way to use openvpn or enable tun0 you need to add --privileged option instead using --tty by default, Docker containers do not have access to TUN/TAP devices on the host system due to security and isolation concerns.

# options 1:
$ docker run --privileged -it kalilinux/kali-rolling /bin/bash

# Option 2: Use --device Flag (More Secure)
# A more secure approach is to use the --device flag to explicitly map the TUN/TAP device from the host into the container. This approach is more controlled and limits access to only the necessary device.

$ docker run --device=/dev/net/tun:/dev/net/tun -it kalilinux/kali-rolling /bin/bash

# Verify TUN/TAP Functionality Inside the Container
$ ls -l /dev/net/tun

New Terminal Session

Note

Github codespace terminal

$ docker exec -it <container_id> /bin/bash

🚫 Temporarily Disabled

If you've used 100% of the included services for GitHub Codespaces storage, a few things might happen depending on your account settings and actions.

  1. Inability to Use Codespaces: You won't be able to create or use GitHub Codespaces until either your free allotment resets next month or you take action to manage your usage.
  2. Options to Regain Access:
    • Set Up a Spending Limit: You can set up a spending limit on your GitHub account to prevent unexpected charges and manage your usage effectively.
    • Delete Unused Resources: Consider deleting Codespaces or prebuilds that are no longer needed to free up space and potentially reduce future charges.
  3. Access to In-Progress Work: It's important to export any unpushed work to a branch if you want to retain access to your in-progress projects. This ensures you have a backup and can continue working on them when you regain access to Codespaces.
  4. Review Usage and Charges: GitHub provides a usage report where you can see detailed information about your Codespaces and prebuild usage. This can help you understand your usage patterns and manage future usage effectively.

codespace billing

🔄 Changelog

v1.1.0 - [2024-06-29]

  • Adjustment:
    • Adding privileged user mode to enable TUN error when starting the OpenVPN file.

📝 Todo

  • Adding remotehost for graphical user inferface (GUI), this includes xrdp, ssh, noVNC and etc.
  • Adding Automated builds Dockerfile to ensure consistency and reliability.
  • Adding ngrok to exposed your cloud servers behind NATs and firewalls to the public internet over secure tunnels.
  • Adding Openvpn default configuration to ensure privacy and security

👨🏾‍⚖️ License

This project is under terms of the MIT License. bugs and error, create issue

About

You can get a lifetime of FREE VPS using GitHub Codespaces with Kali Linux Docker image installed on github workspace terminal.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published