https://github.com/AkselAllas/airgapt Skip to content Sign up * Why GitHub? + Features - + Mobile - + Actions - + Codespaces - + Packages - + Security - + Code review - + Issues - + Integrations - + GitHub Sponsors - + Customer stories - * Team * Enterprise * Explore + Explore GitHub - + Learn and contribute + Topics - + Collections - + Trending - + Learning Lab - + Open source guides - + Connect with others + The ReadME Project - + Events - + Community forum - + GitHub Education - + GitHub Stars program - * Marketplace * Pricing + Plans - + Compare plans - + Contact Sales - + Education - [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} AkselAllas / airgapt Public * Notifications * Star 63 * Fork 3 * Automate "airgapped" server proxy with ssh socks proxy MIT License 63 stars 3 forks Star Notifications * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Wiki * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Wiki * Security * Insights master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show Loading {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default Loading View all tags 1 branch 1 tag Code Loading Latest commit @AkselAllas AkselAllas Airgapt allegedly ... 73d2575 Dec 3, 2021 Airgapt allegedly 73d2575 Git stats * 31 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time src Add working long-running docker container Dec 3, 2021 test Added initial working Docker setup Dec 3, 2021 Dockerfile Added initial working Docker setup Dec 3, 2021 LICENSE Added MIT license Dec 3, 2021 README.md Airgapt allegedly Dec 3, 2021 airgapt.sh Add working long-running docker container Dec 3, 2021 runDocker.sh Clean up unnecessary docker ssh port expose Dec 3, 2021 View code Airgapt - "airgapped" apt llly* Usage Docker usage Bash script usage Custom proxy queries Future plans README.md Airgapt - "airgapped" apt ^[llly*] Script for setup of package management Proxy for situations where you can ssh, but target doesn't have an outgoing network connection to public web. Uses local socks5 proxy & ssh remote proxy. After running the script you can also query arbitrary URLs via curl -L --socks5 localhost:6666 google.com drawing ^*NB! If you can proxy connections like this, then your system isn't actually airgapped :) Usage Choose one of these: --) Docker usage via runDocker.sh --) Bash usage via airgapt.sh Docker usage Make sure you have docker installed 0. wget https://raw.githubusercontent.com/AkselAllas/airgapt/master/ runDocker.sh 1. Edit runDocker.sh input variables LOCAL_SOCKS_PORT=44444 LOCAL_USER="kali" #This user must match your LOCAL_SSH_KEY's owner LOCAL_USER_ID=1000 TARGET="example.domain" TARGET_USER="ubuntu" TARGET_FORWARDED_PORT="6666" LOCAL_SSH_KEY_PATH="/home/${LOCAL_USER}/.ssh/id_rsa" REMOTE_SSH_KEY_PATH="/home/${LOCAL_USER}/.ssh/custom_key" 2. Run ./runDocker.sh Bash script usage 0. wget https://raw.githubusercontent.com/AkselAllas/airgapt/master/ airgapt.sh 1. Edit airgapt.sh input variables LOCAL_SOCKS_PORT=44444 LOCAL_USER="kali" TARGET="example.domain" TARGET_USER="ubuntu" TARGET_FORWARDED_PORT="6666" LOCAL_SSH_KEY_PATH="/home/${LOCAL_USER}/.ssh/id_rsa" REMOTE_SSH_KEY_PATH="/home/${LOCAL_USER}/.ssh/custom_key" 2. Run .airgapt.sh Custom proxy queries In your target machine you can use proxy to request arbitrary URLs. For that run curl -L --socks5 localhost:6666 google.com You can also optionally install proxychains on the target server to enable any software to use the forwarded SOCKS proxy It uses a LD_PRELOAD trick to redirect TCP and DNS requests from arbitrary commands into a proxy and is really handy. Setup /etc/proxychains.conf to use the forwarded socks proxy: [ProxyList] # SSH reverse proxy socks5 127.0.0.1 6666 e.g. proxychains yum update Future plans [ ] add yum, pac, pkg detection & proxy setup to ensure_remote_server_has_proxy_config() function About Automate "airgapped" server proxy with ssh socks proxy Resources Readme License MIT License Releases 1 tags Packages 0 No packages published Languages * Shell 98.4% * Dockerfile 1.6% * (c) 2021 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.