Day 62: WiFi Pentesting with Scapy (TL;DR use Bettercap)

Atumcell Labs
2 min readMar 2, 2019

--

Look, if you want to pentest wifi for real, forget this post and just use bettercap, it’s awesome.

However, today we just want to tinker and experiment, after all, that’s why we do this right? That said, Scapy is super powerful and allows you to do bespoke testing directly with packets that lead to awesome and interesting results.

Scapy

Scapy is a powerful interactive packet manipulation program. It is able to forge or decode packets of a wide number of protocols, send them on the wire, capture them, match requests and replies, and much more. It can easily handle most classical tasks like scanning, tracerouting, probing, unit tests, attacks or network discovery (it can replace hping, 85% of nmap, arpspoof, arp-sk, arping, tcpdump, tethereal, p0f, etc.). It also performs very well at a lot of other specific tasks that most other tools can’t handle, like sending invalid frames, injecting your own 802.11 frames, combining technics (VLAN hopping+ARP cache poisoning, VOIP decoding on WEP encrypted channel, …), etc.

Get Started

user@box~:># airmon-ng check kill
user@box~:># airmon-ng start wlan1
user@box~:># airodump-ng mon0
user@box~:># scapy (to bring up shell)
scapy~:># conf.iface = “mon0”
scapy~:># wifiPkts = sniff(count=1)
scapy~:># wifiPkts
scapy~:># wifiPkts.summary()
scapy~:># wifiPkts[0].pdfdump()
scapy~:># wifiPkts.nsummary()
scapy~:># wifiPkts.hexdump()

Packet Handler Functions

  • Packet Processor
  • Parse, Analyse and take Action
  • Injecting Packets

--

--

Atumcell Labs
Atumcell Labs

Written by Atumcell Labs

Security Research Team @ Atumcell

No responses yet