I developed a keylogger in Python, but it has to be used as sudo to work. Is there any chance I can "capture" any other sudo order to be able to execute it without the user intentionally doing so?✌
Can force sudo? |
(Apr 1, 2026 05:52 AM)bl1ndm0nk Wrote: I developed a keylogger in Python, but it has to be used as sudo to work. Is there any chance I can "capture" any other sudo order to be able to execute it without the user intentionally doing so?✌ Use xkbcat. It doesn't need sudo. If you really want to use yours, you could use linpeas to find a misconfiguration or exploit. You could also try creating an alias to your script that the victim might run. You could also modify a .desktop file. There's also creating an alias for 'sudo su' (https://github.com/astra90x/sudo-su-phishing) or just 'sudo' (https://github.com/hak5/bashbunny-payloa...hishing.sh). Aliases are evaluated before $PATH. (Apr 1, 2026 06:28 AM)DramaKing Wrote: Use xkbcat. It doesn't need sudo. If you really want to use yours, you could use linpeas to find a misconfiguration or exploit. You could also try creating an alias to your script that the victim might run. You could also modify a .desktop file. There's also creating an alias for 'sudo su' () or just 'sudo' (). Aliases are evaluated before $PATH. Hey, thank u, yeah it's not like I wanna use mine, or any other to be honest, just investigating for the sake of it. I will take a look into the alias stuff, didn't think about it 👍 (Apr 1, 2026 06:37 AM)bl1ndm0nk Wrote: Hey, thank u, yeah it's not like I wanna use mine, or any other to be honest, just investigating for the sake of it. I will take a look into the alias stuff, didn't think about it 👍 One reason I respond to as many threads as I can, it gets the brain working. |
|
|


