{"id":23544096,"url":"https://github.com/melkir/hacking-workshop","last_synced_at":"2025-11-01T08:30:31.696Z","repository":{"id":70425357,"uuid":"346455859","full_name":"melkir/hacking-workshop","owner":"melkir","description":"Ethical Hacking Workshop","archived":false,"fork":false,"pushed_at":"2022-03-03T23:23:51.000Z","size":57,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-26T07:14:14.700Z","etag":null,"topics":["hacking","metasploitable","network-analysis","penetration-testing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/melkir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-03-10T18:37:25.000Z","updated_at":"2024-09-13T20:43:15.000Z","dependencies_parsed_at":"2023-02-24T00:19:43.192Z","dependency_job_id":null,"html_url":"https://github.com/melkir/hacking-workshop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melkir%2Fhacking-workshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melkir%2Fhacking-workshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melkir%2Fhacking-workshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melkir%2Fhacking-workshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/melkir","download_url":"https://codeload.github.com/melkir/hacking-workshop/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239269818,"owners_count":19610870,"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":["hacking","metasploitable","network-analysis","penetration-testing"],"created_at":"2024-12-26T07:13:22.303Z","updated_at":"2025-11-01T08:30:31.648Z","avatar_url":"https://github.com/melkir.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Security Workshop\n\nThis workshop is inspired from [Complete Ethical Hacking Bootcamp 2021: Zero to Mastery](https://www.udemy.com/course/complete-ethical-hacking-bootcamp-zero-to-mastery/).\n\n\u003e Learn Ethical Hacking + Penetration Testing! Use real techniques by black hat hackers then learn to defend against them!\n\nPresentation PDF: https://drive.google.com/file/d/1INQJDxII_ktZ9v7_7kUisWQCjjjt-QfK/view?usp=sharing\n\n## Requirements\n\n- [VirtualBox](https://www.virtualbox.org/wiki/Downloads)\n- [Metasploitable](https://github.com/rapid7/metasploitable3)\n\n## Installation\n\n- [Kali Linux VirtualBox 64-Bit (OVA)](https://www.offensive-security.com/kali-linux-vm-vmware-virtualbox-image-download/#1572305786534-030ce714-cc3b)\n\nDouble click on the `kali-linux-2021.1-vbox-amd64.ova` file, this should open VirtualBox and create your first virtual machine. You can keep the default options.\n\n- [metasploitable3#quick-start](https://github.com/rapid7/metasploitable3#quick-start)\n\nFollow the quick-start instructions that correspond to your operating system. For simplicity, we'll use the prebuit images.\n\n## Configuration\n\n\u003e VirtualBox\n\nIn order to enable the communication between your virtual machines we'll configure a NAT Network.\n\n`Virtual Box` \u003e\u003e `Preferences...` \u003e\u003e `Network` \u003e\u003e `[+] Adds new NAT network` \u003e\u003e `OK`\n\n\u003e Kali Linux\n\n`Kali-Linux-2021.1-vbox-amd64` \u003e\u003e `Settings` \u003e\u003e `Network` \u003e\u003e `Attached to: NAT Network` \u003e\u003e `OK`\n\nClick on the `Show` button, on the login screen enter the following credentials:\n\n```\nlogin: kali\npassword: kali\n```\n\n\u003e ⚠️ The `q` key on a `azerty` keyboard corresponds to the `a` key on a `qwerty` keyboard.\n\nFrom a terminal, you can now change the keyboard to `azerty` if you're using a French keyboard\n\n```sh\n$ setxkbmap fr\n$ sudo dpkg-reconfigure keyboard-configuration\n```\n\nChoose the following options:\n\n- Generic 105-key (Intl) PC\n- Other\n- French\n- The default for the keyboard layout\n- No compose key\n\nTo retrieve the IP address of the machine use the following command:\n\n```\n$ ip -4 addr\n...\n2: eth0: \u003cBROADCAST,MULTICAST,UP,LOWER_UP\u003e mtu 1500 qdisc pfifo_fast state UP group default qlen 1000\n    inet 10.0.2.4/24 brd 10.0.2.255 scope global dynamic\n```\n\n\u003e Metasploitable 3\n\n`Metasploitable3-ub1404` \u003e\u003e `Settings` \u003e\u003e `Network` \u003e\u003e `Attached to: NAT Network`\n\nYou might also want to increase the display scale factor:\n\n`Settings` \u003e\u003e `Display` \u003e\u003e `Scale Factor: 300%` \u003e\u003e `OK`\n\nOnce this is done you can click on the `Show` button\n\n```sh\nmetasploitable3-ub1404 login: vagrant\npassword: vagrant\n```\n\nConfigure the keyboard in French if needed:\n\n```sh\n$ sudo loadkeys fr\n$ sudo dpkg-reconfigure keyboard-configuration\n```\n\nChoose the following options:\n\n- Generic 105-key (Intl) PC\n- French\n- French\n- The default for the keyboard layout\n- No compose key\n\nAs previously, to retrieve the IP address of the machine use the following command:\n\n```\n$ ip -4 addr\n2: eth0: \u003cBROADCAST,MULTICAST,UP,LOWER_UP\u003e mtu 1500 qdisc pfifo_fast state UP group default qlen 1000\n    inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0\n```\n\nYou are ready to take up the challenge, head over to the [Wiki](https://github.com/melkir/hacking-workshop/wiki/1.-Information-Gathering) 💻\n\n**SSH (Optionnal)**\n\nIf you are using a Windows 10 machine, please check if the OpenSSH client is installed.\nTo do so, please follow the Microsoft's instructions located [here](https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse#install-openssh-using-windows-settings).\n\nThen, you can configure port-forwarding (only required over NAT Network) in order to access to access remotly to the virtual machine terminal using your host machine.\n\n`Virtual Box` \u003e\u003e `Preferences...` \u003e\u003e `Network` \u003e\u003e `NatNetwork` \u003e\u003e `Port Forwarding`\n\n| Name        | Protocol | Host IP   | Host Port | Guest IP  | Guest Port |\n| ----------- | -------- | --------- | --------- | --------- | ---------- |\n| SSH Kali    | TCP      | 127.0.0.1 | 2522      | 10.0.2.4  | 22         |\n| SSH Ubuntu  | TCP      | 127.0.0.1 | 2523      | 10.0.2.15 | 22         |\n| SSH Windows | TCP      | 127.0.0.1 | 2524      | 10.0.2.5  | 22         |\n\n\u003cbr /\u003e\n\nOpen **Kali Linux** and access to the terminal\n\n```\n$ sudo systemctl start ssh.socket\n$ sudo systemctl enable ssh.socket\n```\n\nOpen a terminal of your **HOST** machine:\n\n\u003e Kali Linux\n\n```\n$ ssh -p 2522 kali@127.0.0.1\n```\n\n\u003e Metasploit\n\n```\n$ ssh -p 2523 vagrant@127.0.0.1\n```\n\n\u003e Windows\n\n```\n$ ssh -p 2524 vagrant@127.0.0.1\n```\n\nIn order to avoid having to type the password for each SSH connection you can register your host machine as a trusted machine with Kali Linux and Metasploitable.\n\n1. Open a terminal (Powershell on Windows) and generate a new SSH keypair using the `ssh-keygen` command:\n\n```\n$ ssh-keygen\n```\n\nThe program will ask you for a passphrase and a location where to save the new key. Using the suggested default path is recommended because all other tools will look for it there.\n\n2. Copy your public key to Kali Linux and Ubuntu machines:\n\n\u003e Windows instructions\n\n```\n\u003e type $env:USERPROFILE\\.ssh\\id_rsa.pub | ssh -p 2522 kali@127.0.0.1 \"cat \u003e\u003e .ssh/authorized_keys\"\n```\n\n```\n\u003e type $env:USERPROFILE\\.ssh\\id_rsa.pub | ssh -p 2523 vagrant@127.0.0.1 \"cat \u003e\u003e .ssh/authorized_keys\"\n```\n\n\u003e Mac instructions\n\n```\n$ ssh-copy-id -i ~/.ssh/id_rsa.pub -p 2522 kali@127.0.0.1\n```\n\n```\n$ ssh-copy-id -i ~/.ssh/id_rsa.pub -p 2523 vagrant@127.0.0.1\n```\n\n**SSH Config (Optionnal)**\n\nCreate aliases for hosts so that `ssh -p 2522 kali@127.0.0.1` becomes `ssh kali`.\n\n```\n# filename: .ssh/config\n\nHost kali\n    User kali\n    HostName 127.0.0.1\n    Port 2522\n\nHost ubuntu\n    User vagrant\n    HostName 127.0.0.1\n    Port 2523\n\nHost windows\n    User vagrant\n    HostName 127.0.0.1\n    Port 2524\n```\n\n**Host (Optionnal)**\n\nAs we will often use IP addresses of machines through the workshop, you can also configure the hosts file to use aliases on the Kali Linux machine.\n\n```\n$ ssh -p 2522 kali@127.0.0.1\n$ sudo vim /etc/hosts\n```\n\nAdd these two lines to the file\n\n```\n10.0.2.15       ubuntu\n10.0.2.5        windows\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelkir%2Fhacking-workshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmelkir%2Fhacking-workshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelkir%2Fhacking-workshop/lists"}