A&D of Network Security - Lab 3
tags: Practicum of A&D of NS NTU
Background
Network setting type in virtual box

Ping two machine in internal mode
- Clone another VM

- Setting Network Configuration
Setting 2 VMs’ network config as above.
Note that, must check MAC address is different, promiscuous mode is Allow Alland the adapter is the same. -
Check ifconfig


-
Ping each other


Test Communication between bridged VMs on Different Hosts
- Setting Bridged Adapter of each VM
Note that, the adapter must be the same. -
Check ifconfig

It should be the same of sub-ip as your true machine

- Ping

Reconstruct ARP cache by iteratively PING all subnet IP addresses
Objective: scanning all the machine in the same LAN
Note
DO NOT EXECUTE IN DORM… YOU’LL BE BANNED…
Source Code
1 | |
Detailed Process
- Setting to Host-Only Adapter

-
Check ifconfig
It should be the same as your real machine



- Setting the code
1
2
3
4
5$ sudo dos2unix arpscan.sh $ sudo chmod 777 arpscan.sh $ vim arpscan.sh # modify the sub-ip as the same as your real machine, i.e. 192.168.56.{1..254} $ sudo bash arpscan.sh
Testing Communication between VMs on Different Hosts using NAT
Objective: Find another physical computer and open web service on each PC then use port forwarding to connect the web service to each other.
- Find another physical computer and connect your own network
- Set to NAT mode

-
Check your physical computer and VM’s ip


- Turn off VM and set port forwarding

- Open your web service
1
$ sudo service apache2 startThen test if the service is open or not in local host

- Start to let somebody else to query your service
OR…
You can edit the content of index.htmland the result is as below.1
2
3
4
5$ cd /var/www/html $ sudo rm index.html $ sudo touch index.html $ sudo vim index.html # Just write `It works on VM1!!!` and saved it