home page

copyright 1999/2005 vrl labs. - tutti i diritti riservati

home
advisories
library
links
news
review
servizi
tools
freaknet.org
dyne.org
your account

 
 

.:::.search.:::.



 

.:::.who's online.:::.

There are currently, 2 guest(s) and 0 member(s) that are online.

..::lastest advisories::..


Lynx Command Line URL CRLF Injection Vulnerability

Microsoft Windows 2000 Subnet Bandwidth Manager RSVP Server Authority Hijacking Vulnerability

FreeBSD Ptrace/SPIgot Insufficient Signal Verification Denial of Service Vulnerability

Dotless IP Addresses Can Cause IE to Move into Intranet Zone

Invalid RDP Data can Cause Terminal Service Failure

phpBB Allows Remote Users to Modify Default SQL Queries

CDP Vulnerability in Cisco Routers

Hi-Resolution System`s MacAdministrator Hidden Files Disclosure and Access Vulnerability

TYPSoft FTP Server STOR/RETR Denial of Service Vulnerability

Security Bug Found in ht://Dig htsearch CGI (DoS, File Exposure)

Account Management Vulnerabilities in Ipswitch IMail Server

Cisco PIX Firewall Manager Password Disclosure Vulnerability

Atomz Search Engine Cross-site Scripting Vulnerability

Security Bug Found in PostNuke (and possibly PHPNuke

Additional Details Released on the Zone Spoofing Vulnerability

Ipswitch Web Calendaring Buffer Overflow
all advisories


..:::..lastest files..:::..


DNS Flood Detector v1.0

wormulon v0.1.3

ulogd-php v0.7

FWReport v1.1.5

Netl, a Customizable Low Level Network Monitor

WinDefender 2.1.6

NTDaddy, ASP Based Administration Kit

Virge v2.07

PCX Firewall v2.7

Port Scan Attack Detector (psad) v0.9.2

NARC v0.5.1

Nimda Notifyer v1.2

IIS Worms Detector v1.1

Legion of the Bouncy Castle Java Cryptography API v1.09

Samhain 1.2.8
all files








How to tell if your Linux box has been cracked
posted by: valvoline on 17/10/2001 @ 8.35.18
How to tell if your Linux box has been cracked
Tips and tricks script kiddies use to hide themselves when they break into your Linux machine.
By Joshua Drake


(LinuxWorld) -- Over the last two weeks, I`ve discussed how to prevent crackers from gaining access to your Linux computer (see 10 minutes to an iptables-based Linux firewall and How to stop crackers with PortSentry). This week, we continue the series with ways you can tell if someone has cracked your machine.

Script kiddies are the worse kinds of crackers, primarily because there are so many of them and most of them are unskilled. It is one thing to be cracked when you have put in all the correct patches, have a tested firewall, and run advanced intrusion detection actively on multiple levels. It is another when you are cracked because you were lazy and didn`t, for example, install the latest patch to BIND.

It`s embarrassing to be cracked because you weren`t paying attention. It`s aggravating to realize that some script kiddie downloaded one of many well known "root kits" or publicly available exploits, and is having a party with your CPU, storage, data, and bandwidth. How do these villains get started? The answer is usually with "warez," which often consists of a root kit.

A root kit is a software package that a cracker uses to provide himself (and it`s usually a "he") with root-level access on your machine. Once the cracker has root access on your machine, it is all over. The only method of recourse that is truly effective is to back up your data, wipe the disks, and reinstall the operating system. However, it is not always easy to discover that someone has taken over your machine.

Can you trust your ps command?
The first trick in finding a root kit is to run the command ps. Chances are that everything will look normal to you. Here is an example ps output:


PID TTY STAT TIME COMMAND
1 ? S 0:05 init
2 ? SW 0:00 [kflushd]
3 ? SW 0:00 [kupdate]
4 ? SW 0:00 [kswapd]
5 ? SW 0:00 [keventd]
6 ? SW 0:00 [mdrecoveryd]
2655 ? S 0:01 syslogd -m 0
2664 ? S 0:00 klogd
2678 ? S 0:01 identd -e -o
2685 ? S 0:02 identd -e -o
2686 ? S 0:56 identd -e -o
2688 ? S 0:55 identd -e -o
2690 ? S 0:01 identd -e -o
2696 ? S 0:00 /usr/sbin/atd
2710 ? S 0:00 crond
2724 ? S 0:00 inetd
[...]


The real question is, however, "Is everything actually normal?" A common trick that a cracker will use is to replace the ps command. The replaced version will mask illicit programs running on your machine. To test this, check the size of your ps application. It is usually located in /bin/ps. On our Linux machines it is about 60 kilobytes. I recently encountered a root kit that had replaced the ps program. The compromised ps from the root kit was only 12 kilobytes in size.

Another obvious trick is the linking of root`s command history file to /dev/null. The command history file is used to track and log commands that are issued by a user when they log into a Linux machine. Crackers will redirect your history file to /dev/null so that you can not see what commands they were typing.

You can access your history file by typing history at your shell prompt. If you find yourself using the history command, and it does not display any previously used commands, take a look at your ~/.bash_history file. If the file is empty, perform a ls -l ~/.bash_history. When you perform the previous command you should see something similar to the following:


-rw------- 1 jd jd 13829 Oct 10 17:06 /home/jd/.bash_history


However, you may see something like this:


lrwxrwxrwx 1 jd jd 9 Oct 10 19:40 /home/jd/.bash_history -> /dev/null


If you see the above, the .bash_history file has been redirected to /dev/null. This is a dead giveaway. Take your machine off the Internet now, back up your data (if you can), and begin a reinstallation.

Look for unknown user accounts
While you are playing detective on your Linux machine, it is always smart to check for unknown user accounts. The next time you log into your Linux box, type the following command:


grep :x:0: /etc/passwd


The only line, I repeat, the only line that the grep command should return on a standard Linux installation is something similar to the following:


root:x:0:0:root:/root:/bin/bash


If your system returns more than one line with the previous grep command, you may have a problem. There should only be one user with the UID of 0 and if that grep command returns more than one line, you have more than one.

Finally, the quickest and easiest way to know if you have been cracked is to check and see if are running IIS.

Seriously, though these are all good basics to know about the nature of the script kiddie, these tricks will not in and of themselves make up for good security, and they do not even touch on the depth in which we can go into the topic of intrusion detection.

My suggestion is that if you suspect a real problem, call a Linux security professional and get references. Linux security is not a 10-minute job.

Also, study the resources listed below. Network World Fusion, for example, recently conducted a comparative review of 42 hardware and software-based intrusion-detection tools, many of which work with Linux.

About the author
Joshua Drake is the co-founder of Command Prompt, Inc., a PostgreSQL and Linux custom development company. He is also the current author of the Linux Networking HOWTO, Linux PPP HOWTO, and Linux Consultants HOWTO. His most demanding project at this time is a new PostgreSQL book for O`Reilly, Practical PostgreSQL.
comments: (0) |  send this story to a friendprint a friendly page

.:::.mailing list.:::.


subscribe
unsubscribe

 
 

.:::.Login.:::.

Nickname

Password



Don't have an account yet? You can create one. As registered user you have some advantages like, comments configuration and post comments with your name.
 

..:::..news..:::..


Scans to expose Windows RPC vulnerability are increasing

Update Windows before it gets Blasted

Blaster rewrites Windows worm rules

Microsoft to hackers: Don`t publish code

Senator Backs Off Backdoors

SafeWeb ain`t all that

Hackers launch `cyber jihad` on US

Net security: An oxymoron

Microsoft Patch Yanked

Security Attacks Set to Double in 2001

`Govnet` Would Be Costly, Prone to Failure-Experts

Microsoft to Prioritize Security Bugs

XP a National Security Threat?

`Smart Card` Technology Gets Second Look

U.S. could close Gates on hackers, terrorists

Encryption: How Prevalent Is It?

bv-Control for Microsoft SQL Server Launched

The Achilles` Heel of Remote Net Mgmt

Former Federal Agent Calls Xp a Threat to National Security

`Net Routers Still Feeling Effects of Code Red, Nimda

RIAA Attempts to Influence Anti-Terrorism Bill

FBI shuts down `IRA` website

$200m WinXP media assault begins

Symantec users risk redirection to hacker sites

Anthrax-laced letter to MS license div suspected

Internet Security Revenue To Exceed $14 Billion by 2005
all news


..:::..lastest docs..:::..


Ethernet Games Sources

Ethernet Games Slides

EthernetGames DOCS

CryptoWorkshop Sources

CryptoWorkshop DOCS

CryptoWorkshop Slides

An Overview of LIDS

How to tell if your Linux box has been cracked

CRYPTO-GRAM - October 15 2001

Netfilter and iptables: Stateful firewalling for Linux

Comparing E-mail Server Virus Protection Solutions

Cryptography General Discussions and Implementations

THINKERS ANONYMOUS

The world will end tomorrow - official

Kerberos and Windows 2000
all docs


..:::..lastest reviews..:::..


NSA Security-enhanced Linux v2003081307

Sophos Delivers MailMonitor For Notes/Domino

Evidian Announces NetWall 6

DbEncrypt Flexible

LANGuard S.E.L.M.

BlackICE Defender

ftp-voyager 8.0.0.3 - Wins Again!

sygate personal firewall 4.2

FreeBSD 4.4 Released

LSM-based Security-Enhanced Linux
all reviews

.:::. webdesign & webprogramming: valv`0 (PGP KEY) .:::. co-ordinators: hellbreak (PGP KEY) & cmcsynth (PGP KEY) .:::.

All logos and trademarks in this site are property of their respective owner, all the rest © 2001/2219 VRL Team
site powered by: ALIP site creator v1.0b © 2001/2219 VRL Team