.

Setting up Vitrual Lab

<<

vp75

Jr. Member
Jr. Member

Posts: 78

Joined: Tue May 01, 2007 6:46 am

Post Sat Jun 02, 2007 5:12 pm

Setting up Vitrual Lab

quote author=blackazarro link=topic=1369.msg4977#msg4977 date=1180737930]

Vp75, it appears that you're a bit confuse and that's ok. I was also confuse when I started to learn about VMware and virtual machines. I encourage you to reread Negrita's article carefully. What ever linux distro you download, you have to use a virtualization software in order to convert it to a virtual machines. Then use the VMware Player to boot-up the linux OS or whatever OS you interested in.

As for the knoppix distro, download the iso image and burned this to a cd. In your burning cd software, make sure to choose the option for burning iso image to a cd. Then use VMware Server or VMX Builder as I mentioned before, to create the virtual machine. This step here is similar to installing a OS on your system but you are doing it virtually. I haven't used knoppix for while but I think this distro does have an option to install it on a hard drive.

After successfully installing knoppix virtually you can add scripts, download applications and configure settings in your virtual machine and this will be saved.

Suse and Knoppix are two different linux distribution, for complete info refer to the following links:

http://en.wikipedia.org/wiki/SUSE_Linux
http://en.wikipedia.org/wiki/Knoppix

Vp75, if you still having problems in creating and playing virtual machines, I recommend that you check EH-NET forums for any information that will help you on the subject or create a new forum topic so we can address your problems there. I would like to keep this forum topic CEH related ;)  ,thanks.
[/quote]

Hi blackazarro ,

Thanks for your reply, as it is about setting up virtual lab iam taking this as a new topic , hope iam in right place now.

blackazarro , i installed knoppix 5.1.0 and downloaded 5.1.0 iso live cd and renamed as per negrita post and able to open knoppix in vmplayer. Iam able to ping both side and i have got the ethernet selection as NAT, Anyway dynamic ipaddress is assigned to virtual pc and am able to ping both the host & guest, but not able to use internet or connect to internet in virtual pc, iam  not sure of what setting needs to be done in knoppix.

Also iam not able to save any desktop configuration in virtual pc, does it needs to be with any write permission, bcoz when i tried setting read/write permission i had message saying it should be mounted....! how does virtual pc have space to store scripts...?

Does any one have idea....or clue about it,

Cheers
Vp75
Last edited by vp75 on Sat Jun 02, 2007 5:14 pm, edited 1 time in total.
eCPPT
<<

blackazarro

User avatar

Sr. Member
Sr. Member

Posts: 368

Joined: Sun Aug 13, 2006 5:31 pm

Post Sun Jun 03, 2007 12:31 pm

Re: Setting up Vitrual Lab

Hi vp75,

First of all, I need some information from you so I can continue troubleshooting your problem.

1. What is your host OS (the physical, real OS running on your computer)?

2. What is your guest OS (this is the OS that you want to run virtually from your host OS)?

3. Are you booting the guest OS using the VMware playrer via a preinstalled virtual machine (installed guest OS using virtualization software like VMware Server or VMX builder) or from an iso image?

4. Did your create your virtual lab at home and are you using a SOHO router?
Security+, OSCP, CEH
<<

lastdojo

Newbie
Newbie

Posts: 2

Joined: Sun Jun 03, 2007 12:35 pm

Post Sun Jun 03, 2007 1:07 pm

Re: Setting up Vitrual Lab

I recommend VirtualBox (it seems you're having problems with VMWare)

http://www.virtualbox.org

It's pretty easy to configure, saves you the hassle of working with VMWare images.
Last edited by lastdojo on Sun Jun 03, 2007 1:10 pm, edited 1 time in total.
<<

vp75

Jr. Member
Jr. Member

Posts: 78

Joined: Tue May 01, 2007 6:46 am

Post Sun Jun 03, 2007 4:53 pm

Re: Setting up Vitrual Lab

blackazarro wrote:
Hi vp75,

First of all, I need some information from you so I can continue troubleshooting your problem.

1. What is your host OS (the physical, real OS running on your computer)?

2. What is your guest OS (this is the OS that you want to run virtually from your host OS)?

3. Are you booting the guest OS using the VMware playrer via a preinstalled virtual machine (installed guest OS using virtualization software like VMware Server or VMX builder) or from an iso image?

4. Did your create your virtual lab at home and are you using a SOHO router?


Hi

Oops, i should have provided these information before i write the query, anyway,

1. My Host is Windows XP Home edition,
2. I want to run Knoppix 5.1.0 version.
I downloaded Knoppix 5.1.0 virtual machine thru link provided by vmware website, it had set of files .nvram, .vmdk, .vmx and one livecd.iso(this is just a dummy iso file and needed to download orinial .iso file from knoppix.net which i downloaded and renamed as livecd.iso)
Everything was placed in directory as given in negrita on vmware setting up article)
3. iam booting guest OS thru vmplayer where it asks to open .vmx file and from there it checks for livecd.iso image file and boots it, there is no vmserver or i didnt create thru vmx builder.)
4. No i didnt create using vmx builder.

Hope this helps,

Cheers
Vp75
eCPPT
<<

blackazarro

User avatar

Sr. Member
Sr. Member

Posts: 368

Joined: Sun Aug 13, 2006 5:31 pm

Post Mon Jun 04, 2007 12:02 am

Re: Setting up Vitrual Lab

Ok, now that I have a clear picture of basically what you have setup as of now, lets proceed with your problem. We are going to tackle this one step at a time.

Let start first with the problem that you are having saving configurations settings and data on your Knoppix OS. Based on the information that you've provided, if you boot Knoppix using the iso image then all your settings, softwares or scripts won't be saved, that is because all this information is being temporarily  stored into your computer's ROM. As soon you shutdown Knoppix all this data is lost. Some Linux distros that are designed to function as a live cd will usually have sets of commands to save this data to a media disk, for instance, a usb flash drive. When you boot the system up with the usb plugged in to your computer, you'll then execute the appropriates commands to restore your saved settings. This is kind of a hassle so I preferred to use VMware or VMX Builder to create a virtual machine by installing the OS onto a virtual hard drive. For an example, please refer to Irongeek's video on how to do this with VMX Builder. In that way, every time you configure a setting or download a software, this data will be saved on your virtual hard drive where your virtual machine resides.

I will like to mention that some virtual appliances that you see in VMware website are preconfigured to use the OS iso image and others are created as vitural machines. The virtual machine has a VMware virtual disk file (with file extension .vmdk). The VMware player uses either the iso image or virtual disk file to boot the OS.

After you've solved this problem we'll go ahead and try to fix your internet connection problems.

Note: I'm not an expert in VMware or virtualization software so if anybody finds errors on what I've written, please jump in and correct me. Thanks
Security+, OSCP, CEH
<<

vp75

Jr. Member
Jr. Member

Posts: 78

Joined: Tue May 01, 2007 6:46 am

Post Wed Jun 06, 2007 2:00 am

Re: Setting up Vitrual Lab

Hi blackazarro

thanks for your reply, i think i would prefer to install it in virtual pc and go on with that, and with virtual workstation or virtual server i think i will be able to achieve that. Will be installing this today and will try it. Will keep updating you about it soon....

CHeers
Vp75
eCPPT
<<

vp75

Jr. Member
Jr. Member

Posts: 78

Joined: Tue May 01, 2007 6:46 am

Post Wed Jun 06, 2007 1:18 pm

Re: Setting up Vitrual Lab

blackazarro wrote:
Ok, now that I have a clear picture of basically what you have setup as of now, lets proceed with your problem. We are going to tackle this one step at a time.

Let start first with the problem that you are having saving configurations settings and data on your Knoppix OS. Based on the information that you've provided, if you boot Knoppix using the iso image then all your settings, softwares or scripts won't be saved, that is because all this information is being temporarily  stored into your computer's ROM. As soon you shutdown Knoppix all this data is lost. Some Linux distros that are designed to function as a live cd will usually have sets of commands to save this data to a media disk, for instance, a usb flash drive. When you boot the system up with the usb plugged in to your computer, you'll then execute the appropriates commands to restore your saved settings. This is kind of a hassle so I preferred to use VMware or VMX Builder to create a virtual machine by installing the OS onto a virtual hard drive. For an example, please refer to Irongeek's video on how to do this with VMX Builder. In that way, every time you configure a setting or download a software, this data will be saved on your virtual hard drive where your virtual machine resides.

I will like to mention that some virtual appliances that you see in VMware website are preconfigured to use the OS iso image and others are created as vitural machines. The virtual machine has a VMware virtual disk file (with file extension .vmdk). The VMware player uses either the iso image or virtual disk file to boot the OS.

After you've solved this problem we'll go ahead and try to fix your internet connection problems.

Note: I'm not an expert in VMware or virtualization software so if anybody finds errors on what I've written, please jump in and correct me. Thanks




Hi blackazarro

Atlast got Virtual workstation and alloted 5GB space for SUSE linux initially to start with. Now everything is fine except the net connection setup...guys pls help me to move forward on setting the net access in linuz, FYI i have got the NAT setup in virtual pc, i tried giving entry for default gateway, still couldnt get it, tried pinging my windows pc (host) it recognizes.....so ....not sure where iam missing entry....

Cheers
Vp75
eCPPT
<<

blackazarro

User avatar

Sr. Member
Sr. Member

Posts: 368

Joined: Sun Aug 13, 2006 5:31 pm

Post Wed Jun 06, 2007 2:11 pm

Re: Setting up Vitrual Lab

Awesome, now that you got that out of the way can you please provide us some additional info:

1) Run a command DOS in your host OS and type the following command:

  Code:
ipconfig /all


2) On your guess OS open a new shell and type the following two commands:

  Code:
ifconfig


  Code:
netstat -nr


For each command please post the results so I can analyze them.
Security+, OSCP, CEH
<<

vp75

Jr. Member
Jr. Member

Posts: 78

Joined: Tue May 01, 2007 6:46 am

Post Fri Jun 08, 2007 1:51 am

Re: Setting up Vitrual Lab

Hi Blackzarro

ifconfig in linux didnt fetch me any result, , i got error message as
bash: ifconfig : command not found. But when i try man ifconfig it displays help information on ifconfig command, so couldnt get details about linux config details,
Got details about host OS with ipconfig/all

---------------------------------------------------------------
Windows IP Configuration

        Host Name . . . . . . . . . . . . : XXX
        Primary Dns Suffix  . . . . . . . :
        Node Type . . . . . . . . . . . . : Unknown
        IP Routing Enabled. . . . . . . . : No
        WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter VMware Network Adapter VMnet8:

        Connection-specific DNS Suffix  . :
        Description . . . . . . . . . . . : VMware Virtual Ethernet Adapter for
VMnet8
        Physical Address. . . . . . . . . : 00-50-56-C0-00-08
        Dhcp Enabled. . . . . . . . . . . : No
        IP Address. . . . . . . . . . . . : 192.168.36.1
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . :

Ethernet adapter VMware Network Adapter VMnet1:

        Connection-specific DNS Suffix  . :
        Description . . . . . . . . . . . : VMware Virtual Ethernet Adapter for
VMnet1
        Physical Address. . . . . . . . . : 00-50-56-C0-00-01
        Dhcp Enabled. . . . . . . . . . . : No
        IP Address. . . . . . . . . . . . : 192.168.145.1
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . :

Ethernet adapter Local Area Connection:

        Media State . . . . . . . . . . . : Media disconnected
        Description . . . . . . . . . . . : Realtek RTL8139/810x Family Fast Ethernet NIC
        Physical Address. . . . . . . . . : 00-0D-61-ED-F0-CE

Ethernet adapter AGN Virtual Network Adapter:

        Connection-specific DNS Suffix  . :
        Description . . . . . . . . . . . : AGN Virtual Network Adapter
        Physical Address. . . . . . . . . : 00-00-00-00-00-01
        Dhcp Enabled. . . . . . . . . . . : No
        IP Address. . . . . . . . . . . . : 0.0.0.0
        Subnet Mask . . . . . . . . . . . : 0.0.0.0
        Default Gateway . . . . . . . . . :

Ethernet adapter Wireless Network Connection:

        Connection-specific DNS Suffix  . :
        Description . . . . . . . . . . . : NETGEAR WG111T 108Mbps Wireless 2.0 Adapter
        Physical Address. . . . . . . . . : 00-14-6C-5D-C7-DA
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : Yes
        IP Address. . . . . . . . . . . . : 192.168.0.2
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.0.1
        DHCP Server . . . . . . . . . . . : 192.168.0.1
        DNS Servers . . . . . . . . . . . : xx.xx.xx.xx
                                            xx.xx.xx.xx
        Lease Obtained. . . . . . . . . . : 07 June 2007 20:56:02
        Lease Expires . . . . . . . . . . : 10 June 2007 20:56:02
---------------------------------------------------------------
Hope this wil help me....

Updating @17:00 GMT - ifconfig executed only when iam logged in as root, couldnt copy & paste the details across Guest OS to Host OS...will post it soon.

CHeers
Vp75
Last edited by vp75 on Mon Jun 11, 2007 7:25 am, edited 1 time in total.
eCPPT
<<

blackazarro

User avatar

Sr. Member
Sr. Member

Posts: 368

Joined: Sun Aug 13, 2006 5:31 pm

Post Fri Jun 08, 2007 1:42 pm

Re: Setting up Vitrual Lab

As mentioned in http://www.linuxcommand.org:

When you type in the name of a command, the system does not search the entire computer to find where the program is located. That would take a long time. You have noticed that you don't usually have to specify a complete path name to the program you want to run, the shell just seems to know.

Well, you are right. The shell does know. Here's how: the shell maintains a list of directories where executable files (programs) are kept, and just searches the directories in that list. If it does not find the program after searching each directory in the list, it will issue the famous command not found error message.

This list of directories is called your path. You can view the list of directories with the following command:

[me@linuxbox me]$ echo $PATH

This will return a colon separated list of directories that will be searched if a specific path name is not given when a command is attempted.

You can add directories to your path with the following command, where directory is the name of the directory you want to add:

[me@linuxbox me]$ export PATH=$PATH:directory

A better way would be to edit your .bash_profile file to include the above command. That way, it would be done automatically every time you log in.

Most modern Linux distributions encourage a practice in which each user has a specific directory for the programs he/she personally uses. This directory is called bin and is a subdirectory of your home directory. If you do not already have one, create it with the following command:

[me@linuxbox me]$ mkdir bin

Move your script into your new bin


With this information we can do the following: (example):

  Code:
bob@bob-desktop:~$ whereis ifconfig
ifconfig: /sbin/ifconfig /usr/share/man/man8/ifconfig.8.gz
bob@bob-desktop:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/bin:/usr/bin/X11:/usr/games


Notice that directory /sbin/ is not included in my $PATH environment variable, so if I execute the ifconfig command it will give me an error message similar to yours.

I can manually execute the command including its absolute path like so:

  Code:
/sbin/ifconfig


or add this directory to my $PATH so  every time I execute this command the shell can find it:

  Code:
export PATH=$PATH:/sbin


and now I should have it include in my $PATH:

  Code:
bob@bob-desktop:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/sbin


Remember to include the netstat -nr result for your guest OS and also, I recommend that you visit the above link to learn the basic linux commands.
Security+, OSCP, CEH
<<

vp75

Jr. Member
Jr. Member

Posts: 78

Joined: Tue May 01, 2007 6:46 am

Post Mon Jun 11, 2007 7:29 am

Re: Setting up Vitrual Lab

Hi Blackzarro

Thanks for ur reply , i got the ifconfig details, stored it as a file, but couldnt copy it across copy&paste to windows from virtual pc or not sure how to bring the stored file from vmware to windows....!
will post very soon,
cheers
Vp75
eCPPT
<<

blackazarro

User avatar

Sr. Member
Sr. Member

Posts: 368

Joined: Sun Aug 13, 2006 5:31 pm

Post Mon Jun 11, 2007 7:52 am

Re: Setting up Vitrual Lab

I think there's a VMware tool that you can install for SUSE that will let you copy and paste between guest and host. Google it to find it. Also, you can always use a usb flash drive.

If it's to much trouble for you, just give me the interface (e.g. eth0), IP address and submask.
Security+, OSCP, CEH
<<

LSOChris

Post Mon Jun 11, 2007 8:19 am

Re: Setting up Vitrual Lab

use SCP to move the file(s) between your host and guest Operating Systems.
<<

vp75

Jr. Member
Jr. Member

Posts: 78

Joined: Tue May 01, 2007 6:46 am

Post Tue Jun 12, 2007 4:53 pm

Re: Setting up Vitrual Lab

Hi ChrisG

Thanks for ur help.

hi Blackzarro

Atlast you would be surprised to hear this, iam posting this reply from Suse linux broswer (konqueror) ;D

I was not sure how it was configured to access net, i suspect i installed dhcp configuration from suse dvd and from there it started working. I hope it didnt had proper dhcp modules to extract or not sure iam bluffing something dumb....

Now to the problem side,

I couldnt open 192.168.0.1 router configuration admin page.....! not sure whats happening.

Anyway as u requested iam posting the ifconfig -a command execution:

eth0      Link encap:Ethernet  HWaddr 00:0C:29:A4:D2:FB
          inet addr:192.168.0.128  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fea4:d2fb/64 Scope:Link
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:612 errors:0 dropped:0 overruns:0 frame:0
          TX packets:398 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:296580 (289.6 Kb)  TX bytes:53178 (51.9 Kb)
          Interrupt:10 Base address:0x2024

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:50 errors:0 dropped:0 overruns:0 frame:0
          TX packets:50 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3260 (3.1 Kb)  TX bytes:3260 (3.1 Kb)

sit0      Link encap:IPv6-in-IPv4
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

And here comes Netstat -nr:
Kernel IP routing table
Destination    Gateway        Genmask        Flags  MSS Window  irtt Iface
192.168.0.0    0.0.0.0        255.255.255.0  U        0 0          0 eth0
169.254.0.0    0.0.0.0        255.255.0.0    U        0 0          0 eth0
127.0.0.0      0.0.0.0        255.0.0.0      U        0 0          0 lo
0.0.0.0        192.168.0.2    0.0.0.0        UG        0 0          0 eth0

And here is ipconfig/all from Host windows xp home
Windows IP Configuration

        Host Name . . . . . . . . . . . . : Vp
        Primary Dns Suffix  . . . . . . . :
        Node Type . . . . . . . . . . . . : Unknown
        IP Routing Enabled. . . . . . . . : No
        WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Local Area Connection:

        Media State . . . . . . . . . . . : Media disconnected
        Description . . . . . . . . . . . : Realtek RTL8139/810x Family Fast Eth
ernet NIC
        Physical Address. . . . . . . . . : 00-0D-61-ED-F0-CE

Ethernet adapter VMware Network Adapter VMnet8:

        Connection-specific DNS Suffix  . :
        Description . . . . . . . . . . . : VMware Virtual Ethernet Adapter for
VMnet8
        Physical Address. . . . . . . . . : 00-50-56-C0-00-08
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : Yes
        IP Address. . . . . . . . . . . . : 0.0.0.0
        Subnet Mask . . . . . . . . . . . : 0.0.0.0
        Default Gateway . . . . . . . . . :
        DHCP Server . . . . . . . . . . . : 255.255.255.255

Ethernet adapter Wireless Network Connection:

        Connection-specific DNS Suffix  . :
        Description . . . . . . . . . . . : NETGEAR WG111T 108Mbps Wireless USB2
.0 Adapter
        Physical Address. . . . . . . . . : 00-14-6C-5D-C7-DA
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : Yes
        IP Address. . . . . . . . . . . . : 192.168.0.2
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.0.1
        DHCP Server . . . . . . . . . . . : 192.168.0.1
        DNS Servers . . . . . . . . . . . : xxx.xx.xxx.xx
                                            xxx.xx.xxx.xx
        Lease Obtained. . . . . . . . . . : 12 June 2007 20:50:48
        Lease Expires . . . . . . . . . . : 15 June 2007 20:50:48

Ethernet adapter VMware Network Adapter VMnet1:

        Connection-specific DNS Suffix  . :
        Description . . . . . . . . . . . : VMware Virtual Ethernet Adapter for
VMnet1
        Physical Address. . . . . . . . . : 00-50-56-C0-00-01
        Dhcp Enabled. . . . . . . . . . . : No
        IP Address. . . . . . . . . . . . : 192.168.0.5
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . :

Anyhelp friends....

Cheers
Vp75
eCPPT
<<

blackazarro

User avatar

Sr. Member
Sr. Member

Posts: 368

Joined: Sun Aug 13, 2006 5:31 pm

Post Tue Jun 12, 2007 6:12 pm

Re: Setting up Vitrual Lab

At least you got the Internet issue working, however I see something weird in your NIC configuration. Did you manually configure the VMnet8 and VMnet1 configurations?

You are having problem accessing your router's admin page from SuSe because your packets never get to the router:

  Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U         0 0          0 lo
0.0.0.0         192.168.0.2     0.0.0.0         UG        0 0          0 eth0



Your router IP is (192.168.0.1) and by looking the above netstat's result, especially the first line:

  Code:
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0


there's no way that the packet will ever get to your router. Remember your guest OS is a virtual machine and it needs a gateway in order route the packet to the host machine then to the router even though it appears that your guest OS is within the local network.

For what I understand and knowing how my virtual lab is setup, the virtual NIC (e.g. VMnet8) should have a different subnet from your host machine. This is automatically assigned when you install VMware player or other VMware software. Therefore your guest hosts should have a IP address within the VMnet8 subnet (different from your real local subnet).

Not sure if you understand this but I guess the best way to illustrate what I'm trying to say is by posting my virtual network configuration setup. I will post this later when I get a chance.
Security+, OSCP, CEH
Next

Return to Network Pen Testing

Who is online

Users browsing this forum: No registered users and 2 guests

cron
.
Powered by phpBB® Forum Software © phpBB Group.
Designed by ST Software