DHCP Server won't assign IP to imported VMs

Discussions about using Linux guests in VirtualBox.
Post Reply
lhel
Posts: 1
Joined: 17. Aug 2021, 21:29

DHCP Server won't assign IP to imported VMs

Post by lhel »

Hello every one,

I have an issue while configuring VMs from vulnhub. I've seen a lot of people with a similar issue, but not quite like it. This is gonna be a long post, so I'm sorry in advance.

As I've stated, I'm trying to import vms from vulnhub so I can play a little, and to that I though I'd configure an internal network. I configured an internal network with a DHCP server through VBoxManage by using
vboxmanage dhcpserver add --network=vulnhub --server-ip=10.38.1.1 --lower-ip=10.38.1.2 --upper-ip=10.38.1.124 --netmask=255.255.255.0 --enable
The network works as intended and I can get my Kali and other vms on it no problem. They can also communicate with each other, as they should.
Problem arises when I tried to put the CTF vms I imported in the network. The DHCP server is not assigning an IP to them. To be fair, I don't even know if that accurate to say, because when I try to boot the vulnerable machines through LAN, before failing, they try to collect an IP from DHCP and they acctually get one.

If I use
dhcpserver findlease --network=vulnhub --mac-address=080027618C05
where 080027618C05 is the CTF machine MAC address, it successfully finds the machine inside the network.
IP Address:  10.38.1.6
MAC Address: 08:00:27:61:8c:05
State:       acked
Issued:      2021-08-17T19:41:53Z (1629229313)
Expire:      2021-08-17T19:51:53Z (1629229913)
TTL:         600 sec, currently 565 sec left
(base)
Problem is, I can't boot the CTF machine from LAN, at least I don't think it's possible. (Screenshot in attachments)

But aside from that, the DCHP server is not getting anything from the MAC address (when I don't boot from LAN)
BoxManage: error: Could not find a lease for 08:00:27:61:8c:05
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component DHCPServerWrap, interface IDHCPServer, callee nsISupports
VBoxManage: error: Context: "FindLeaseByMAC(Bstr(szMac).raw(), 0 , bstrAddress.asOutParam(), bstrState.asOutParam(), &secIssued, &secExpire)" at line 1128 of file VBoxManageDHCPServer
Output of vboxmanage when I try to look for this MAC address inside the DHCP server.

I've even tryed scanning for the DHCP udp port with kali:
└─$ sudo nmap -sS -sU -T4 10[.]38[.]1[.]2-10
Starting Nmap 7.91 ( nmap ) at 2021-08-17 15:58 EDT
Nmap scan report for 10[.]38[.]1[.]5
Host is up (0.0000080s latency).
Not shown: 1999 closed ports
PORT   STATE         SERVICE
68/udp open|filtered dhcpc
To no avail. List of other things I've tried:

- Added an entry in my Kali's ARP table with the CTF machine MAC addr
- Created and configured a dchp server for internal networks through 'VBoxManage' (it works for literally every vm except the one's I imported from vulnhub)
- Created a host only network (same as above, works for every machine except the ones i imported from vulnhub)

But I still can't discover the vms in my network. (Ive tested with 2 so far). And since both of them are entry level, I find it hard that they are filtering packets, since that would start to step on more advanced levels.

Cheers, hope someone can help me. Sorry for the long rant.
Attachments
When I boot from LAN
When I boot from LAN
vbox.png (9.01 KiB) Viewed 2582 times
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: DHCP Server won't assign IP to imported VMs

Post by mpack »

10.x addresses are typically used by NAT, not by internal networking, which would more typically use 192.168.xxx.yyy.

Please provide a VM log file. Make sure the VM is fully shut down, then right click it in the manager UI. Select "Show Log" and save "VBox.log" (no other file) to a zip file. Attach the zip here.
Post Reply