Another useful tool I like to have available is a remote instance of Google’s multi-process and multi-threaded fuzzer. This allows for the use of a command-line interface via ssh on a remotely hosted machine. This can be deployed in the cloud, or in my instance, on a machine in another room, keeping my office cool and quiet.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
config.vm.define :ubuntu_honggfuzz do |ubuntu_honggfuzz|
ubuntu_honggfuzz.vm.box = "generic-x64/ubuntu2310"
ubuntu_honggfuzz.vm.provider :libvirt do |libvirt|
libvirt.id_ssh_key_file = "/home/jason/projects/kali_remote/id_ssh.key"
#libvirt.uri = "qemu+ssh://10.130.10.50/system"
libvirt.host = '10.130.10.50'
libvirt.connect_via_ssh = true
libvirt.username = "jason"
libvirt.password = ''
libvirt.memory = 2048
libvirt.cpus = 2
end
end
# Default false
config.ssh.forward_agent = true
config.ssh.forward_x11 = true
# Default true
config.ssh.keep_alive = false
# Default 300s
config.vm.boot_timeout = 900
config.vm.provision "file", source: "~/projects/gm-com-chain.pem", destination: "~/"
config.vm.provision "shell", inline: <<-SHELL
echo foo
sudo cp /home/vagrant/gm-com-chain.pem /etc/ssl/certs/
#sudo mv ~/gdroot-g2.pem /etc/pki/ca-trust/source/anchors/
#sudo update-ca-trust
# Base requirements for installing X11
#sudo dnf update -y
#sudo dnf install -y git
# Add desktop environment
#sudo dnf install -y xorg-x11-xauth
#sudo dnf install -y xclock
#sudo dnf install -y gnome-shell
#sudo dnf install xorg-x11-apps
#sudo dnf install -y xorg*
#sudo dnf install -y @xfce-desktop-environment
sudo sed -i '/#X11Forwarding no/s//X11Forwarding yes/' /etc/ssh/sshd_config
sudo rm -rf /root/.Xauthority
sudo rm -rf /root/.serverauth.*
SHELL
config.vm.provision "shell", privileged: false, inline: <<-SHELL
echo bar
echo export PATH="$PATH:$HOME/.cargo/bin:$HOME/veilid/target/release:$HOME/.local/bin" >> ~/bash.bashrc
echo export PATH="$PATH:$HOME/.cargo/bin:$HOME/veilid/target/release:$HOME/.local/bin" >> ~/.bash_profile
echo $PATH
SHELL
config.vm.provision "shell", privileged: false, inline: <<-SHELL
echo bas
echo $PATH
echo fooby
sudo apt-get update
git clone https://github.com/google/honggfuzz.git
sudo apt-get install -y binutils-dev libunwind-dev libblocksruntime-dev clang gcc git make pkg-config libipt-dev libunwind8-dev binutils-dev
make
echo barby
cd honggfuzz
sudo mkdir -p /bin/honggfuzz
chown vagrant:vagrant -R /bin/honggfuzz
chmod 777 -R /bin/honggfuzz
sudo make && sudo cp -r ~/honggfuzz /bin
#nohup ./veilid-server &> /dev/null 2>&1 & disown
SHELL
config.vm.provision "shell", privileged: false, inline: <<-SHELL
echo basby
echo login to host using "vagrant ssh"
echo cd ~/honggfuzz
echo ./honggfuzz *made up instructions*
SHELL
config.vm.synced_folder ".", "/vagrant", type: "rsync",
rsync__exclude: ".git/, ./vagrant"
end