Page 1 of 1

VMDK file and kernel panic.

Posted: 30. Sep 2020, 17:34
by hack3rcon
Hello,
I downloaded https://www.vulnhub.com/entry/lampsecurity-ctf4,83/ file and imported it to the VirtualBox. The VM document said:
The contents of this exercise assume that you are using the LAMPSecurity VMware image. This is a CentOS based Linux virtual machine preloaded with many of the attack tools necessary to do a security evaluation or penetration test of a remote machine. You'll need VMware's free player in order to run the image. You can download the testing image and the target image from https://sourceforge.net/projects/lampsecurity. You can download the VMware player from http://www.vmware.com/download/player .
When I launch the VM then it show me kernel panic:
Screenshot at 2020-09-30 19-03-34.png
Screenshot at 2020-09-30 19-03-34.png (11.75 KiB) Viewed 1594 times
No way to run it by VirtualBox?

Thank you.

Re: VMDK file and kernel panic.

Posted: 30. Sep 2020, 18:04
by scottgus1
The error messages appear to say that the guest is not able to find its disk.

I did the CTF8 download, too. It comes in as a preinstalled vmdk, a VMware vmx file, and a PDF. This is a note in the PDF:
Note for VirtualBox Users
Note that if you're using VirtualBox you may experience some issues. The CTF8 image is
configured with a network adapter with the MAC address 08:00:27:5E:A5:06 (you can find
this value in the CentOS.vmx file). You may need to adjust the settings for the CTF image to
use this MAC address. The image is also built to use NAT for networking. This should be
changed to “host-only” networking in order to work in VirtualBox. To create the VirtualBox
version simply create a new virtual machine with the Linux and Other 2.6 Kernel
specifications, then when prompted for a hard disk, choose existing and select the CTF hard
disk (CentOS.vmdk)
Virtualbox doesn't have support for VMware vmx files. You have to manually set up a guest to use the vmdk file that matches settings to the vmx.

You can try posting your guest's .vbox file and your downloaded vmx file, and someone who groks VMware might be able to compare the settings.

Re: VMDK file and kernel panic.

Posted: 30. Sep 2020, 18:19
by hack3rcon
Excuse me, It is CTF4 and not CTF8.
The contents of files are:

Code: Select all

$ cat CTF4.vmx
#!/usr/bin/vmware
.encoding = "windows-1252"
config.version = "8"
virtualHW.version = "7"
scsi0.present = "TRUE"
scsi0.virtualDev = "lsilogic"
memsize = "256"
scsi0:0.present = "TRUE"
scsi0:0.fileName = "CTF4.vmdk"
ide1:0.present = "TRUE"
ide1:0.fileName = "auto detect"
ide1:0.deviceType = "cdrom-raw"
floppy0.startConnected = "FALSE"
floppy0.autodetect = "TRUE"
ethernet0.present = "TRUE"
ethernet0.connectionType = "hostonly"
ethernet0.wakeOnPcktRcv = "FALSE"
usb.present = "TRUE"
sound.present = "TRUE"
sound.fileName = "-1"
sound.autodetect = "TRUE"
mks.enable3d = "FALSE"
pciBridge0.present = "TRUE"
pciBridge4.present = "TRUE"
pciBridge4.virtualDev = "pcieRootPort"
pciBridge4.functions = "8"
pciBridge5.present = "TRUE"
pciBridge5.virtualDev = "pcieRootPort"
pciBridge5.functions = "8"
pciBridge6.present = "TRUE"
pciBridge6.virtualDev = "pcieRootPort"
pciBridge6.functions = "8"
pciBridge7.present = "TRUE"
pciBridge7.virtualDev = "pcieRootPort"
pciBridge7.functions = "8"
vmci0.present = "TRUE"
roamingVM.exitBehavior = "go"
displayName = "CTF4"
guestOS = "rhel3"
nvram = "CTF4.nvram"
virtualHW.productCompatibility = "hosted"
ft.secondary0.enabled = "TRUE"
tools.upgrade.policy = "useGlobal"

extendedConfigFile = "CTF4.vmxf"

floppy0.fileName = "A:"

ethernet0.addressType = "generated"
tools.syncTime = "FALSE"
uuid.location = "56 4d f6 04 c5 7d 1a 2b-26 6a 9b cb fe 14 5b 49"
uuid.bios = "56 4d 1e fa 71 53 9c 8c-e3 a1 4b bb 38 28 d9 61"
scsi0:0.redo = ""
vmotion.checkpointFBSize = "33554432"
pciBridge0.pciSlotNumber = "17"
pciBridge4.pciSlotNumber = "21"
pciBridge5.pciSlotNumber = "22"
pciBridge6.pciSlotNumber = "23"
pciBridge7.pciSlotNumber = "24"
scsi0.pciSlotNumber = "16"
usb.pciSlotNumber = "32"
ethernet0.pciSlotNumber = "33"
sound.pciSlotNumber = "34"
vmci0.pciSlotNumber = "36"
ethernet0.generatedAddress = "00:0C:29:28:D9:61"
ethernet0.generatedAddressOffset = "0"
vmci0.id = "942201185"
tools.remindInstall = "TRUE"

ide1:0.autodetect = "TRUE"

sound.startConnected = "FALSE"

usb.generic.autoconnect = "FALSE"

ide1:0.startConnected = "FALSE"
cleanShutdown = "TRUE"
replay.supported = "FALSE"
replay.filename = ""
ehci.present = "FALSE"
And:

Code: Select all

$ cat CTF.vbox
<?xml version="1.0"?>
<!--
** DO NOT EDIT THIS FILE.
** If you make changes to this file while any VirtualBox related application
** is running, your changes will be overwritten later, without taking effect.
** Use VBoxManage or the VirtualBox Manager GUI to make changes.
-->
<VirtualBox xmlns="http://www.virtualbox.org/" version="1.16-linux">
  <Machine uuid="{a30bfc8b-b8e3-44e9-9ee6-d8621e333ff9}" name="CTF" OSType="RedHat" snapshotFolder="Snapshots" lastStateChange="2020-09-30T15:33:42Z">
    <MediaRegistry>
      <HardDisks>
        <HardDisk uuid="{d3424c30-fff2-4494-9b03-c6eb37e786f3}" location="/home/Jason/Desktop/CTF4.vmdk" format="VMDK" type="Normal"/>
      </HardDisks>
    </MediaRegistry>
    <ExtraData>
      <ExtraDataItem name="GUI/LastCloseAction" value="PowerOff"/>
      <ExtraDataItem name="GUI/LastNormalWindowPosition" value="314,224,720,448"/>
    </ExtraData>
    <Hardware>
      <CPU>
        <PAE enabled="false"/>
        <LongMode enabled="false"/>
        <X2APIC enabled="true"/>
        <HardwareVirtExLargePages enabled="false"/>
      </CPU>
      <Memory RAMSize="1024"/>
      <HID Pointing="USBTablet"/>
      <Display controller="VMSVGA" VRAMSize="16"/>
      <VideoCapture file="." fps="25"/>
      <BIOS>
        <IOAPIC enabled="true"/>
        <SmbiosUuidLittleEndian enabled="true"/>
      </BIOS>
      <USB>
        <Controllers>
          <Controller name="OHCI" type="OHCI"/>
          <Controller name="EHCI" type="EHCI"/>
        </Controllers>
      </USB>
      <Network>
        <Adapter slot="0" enabled="true" MACAddress="0800279673C5" type="82540EM">
          <DisabledModes>
            <InternalNetwork name="intnet"/>
            <NATNetwork name="NatNetwork"/>
          </DisabledModes>
          <HostOnlyInterface name="vboxnet0"/>
        </Adapter>
      </Network>
      <AudioAdapter codec="AD1980" driver="Pulse" enabled="true" enabledIn="false"/>
      <RTC localOrUTC="UTC"/>
      <Clipboard/>
      <GuestProperties>
        <GuestProperty name="/VirtualBox/HostInfo/GUI/LanguageID" value="en_US" timestamp="1601480023420786000" flags=""/>
      </GuestProperties>
    </Hardware>
    <StorageControllers>
      <StorageController name="IDE" type="PIIX4" PortCount="2" useHostIOCache="true" Bootable="true">
        <AttachedDevice passthrough="false" type="DVD" hotpluggable="false" port="1" device="0"/>
      </StorageController>
      <StorageController name="SATA" type="AHCI" PortCount="1" useHostIOCache="false" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3">
        <AttachedDevice type="HardDisk" hotpluggable="false" port="0" device="0">
          <Image uuid="{d3424c30-fff2-4494-9b03-c6eb37e786f3}"/>
        </AttachedDevice>
      </StorageController>
    </StorageControllers>
  </Machine>
</VirtualBox>

Re: VMDK file and kernel panic.

Posted: 30. Sep 2020, 20:18
by fth0
If the guest OS is a 64-bit variant, you have to use the matching 64-bit guest OS type. Other than that, VMware uses an LsiLogic SCSI controller instead of the SATA controller. HTH.

Re: VMDK file and kernel panic.

Posted: 30. Sep 2020, 20:32
by hack3rcon
fth0 wrote:If the guest OS is a 64-bit variant, you have to use the matching 64-bit guest OS type. Other than that, VMware uses an LsiLogic SCSI controller instead of the SATA controller. HTH.
Thank you so much.
Problem solved by change SATA to LsiLogic.