Converting NMAP reports from HTML to XML

You can use NMAP to perform scans on targets. NMAP supports different output formats for saving scan results. You can choose normal, XML, and grepable. This post explains how use Kali Linux to save a report output as an XML file and convert it to readable HTML.

To use the XML output format complete the following steps.

  1. Open the NMAP terminal.
  2. Enter the follow command for your target: nmap [your target] -oX ~/Desktop/nmap.xml
  3. The report is saved on your desktop. You can read it using a text editor.

 

To convert the XML report into HTML complete the following steps:

  1. Open the NMAP terminal.
  2. Enter the following command: xsltproc Desktop/nmap.xml –o nmap.html
  3. The report is saved on your desktop. You can access it using the browser.

Part 3: Setting up a lab – Installing Windows 95 on Virtual Box


This one is purely for nostalgia purposes. Installing Windows 95 on VirtualBox. There’ll be a second part to this -connecting to the Internet. I am too weary after writing this not-so-concise tutorial to cram it into the one tutorial. FYI there’s no Solitaire on this. That might be the part 3. Don’t forget when you boot up for the first time to have the volume up so you can listen to the infamous startup sound. It’s worth the drama.

  1. Navigate to https://winworldpc.com/product/windows-95/osr-2 download the Windows 95 floppy disc and CD files:
    1. Windows 95 OSR2 (OEM) (3.5-DMF)
    2. Windows 95 OSR2 (OEM) (ISO)
  2. To install Windows 95 on VirtualBox, click New.
  3. Name the machine Windows 95.
  4. In the Type: field select Microsoft Windows.
  5. In the Version: field select Windows 95.
  6. Configure RAM to 256MB and click Next.
  7. In the rest of the Wizard accept all defaults.
  8. Power off your virtual machine.
  9. Right-click your virtual machine and select Settings.
  10. Navigate to System > Acceleration and deselect Enable VT-x/AMD-V.
  11. Navigate to Storage and click Empty under Controller: Floppy and click on the virtual floppy disk icon under Attributes.
  12. Select Microsoft Windows 95B (4.00.1111.osr2) (3.5)\Boot.img.
  13. Click Empty under Controller: IDE and click on the virtual optical disk icon under Attributes.
  14. Select Microsoft Windows 95B (4.00.1111) (OSR2) [English] (CD)\windows95b.iso.
  15. Click OK.
  16. Turn on your virtual machine.
  17. Choose Start computer without CD-ROM support.
  18. To partition your virtual drive execute the following command fdisk and press ENTER.
  19. In Do you wish to enable large disk support, type Y and press ENTER.
  20. In FDISK Options select 1. Create DOS partition or Logical DOS Drive.
  21. In Create DOS Partition or Logical DOS Drive select 1. Create Primary DOS Partition.
  22. Type Y and press ENTER.
  23. Restart your virtual machine by navigating to Input > Keyboard > Insert CTRL+ALT+DEL.
  24. To format your drive execute the following command format c:.
  25. In Proceed with Format select Y.
  26. Press ENTER.
  27. Restart your virtual machine by navigating to Input > Keyboard > Insert CTRL+ALT+DEL.
  28. Note your drive letter, for example Drive E: = Driver MSCD001 unit 0.
  29. Run the following command to copy the files from the Windows 95 disc to your C: drive, replacing R: with whatever drive letter corresponds to your virtual disc drive xcopy R:\ C:\INSTALL\ /S.
  30. Navigate to your install folder by executing the following commands:
    1. c:
    2. cd INSTALL
    3. setup
  31. Press ENTER.
  32. Click EXIT.
  33. To begin setup click Continue.
  34. Accept all of the defaults.
  35. Enter the number found on your Certificate of Authenticity and click Next.
  36. Enter your user information and click Next.
  37. In the Analyzing Your Computer window check Network Adapter and Sound, MIDI, or Video Capture Card and click Next.
  38. In Windows Components select Install the most common components (recommended) and click Next.
  39. In Startup Disk select No, I do not want a startup disk and click Next.
  40. In Finishing Setup click Finish.
  41. Windows will prompt you to restart the machine and remove the floppy disk from your computer. To do this, click Devices > Floppy Drive > Remove Disk From Virtual Drive. Click OK.

Part 2: Setting up a lab – Metasploitable


I’m going to build my lab piece by piece and create a tutorial on how I do it. If you want to follow sequentially, please refer first to my previous post https://www.girlfromtomorrow.com/technical-tools/installing-kali-linux-on-virtualbox/ to start.

To run Metasploitable on VirtualBox complete the following steps:

  1. Navigate to https://information.rapid7.com/download-metasploitable-2017.html complete the form and click SUBMIT.
  2. Download the folder.
  3. Unzip the folder.
  4. To install Metasploitable on VirtualBox, click New.
  5. Name the machine Metasploitable.
  6. In the Type: field select Linux.
  7. In the Version: field select Ubuntu.
  8. Configure RAM and click Next.
  9. In the Hard disk window select Use an existing virtual hard disk file and navigate to your Metasploitable download.
  10. Click Create.
  11. Log on using the following credentials:
    1. Username: mfsadmin
    2. Password: mfsadmin

Part 1: Setting up a lab – Installing Kali Linux on VirtualBox

Here’s the concise tutorial you’ve been waiting for. This tutorial is written for Windows 10 and can possibly be adapted.

Prerequisites

  • Your personal machine
  • Ethical hacking knowledge – know what you legally and ethically can and cannot do

Installing VirtualBox on Windows 10

  1. Navigate to https://www.virtualbox.org/wiki/Downloads.
  2. Under VirtualBox 6.0.4 platform packages click Windows hosts.
  3. Run the installer.
  4. To select default settings click Next in the Wizard until installation begins.

Setting up your virtual machine

  1. Open VirtualBox and click New.
  2. In the Name and operating system window change the name to something identifiable, for example, Kali.
  3. Change the Type to Linux.
  4. Change the Version to Debian (32-bit or 64-bit depending on your machine) and click Next.
  5. Configure the Memory size or click Next to accept the default.
  6. In Hard disk, select Create a virtual disk now and click Create.
  7. In Hard disk file type, select VDI (VirtualBox Disk Image) and click Next.
  8. In Storage on physical hard disk, select Dynamically allocated and click Next.
  9. Configure the File location and size or click Create to accept the default.

Installing Kali

  1. Navigate to https://www.kali.org/downloads/  and download Kali Linux 64 Bit .
  2. Open VirtualBox.
  3. To power on your virtual machine double-click its icon.
  4. In the Select start-up disk window browse to the location of your Kali image.
  5. Click Start.
  6. In the Boot menu select INSTALL.

The end.

If you have issues, let me know and I’ll consider compiling a troubleshooting guide.