• Home
  • Become a Hacker
    • Get Started
    • Hacker Mindset
    • Roadmap
    • Simple Setup – Hacker 101
    • Types of Hackers
    • Recommended Courses
  • Boot People Offline
  • Courses
    • All Hacking Courses
    • Cyber Security School
  • CTF
    • Beginners to Advanced Guide
    • Create your own CTF box
    • Field and Resources Guide
    • Platforms & Wargames
    • Tools Used for Solving CTF
    • Writeups
  • Dark Web
    • Beginners Guide
    • Darknet Markets
    • Darkweb 101 (Anonymity Guide)
    • Dark Web OSINT Tools
    • Hacking Forums
    • Latest News
    • Onion Links
  • Hacker Gadgets
  • Hacking Books
  • Tools Directory
Menu
  • Home
  • Become a Hacker
    • Get Started
    • Hacker Mindset
    • Roadmap
    • Simple Setup – Hacker 101
    • Types of Hackers
    • Recommended Courses
  • Boot People Offline
  • Courses
    • All Hacking Courses
    • Cyber Security School
  • CTF
    • Beginners to Advanced Guide
    • Create your own CTF box
    • Field and Resources Guide
    • Platforms & Wargames
    • Tools Used for Solving CTF
    • Writeups
  • Dark Web
    • Beginners Guide
    • Darknet Markets
    • Darkweb 101 (Anonymity Guide)
    • Dark Web OSINT Tools
    • Hacking Forums
    • Latest News
    • Onion Links
  • Hacker Gadgets
  • Hacking Books
  • Tools Directory
Search
Close
  • Home
  • 2019
  • February
  • 4
  • Scapy – Interactive Packet Manipulation Tool

Scapy – Interactive Packet Manipulation Tool

February 4, 2019July 27, 2019 Comments Off on Scapy – Interactive Packet Manipulation Tool
how to use scapy packet crafting tool scapy Scapy - Interactive Packet Manipulation Tool scapy tutorial

Scapy is a very powerful packet manipulation program and library, written in Python. It allows you to: forge / decode packets of a wide number of protocols, send them on the wire, capture them, match requests and replies, etc.

This tool can also perform tasks such as scanning, trace-routing, probing, unit tests, attacks, network discovery, and much more. (official website).

Scapy Banner Logo

Since version 2.4.0+ Scapy supports Python 3.

Scapy: Powerful Python-based Interactive Packet Manipulation Tool

Scapy is a Python tool that enables you to send, sniff and dissect/forge network packets. Those capabilities allows tool construction that can probe, scan or attack networks. It can replace:

  • hping, arpspoof, arp-sk, arping, p0f,even some parts of Nmap, tcpdump, and tshark.

Scapy can also perform a huge number of other specific operations/tasks that most other tools can’t, such as:

    • sending invalid frames,
    • injecting your own 802.11 frames,
    • combining techniques (VLAN hopping + ARP cache poisoning, VOIP decoding on WEP encrypted channel, etc.),
  • …

Supported platforms (cross-platfom)

Scapy supports Python 2.7 and Python 3 (3.4 to 3.6):

  • Linux, OSX, * BSD, and Windows.

Features:

  • Craft Packets
    Scapy enables the user to describe a packet or set of packets as layers that are stacked one upon another. Layer fields have useful default values that can be overloaded. It doesn’t oblige the user to use predetermined methods or templates.
  • Interpret many with single probe
    Unlike many tools, it provides a complete set of data/information (send/received responses). In case of a small dataset, user might try to dig desired data himself. In other cases when data set is simply too big, most tools process and discard all data not directly related to specific point of view. Scapy in comparement, provides the complete raw data, available for multiple/different types of analysis (viewpoints).
  • It decodes, doesn’t interpret,
  • It is also modular. Python module can be used to build specific network tools,
  • Can be easily extended to support new protocols,
  • You can build your own tools,
  • etc.

Install

Requirements:

  • Python 2.7.x or 3.4+

Clone it from the github repository, and run as follows:

$ git clone https://github.com/secdev/scapy
$ cd scapy
$ ./run_scapy
>>>

To update scapy, just run:

$ git pull
$ sudo python setup.py install
To take advantage of all scapy features, you’ll need to install some Python modules, such as matplotlib or cryptography.

If you decide not to install all optional packages, Scapy will make sure to inform you about impossibility of using certain features:

INFO: Can't import python gnuplot wrapper . Won't be able to plot.
INFO: Can't import PyX. Won't be able to use psdump() or pdfdump().

Debian/Ubuntu:

To install cryptography , simply run:

$ sudo apt-get install tcpdump graphviz imagemagick python-gnuplot python-cryptography python-pyx

If you need the cryptography-related methods, install it with pip:

# pip install cryptography

Fedora (9):

# yum install git python-devel
# cd /tmp
# git clone https://github.com/secdev/scapy
# cd scapy
# python setup.py install

To install optional packages, run:

# yum install graphviz python-cryptography sox PyX gnuplot numpy
# cd /tmp
# wget http://heanet.dl.sourceforge.net/sourceforge/gnuplot-py/gnuplot-py-1.8.tar.gz
# tar xvfz gnuplot-py-1.8.tar.gz
# cd gnuplot-py-1.8
# python setup.py install

Mac OS X:

On Mac OS X, it doesn’t work natively. You need to install Python bindings to use libdnet and libpcap.  To install using homebrew, first update it, then run python buildings:

$ brew update
$ brew install --with-python libdnet
$ brew install https://raw.githubusercontent.com/secdev/scapy/master/.travis/pylibpcap.rb
$ sudo brew install --with-python libdnet
$ sudo brew install https://raw.githubusercontent.com/secdev/scapy/master/.travis/pylibpcap.rb

For installation on other platforms (* BSD, Windows), check the official docu page.

Basic Usage

To start Scapy, you’ll need root privileges:

$ sudo ./scapy

Scapy Terminal Banner

Note: iPython users must import Scapy as follows:
from scapy.all import *

To see detailed documentation with usage examples, click the documentation button bellow.

 

Documentation BoxDownload Box

Post navigation

Remot3d: An Simple Exploit for PHP Language
Pown Recon – A Powerful Target Reconnaissance Framework Powered By Graph Theory

Related Articles

Winevt_Logs_Analysis - Searching .Evtx Logs For Remote Connections

Winevt_Logs_Analysis – Searching .Evtx Logs For Remote Connections

- Hack Tools
February 5, 2023
PlumHound v1.5.1 releases: Bloodhound for Blue and Purple Teams

PlumHound v1.5.1 releases: Bloodhound for Blue and Purple Teams

- Hack Tools
February 4, 2023
EAST - Extensible Azure Security Tool - Documentation

EAST – Extensible Azure Security Tool – Documentation

- Hack Tools
February 4, 2023
hacker gadgets
hacker phone covers

Recent Posts

Winevt_Logs_Analysis - Searching .Evtx Logs For Remote Connections

Winevt_Logs_Analysis – Searching .Evtx Logs For Remote Connections

February 5, 2023
NJ Man Attempted to Hire a Hitman on the Dark Web

NJ Man Attempted to Hire a Hitman on the Dark Web

February 5, 2023
PlumHound v1.5.1 releases: Bloodhound for Blue and Purple Teams

PlumHound v1.5.1 releases: Bloodhound for Blue and Purple Teams

February 4, 2023
EAST - Extensible Azure Security Tool - Documentation

EAST – Extensible Azure Security Tool – Documentation

February 4, 2023
Dutchman Sold Counterfeit Banknotes on the Dark Web

Dutchman Sold Counterfeit Banknotes on the Dark Web

February 4, 2023
CVE-2023-22501: Critical Flaw in Atlassian Jira Service Management Server and Data Center

CVE-2023-22501: Critical Flaw in Atlassian Jira Service Management Server and Data Center

February 4, 2023

Social Media Hacking

SocialPath – Track users across Social Media Platforms

SocialPath – Track users across Social Media Platforms

- Social Media Hacking
October 16, 2019October 16, 2019

SocialPath is a django application for gathering social media intelligence on specific username. It checks for Twitter, Instagram, Facebook, Reddit...

SocialScan – Check Email Address and Username Availability on Online Platforms

SocialScan – Check Email Address and Username Availability on Online Platforms

June 17, 2019
Shellphish – Phishing Tool For 18 Social Media Apps

Shellphish – Phishing Tool For 18 Social Media Apps

June 10, 2019July 27, 2019
WhatsApp Hacking using QRLJacking

WhatsApp Hacking using QRLJacking

May 2, 2019May 19, 2019
How to Hack any Facebook Account with Z-Shadow

How to Hack any Facebook Account with Z-Shadow

April 26, 2019June 29, 2020
hacker buffs

About Us

Haxf4rall is a collective, a good starting point and provides a variety of quality material for cyber security professionals.

Join Our Community!

Please wait...
Get the latest News and Hacking Tools delivered to your inbox.
Don't Worry ! You will not be spammed

Active Members

Submit a Tool

Hackers Handbook 2018


Grab your copy here

ABOUT US

Haxf4rall is a collective, a good starting point and provides a variety of quality material for cyber security professionals.

Our primary focus revolves around the latest tools released in the Infosec community and provide a platform for developers to showcase their skillset and current projects.

COMPANY
  • Contact Us
  • Disclaimer
  • Hacker Gadgets
  • LANC Remastered
  • PCPS IP Puller
  • Privacy Policy
  • Sitemap
  • Submit your Tool
Menu
  • Contact Us
  • Disclaimer
  • Hacker Gadgets
  • LANC Remastered
  • PCPS IP Puller
  • Privacy Policy
  • Sitemap
  • Submit your Tool
Live Chat
RESOURCES
  • Attack Process
  • Become a Hacker
  • Career Pathways
  • Dark Web
  • Hacking Books
  • Practice Your Skills
  • Recommended Courses
  • Simple Setup – Hacker 101
Menu
  • Attack Process
  • Become a Hacker
  • Career Pathways
  • Dark Web
  • Hacking Books
  • Practice Your Skills
  • Recommended Courses
  • Simple Setup – Hacker 101
Get Started
TOOLBOX
  • Anonymity
  • Bruteforce
  • DoS – Denial of Service
  • Information Gathering
  • Phishing
  • SQL Injection
  • Vulnerability Scanners
  • Wifi Hacking
Menu
  • Anonymity
  • Bruteforce
  • DoS – Denial of Service
  • Information Gathering
  • Phishing
  • SQL Injection
  • Vulnerability Scanners
  • Wifi Hacking
Tools Directory

2014 – 2020 | Haxf4rall.com               Stay Connected:

Facebook Twitter Google-plus Wordpress
Please wait...

Join Our Community

Subscribe now and get your free HACKERS HANDBOOK

Don't Worry ! You will not be spammed
SIGN UP FOR NEWSLETTER NOW