GO KALI FREE

arpspoof

Sniffing & Spoofing

Intermediatehigh risk

arpspoof redirects packets from a target host on the LAN to another host by forging ARP replies. It is a simple and effective utility part of the dsniff suite.

Installation

sudo apt install dsniff

Basic Syntax

arpspoof -i <interface> -t <target> <gateway>

Quick Facts

Full Name
arpspoof
License
BSD
Written In
C
Platforms
Linux, macOS, BSD
Category
ARP Poisoning
Suite
dsniff
First Release
2000
Author
Dug Song

Tool Overview

arpspoof is a focused ARP cache poisoning tool from the dsniff suite that redirects traffic between two hosts on a local network. By forging ARP replies, it associates your MAC address with the IP address of another host, causing traffic to flow through your system.

Created by Dug Song, arpspoof is one of the simplest MITM tools available. Its minimal design makes it ideal for learning ARP spoofing fundamentals and for scenarios where a lightweight, single-purpose tool is preferred over comprehensive frameworks.

While modern frameworks like Bettercap offer more features, arpspoof remains valuable for its simplicity and reliability in basic ARP spoofing scenarios. It is often used in conjunction with other dsniff tools like dnsspoof and urlsnarf for complete MITM attack chains.

Common Commands

arpspoof -i eth0 -t 192.168.1.10 192.168.1.1Poison target 192.168.1.10 to intercept traffic bound for gateway 192.168.1.1
arpspoof -i eth0 -t 192.168.1.10 -r 192.168.1.1Poison both directions between the target and the gateway with -r
arpspoof -i eth0 192.168.1.1Poison the entire LAN's ARP cache for the gateway (no specific target)
arpspoof -i wlan0 -t 192.168.1.10 192.168.1.1Run the attack over a wireless interface
arpspoof -i eth0 -c host -t 192.168.1.10 192.168.1.1On exit, restore the victim using the real host's MAC address
arpspoof -i eth0 -c own -t 192.168.1.10 192.168.1.1On exit, send cleanup packets using the attacker's own MAC
arpspoof -i eth0 -c both -t 192.168.1.10 192.168.1.1On exit, attempt cleanup using both own and host MAC addresses
sysctl -w net.ipv4.ip_forward=1Enable IP forwarding so intercepted traffic still reaches its destination
echo 1 > /proc/sys/net/ipv4/ip_forwardAlternative way to enable kernel IP forwarding before spoofing
arpspoof -t 192.168.1.10 192.168.1.1Run without -i, letting arpspoof pick the default interface
arpspoof -i eth0 -t 10.10.10.10 10.10.10.1Poison a target on a different subnet to intercept its gateway traffic
arpspoof -i eth0 -t 192.168.1.20 -r 192.168.1.1Full man-in-the-middle between a second host and the gateway
arpspoof -i eth0 -t 192.168.1.10 192.168.1.50Impersonate a peer host (not the gateway) to intercept host-to-host traffic
arpspoof -i eth0 -t 192.168.1.1 192.168.1.10Poison the gateway so it thinks the attacker is the victim (one leg of MITM)
arpspoof -i eth0 -t 192.168.1.10 192.168.1.1 > /dev/null 2>&1 &Run the poisoning in the background while another tool captures traffic

Step-by-Step Guide

  1. 1Activate routing capabilities on your own operating system
  2. 2Execute the tool to deceive the victim machine
  3. 3Execute the tool again in a new window to deceive the router
  4. 4Use a secondary tool to capture and inspect the now-redirected flow
  5. 5Stop the processes safely to allow the network to self-correct

Warnings

Use Cases

Traffic Redirection

Redirect target traffic through your system for interception and analysis.

MITM Attack Setup

Establish man-in-the-middle position before enabling sniffing tools.

Session Hijacking

Intercept unencrypted sessions to capture cookies, tokens, and credentials.

Network Testing

Verify network segmentation effectiveness and ARP spoofing resistance.

Training Labs

Teach ARP spoofing fundamentals in controlled lab environments.

Traffic Mirroring

Mirror traffic from production hosts to monitoring systems for analysis.

Related Tools

Bettercap

Sniffing & Spoofing

Modern MITM framework with ARP spoofing plus WiFi, BLE, and many other attack modules.

Ettercap

Sniffing & Spoofing

Classic MITM framework with ARP poisoning, DNS spoofing, and plugin system.

tcpdump

Sniffing & Spoofing

Command-line packet analyzer for capturing and inspecting network traffic.

Wireshark

Sniffing & Spoofing

GUI-based network protocol analyzer with deep packet inspection.

dsniff

Sniffing & Spoofing

Suite of network auditing tools including arpspoof, dnsspoof, and urlsnarf.

Frequently Asked Questions

What is arpspoof used for?

arpspoof is a simple ARP spoofing tool that redirects packets between two hosts on a local network by forging ARP replies. It is the foundation for man-in-the-middle attacks on switched networks.

Does arpspoof work on modern networks?

arpspoof works on networks where ARP spoofing is not mitigated. Modern switches with Dynamic ARP Inspection (DAI) and port security can detect and block ARP spoofing attacks.

How is arpspoof different from Bettercap?

arpspoof is a single-purpose tool for ARP spoofing only. Bettercap is a comprehensive framework that includes ARP spoofing along with DNS poisoning, WiFi attacks, BLE scanning, and many other features.

Do I need to enable IP forwarding?

Yes, you must enable IP forwarding on your system to route intercepted traffic between the target and gateway. Use: sysctl -w net.ipv4.ip_forward=1.

How does ARP cache poisoning work?

ARP cache poisoning corrupts the target's ARP table by sending forged ARP replies, associating the attacker's MAC address with a legitimate host's IP. This redirects traffic through the attacker's system.

Can arpspoof intercept encrypted traffic?

arpspoof can redirect encrypted traffic through your system, but it cannot decrypt TLS/SSL without additional techniques like SSL stripping. Combined with tools like mitmproxy, HTTPS interception is possible.

What is man-in-the-middle with arpspoof?

In a man-in-the-middle attack, arpspoof poisons both the target's and gateway's ARP caches, allowing the attacker to intercept, inspect, and forward traffic between both parties without their knowledge.

How do I detect ARP spoofing on my network?

Use tools like arping to check for multiple MAC addresses on a single IP, monitor for duplicate IP alerts, or deploy ARP inspection on managed switches. Static ARP entries also prevent poisoning.

What countermeasures prevent ARP spoofing?

Enable Dynamic ARP Inspection (DAI) on switches, use 802.1X port authentication, implement static ARP entries for critical systems, and deploy intrusion detection systems that monitor ARP traffic.

Can I use arpspoof with tcpdump together?

Yes, arpspoof redirects traffic while tcpdump captures and analyzes it. Run arpspoof to establish the MITM position, then use tcpdump with BPF filters to inspect the intercepted packets.

How do I restore ARP tables after arpspoof?

Press Ctrl+C to stop arpspoof, then manually send correct ARP replies: arping -U -c 3 -I eth0 -s gateway_ip gateway_mac target_ip. Without restoration, hosts may continue sending traffic to the attacker's MAC.

Can arpspoof redirect traffic to a specific port?

arpspoof redirects all traffic, not specific ports. For port-specific redirection, combine with iptables rules: iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080 to redirect HTTP traffic to a local proxy.

How do I detect if someone is arpspoofing my network?

Monitor for ARP table changes with arp-watch, use static ARP entries for critical systems, deploy IDS/IPS with ARP anomaly detection, and periodically scan with arping to verify IP-MAC consistency.

Can arpspoof work on wireless networks?

Yes, arpspoof works on WiFi networks when connected to the same subnet. Ensure your wireless adapter supports promiscuous mode and you're connected to the target WiFi network before launching attacks.

How do I perform bidirectional ARP spoofing?

Run two arpspoof instances simultaneously: one poisoning the target (arpspoof -i eth0 -t target_ip gateway_ip) and one poisoning the gateway (arpspoof -i eth0 -t gateway_ip target_ip). This enables full bidirectional interception.

Can arpspoof work with a virtual machine?

Yes, arpspoof works in VMs with bridged networking. Ensure the VM's virtual adapter is in bridged mode so it can send ARP packets on the physical network. NAT mode won't work for ARP spoofing.

How do I verify arpspoof is working?

Check the target's ARP table with 'arp -a' on the target machine to verify the gateway's MAC has changed to your MAC. On your machine, use tcpdump to verify you're receiving redirected traffic.

What is the -r flag in arpspoof?

The -r flag enables reverse spoofing, poisoning both the target and the gateway simultaneously in a single command. This simplifies bidirectional interception without running two separate arpspoof instances.

How do I install arpspoof on non-Kali Linux?

arpspoof is part of the dsniff package. Install with: sudo apt install dsniff (Debian/Ubuntu) or sudo yum install dsniff (CentOS/RHEL). On macOS: brew install dsniff.

Tags

#sniffing-spoofing#mitm#arp-poisoning

Output Explanation

Outputs a simple, continuous log of the deceptive messages being broadcast to the network.

Ethical Usage Notice

This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.