Rootstealer Save Abandoned

X11 trick to inject commands on root terminal.

Project README

Rootstealer

This is a simple example of a new attack using X11. Program to detect when a Linux user opens a console with root and injects intrusive commands in the terminal with X11 lib.

Video of Proof of concept

This video proposes to use the tool rootstealer to spy all GUI windows interactions and inject commands only in the root terminal. This approach can be used when an attacker must send a malicious program to prove that the user is vulnerable to social engineering. Force root command in the terminal with lib X11 is an exotic way to show the diversity of weak points.

https://www.youtube.com/watch?v=V8sZQq7nerw

The purpose of this tool is to use in pentest, take attention if you have a proper authorization before to use that. I do not have responsibility for your actions. You can use a hammer to construct a house or destroy it, choose the law path, don't be a bad guy, remember.

Install

# apt-get install libX11-dev libxtst-dev
# cd rootstealer/sendkeys; 

Edit file rootstealer/cmd.cfg and write your command to inject.

Now you can take that following:

# make; cd ..    #to back to path rootstealer/ 
# pip intall gi
or
# pip install gir

Run the python script to spy all windows gui and search window with "root@" string in title.

$ python rootstealer.py &

Note: If you prefers uses full C code... to use simple binary purposes... you can uses rootstealer.c

$ sudo apt-get install libwnck-dev
$ gcc -o rootstealer rootstealer.c `pkg-config --cflags --libs libwnck-1.0` -DWNCK_I_KNOW_THIS_IS_UNSTABLE -DWNCK_COMPILATION
$ ./rootstealer &

Done, look the video demo, rootstealer force commands only on root terminal...

Mitigation

Don't trust in anyone. https://www.esecurityplanet.com/views/article.php/3908881/9-Best-Defenses-Against-Social-Engineering-Attacks.htm

Always when you enter by the root user, change the window title:

# gnome-terminal --title="SOME TITLE HERE"

This simple action can prevent this attack.

Tests

Tested on Xubuntu 16.04

Point of attention

The purpose of this tool is to use in pentest, take attention if you have a proper authorization before to use that. I do not have responsibility for your actions. You can use a hammer to construct a house or destroy it, choose the law path, don't be a bad guy, remember.

Open Source Agenda is not affiliated with "Rootstealer" Project. README Source: CoolerVoid/rootstealer
Stars
72
Open Issues
1
Last Commit
1 year ago
License

Open Source Agenda Badge

Open Source Agenda Rating