[22582] in bugtraq

home help back first fref pref prev next nref lref last post

Remote Shell Trojan: Threat, Origin and the Solution

daemon@ATHENA.MIT.EDU (kai takashi)
Sun Sep 9 16:58:43 2001

From: kai takashi <rst@coders.com>
Reply-To: rst@coders.com
To: bugtraq@securityfocus.com
Date: Sun, 9 Sep 2001 14:40:27 +0300
Content-Type: Multipart/Mixed;
  boundary="Boundary-=_nWlrBbmQBhCDarzOwKkYHIDdqSCD"
Cc: incidents@securityfocus.com, focus-virus@securityfocus.com,
        vulnwatch@vulnwatch.org, contribute@linuxsecurity.org
MIME-Version: 1.0
Message-Id: <01090914541500.08399@bandit>

--Boundary-=_nWlrBbmQBhCDarzOwKkYHIDdqSCD
Content-Type: text/plain
Content-Transfer-Encoding: 8bit

Overview:

At the 5th of September Qualys released a Security Warning regarding a Linux
based virus. This virus was called  the "Remote Shell Trojan" (RST) and it
attacks Linux ELF binaries. It has replicating abilities: when run it will
infect all binaries in /bin and the current working directory. Besides that
it also spawns a process listening on UDP port 5503. When a properly crafted
packet is received by this process it will connect back with a system shell.

Danger:

Very often viri are not seen as a real security threat for UNIX. A virus can
not infect binaries where the userID it is running under has no write access
to. Even under this situation viri can be a threat for UNIX based operating-
systems: Everytime a infected binary is run it will infect all binaries in the
current working directory. It is not unthinkeble that a user with increased
privileges will later run a binary infected by the RST. In this way the virus
can transparently spread itself over the system. This is especially the case
in production environments of in an environment where many users share files.
This process will get into a rapid once the /bin binaries are infected. Every
execution of normal system commands like 'ls' will infect all binaries in the
current working directory. In spite of the theoretical immunity UNIX has is
the situation described here not unlikely to happen in many human situations.
The backdoor process can give unpriviledged people access to your system under
the UserID the backdoor process is running. Attackers can attempt to get higher
privileges on the system from there.

Origin:

RST was developed by us as a research project and intended only for internal 
use on our systems. Our goal was to analyse how a non-priviledged virus could
affect a system running Linux in a normal work-environment. Things however didnt
go as they were intended to go. An infected binary accidentely leaked out our
research lab and came into the hands of so called "scriptkiddies". They infected
their own systems and other systems where they had access to. From this point
the virus seemed to spread in the wild. This should never have happened and we
truely apologize that it did.

Our main concern now is that the spread of this virus gets stopped and that al
the infected hosts get cleaned as soon as possible. As of now the format of the
specially crafted packet send to the listening backdoor process is unknown to
the public. But this might eventually get reverse engineered in the future and
RST can then be actively abused by other people. 

Solution:

We have created a set of utilities which can recursively detect and remove the
virus from the system. It also has the option to make binaries IMMUNE for future
infection by the RST. We put our best effort in making these utilities as easy
to use as possible. And we STRONGLY RECOMMEND that you run these to see if you
are infected and to remove the RST from all the infected binaries. We especially
recommend that multiuser systems make their system immune for the RST as the risks
for these systems are much higher. Immunisation works by increasing the size of 
the text segment by 4096 bytes so that the "hole" between the text and data segments
is gone. After this there's no space for the RST to add it self to the binary anymore.

The interface to these programs is simple and self-explanating. The user can 
decide wether he wants to automatically detect and remove the RST on the system
recursively or if he wants to apply the remover on a per binary base. In this
mode he can also get a individual status report on wheter this binary is infected,
immune or innocent. Sample usage would be:

% perl Recurse.pl remove

For more information regarding this read the included documentation.

Conclusion:

Again we strongly recommand that anybody running Linux runs the detector to see
if their system is infected. Even if they do not expect anything, they can always
optionally immunise their system. This is the only way we can fight the further
spread of this virus. Again we apologise for all the inconvenience this may have
caused. But maybe we can see it as a lesson that Linux and UNIX are not immune
for viri.

Regards,
        - anonymous

--Boundary-=_nWlrBbmQBhCDarzOwKkYHIDdqSCD
Content-Type: application/x-gzip;
  name="kill_rst.tgz"
Content-Transfer-Encoding: base64
Content-Description: Kill the beast!
Content-Disposition: attachment; filename="kill_rst.tgz"

H4sIAEBYmzsAA+08a3fbxrH5KvyKFWNbZMy3Hr6RbOeottzrEztubbnuPYmPDggsSEQgFsEuRLOt
72/vzOwDAB+SEz9y0mLbWCSwOzM7792dZRjzi1yqwVefsQ2HB8N7h4fwl9rqX/353v7B0dHhwfBo
/6vhaDQeH33FDj8nUbYVUvk5Y1/lQqjr+t30/g/aQiP/lzwocsn7WfLpcQxHw+HRutzt3/3D0b6W
//7h/r1DlP/+6OjgKzb89KSst/9y+X+9OyhkPpjE6SDj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wWOsTOF0K3xokmgGnGnp4
7lUjmdZAUa0bQdHoohGIUTWlLBNamEoZq8ErYLTjVpfnRaJiyjKsBRO/tKkbv1b5QRKL03A5j+Wl
9MwLyUu/gFEdS/S10wfxUNyTOsKhN5TIbZPT2O0YKjECxSD9rRWJQt9KFZMUpdm2ZiLhLZCRWnBb
r4EjV+t2pQcmMBUpSiNSNj2kcLNHqSTkP0F9jhgLQsyDGCVCtuzZ3i9fzgWFqvOZdtR5hAB0L2CF
2fMi05R0HEM0Iagef5clfkqZJvlYneah/nshR38O2kIGhU7Qx+wJaSmUAI9har42GkftRjyJwqsa
FIbCqA4zy0z6Zu/uC1pLwAczT0yMXero0S/zULKXanNDH4J5cQgRMiwwo9LnxbB6QnNBYc+4Y3eZ
Nls17XpGuShM6zO6PnvlE7+ocAu0BT3/hIMruc1WNrMM2Z73BMajPBAwOVbUs3IJSdjJv2sboYvw
oCAiKFA5qDuI8pHAN1L7rVO8DolmKxVE7Sn91I9JFE0YSJcTES5Xwj5807ahJYT6RAbtxdGKVcl6
iqp/PAgDZyhM5U+mRbzEZcG0q19q1kMOLz3t40gddF4p64Zb5urkETEdwtx/oeUXUTzQrp6OcbxN
IRDMxfLBhFapraR0OBBRgfqY61QcI42/JJcPawuMDzoGwcMJt7jJwSmdxOEv15DOAks1C5HDlB/b
taW5GIpocRnXx580QtHKrrdT2Vxs9gGb1rSmNa1pTWta05rWtKY1rWlNa1rTmta0pjWtaU1rWtOa
1rSmNa1pTWta05rWtKY1rWn/ze3fRioB/QB4AAA=

--Boundary-=_nWlrBbmQBhCDarzOwKkYHIDdqSCD--

home help back first fref pref prev next nref lref last post