ARP Spoofing
ARP Spoofing
my IP address is 192.168.172.233
router/default gateway ip is - 192.168.172.55
target machine ip - 192.168.172.22
run the first time with target ip address first then default gateway(router)
then run it a second time with gateway as target and your Kali machine as second ip
The above two steps lead to a direct denial of service unless you allow forwarding
of ip packets using the command echo 1 > /proc/sys/net/ipv4/ip_forward with a value
of 1 if you want to disable forwarding of pkts then use a value of 0
wfite command
Other Commands:
1. `ifconfig`
Purpose: `ifconfig` (interface configuration) is used to configure or display
network interface settings.
Basic Usage:
```bash
ifconfig
```
- Displays all active network interfaces and their IP addresses, MAC addresses, and
other info.
Common Options:
- `ifconfig [interface] up`: Activates the specified network interface.
- `ifconfig [interface] down`: Deactivates the specified network interface.
- `ifconfig [interface] [IP] netmask [netmask]`: Assigns an IP address and netmask
to the specified interface.
---
2. `iwconfig`
**Purpose**: `iwconfig` is used to configure wireless network interfaces and
display information about Wi-Fi connections.
Basic Usage:
```bash
iwconfig
```
- Shows information about wireless interfaces, including SSID, frequency, signal
strength, and mode (Managed, Monitor, etc.).
Common Options:
- `iwconfig [interface] essid [network_name]`: Connects to a specific wireless
network.
- `iwconfig [interface] mode monitor`: Puts the Wi-Fi interface into monitor mode
for packet capturing.
3. `ping`
Purpose: `ping` is used to test connectivity to a specific IP address or domain by
sending ICMP packets.
Basic Usage:
```bash
ping [IP/domain]
```
- Sends packets to the specified IP or domain and waits for responses, which helps
measure response time and packet loss.
Common Options**:
- `ping -c [count] [IP/domain]`: Sends a specified number of packets instead of
pinging indefinitely.
- `ping -i [interval] [IP/domain]`: Sets the interval (in seconds) between sending
each packet.
---
4. `arp`
**Purpose**: `arp` displays and manipulates the ARP (Address Resolution Protocol)
table, which maps IP addresses to MAC addresses on the local network.
Basic Usage:
```bash
arp -a
```
- Shows the ARP table, listing IP addresses and their corresponding MAC addresses.
Common Options:
- `arp -d [IP]`: Deletes an entry from the ARP table.
- `arp -s [IP] [MAC]`: Manually adds a static entry to the ARP table, mapping an IP
address to a MAC address.
---
5. `netstat`
**Purpose**: `netstat` (network statistics) is used to display active network
connections, listening ports, routing tables, and other network interface
statistics.
Basic Usage:
```bash
netstat
```
- Displays active connections.
Common Options:
- `netstat -tuln`: Shows all listening TCP and UDP ports.
- `netstat -r`: Displays the routing table.
- `netstat -i`: Shows statistics for all network interfaces.
- `netstat -p`: Shows the PID and program name for each connection.
---
6. `route`
Purpose: `route` displays or manipulates the system's IP routing table, which
directs network traffic to the appropriate interface.
Basic Usage:
```bash
route
```
- Displays the current routing table.
Common Options:
- `route add default gw [IP]`: Sets the default gateway to a specific IP.
- `route add -net [network IP] netmask [netmask] gw [gateway IP]`: Adds a route to
a specific network through a designated gateway.
- `route del default gw [IP]`: Deletes the default gateway.