NET SEC Lab4
NET SEC Lab4
233650
BS CYS (4TH SEM)
NETWORK SECURITY:
LAB#4:
1#IP SPOOFING:
IP Spoofing is a technique where an attacker changes the source IP address in a packet to
impersonate another device. It is used for cyberattacks like DoS, MITM, and bypassing security
measures. Prevention includes packet filtering, authentication, and firewall rules.
IP before spoofing:
Download VPN from vpnbook and unzip vpn files:
-----------------------------------------------------------------------------------------------
2#MAC SPOOFING:
MAC spoofing is the act of changing a device’s MAC address (Media Access Control) to bypass
network restrictions, hide identity, or impersonate another device.
-----------------------------------------------------------------------------------------------
3#WEB SPOOFING:
Web spoofing is a cyberattack where an attacker creates a fake version of a legitimate website
to deceive users into entering sensitive information, such as usernames, passwords, or financial
details. This is often done using phishing techniques and tools like the Social Engineering
Toolkit (SEToolkit) to clone websites.
set IP of the host and paste the url of the website you to want clone here we paste the url of
github login page.
The attacker's machine hosts a fake GitHub login page, making it look real. When victims enter
their credentials, SEToolkit captures and stores them.
ARP SPOOFING:
install bettercap: command “sudo apt-get install bettercap”
Access Bettercap through root terminal:
These are the modules of bettercap:
The net.show command in Bettercap lists all active devices on the network, showing their IP,
MAC address, and hostname. This helps in network reconnaissance before launching attacks
or monitoring traffic.
Help net.probe Displays detailed information about the net.probe module, including its
usage, options, and parameters. It helps users understand how to actively scan for hidden
devices on the network.
The command net.probe on in Bettercap enables active network probing by sending ARP
and ICMP requests. This helps discover hidden or unresponsive devices on the network.
The command arp.spoof on makes the attacker’s device act like the router, so all network
traffic from the target passes through the attacker. This lets them see, modify, or steal data.
5# DNS SPOOFING:
DNS spoofing is a cyberattack where hackers trick your device into visiting fake websites by
altering DNS records. This can lead to data theft, phishing, or malware infections.
To start Apache2: command sudo service apache2 start
Check IP of your machine: ifconfig
Start Apache and access it in the browser:
set dns.spoof.address <IP> tells Bettercap to redirect spoofed DNS requests to the
specified IP. Use your Kali machine's IP if hosting a fake site or another target IP to redirect
victims elsewhere.
set dns.spoof.domains <domain> specifies which domain names Bettercap should spoof.
net.probe on enables network probing in Bettercap, actively detecting live hosts on the
network. This helps identify potential targets for further attacks
After setting up DNS spoofing, when the victim searches the targeted domain (e.g.,
hackeralt1.com), they will be redirected to your Apache server instead of the real site.
Meanwhile, Bettercap captures their requests and possible credentials, which can be viewed in
the terminal.