Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Can force sudo?

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?✌
(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.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by oxagastJan 22, 2026 08:57 PM 3 292 Jan 22, 2026 08:57 PM
Last Post: black devil9099
by OSTigerJun 7, 2018 09:10 PM 1 312 Jun 7, 2018 09:10 PM
Last Post: Last_viking
by OmniscientAug 20, 2007 03:56 AM 0 151 Aug 20, 2007 03:56 AM
Last Post: Omniscient