Remote Exploit Forums

Go Back   Remote Exploit Forums > Archives > BackTrack v2.0 Final > Tutorials & Guides


Tutorials & Guides Contributions welcome! Please check the rules & guidelines for posting

   

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-21-2007, 04:27 AM
balding_parrot's Avatar
Administrator
 
Join Date: May 2007
Posts: 3,259
Thumbs up [TUTORIAL] How to install VMware Server on BT2 (Step by Step)

OK so here it is, Many have said it is impossible, but it's not. You too can run VMware Server under BT2 and I am going to show you how.

Now I consider myself a Linux n00b so I am sure that there will be a much more elegant way to do much of what I am about to show you, but this is what works for me.

Obviously you must be doing this with a full install, or a live install with the save changes mod that Shamanvirtuel discovered. Attempting to do this on a plain live install is pointless and will just end up in you wasting a lot of time.

Just so as we are all on the same page, I am using BT2 FINAL not BETA, I have no idea whether this will work on beta and I have no intention of finding out. I will be using a live install with the changes mod, as this suited the development of this solution. This meant that if I messed up I only had to delete a couple of folders from the partition that holds the changes and reboot and I was back to a virgin install. I will be using VMware Server 1.0.3-44356 which is available for free from http://register.vmware.com/content/download.html yes those crazy people at vmware are giving it away, just remember to register for your serial (100 of them if you like).
You can also grab a windows version while you are there if you like.

I will be posting this in sections, 1 step per post (some steps will be over several posts), to help make each step clear, and to make things easier if someone has a problem with a particular step. They can then refer to the step where they are having a problem, hopefully making it easy for people to help others out. This is also required as there is no way that this is going to fit into 1 or 2 posts.

There WILL be information left out, this is not to make things difficult, it is because YOU will have to customise it to your situation, your requirements and in one case how you want to set your security.

OK so now I have got all that out of the way, on to what you have been waiting for, follow very carefully, read what I have written, and good luck.
__________________

Any questions you have will get a good answer as long as you have followed the forum rules and show you have tried to help yourself. Your questions are clear and contain as much relevant info as possible, especially error messages, commands you have tried and the output from those commands.

remember: garbage in = garbage out

BackTrack needs your donations, no matter how small.

Please contribute HERE


Last edited by balding_parrot; 07-21-2007 at 04:57 AM.
Reply With Quote
  #2 (permalink)  
Old 07-21-2007, 04:28 AM
balding_parrot's Avatar
Administrator
 
Join Date: May 2007
Posts: 3,259
Default Step 1 ------ Pam & Sysvinit

STEP 1 ------ PAM & SYSVINIT

This is the easiest of all of the steps, if you have a problem at this stage, give up now.

The VMware Server install requires some directories and placeholders to be present for the install to proceed. These are PAM which does not need to be installed as it is only looking for a directory, not sure why? The others are the SYSVINIT directories which are not present in a slackware install.

Open a console and type:
Code:
mkdir /etc/rc.d/{init,rc{0,1,2,3,4,5,6}}.d
mkdir /etc/pam.d
OK so that’s it for step one, simple wasn’t it.
__________________

Any questions you have will get a good answer as long as you have followed the forum rules and show you have tried to help yourself. Your questions are clear and contain as much relevant info as possible, especially error messages, commands you have tried and the output from those commands.

remember: garbage in = garbage out

BackTrack needs your donations, no matter how small.

Please contribute HERE

Reply With Quote
  #3 (permalink)  
Old 07-21-2007, 04:31 AM
balding_parrot's Avatar
Administrator
 
Join Date: May 2007
Posts: 3,259
Default Step 2 ------ Xinetd

STEP 2 ------ XINETD

This step does require you to edit a file for your security, but I will include a default which you can use for now and configure yours later.

The VMware Server install, wants either inetd or xinetd to continue the install.

I chose xinetd over inetd as inetd is very old and has some security flaws.

xinetd is an internet service daemon. Instead of having many
different servers running at the same time, only xinetd is loaded..
Whenever a request for a service is made, xinetd fires the
corresponding server up. It does this in a more secure manner
than it's precursor inetd.

Xinetd is available from here http://www.xinetd.org/xinetd-2.3.14.tar.gz you need to download this to your root directory.

Once downloaded you need to open a console and type:

Code:
tar xvzf xinetd-2.3.14.tar.gz
cd xinetd-2.3.14
./configure --prefix=/usr
make
make install
__________________

Any questions you have will get a good answer as long as you have followed the forum rules and show you have tried to help yourself. Your questions are clear and contain as much relevant info as possible, especially error messages, commands you have tried and the output from those commands.

remember: garbage in = garbage out

BackTrack needs your donations, no matter how small.

Please contribute HERE

Reply With Quote
  #4 (permalink)  
Old 07-21-2007, 04:33 AM
balding_parrot's Avatar
Administrator
 
Join Date: May 2007
Posts: 3,259
Default STEP 2 ------ XINETD cont....

Now you need to create the inetd.conf file by copying and pasting this entire code segment into the console window in one go.

Code:
cat > /etc/inetd.conf << "EOF"
# Begin /etc/inetd.conf

# Default configuration options that apply to all servers, can be
# overriden per service.

defaults
{
    instances      = 10
    log_type       = FILE /var/log/service.log 
    log_on_success = HOST PID
    log_on_failure = HOST RECORD
}

# The service name must be in /etc/services in order to obtain
# the correct port.
# If it's a non-standard server/port, use "port = X"
service ftp
{
    socket_type    = stream
    protocol       = tcp
    wait           = no
    user           = root
    server         = /usr/sbin/proftpd
    
}

#service telnet
#{
#    socket_type    = stream
#    protocol       = tcp
#    wait           = no
#    user           = root
#    no_access      = 0.0.0.0 
#    only_from      = 127.0.0.1
#    banner_fail    = /etc/telnet_fail 
#    server         = /usr/sbin/in.telnetd
#}

service ssh
{
    socket_type    = stream
    protocol       = tcp
    wait           = no
    user           = root
    port           = 22
    server         = /usr/sbin/sshd
    server_args    = -i
}

service http
{
    socket_type    = stream
    protocol       = tcp
    wait           = no
    user           = root
    server         = /usr/local/apache/bin/httpd
}

#service finger
#{
#    socket_type    = stream
#    protocol       = tcp
#    wait           = no
#    user           = root
#    no_access      = 0.0.0.0
#    only_from      = 127.0.0.1
#    banner_fail    = /etc/finger_fail
#    server         = /usr/sbin/in.fingerd
#    server_args    = -l
#}

# End /etc/inetd.conf
EOF
__________________

Any questions you have will get a good answer as long as you have followed the forum rules and show you have tried to help yourself. Your questions are clear and contain as much relevant info as possible, especially error messages, commands you have tried and the output from those commands.

remember: garbage in = garbage out

BackTrack needs your donations, no matter how small.

Please contribute HERE

Reply With Quote
  #5 (permalink)  
Old 07-21-2007, 04:35 AM
balding_parrot's Avatar
Administrator
 
Join Date: May 2007
Posts: 3,259
Default STEP 2 ------ XINETD cont....

Configuration information

Please note that this only is a sample configuration and you
will MOST CERTAINLY have to edit this to suite your needs.
YOUR SECURITY WILL BE AFFECTED IF YOU DON’T

Now we need to make sure that all of the above was successful.

Code:
xinetd
Ok so you saw nothing happen, now that is a good thing.
If you saw any error messages or didn’t get returned to the prompt, go back and make sure that you have followed the instructions to the letter.

Now we need to make xinetd run at boot-up by copying and pasting this entire code segment into the console window in one go.

Code:
cat > /etc/rc.d/init.d/inetd << "EOF"
#!/bin/sh
# Begin /etc/rc.d/init.d/inetd

#
# Include the functions declared in the /etc/init.d/functions file
#

source /etc/rc.d/init.d/functions

case "$1" in
        start)
                echo -n "Loading xinet super daemon"
                loadproc /usr/sbin/xinetd
                ;;

        stop)
                echo -n "Stopping xinet super daemon"
                killproc /usr/sbin/xinetd
                ;;

        restart)
                $0 stop
                /usr/bin/sleep 1
                $0 start
                ;;

        status)
                statusproc /usr/sbin/xinetd
                ;;

        *)
                echo "Usage: $0 {start|stop|reload|restart|status}"
                exit 1
        ;;

esac

# End /etc/init.d/inetd
EOF
Now you need to make this script executable and create the symbolic links by copying and pasting this entire code segment into the console window in one go.

Code:
chmod 755 /etc/rc.d/init.d/inetd &&
ln -s /etc/rc.d/init.d/inetd /etc/rc.d/rc1.d/K110xinetd &&
ln -s /etc/rc.d/init.d/inetd /etc/rc.d/rc2.d/K110xinetd &&
ln -s /etc/rc.d/init.d/inetd /etc/rc.d/rc3.d/S30xinetd &&
ln -s /etc/rc.d/init.d/inetd /etc/rc.d/rc4.d/S30xinetd &&
ln -s /etc/rc.d/init.d/inetd /etc/rc.d/rc5.d/S30xinetd &&
ln -s /etc/rc.d/init.d/inetd /etc/rc.d/rc6.d/K110xinetd
REBOOT it is VERY important that you do, if you do not you WILL run into problems later.

OK so that is probably the most difficult step of this long process done.
__________________

Any questions you have will get a good answer as long as you have followed the forum rules and show you have tried to help yourself. Your questions are clear and contain as much relevant info as possible, especially error messages, commands you have tried and the output from those commands.

remember: garbage in = garbage out

BackTrack needs your donations, no matter how small.

Please contribute HERE


Last edited by balding_parrot; 07-22-2007 at 08:42 PM.
Reply With Quote
  #6 (permalink)  
Old 07-21-2007, 04:37 AM
balding_parrot's Avatar
Administrator
 
Join Date: May 2007
Posts: 3,259
Default Step 3 ------ Perl

STEP 3 ------ PERL

Ok so after the hell of the last step here is an easy one

You need to insall perl 5.8.8 which I downloaded from here to my root directory.

http://slackware.osuosl.org/slackwar...8.8-i486-3.tgz

To install just type this in the console window

Code:
installpkg perl-5.8.8-i486-3.tgz
That’s it for this step.
__________________

Any questions you have will get a good answer as long as you have followed the forum rules and show you have tried to help yourself. Your questions are clear and contain as much relevant info as possible, especially error messages, commands you have tried and the output from those commands.

remember: garbage in = garbage out

BackTrack needs your donations, no matter how small.

Please contribute HERE


Last edited by balding_parrot; 07-22-2007 at 05:32 AM.
Reply With Quote
  #7 (permalink)  
Old 07-21-2007, 04:38 AM
balding_parrot's Avatar
Administrator
 
Join Date: May 2007
Posts: 3,259
Default STEP 4 ------ VMWARE SERVER INSTALL pt1

STEP 4 ------ VMWARE SERVER INSTALL pt1


Code:
tar xvzf VMware-server-1.0.3-44356.tar.gz
cd vmware-server-distrib
chmod 755 vmware-install.pl
vmware-install.pl
Follow this installer answering all the easy questions until you get to:

Quote:
Before running VMware Server for the first time, you need to configure it by invoking the following command: “/usr/bin/vmware-config.pl” . Do you want this program to invoke the command for you now? [yes]
SAY NO ! if you let it continue you will get errors and will possibly break the work you have done so far. YOU HAVE BEEN WARNED
__________________

Any questions you have will get a good answer as long as you have followed the forum rules and show you have tried to help yourself. Your questions are clear and contain as much relevant info as possible, especially error messages, commands you have tried and the output from those commands.

remember: garbage in = garbage out

BackTrack needs your donations, no matter how small.

Please contribute HERE


Last edited by balding_parrot; 07-22-2007 at 06:15 AM.
Reply With Quote
  #8 (permalink)  
Old 07-21-2007, 04:42 AM
balding_parrot's Avatar
Administrator
 
Join Date: May 2007
Posts: 3,259
Default STEP 5 ------ VMWARE SERVER INSTALL pt2 the patch

STEP 5 ------ VMWARE SERVER INSTALL pt2 the patch

You need to download this file to your root directory.

EDIT: This file is updated from time to time, so the version number will change !

http://knihovny.cvut.cz/ftp/pub/vmwa...date110.tar.gz

To install type this code into a console window.

Code:
tar xvzf vmware-any-any-update110.tar.gz
cd vmware-any-any-update110/
./runme.pl
This will tell you that some files have been patched and that some have not.

It will then offer to run the file that we stopped from running in the previous step, which you should answer yes to.

You will get many questions which most of you can just press enter to.
You will also have to make choices about how you want your network setup.

Just after you get this message:

Quote:
Please specify a port for remote console connections to use [902]
You will get an error saying:

Quote:
inetd: no process killed
Unable to make the Internet super-server (inetd) re-read its configuration
file, Please restart inetd by hand:
killall –v –HUP inetd

Hit enter to continue.
I have no idea why you get this error or how to fix it, but it does not seem to make any difference to VMware running correctly.

If you know how to fix this let me know and I will fix this tutorial.

Enter your serial number.

That’s it if you have got this far well done, you have just done the impossible and installed VMware Server on BT2.

To start VMware Server just type vmware into the console or better still in the runbox at the bottom of the screen.

DO NOT CLOSE THIS CONSOLE WINDOW AS IT WILL CLOSE VMWARE.
__________________

Any questions you have will get a good answer as long as you have followed the forum rules and show you have tried to help yourself. Your questions are clear and contain as much relevant info as possible, especially error messages, commands you have tried and the output from those commands.

remember: garbage in = garbage out

BackTrack needs your donations, no matter how small.

Please contribute HERE


Last edited by balding_parrot; 10-28-2007 at 02:53 AM.
Reply With Quote
  #9 (permalink)  
Old 07-21-2007, 08:02 AM
balding_parrot's Avatar
Administrator
 
Join Date: May 2007
Posts: 3,259
Default

Here are a couple of screenshots of the final result that you may be interested to see.







Hope you like the tutorial, and sorry it's so long
__________________

Any questions you have will get a good answer as long as you have followed the forum rules and show you have tried to help yourself. Your questions are clear and contain as much relevant info as possible, especially error messages, commands you have tried and the output from those commands.

remember: garbage in = garbage out

BackTrack needs your donations, no matter how small.

Please contribute HERE

Reply With Quote
  #10 (permalink)  
Old 07-21-2007, 04:50 PM
theprez98's Avatar
Super Moderator
 
Join Date: Apr 2007
Location: Maryland
Posts: 2,556
Default

Very nice job. Will you be providing us with a Windows image to play around with?
__________________
theprez98
"I want peace on earth and goodwill toward men."
"We are the United States Government. We don't do that sort of thing!"
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:28 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2