subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
try: subprocess.run(["launchctl", "stop", "com.fink.clawshorts"], timeout=5) time.sleep(1) subprocess.run(["pkill", "-9", "-f", "clawshorts-daemon.py"], timeout=10) time.sleep(1) except subprocess.TimeoutExpired: _log("Kill command timed out")- Confidence
- 83% confidence
- Finding
- The script forcefully kills any process whose command line matches clawshorts-daemon.py using pkill -9 -f, which is an overly broad and irreversible action. If an attacker or unrelated local process can influence process naming or create a matching command line, this can terminate unintended processes and create denial-of-service conditions on the host.
