Skip to content

KhaledEmaraDev/packet-sniffer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Packet Sniffer and DoS Attack Defender

How to Run

  1. Install Dependencies
sudo apt-get install libpcap-dev libnftables-dev
  1. Compile
g++ -Wall -Wextra sniffer.cpp syn_attack.cpp -o sniffer -lpcap -lpthread
  1. Build Docker Image
docker build -t nft-blocker:0.1.0 .
  1. Create Docker Network
docker network create nft-block
  1. Run
docker run --privileged -d --name nft-blocker --network nft-block nft-blocker:0.1.0
  1. Attack
docker run -it --rm --network nft-block busybox:1.34.1-musl ping nft-blocker
  1. Watch Logs
docker logs -f nft-blocker
  1. Stop
docker stop -t 0 nft-blocker
  1. Remove Container
docker rm -f nft-blocker
  1. Rinse and Repeat :)

Bugs

The program doesn't respond to SIGINT. That's why it has to terminated forcefully.

About

Layer 2 Packet Sniffer and DoS Attack Defender

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published