NikolaiT / zardaxt

Passive TCP/IP Fingerprinting Tool. Run this on your server and find out what Operating Systems your clients are *really* using.
Other
292 stars 33 forks source link

Unable to run tcp_fingerprint.py due to insufficient permissions #13

Closed JohnnyRacer closed 1 year ago

JohnnyRacer commented 2 years ago

Hello, I am trying to get this library working but am having trouble with libpcap requiring root permissions. I've seen another issue that was closed with 'just run it as sudo', but this is dangerous as it breaks file permissions with pip and defaults to using the Python binary inside /usr/bin/python which does not working with using any environment managers like conda or pipenv. Is there a fix to get around this problem?

This is the message that pops up when I try to run tcp_fingerprint.py

[2022-09-19 01:40:41.545098] - INFO - tcp_fingerprint - Loaded 2916 fingerprints from the database

[2022-09-19 01:40:41.545304] - INFO - tcp_fingerprint - listening on interface enp6s0

enp6s0: You don't have permission to capture on that device (socket: Operation not permitted)
jja67 commented 1 year ago

i face the same issue . if I add sudo to run the python file, then it would still fail as said the module is missing

newedgex commented 1 year ago

I'm having the same problem.. Tried also sudo setcap cap_net_admin,cap_net_raw=ep tcp_fingerprint.py but it didn't work

Of course I tried with sudo, but it get's out of the env.... ` sudo python tcp_fingerprint.py -i enp0s3 [2023-01-25 22:05:26.588635] - INFO - tcp_fingerprint - Loaded 11482 fingerprints from the database

Traceback (most recent call last): File "/home/qacicd/zardaxt/tcp_fingerprint.py", line 16, in from api import run_api File "/home/qacicd/zardaxt/api.py", line 14, in raise Exception('InvalidAPIKeyException') Exception: InvalidAPIKeyException

`

NikolaiT commented 1 year ago

Guys you need to set the correct environment variables.