{"id":13842310,"url":"https://github.com/eikendev/hackenv","last_synced_at":"2026-02-17T00:03:08.483Z","repository":{"id":41847207,"uuid":"268527183","full_name":"eikendev/hackenv","owner":"eikendev","description":"Manage and access your Kali Linux or Parrot Security VM from the terminal (SSH support + file sharing, especially convenient during CTFs, Hack The Box, etc.) :rocket::wrench:","archived":false,"fork":false,"pushed_at":"2025-02-22T21:45:13.000Z","size":218,"stargazers_count":20,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-19T13:46:25.755Z","etag":null,"topics":["cli","ctf","ctf-scripts","ctf-tools","hacking","hackthebox","kali","kali-linux","kali-setup","kalilinux","libvirt","parrot-sec","parrotsec","penetration-testing","pentest-scripts","pentest-tool","pentest-tools","pentesting","security","security-tools"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eikendev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-06-01T13:16:14.000Z","updated_at":"2025-03-14T08:37:38.000Z","dependencies_parsed_at":"2023-12-22T00:50:29.307Z","dependency_job_id":"b44b2d4f-f459-4e16-83c5-649edae02f8c","html_url":"https://github.com/eikendev/hackenv","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eikendev%2Fhackenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eikendev%2Fhackenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eikendev%2Fhackenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eikendev%2Fhackenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eikendev","download_url":"https://codeload.github.com/eikendev/hackenv/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252752420,"owners_count":21798796,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","ctf","ctf-scripts","ctf-tools","hacking","hackthebox","kali","kali-linux","kali-setup","kalilinux","libvirt","parrot-sec","parrotsec","penetration-testing","pentest-scripts","pentest-tool","pentest-tools","pentesting","security","security-tools"],"created_at":"2024-08-04T17:01:31.790Z","updated_at":"2026-02-17T00:03:08.458Z","avatar_url":"https://github.com/eikendev.png","language":"Go","readme":"\u003cdiv align=\"center\"\u003e\n\t\u003ch1\u003ehackenv\u003c/h1\u003e\n\t\u003ch4 align=\"center\"\u003e\n\t\tAccess your \u003ca href=\"https://www.kali.org/\"\u003eKali Linux\u003c/a\u003e and \u003ca href=\"https://parrotsec.org/\"\u003eParrot Security\u003c/a\u003e instances with ease.\n\t\u003c/h4\u003e\n\t\u003cp\u003ehackenv lets you comfortably manage your hacking environment from the terminal.\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://github.com/eikendev/hackenv/actions\"\u003e\u003cimg alt=\"Build status\" src=\"https://img.shields.io/github/actions/workflow/status/eikendev/hackenv/release.yaml?branch=main\"/\u003e\u003c/a\u003e\u0026nbsp;\n\t\u003ca href=\"https://github.com/eikendev/hackenv/blob/master/LICENSE\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/github/license/eikendev/hackenv\"/\u003e\u003c/a\u003e\u0026nbsp;\n\u003c/p\u003e\n\n## 🚀\u0026nbsp;Installation\n\nThe **preferred way** is to download the binary from the [latest release](https://github.com/eikendev/hackenv/releases).\n\nAlternatively, install the [required dependencies](#dependencies) and build it yourself:\n```bash\ngo install github.com/eikendev/hackenv/cmd/...@latest\n```\n\nEnsure that the libvirt daemon is running, and a socket created. On Fedora, this can be done as follows:\n```\nsudo systemctl start libvirtd\nsudo systemctl start virtqemud.socket\n```\n\n## 🤘\u0026nbsp;Features\n\n- Support for Kali Linux and Parrot Security.\n- Create short-lived virtual machines within seconds.\n- Download the latest official live image conveniently.\n- **Simple and intuitive** command line interface.\n- Configure instant SSH access based on **public-key authentication**.\n- Set up a **shared directory** between host and guest.\n- Set the same **keyboard layout** in the guest as on the host.\n\n## 📄\u0026nbsp;Usage\n\nFirst, make sure you have the [required dependencies](#dependencies) installed.\nAlso, you will need a bridge interface [as described below](#creating-a-bridge-interface).\nThis can be as simple as running `hackenv fix create-bridge` (or `./bin/hackenv_createbridge`).\n\nThen, download an image using `hackenv get`.\nThis will download a live image from the official mirrors.\nThe download can take a while, so sit back and enjoy some tea.\n\n| :warning:  **If you run SELinux, you must label the new image yourself. Check [the section on file sharing](#file-sharing) for more information.**   |\n|-----------------------------------------------------------------|\n\nNext, run `hackenv up` to boot the virtual machine.\nOnce this command is finished, the VM is running and fully configured.\nThe VM will be short-lived (volatile), meaning any data and configuration stored outside the shared directory will be removed once the machine shuts down.\nThis is by design and admittedly opinionated.\n\nYou can now start an SSH session with `hackenv ssh` or spin up a GUI with `hackenv gui`.\n\nNote that by default, hackenv will operate with Kali Linux, and respectively download its image.\nIf you want to operate with Parrot Security instead, specify `hackenv --type=parrot`, or check out [the configuration](#configuration).\n\n### File Sharing\n\nhackenv will automatically set up a shared directory between the host and the virtual machine.\nOn the host side the directory is `~/.local/share/hackenv/shared`, while on the guest side it is located at `/shared`.\n\nIf SELinux denies access to the shared directory, you have to adjust the context of the directory.\nYou can run `hackenv fix apply-labels` (or `./bin/hackenv_applylabels`) if you are on Fedora or similar.\nThe script will also relabel the downloaded images.\nIf you add new files to the shared directory from outside, do not forget to label them as well.\n\n### Creating a Bridge Interface\n\nhackenv uses a bridge so that you can reach the guest from the host for SSH, while the guest can access the Internet.\nYou can create this bridge by running `hackenv fix create-bridge` (or `./bin/hackenv_createbridge`).\nNote that this script **will request privileges** so it can create an interface.\n\nOf course, please adapt the script to your specific needs.\nThe interface is expected to have the name `virbr0` by default, but this can be changed using command line flags.\n\n## ⚙\u0026nbsp;Configuration\n\nThe tool currently does not support configuration via files.\nHowever, some options can be set using environment variables.\nCheck out the help (`--help`) of a command to see what options support this.\n\nFor instance, to operate with Parrot Security by default, you can set `$HACKENV_TYPE=parrot`.\nIf you work with both operating systems, then I recommend using shell aliases:\n```bash\nalias kali='hackenv --type=kali'\nalias parrot='hackenv --type=parrot'\n```\n\n## 🥙\u0026nbsp;Dependencies\n\n- [libvirt](https://libvirt.org/) (virsh)\n- [OpenSSH](https://www.openssh.com/) (ssh and ssh-keygen)\n- setxkbmap\n- [virt-viewer](https://virt-manager.org/) or [Remmina](https://remmina.org/)\n\nTo build the binary yourself, you also need the development files of libvirt, usually called `libvirt-dev` or `libvirt-devel`.\n\n## 💡\u0026nbsp;Alternatives\n\nIf you do not like this tool, the following options are worth checking out:\n- [Vagrant](https://www.vagrantup.com/) in combination with [VirtualBox](https://www.virtualbox.org/)\n- [Docker](https://www.docker.com/) or [Podman](https://podman.io/)\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feikendev%2Fhackenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feikendev%2Fhackenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feikendev%2Fhackenv/lists"}