tcpdump example

This commit is contained in:
Roberto Abdelkader Martínez Pérez
2020-01-28 07:47:28 +01:00
parent 2c54ff5e3e
commit 04e855c74d
2 changed files with 23 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
kapow route add /sniff -c 'tcpdump -i any -U -s0 -w - "not portrange 8080-8082" | kapow set /response/body'
@@ -0,0 +1,22 @@
# Network Sniffer (tcpdump) as a Service
Provides an HTTP service that allows the user to sniff the network in real time. The packet capture data is served as an HTTP stream that can be injected to a packet analysis tool on the fly.
## How to run it
For the sake of simplicity, run:
```
$ sudo -E kapow server NetworkSniffer.pow
```
In a production environment, tcpdump should be run with the appropiate
permissions, but kapow can (and should) run as an unprivileged user.
## How to consume it
```
$ curl http://localhost:8080/sniff | sudo -E wireshark -k -i -
```