All Projects → phaethon → Kamene

phaethon / Kamene

Licence: gpl-2.0
Network packet and pcap file crafting/sniffing/manipulation/visualization security tool. Originally forked from scapy in 2015 and providing python3 compatibility since then.

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Kamene

Scapy
Scapy: the Python-based interactive packet manipulation program & library. Supports Python 2 & Python 3.
Stars: ✭ 6,932 (+738.21%)
Mutual labels:  pcap, scapy
Passer
Passive service locator, a python sniffer that identifies servers, clients, names and much more
Stars: ✭ 144 (-82.59%)
Mutual labels:  pcap, scapy
Arduinopcap
A library for creating and sending .pcap files for Wireshark and other programms.
Stars: ✭ 278 (-66.38%)
Mutual labels:  pcap
Sniffglue
Secure multithreaded packet sniffer
Stars: ✭ 651 (-21.28%)
Mutual labels:  pcap
Arkime
Arkime (formerly Moloch) is an open source, large scale, full packet capturing, indexing, and database system.
Stars: ✭ 4,994 (+503.87%)
Mutual labels:  pcap
Poseidon
Poseidon is a python-based application that leverages software defined networks (SDN) to acquire and then feed network traffic to a number of machine learning techniques. The machine learning algorithms classify and predict the type of device.
Stars: ✭ 310 (-62.52%)
Mutual labels:  pcap
Wifibroot
A Wireless (WPA/WPA2) Pentest/Cracking tool. Captures & Crack 4-way handshake and PMKID key. Also, supports a deauthentication/jammer mode for stress testing
Stars: ✭ 567 (-31.44%)
Mutual labels:  scapy
Pypcap
pypcap - python libpcap module, forked from code.google.com/p/pypcap, now actively maintained
Stars: ✭ 255 (-69.17%)
Mutual labels:  pcap
Tcpreplay
Pcap editing and replay tools for *NIX and Windows - Users please download source from
Stars: ✭ 745 (-9.92%)
Mutual labels:  pcap
Qcsuper
QCSuper is a tool communicating with Qualcomm-based phones and modems, allowing to capture raw 2G/3G/4G radio frames, among other things.
Stars: ✭ 492 (-40.51%)
Mutual labels:  pcap
Habu
Hacking Toolkit
Stars: ✭ 635 (-23.22%)
Mutual labels:  scapy
Packet Agent
A toolset for network packet capture in Cloud/Kubernetes and Virtualized environment.
Stars: ✭ 419 (-49.33%)
Mutual labels:  pcap
Scapy Ssl tls
SSL/TLS layers for scapy the interactive packet manipulation tool
Stars: ✭ 354 (-57.19%)
Mutual labels:  scapy
Sngrep
Ncurses SIP Messages flow viewer
Stars: ✭ 605 (-26.84%)
Mutual labels:  pcap
Tcpterm
tcpterm is a packet visualizer in TUI.
Stars: ✭ 288 (-65.18%)
Mutual labels:  pcap
Isf
ISF(Industrial Control System Exploitation Framework),a exploitation framework based on Python
Stars: ✭ 690 (-16.57%)
Mutual labels:  scapy
Fastnetmon
FastNetMon - very fast DDoS sensor with sFlow/Netflow/IPFIX/SPAN support
Stars: ✭ 2,860 (+245.83%)
Mutual labels:  pcap
Pythoncode Tutorials
The Python Code Tutorials
Stars: ✭ 544 (-34.22%)
Mutual labels:  scapy
Zeek
Zeek is a powerful network analysis framework that is much different from the typical IDS you may know.
Stars: ✭ 4,180 (+405.44%)
Mutual labels:  pcap
Pcap Analyzer
Python编写的可视化的离线数据包分析器
Stars: ✭ 694 (-16.08%)
Mutual labels:  pcap

kamene (formerly known as "scapy for python3" or scapy3k)

General

Follow @pkt_kamene for recent news. Original documentation updated for kamene

News

We underwent naming transition (of github repo, pip package name, and python package name), which will be followed by new functionality. More updates to follow.

Kamene is included in the Network Security Toolkit Release 28. It used to be included in NST since Release 22 under former name.

History

This is a fork of scapy (http://www.secdev.org) originally developed to implement python3 compatibility. It has been used in production on python3 since 2015 (while secdev/scapy implemented python3 compatibility in 2018). The fork was renamed to kamene in 2018 to reduce any confusion.

These features were first implemented in kamene and some of them might have been reimplemented in scapy by now:

  • replaced PyCrypto with cryptography.io (thanks to @ThomasFaivre)
  • Windows support without a need for libdnet
  • option to return Networkx graphs instead of image, e.g. for conversations
  • replaced gnuplot with Matplotlib
  • Reading PCAP Next Generation (PCAPNG) files (please, add issues on GitHub for block types and options, which need support. Currently, reading packets only from Enhanced Packet Block)
  • new command tdecode to call tshark decoding on one packet and display results, this is handy for interactive work and debugging
  • python3 support

Installation

Install with python3 setup.py install from source tree (get it with git clone https://github.com/phaethon/kamene.git) or pip3 install kamene for latest published version.

On all OS except Linux libpcap should be installed for sending and receiving packets (not python modules - just C libraries) or winpcap driver on Windows. On some OS and configurations installing libdnet may improve experience (for MacOS: brew install libdnet). On Windows libdnet is not required. On some less common configurations netifaces may improve experience.

Usage

Use bytes() (not str()) when converting packet to bytes. Most arguments expect bytes value instead of strvalue except the ones, which are naturally suited for human input (e.g. domain name).*

You can use kamene running kamene command or by importing kamene as library from interactive python shell (python or ipython) or code. Simple example that you can try from interactive shell:

from kamene.all import *
p = IP(dst = 'www.somesite.ex') / TCP(dport = 80) / Raw(b'Some raw bytes')
# to see packet content as bytes use bytes(p) not str(p)
sr1(p)

Notice 'www.somesite.ex' as a string, and b'Some raw bytes' as bytes. Domain name is normal human input, thus it is string, raw packet content is byte data. Once you start using, it will seem easier than it looks.

Use ls() to list all supported layers. Use lsc() to list all commands.

Currently, works on Linux, Darwin, Unix and co. Using python 3.4+ on Ubuntu, MacOS, FreeBSD, Windows 10 for testing.

Compatible with scapy-http module

Reading huge pcap file

rdpcap reads whole pcap file into memory. If you need to process huge file and perform some operation per packet or calculate some statistics, you can use PcapReader with iterator interface.

with PcapReader('filename.pcap') as pcap_reader:
  for pkt in pcap_reader:
    #do something with the packet
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].