cliffe / SecGen

Create randomly insecure VMs
GNU General Public License v3.0
2.62k stars 316 forks source link

virtualbox issues using ubuntu 2004 on wsl2 #288

Closed ltham79 closed 1 year ago

ltham79 commented 1 year ago

I am having the hardest time getting SecGen set up!!! It took me a few days to get this far. I have installed SecGen finally. When I run the secgen.rb

gets all the way to the end and errors


Project files created. Building project: /home/syn/SecGen/projects/SecGen20230717_091121 Loading vagrant (up) in /home/syn/SecGen/projects/SecGen20230717_091121 No usable default provider could be found for your system.

Vagrant relies on interactions with 3rd party systems, known as "providers", to provide Vagrant with resources to run development environments. Examples are VirtualBox, VMware, Hyper-V.

The easiest solution to this message is to install VirtualBox, which is available for free on all major platforms.

If you believe you already have a provider available, make sure it is properly installed and configured. You can see more details about why a particular provider isn't working by forcing usage with vagrant up --provider=PROVIDER, which should give you a more specific error message for that particular provider. Non-zero exit status... Error provisioning VMs, destroying VMs and exiting SecGen. Loading vagrant (destroy -f) in /home/syn/SecGen/projects/SecGen20230717_091121 No usable default provider could be found for your system.

Vagrant relies on interactions with 3rd party systems, known as "providers", to provide Vagrant with resources to run development environments. Examples are VirtualBox, VMware, Hyper-V.

The easiest solution to this message is to install VirtualBox, which is available for free on all major platforms.

If you believe you already have a provider available, make sure it is properly installed and configured. You can see more details about why a particular provider isn't working by forcing usage with vagrant up --provider=PROVIDER, which should give you a more specific error message for that particular provider. Non-zero exit status...

I have tried everything to reinstall virtual box and vagrant files and Im just stuck!!!!!!! I hope you guys can help I am really excited to use SecGen as my pen testing playground.

Thanks in advance

-Syn

cliffe commented 1 year ago

Hi there. Sorry, this isn't going to be super useful, but you haven't got vagrant (and/or VirtualBox) installed properly. Good luck.

ltham79 commented 1 year ago

I followed the directions


syn@SYN-TER:~/SecGen$ vagrant --version Vagrant 2.2.9


syn@SYN-TER:~/SecGen$ virtualbox --version WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (5.15.90.1-microsoft-standard-WSL2) or it failed to load. Please recompile the kernel module and install it by

       sudo /sbin/vboxconfig

     You will not be able to start VMs until this problem is fixed.

/usr/lib/virtualbox/VirtualBox: error while loading shared libraries: libQt5Xml.so.5: cannot open shared object file: No such file or directory


Ive tried purge/installing vbox multiple times using the downloaded one and apt after /sbin/vboxconfig this comes


root@SYN-TER:~# /sbin/vboxconfig vboxdrv.sh: Stopping VirtualBox services. vboxdrv.sh: Starting VirtualBox services. vboxdrv.sh: Building VirtualBox kernel modules. This system is currently not set up to build kernel modules. Please install the Linux kernel "header" files matching the current kernel for adding new hardware support to the system. This system is currently not set up to build kernel modules. Please install the Linux kernel "header" files matching the current kernel for adding new hardware support to the system.

There were problems setting up VirtualBox. To re-start the set-up process, run /sbin/vboxconfig as root. If your system is using EFI Secure Boot you may need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system's documentation for more information.

now stuck again lol

sorry for all the questions

cliffe commented 1 year ago

Maybe VirtualBox doesn't work with WSL?

ltham79 commented 1 year ago

can you use secgen with vmware?

cliffe commented 1 year ago

No, not currently.

ltham79 commented 1 year ago

well thanx for your help anyway :-(

cliffe commented 1 year ago

Install Linux dual boot, or you can even run SecGen in a Linux VM, if you enable nested virtualisation (if your BIOS supports it)

ltham79 commented 1 year ago

Im working on that now. Still reading some other posts on getting vbox with wsl2 seems the problem is hyper V. I use wsl because its so much faster than vm and dont have the ram needed for a upperclass linux vm lol

ltham79 commented 1 year ago

https://askalice97.medium.com/running-virtualbox-inside-of-wsl2-with-nested-virtualization-bde85046fe8d has figured it out but I dont understand half of the information on the page

cliffe commented 1 year ago

Good luck!