If they run as root and we can write them replace them with a python reverse shell.
Module Hijacking
This happens when the module that a script wants to use isnt imported, we can replace it with our own version.
1
sudo-l
wifi_reset.py was importing a module wificontroller and executing some commands but this wifcontroller module was absent.
So ,we created our malicious wificontroller.py module inside the same folder i.e. /home/walter which had the malicious Privilege Escalation code. And executed it.