I am well had set up a NAT Network as a pentesting lab for school. The network had an IP of 10.0.0.1/24. I had it running properly and no issues. Then I was doing a CTF VM, and on my Host (Kali) I edited a etc/hosts file to add in an IP address (I was following the directions of the walk through).
SInce editing this file, the network does not work right. When I run an nmap scan, it shows there is another assigned IP address. But when i go to a browser and type the address lets say 10.0.0.5 (Target) and the host is lets say 10.0.0.2. The webpage says it cannot load. I thought it was a fluke, so I got another vulnerable VM to do and the same thing happened.
I then proceeded to delete all of my VM's and re-download. New Kali and vulnerable VM's. got them up and running and still the same thing happened, web page cannot be loaded. I am confused on why all of the sudden it will not work? I did not edit any actual host files on my PC.
So I then deleted everything VBox related and did a fresh install, and it loads up like it was never deleted. Everything is their including the network I was using (pentestlab 1 and 2). Any help will be appreciated. I'm lost and cannot figure this out and that's after 3 days of googling and trying different things.
Setting up network for a penetration lab test
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: Setting up network for a penetration lab test
First, reinstalling Virtualbox will not remove your guests or settings. This is expected behavior, just as reinstalling Word would not delete all your .docx files.
You will need to draw us a picture of how you wanted to set up your test environment. Include each guest's name, the expected IP addresses of each guest, and the desired settings of the NAT Network in Virtualbox. Draw it on a piece of paper & scan it, or use a paint editing program. Make a PNG, and post the PNG using the forum's Upload Attachment tab. Scale & crop to get to the forum limit 128kB.
Also, please post each guest's .vbox file, in a zip file, as well as the main Virtualbox.XML file, zipped, found on the host in $HOME/.config/VirtualBox
Using these files we might be able to compare what you want with what you've got.
You will need to draw us a picture of how you wanted to set up your test environment. Include each guest's name, the expected IP addresses of each guest, and the desired settings of the NAT Network in Virtualbox. Draw it on a piece of paper & scan it, or use a paint editing program. Make a PNG, and post the PNG using the forum's Upload Attachment tab. Scale & crop to get to the forum limit 128kB.
Also, please post each guest's .vbox file, in a zip file, as well as the main Virtualbox.XML file, zipped, found on the host in $HOME/.config/VirtualBox
Using these files we might be able to compare what you want with what you've got.
-
- Posts: 2
- Joined: 29. Jul 2019, 02:23
Re: Setting up network for a penetration lab test
Hi,
So my question is I have a desktop running Win10 and vbox and a laptop running Ubuntu with vbox. The desktop is the host with kali running in vbox (Attacker), the victim is the Ubuntu running vbox (metasploitable 2 and 3 and a Win10 VM). How do I get both computers to talk to each other?
I have tried NAT NETWORK (this works with kali and victim VM's on the desktop together), but when I try to get both computers to talk to each other using all of the settings nothing works. Internal, Bridged, Host Only. I am lost on how to get both computers to talk to each other so I can attack the laptop with the desktop through vbox.
Unless this is completely not a thing (which I find hard to believe) or maybe I am going about it the wrong way? I know this shouldn't be this difficult to do, I just can't seem to understand why I can't get it to work?
(ATTACKER) Desktop- Win10 with Vbox running Kali
(VICTIM) Laptop- Vbox with Metasploitable 2 and 3 and Win10 VM's
So my question is I have a desktop running Win10 and vbox and a laptop running Ubuntu with vbox. The desktop is the host with kali running in vbox (Attacker), the victim is the Ubuntu running vbox (metasploitable 2 and 3 and a Win10 VM). How do I get both computers to talk to each other?
I have tried NAT NETWORK (this works with kali and victim VM's on the desktop together), but when I try to get both computers to talk to each other using all of the settings nothing works. Internal, Bridged, Host Only. I am lost on how to get both computers to talk to each other so I can attack the laptop with the desktop through vbox.
Unless this is completely not a thing (which I find hard to believe) or maybe I am going about it the wrong way? I know this shouldn't be this difficult to do, I just can't seem to understand why I can't get it to work?
(ATTACKER) Desktop- Win10 with Vbox running Kali
(VICTIM) Laptop- Vbox with Metasploitable 2 and 3 and Win10 VM's
-
- Volunteer
- Posts: 5105
- Joined: 19. Sep 2009, 04:44
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows 10,7 and earlier
- Location: Sydney, Australia
Re: Setting up network for a penetration lab test
If you want the physical and virtual machines to be in the same network, your only option is bridged mode. If the hosts are in the same physical network and the vms are bridged, hosts and guests will all be in the same network. If the network has a DHCP server, all machines, virtual and physical, will get their network config from DHCP (unless you override the default network settings) and behave just like any set of machines in the same network.
What OS you run and what you want to do with them makes no difference to the way IP networking operates.
If you want only the virtual machines to see each other, and the only physical connection is between the hosts, things are more difficult. Your NAT network solution would only work if both vms were on the same host.
What OS you run and what you want to do with them makes no difference to the way IP networking operates.
If you want only the virtual machines to see each other, and the only physical connection is between the hosts, things are more difficult. Your NAT network solution would only work if both vms were on the same host.
Bill
-
- Site Moderator
- Posts: 27329
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: Setting up network for a penetration lab test
- I merged the question you had in 2019-07-29 with an answer/questions from 'scottgus1' in the "Windows Guests" section, with the question you had in 2019-11-17 with an answer/questions from 'BillG' in the "Windows Hosts" section.
- I moved the whole thing in the "Using VirtualBox" section.
- I edited your messages to add some <Enter> between a big lump of text, you had the whole message in a continuous sentense, tough to read.
- I changed the thread's title from "Nat Netowork Help" and "pentesting lab networking" to something more easily searchable.
Also, read the following: User Manual, ch. 6.2. Introduction to networking modes including the Overview table, which shows quickly what kind of connection is required to achieve what you want. And remember, you can always have more than one network card in your guest to cover multiple scenarios.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.