I want to set the CAP_NET_ADMIN
capability for a certain subprocess in my python application. I tried a lot to do so, but I didn't succeed as no example is available, that makes it understandable for me.
What I did was that I installed python-prctl(1.6.1) and prctl(1.0.1) as suggested using pip and implemented prctl.capbset.drop("setgid", prctl.CAP_NET_ADMIN)
into my application, right before creating the subprocess. However, it seems that even capbset
can't be recognized.
In the subprocess I want to sniff the network using scapy.