Moar Pentesting Lab – Setting up a NAS

First off, errata from the last post. Working through the Weidman book, the copy of Windows XP SP 3 I listed doesn’t work for the exploits listed in the book and the security updates applied can’t be uninstalled. Windows XP SP2 does work, however I have yet to find a good, clean source for this.

Time to move on and set up the home NAS that will support my VMWare infrastructure. I decided on NAS4Free, since FreeNAS no longer supports x86 systems and my intent is to repurpose an old 32 bit system to support this. This isn’t necessarily the “right” or “best” way to do this, but it is what it is. And it works, very well. We’re doing an embedded USB install here, for ease of use and (hopefully, we’ll see) updating.

Use Win32 Disk Imager, located here to place the NAS4FREE image onto a USB. The image depends on the type of system, I’m using an old 32 bit system so I picked the 32 bit image for version 10.3.0.3. Pick the appropriate image from here and download that. Using the tool to load the image is pretty painless.

Once that is complete, set the system to boot from USB in the BIOS setting and reboot, with your USB attached. Connect a second USB stick to the system. Once the system completes booting, select the first option in order to create an embedded USB install. The system will then prompt you to select a “source” disk, you should pick the USB with the image loaded onto it. The system will then prompt you for a “destination” disk, select the second USB drive. The install will then complete and the server will become available on 192.168.1.250 on your local network. This can be changed from the console if needed.

From a desktop, navigate in a web browser to http://192.168.1.250 and login using the username admin and the password nas4free. Once logged in you can change these values in the System>General menu. Navigate to the Disks>Management menu.

In order to manage the disk, they must first be imported. This walkthrough assumes the disks have no data on them. Select Import Disks under the HDD Management tab. Once completed, switch to the HDD Format tab. It defaults to ZFS Storage Pool, but since ZFS is incompatible with Windows I switched this to UFS. Select UFS, select all disks, and select Next to continue to the next menu. The Minimum Free Space setting defaults to 8%, leave that at the default and input a volume name. Select Next again and begin the formatting process. Once that is complete, it is time to mount the drives.

import

There is an option to create a RAID, after some deliberation I decided against it. RAIDs are really useful for fault tolerance, which isn’t a requirement in my home lab. If you aren’t running real-time backups suited for a home network (ie crashplan, carbonite, custom solution, etc) then this may be a consideration.

Navigate to the Services>CIFS/SMB menu. Select the Shares tab and create shares for each disk, using a custom name for each. Once complete, navigate back to the Settings tab and ensure that Enable is selected under CIFS (it is on the right side). Once this is complete, save and restart. The shares will not be accessible until you select Save and Restart.

nocomment

Once this is complete, map the drives under Windows and they should be accessible. Map them as the name, so \\192.168.1.250\mount_1 from my example picture would map the first disk. Step 1 was setting up the VMs. Step 2: Make a NAS is complete. Now to get the ESXi server up…