Coder Social home page Coder Social logo

rootstealer's Introduction

Rootstealer

This is simple example of new attack that using X11. Program to detect when linux user opens terminal with root and inject intrusive commands in terminal with X11 lib.

Video of Proof of concept

The proposal of this video is use the tool rootstealer to spy all gui windows interactions and inject commands only in root terminal. This approach is util when attacker need to send a malicious program to prove that user is vulnerable to social engineering. Force root command in terminal with lib X11 is a exotic way to show the diversity of weak points.

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

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 root user, change window title:

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

This simple action can prevent this attack.

Tests

Tested on Xubuntu 16.04

Note:

I am not responsible for the evil use of that tool. Use that for a good purpose.

rootstealer's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.