Creating an experimental environment for penetration testing Ubuntu virtual machine

Source: Internet
Author: User
Tags kali linux

1. Brief description

For the purpose of learning, penetration testing is not necessary to be a real environment, we can build an internal network, the installation of virtual machines on their own host can complete the experimental requirements, but also more convenient.

2. Installing virtual machines and related software

In order to add a host to our virtual network, we need to build several virtual machines, of course, the real machine is also very good. I am using Ubuntu 12.04 i386, which can be installed on the official Ubuntu website to download the appropriate version. Http://www.ubuntu.com/download/alternative-downloads
The specific installation process here does not do a specific introduction, you can search the Web-related installation tutorials. Talk about the configuration you need after you install it.
First update the system and execute the following command under Terminal:
  
  $ sudo apt-get update
  $ sudo apt-get upgrade
  

Since this system is then used to simulate what is going on in a typical network, you need to install some necessary software. First, install the services of the lamp (Linux, Apache, MySQL, and PHP) architectures.
1. Execute the following command under Terminal.
  
  $ sudo apt-get install lamp-server^
  

2. During the installation process, you need to set a password for the root user of MySQL and confirm it after Setup is complete.
After the installation is complete, check the operation of the following services.
  

3. Configure the Network

After the virtual machine installation is complete, we need to configure the network. Kali Linux is the host of penetration testing, Ubuntu as the object being tested.
1. Set up the Ubuntu NIC.
Turn the Ubuntu console off and into the VirtualBox Settings screen for Ubuntu. Enable NIC 1, set the connection mode to "internal network" and the name to "Vlab_1".
  
2. Set up the NIC for Kali Linux
Also enter Kali network settings option, enable NIC 2, connect mode select Internal network, and turn advanced options on, enable promiscuous mode enabled. This option is turned off by default, and promiscuous mode allows you to listen for traffic within your own network segment.
  
3. Configure the Ubuntu network
Terminal operationifconfigcommand to check the configuration of the network. Build your own internal network and assign IP addresses in a static and manual manner.
Open terminal and enter the following command:
  
  $ sudo ifconfig eth0 192.168.50.12 netmask 255.255.255.0 broadcast 192.168.50.255
  

4. Configuring the Kali Network
Terminal Enter the following command:
  
  # ifconfig eth1 192.168.50.10 netmask 255.255.255.0 broadcas 192.168.50.255 promisc
  

Here I am using the NIC Eth1 (located in the vlab_1) network segment with an IP address of 192.168.50.10, the broadcast address is192.168.50.255, the NIC is promiscuous mode.
  
5. Test connectivity
Ping each other's IP address under Ubuntu and Kali, respectively.
Under Kali flat Ubuntu:
  
Ping Kali under Ubuntu:
  
OK, the test has passed!
6. Reboot to keep IP address
The IP addresses that are manually assigned by the Ifconfig method are invalidated each time the machine restarts, and if you want to retain the previously assigned IP address after each reboot, you can/etc/network/interfacesThe appropriate configuration is added to the file.
Here are the configurations that I added under Kali:
  

auto192.168.50.10255.255.255.0192.168.50.0192.168.50.255

Save after modification, restart Network Service (requires root permission):

/etc/init.d/networking restart

Creating an experimental environment for penetration testing Ubuntu virtual machine

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.