Linux Today: Linux News On Internet Time.
Search Linux Today
search.internet.com
Linux News Sections:  Blog -  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Preferences
Contribute
Link to Us
Search
Linux Jobs

Become a Marketplace Partner

internet.commerce
Be a Commerce Partner














The Linux Channel at internet.com
Linux Today
Enterprise Linux Today
Apache Today
JustLinux.com
Linux Planet
PHPBuilder
All Linux Devices
Technology Jobs

JustTechJobs.com

LinuxToday Newsletters
Subscribe News
Subscribe PR
Subscribe Security

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

 







Current Newswire:

Microsoft, other rivals slam Google Chrome OS

Intel Linux Graphics Shine With Fedora 12

Editor's Note: Do It Yourself "Cloud"

Google Chrome OS: First looks, first impressions

Kernel Log: Coming in 2.6.32 (Part 3) - Storage

TV Mythos Renewed: MythTV 0.22 with Many Improvements

Enhancing openSUSE 11.2: Adding Repositories and Packages

A Northwest Nobel option? (Linus for the Nobel Peace prize)

SECURITY: Cloud Computing Security Benefits, Risks and Recommendations

Keeping score in test-driven development with Python, PyLint, unittest, doctest,




Virtualization Architect
The Computer Merchant, Ltd
US-MA-Chelsea

Justtechjobs.com Post A Job | Post A Resume
:Linux Kernel-Level Trojan - Kernel Intrusion System (KIS)
Linux Kernel-Level Trojan - Kernel Intrusion System (KIS)
Jul 23, 2001, 19 :15 UTC (36 Talkback[s]) (11562 reads)

Subject: Linux Kernel-Level Trojan - Kernel Intrusion System (KIS)
Date: Sun, 22 Jul 2001 15:53:32 -0400 (EDT)
From: Timothy Lawless <lawless@netdoor.com>


This document describes the Kernel Intrusion System (KIS) trojan that
affects Linux 2.2 and 2.4 systems. The specific version of the KIS
trojan analyzed is labeled 0.9.


1. Introduction

At the Defcon Conference in Las Vegas, NV at 10:00am PST on July 14th
2001, the KIS trojan was published by an individual who is identified
 as Optyx. The trojan is designed to automate the loading of a kernel
 module. Once loaded the kernel module will attempt to conceal its
 presence, and listen to the network for instructions.

2. Description

The KIS trojan is a hybrid between zombie daemons which came to light
 as a result of DDOS attacks on major sites at the beginning of 2000
 and kernel level rootkits that are used by hostile entities to
 conceal their presence on a system after a successful compromise.

In its remote control client, the KIS trojan delivers a similar look
 and feel as is associated with Back Orifice or SubSeven.

By issuing commands from a remote KIS client, an individual is
 capable of executing processes on a victim host while hiding
 arbitrary files, child processes and network connections.

The KIS trojan is introduced into a system in the form of a regular
executable binary that contains the KIS kernel module and the trojan.

3. Operation

The KIS trojan is inserted on a victim host by executing a binary
 that installs the trojan, and loads the KIS trojan kernel module.

The trojan is installed into the system by replacing the /sbin/init
 binary with the trojan. Upon bootup, the trojaned /sbin/init will
 load the KIS kernel module and subsequently call the original "init"
 binary that has been moved to a hidden directory. This ensures that
 the KIS trojan is the first kernel module loaded on the system.

In the testing of the KIS system, it appears it was designed only to
 load from init. Multiple runs of the trojan binary, such as what
 would occur if it were to replace /bin/sh or another binary that
 runs often, can cause the system to hang, generate "Out of Memory"
 messages or become unstable.

During loading, the KIS kernel module performs several tasks:

   -- Conceals the Modules Presence by Removing the Module
      from the modules_list structure.

   -- Replaces key system calls.

   -- Replaces portions of the vfs structures for the net/tcp,
      net/udp, and net/raw files in the procfs.

   -- Spawns a kernel_thread to process incoming commands from
      the network.

   -- Replaces the ip_packet_type structure with a new
      structure to allow KIS to monitor all ip based
      network traffic and add observed commands to queue.

Commands are sent to the KIS trojaned system from a KIS client
 console. The commands are sent via directed IP packets with a
 specific length to match a modulus and remainder defined in the KIS
 module upon compile.

If the packet matches the length requirements and decrypts into a
 valid command packet, then the command is added to a queue for
 processing.

The queue manager takes a queued command off of the queue and
 performs the directed command.

   Valid commands include:

    -- Execution of A Process
    -- Hiding a running process
    -- Revealing a hidden process
    -- Hiding a file
    -- Revealing a file
    -- Hiding a connection
    -- Revealing a connection
    -- Ping
    -- Shutdown and Removal of the Trojan

The queue manager is always running, monitoring the incoming queue of
commands. As a result, the load on a victim system will never fall
 below a load of 0.80.

Additionally, as a result of the replaced systemcalls and the
 requirements to manage hidden files and processes, filesystem
 operations such as listing or even compiling a kernel consume up to
 30% more system time then the victim system would consume in a
 non-trojaned state.

4. Risk

The KIS system permits a remote execution of processes on a victim
 system. Combined with its ability to conceal such executions, files,
 and network activity from normal processes, the KIS system provides
 a prime platform from which attacks against the integrity and
 availability of other compromised systems may be launched.

Despite the need to compile a KIS trojan for each kernel, a
 pre-compiled KIS trojan could be packaged and distributed to victim
 hosts that are running stock kernels.

If such a pre-compiled binaries were to be included into a RPM or DEB
package, a KIS trojan could be introduced to victim systems by
administrators installing a new or updated package.

5. Detection

The KIS system can be detected on initial load by the StMichael 0.05
 Linux Kernel Module. The StMichael Linux kernel module is a
 integrity monitor for the 2.2 and 2.4 Linux kernels.

On systems not running StMichael, or that are suspected of being
 infected by the KIS trojan, the following observations can be made
 to determine if the system is actually infected:

During normal operations (ie, runlevel 3 or 5)

   -- "ps -auwx | grep init" will reveal two "init" processes.

   -- The system load will be high, not falling below 0.8 even
      when all observable processes are idle or sleeping.

   -- Repeated runs of "init", such as switching between runlevels
      or rebooting will cause the system to hang, generate error
      messages or crash.

   -- Portscans on the system reveal open and listening ports that
      are not reflected in a netstat.

Alternatively, if the system can be safely brought down and booted
 off of a clean or rescue media, search the filesystem for a file
 called "ht" with mode 000. This is the hidden file table used by KIS
 to list hidden files.

   find / -name ht -mode 000 -print

Also, the trojaned init process is copied to a file in the same
directory as the original init binary, but named "init."

  find / -name init\. -print

Additionally, to determine if files are hidden by KIS or any other
 trojan the following method may be applied:

   1. Boot the system normally. Generate a file list via:

      find / -type f -print > listing.1

   2. Boot the system into single user mode using 'clean'
      media such as a rescue disk. Mount all the filesystems
      (ie, on /mnt)

      find /mnt -type f -print | sed -e "/\/mnt//g" > listing.2

   3. Diff the two listings to determine the hidden files

      diff -u listing.1 listing.2


6. Cleaning

To remove KIS, the trojaned init binary needs to be replaced with a
 clean init binary or the original init binary.

The original init binary is stored in the same directory that the ht
 file is stored in. There are two files that are named simularly:
 "init." and "init" .

"init" is the original init binary.
"init." is a copy of the trojan.

Copy the "init" file over the trojaned init file:

   cp init /sbin/init

The "ht" file will contain files and directories that are hidden.
 These files may contain information about the attack and what the
 trojaned system was used for.

If the source for KIS is recovered, the server.h file will contain
 the keys, modulus, and remainder needed to communicate with the KIS
 server. Using this information it may be possible to sniff the
 network, identifying packets that are sent in attempts to contact
 the KIS server. In some circumstances, such as with the PING
 command, the origin IP address will likely not be spoofed.


Tim Lawless
lawless@netdoor.com


Index Mode   |   Flat Mode   |   Thread Mode   |   Thread Flat  
  Talkback(s) Name  and Date
You&#39;re going to need root access to  ...   Useless...   
TJ
Jul 23, 2001, 19:56:01
 
Given that one normally needs to be root ...   Sounds dubious   
AJWM
Jul 23, 2001, 20:00:53
 
IANASP (I am not a security professional ...   Just a fancy rootkit?   
Douglas S. Keester
Jul 23, 2001, 20:09:32
 
True.  However, by putting the code basi ...   Re: Useless...   
Mike Hicks
Jul 23, 2001, 20:11:56
 
Yep, it will require root to install. An ...   Partial agreement with TJ above.   
Brandioch Conner
Jul 23, 2001, 20:14:31
 
Hostile kernel modules aren&#39;t especi ...   Might as well have it around   
Devin
Jul 23, 2001, 20:17:53
 
> You&#39;re going to need root access t ...   Re: Useless...   
Aurelien Marchand
Jul 23, 2001, 20:18:56
 
> You&#39;re going to need root access t ...   Re: Useless...   
Anthony
Jul 23, 2001, 20:26:43
 
You can get sudo, you can get someone to ...   Re: Not So Useless...   
InfoSecGuy
Jul 23, 2001, 20:34:10
 
> You&#39;re going to need root access t ...   Re: Useless...   
the maddman
Jul 23, 2001, 20:34:46
 
I quote from the article: "If such a pre ...   Re: Useless...   
Don
Jul 23, 2001, 20:42:09
 
You miss the point. KIs is a &#39;TROJAN ...   Re: Useless...   
Barn Owl
Jul 23, 2001, 20:47:10
 
"Later the Trojans hiding in the horse b ...   Re: Re: Useless...   
Conqueror
Jul 23, 2001, 21:38:23
 
I was going to say check rpm&#39;s with  ...   rpm2tar   
brett
Jul 23, 2001, 21:40:58
 
"It would be nice to have a system check ...   Re: rpm2tar   
Don
Jul 23, 2001, 21:55:13
 
> "Later the Trojans hiding in the horse ...   Re: Re: Re: Useless...   
Homer
Jul 23, 2001, 21:48:15
 
> "?..how did /sbin/init get replaced, o ...   Re: Re: Useless...   
K. Spoon
Jul 23, 2001, 22:26:23
 
> > "Later the Trojans hiding in the hor ...   Re: Re: Re: Re: Useless...   
Chepati
Jul 23, 2001, 22:52:55
 
Odysseus is the Greek name for Ulysses.  ...   Re: Ulysses et al :-)   
Athena
Jul 23, 2001, 22:55:57
 
I&#39;m trying to see how this is any mo ...   Useless?   
TJ
Jul 23, 2001, 22:56:29
 
Well, since nobody else brought this up, ...   Version checking?   
chepati
Jul 23, 2001, 22:40:51
 
Its a sad fact, eventually trojans and v ...   Trojans and Viruses have to come - eventually   
Ian
Jul 23, 2001, 23:03:07
 
Dropping CAP_SYS_MODULE is insufficient  ...   CAP_SYS_MODULE   
Roy Stogner
Jul 23, 2001, 23:04:46
 
The KIS trojan is located at http://www. ...   Re: Just a fancy rootkit?   
Optyx
Jul 23, 2001, 23:09:42
 
> > "Later the Trojans hiding in the hor ...   Re: Re: Re: Re: Useless...   
Jim
Jul 23, 2001, 23:27:30
 
It seems to me that KIS relies rather he ...   Here's a good one...   
AC
Jul 24, 2001, 01:02:54
 
There are other kernel module rootkits t ...   KNARK sounds stealthier   
Jim Dennis
Jul 24, 2001, 01:58:35
 
Because of a oversight on the author, na ...   Re: KNARK sounds stealthier   
Tim Lawless
Jul 24, 2001, 11:52:43
 
>It seems to me that KIS relies rather h ...   Re: Here's a good one...   
Foo Bar
Jul 24, 2001, 12:20:49
 
And what about the (official) nvidia X W ...   Re: Re: Here's a good one...   
AC
Jul 24, 2001, 15:40:45
 

In some talkbacks on older articles an ...   Kernel modules are somtimes dangerous stuff   
Fred Mobach
Jul 24, 2001, 16:23:49
 
The main point here, as I understand, is ...   Useless but still....   
Guillaume
Jul 26, 2001, 09:30:39
 
yes, this module takes root access to lo ...   useless?   
Optyx
Jul 30, 2001, 22:42:27
 
trojans and virii will come to linux?  t ...   Re: Trojans and Viruses have to come - eventually   
optyx
Jul 30, 2001, 22:48:06
 
actually it can be non-gpl...  its all c ...   Re: Here's a good one...   
optyx
Jul 30, 2001, 22:54:39
 
Conveniently, someone posted my Jul 24 o ...   Re: Re: Here's a good one...   
AC
Aug 21, 2001, 07:16:14
 
  Home | Search Talkbacks | Customize View    Top of Page  



Enter your comments below:

* Your Name:

* Your Email Address:

* Subject:

CC: [will also send this talkback to an E-Mail address]

* Comments:

Tags allowed:<I>,<B> and <U>. See our talkback-policy for more about talkback content.

Fields marked with * are required!






..............................




All times are recorded in UTC.
Linux is a trademark of Linus Torvalds.
Powered by Linux, Apache and PHP

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs