A rootkit is a tool, or a group of them that is designed to hide itself and to hide other programs, processes, files, directories, key registration, and ports that allow the intruder to maintain access to a system for remotely commanding actions or extract sensitive information.
In Linux we have 2 great programs to find rootkits on your system. It is of Chkrootkit and Rkhunter .
- Chkrootkit (Check Rootkit) is a software console, which is common in Unix operating systems and derivatives. Quickly find rootkits.
- Rkhunter (or Rootkit Hunter) is a Unix tool that detects rootkits, backdoors and local exploits. Searching the default directories (rootkits), wrong permissions, hidden files, suspicious strings in kernel modules, and special tests for Linux and FreeBSD.
To install these programs can do it from the Synaptic Package Manager (Gnome) or from Kpackagekit (KDE).
operate from Terminal Administrator permissions. To find rootkits with chkrootkit type the following:
sudo chkrootkit And we are seeing the result in the Terminal ...
With Rkhunter is similar. As I read online, rkhunter saving a record with the state of the system the first time you install / run.
If you modify important files or install new packages, you need to update the rkhunter database ( rkhunter - propupd ) to accept them as valid. However, before checks are legitimate. Let
this, open a terminal and type:
rkhunter - propupd and then update:
rkhunter - update And now we come to find rootkits, type:
rkhunter-c - sk Chkrookit And as with anger showing us the results in the Terminal (the -c is to search the system and - sk is to not pause ...).
do so is a bit ... roll, so that people create scripts (small programs) to automate. I have also done well, I made one for Gnome and one for KDE Based on examples I found on the Internet.
* For GNOME (Ubuntu and also for Kubuntu, if we like):
gchkrkhunter.sh
To use my script need to have installed Zenity . With zenity can create boxes (or windows) of dialogues from the command line or scripts that interact with the user graphically. We can install
Zenity from the Synaptic Package Manager (Gnome) or from kpackagekit (KDE) or also from a Terminal. In the latter case we would put in the Terminal:
sudo apt-get install zenity Now create a text file we'll call gchkrkhunter.sh , edit it and copy the code below.
# / bin / bash #P
Wait a minute before you start looking for rootkits ...
sleep 1m # Check if the person running the script is root, and if not root, it re-runs as root.
["$ UID"! = "0"] & & gksu - message "The application gchkrhunter.sh need to enter your password to perform administrative tasks and find rootkits" $ 0 temrina
# When run as root, no will try to run as non-root
["$ UID"! = "0"] & & exit
echo "# Next begins the search for rootkits with gchkrhunter.sh ... "
(
# rkhunter - propupd
echo" # Then we will start searching for rootkits with chkrootkit ... "
# chkrootkit and Runs results are stored in your personal folder
informedechkrootkit.txt chkrootkit> / home / pentell / informedechkrootkit.txt
echo "# Checking for updates to the signatures of rootkits RkHunter ..."
# is updated with the latest signatures rkhunter Rootkit of RkHunter ...
rkhunter - update
echo "# Searching for rootkits on a system with RkHunter ..."
# rkhunter is run, it refers to the latest version of the program, you start to look rootkits and results are stored in your personal folder
informederkhunter.txt rkhunter-c - sk - versioncheck - logfile / home / pentell / informederkhunter.txt
echo "# Press OK to view reports on results ..."
)
zenity - title = "Report RkHunter" - text-info - filename = / home / pentell / informederkhunter.txt
zenity - info - title = "gchkrhunter.sh" - text = "You can find these reports in your personal folder and informederkhunter.txt informedechkrootkit.txt. To see informederkhunter.txt need Administrator privileges. "
Where it pentell, replace it with the name of our personal folder and finally we have to give execute permission, would be one way to do the script by clicking the right mouse button and give this permission or from a Terminal: sudo
chmod + x gchkrkhunter.sh
And if we want we can even but making automating run periodically with cron
, for example, or do you run when you turn the computer on Kubuntu
would
references
System>>
Boot>> Advanced >> Add script and Ubuntu System>> Preferences >> Applications to start>> Add When running gchkrkhunter.sh see something like this:
* For KDE (Kubuntu)
If you use Kubuntu and do not want to install
Zenity can use this other script that uses
kdialog instead of that program to display dialogs ...
# / bin / bash # kchkrhunter.sh # Wait a minute before you start looking for rootkits
sleep 1m # Check if the person running the script is root, and if not root, it re-runs as root. ["$ UID"! = "0"] & & gksu - description "kchkrhunter.sh" $ 0 temrina # When run as root, it will not try to run as non-root ["$ UID "! =" 0 " ] & & Exit ( # Looking for rootkits with chkrootkit ...
kdialog - title "kchkrhunter.sh" - passivepopup "It has begun to find rootkits with chkrootkit System ..."
chkrootkit> / home / pentell / informedechkrootkit.txt
# Checking for updates to the signatures of rootkits RkHunter ...
kdialog - title "kchkrhunter.sh" - passivepopup "Checking for updates to the signatures of rootkits RkHunter ..."
rkhunter - update
# Finding rootkits on a system with RkHunter ...
kdialog - title "kchkrhunter.sh" - passivepopup "It has begun to find rootkits on a system with RkHunter ..."
rkhunter-c - -sk - versioncheck - logfile / home / pentell / informederkhunter.txt
)
kdialog - title "kchkrhunter.sh" - passivepopup "Below you will see results and RkHunter ChkRootKit."
kdialog - title = "Report ChkRootKit Rootkits finder" - textbox / home / pentell / informedechkrootkit.txt 620 420
kdialog - title = "Report RkHunter Rootkits finder" - textbox / home / pentell / informederkhunter . txt 620 420
kdialog - title "kchkrhunter.sh" - passivepopup "After the search of Rootkits ..."
vera On screen, from time to time, a notice like this:
and the results are presented to us as well:
http://library.gnome.org/users/zenity/stable/index-info.html.es
root Password:
http://www.ubuntu- Related
es.org/node/122335
: es.org/node/122335
http://vijamaroylinux.blogspot.com/2008/12/chkrootkit-un-buscador-de-rootkits.html
0 comments:
Post a Comment