Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BitSnoop is a lightweight Python tool for parsing BitTorrent traffic from a packet capture and reconstructing the transmitted files

License

Notifications You must be signed in to change notification settings

aldamd/BitSnoop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

BitSnoop

BitSnoop is a lightweight Python tool for parsing BitTorrent traffic from a packet capture (.pcap / .pcapng) and reconstructing the transmitted files. Created for CTF use, it identifies BitTorrent piece messages, reassembles the payloads, detects file types, and writes them to disk.

Features

  • Parses BitTorrent piece messages from a pcap
  • Reconstructs transferred files by socket mapping
  • Auto-detects file types
  • Writes recovered files to disk with source/destination info in the filename

Requirements

Install dependencies with:

pip install pyshark python-magic

Usage

./bitsnoop <pcap_file>

Example:

❯ ./bitsnoop sample.pcapng
[-] Reading sample.pcapng...
[-] Packets processed: 358
[+] Found: 34.10.241.248:6881 -> 192.168.1.23:44487 Type: pdf

Recovered files will be saved in the current directory, with filenames based on the IP/port pairs.

Notes

  • Only BitTorrent piece messages are extracted. Other BitTorrent messages are ignored.
  • Large captures may take time to process, progress is printed live.

About

BitSnoop is a lightweight Python tool for parsing BitTorrent traffic from a packet capture and reconstructing the transmitted files

Topics

Resources

License

Stars

Watchers

Forks

Languages