### Create and configure vboxnet0 Source: https://vmcloak.readthedocs.io/en/latest/vbox.html Executing these two commands creates and starts the vboxnet0 network. Only required when vboxnet0 is not already present. This is equivalent to running the vmcloak-vboxnet0 script. ```bash VBoxManage hostonlyif create VBoxManage hostonlyif ipconfig vboxnet0 --ip 192.168.56.1 ``` -------------------------------- ### Mount Windows ISO on Ubuntu/Debian Source: https://vmcloak.readthedocs.io/en/latest/config.html Commands to create a directory and mount a Windows Installer ISO image with root privileges on Ubuntu or Debian systems. ```bash mkdir /mnt/winxp mount -o loop,ro winxp.iso /mnt/winxp ``` -------------------------------- ### Install VMCloak manually from Git Source: https://vmcloak.readthedocs.io/en/latest/setup.html Use these commands to clone the repository and install VMCloak globally on your system. ```bash $ git clone git://github.com/jbremer/vmcloak $ cd vmcloak $ sudo python setup.py install ``` -------------------------------- ### Mount Windows ISO on BSD Source: https://vmcloak.readthedocs.io/en/latest/config.html Commands to create a directory and mount a Windows Installer ISO image using vnconfig on BSD systems. ```bash mkdir /mnt/winxp vnconfig /dev/vnd0d winxp.iso mount -t cd9660 /dev/vnd0d /mnt/winxp ``` -------------------------------- ### Install VMCloak in development mode Source: https://vmcloak.readthedocs.io/en/latest/setup.html Use these commands to install VMCloak in development mode, preferably within a virtual environment. ```bash (venv)$ git clone git://github.com/jbremer/vmcloak (venv)$ cd vmcloak (venv)$ python setup.py develop ``` -------------------------------- ### Create a hardware profile with vmcloak-gethwconf Source: https://vmcloak.readthedocs.io/en/latest/hwconfig.html Run this command on the target machine to generate a hardware profile. The profile name is used as the argument and the resulting profile is stored in the hwconf/ directory. ```bash vmcloak-gethwconf lenovo_x220 ``` -------------------------------- ### Configure full internet access commands Source: https://vmcloak.readthedocs.io/en/latest/network.html Commands to create a host-only interface in VirtualBox and apply the iptables configuration. ```bash VBoxManage hostonlyif create VBoxManage hostonlyif ipconfig vboxnet0 --ip 192.168.56.1 sudo vmcloak-iptables ``` -------------------------------- ### Check if vboxnet0 exists Source: https://vmcloak.readthedocs.io/en/latest/vbox.html Run this command to verify whether the host-only interface vboxnet0 is present. If it returns nothing, you need to create it. ```bash VBoxManage list hostonlyifs ``` -------------------------------- ### vmcloak-iptables bash script Source: https://vmcloak.readthedocs.io/en/latest/network.html A bash script used to configure iptables for enabling internet access for Virtual Machines. It must be run as root and can be found on the system as vmcloak-iptables. ```bash #!/bin/sh # Copyright (C) 2014-2015 Jurriaan Bremer. # This file is part of VMCloak - http://www.vmcloak.org/. # See the file 'docs/LICENSE.txt' for copying permission. # Credits to Mark Schloesser, https://github.com/rep/cuckoo-contrib if [ "$1" = "-h" ]; then echo "Usage: $0 [ip_range/cidr] [interfaces..]" echo " $0 192.168.57.0/24 eth0 eth1" echo echo "Defaults to:" echo " $0 192.168.56.0/24 eth0 wlan0" exit fi # Fetch the IP range and CIDR. if [ "$#" -ne 0 ]; then VBOXNET="$1" shift else VBOXNET="192.168.56.0/24" fi # Fetch the interfaces. if [ "$#" -ne 0 ]; then INTERFACES="$*" else INTERFACES="eth0 wlan0" fi iptables -F iptables -t nat -F for i in $INTERFACES; do iptables -t nat -A POSTROUTING -o $i -s "$VBOXNET" -j MASQUERADE done # Default drop. iptables -P FORWARD DROP # Existing connections. iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT # Accept connections from vboxnet to the whole internet. iptables -A FORWARD -s "$VBOXNET" -j ACCEPT # Internal traffic. iptables -A FORWARD -s $VBOXNET -d $VBOXNET -j ACCEPT # Log stuff that reaches this point, could be noisy though. iptables -A FORWARD -j LOG # Actually enable forwarding of packets. This is Debian/Ubuntu specific. echo 1 > /proc/sys/net/ipv4/ip_forward ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.