Last active
January 30, 2021 02:40
-
-
Save rwhitworth/24e71f01b919276836bb3239a588164a to your computer and use it in GitHub Desktop.
Kali 2020 in Hyper-V
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
# install hyper-v tools | |
sudo apt-get install -y hyperv-daemons | |
for i in fcopy kvp vss ; do sudo systemctl start hv-$i-daemon ; systemctl status hv-$i-daemon ; done | |
# change linux scheduler to allow hyper-v to control things, which is more efficient for host, especially on SSD storage | |
sudo sed -i 's/DEFAULT="quiet"/DEFAULT="quiet scheduler=noop"/g' /etc/default/grub | |
sudo update-grub2 | |
# yes yes, python 2 vs python 3. We get it. | |
touch ~/.hushlogin | |
# this section seems to need updating regularly.. | |
# see also https://gist.github.com/mimura1133/25451be04929d65993e0fb658d0b6890 for notes on how to install XRDP on Kali | |
git clone https://github.com/Microsoft/linux-vm-tools.git | |
cd linux-vm-tools/ubuntu/18.04 | |
chmod +x install.sh | |
sudo ./install.sh | |
shutdown -h now | |
# on host OS run PowerShell as Administrator | |
# Set-VM -VMName 'Kali 2020' -EnhancedSessionTransportType HvSocket | |
# In HyperV view settings for VM and check all items under Integration Services | |
# Start VM | |
# in Hyper-V when viewing the VM console, choose View -> Enhanced session | |
# RDP session to VM should now be started and operational. Copy & Paste, shared drives, etc working | |
# pwncat install | |
cd ~ | |
git clone https://github.com/calebstewart/pwncat | |
cd pwncat | |
sudo apt-get install python3-venv | |
python3 -m venv pwncat-venv | |
source pwncat-venv/bin/activate | |
pip install -U git+https://github.com/calebstewart/paramiko | |
pip install base64io | |
# update searchsploit / exploitdb | |
searchsploit -u | |
# update nmap scripts and databases | |
sudo nmap --script-updatedb | |
sudo mv /usr/share/nmap/nmap-service-probes /usr/share/nmap/nmap-service-probes.backup | |
sudo curl https://svn.nmap.org/nmap/nmap-service-probes -O /usr/share/nmap/nmap-service-probes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment