Bagdør i Linuxmaten nr. I

tux

Jeg har fundet 2 bagdøre i min Rørhat 7.2 Linuxmat, denne maskine sidder på en router til en internetudbyder, og har 2 netkort så mine andre 2 maskiner kan dele internettet og bruge den som fil- og
postvært mm.

Dette er en logbog over hvad jeg gjorde, og derfor er den ikke struktureret. Den travle kan nøjes med at
læse sektionen 'VIGTIG SEKTION'. Jeg må nok antage at min maskine er blevet inficeret fordi jeg ikke gad opdatere ssh på trods af advarsler om fundne huller.

Jeg tror der er mange Linuxmaskiner der er inficerede, blot bliver Linuxvirus/trojanske heste ikke brugt til
at ødelægge lokalt materiale

....VIGTIG SEKTION.....

(1)
kør 'chkrootkit' (nogen der kender andre
bagdørsskannere?)
{udput fra 'chkrootkit -q' (stille)
Checking `ifconfig'... INFECTED
Checking `login'... INFECTED
Checking `pstree'... INFECTED
/etc/ld.so.hash
Possible t0rn v8 (or variation) rootkit installed

/usr/lib/perl5/5.6.0/i386-linux/.packlist

Warning: Possible Showtee Rootkit installed
/usr/include/file.h /usr/include/proc.h
INFECTED (PORTS: 3049)

{i øvrigt er visse processer SKJULT, i et tilfælde kan man i /proc/272/cmdline se /usr/sbin/xntps -q , en proces der IKKE kan ses med 'ps -ef'.
En søgning på google på 'xntps' viser 83 træffere, mange fra nyhedsgrupper fra folk der er blevet
knækket.

(2)
kør en portskanning på din egen maskine; jeg loggede på mit arbejde og kørte

bla@job:~$ nmap 123.45.67.89 (dit ip-nr)

Starting nmap V. 2.54BETA31 ( www.insecure.org/nmap/ )
Warning: You are not root -- using TCP pingscan
rather than ICMP
Interesting ports on xxx.xxx (123.45.67.89):
(The 1544 ports scanned but not shown below are in
state: closed)
Port State Service
22/tcp open ssh
25/tcp open smtp
80/tcp open http
98/tcp open linuxconf
111/tcp open sunrpc
139/tcp open netbios-ssn
515/tcp open printer
840/tcp open unknown
1024/tcp open kdm
1026/tcp open nterm

Nmap run completed -- 1 IP address (1 host up) scanned in 24 seconds

på nettet fandt jeg
"nterm 1026/tcp remote_login
network_terminal"

- og jeg tror ikke jeg kommer uden om en formattering og nyinstallering. Måske er der nogen der melder sig
frivilligt til at lave en hvor man for eksempel kan få skannet sin maskine;( https://grc.com/x/ne.dll?bh0bkyd2 ) skanner visse porte, mest interessante for hullede windåser.

Genveje:
http://www.kb.cert.org/vuls/id/945216
http://linux.cvf.net/linux_uncracked.html
http://www.soohrt.org/stuff/linux/suckit/

og lidt pjat:
http://www.counterhack.net/base_clippy_image.html (se billede)

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

Efter at have set en person spørge om virussituationen på Linux, tænkte jeg at jeg ville fortælle lidt om
programmet 'chkrootkit' ( http://www.chkrootkit.org ) der tjekker for såkaldte 'rootkits', altså en bagdør
der udnytter et sikkerhedshul til at give 'root'-adgang.

Hent 'chkrootkit' ( http://www.chkrootkit.org ), oversæt (kompiler) det, kør det (tjek med chkrootkit
-V at I kører den version i lige har hentet (og ikke en gammel installation).

Jeg blev noget overrasket ved at finde ud af jeg var blevet cracket; jeg kørte /usr/sbin/chkrootkit som
root, fandt problemer og hentede en ny version (0.40) og fik følgende resultat, her gengivet i fuld længde:

ROOTDIR is `/'
Checking `amd'... not found
Checking `basename'... not infected
Checking `biff'... not found
Checking `chfn'... not infected
Checking `chsh'... not infected
Checking `cron'... not infected
Checking `date'... not infected
Checking `du'... not infected
Checking `dirname'... not infected
Checking `echo'... not infected
Checking `egrep'... not infected
Checking `env'... not infected
Checking `find'... not infected
Checking `fingerd'... not infected
Checking `gpm'... not infected
Checking `grep'... not infected
Checking `hdparm'... not infected
Checking `su'... not infected
Checking `ifconfig'... INFECTED
Checking `inetd'... not tested
Checking `inetdconf'... not found
Checking `identd'... not infected
Checking `init'... not infected
Checking `killall'... not infected
Checking `ldsopreload'... not infected
Checking `login'... INFECTED
Checking `ls'... not infected
Checking `lsof'... not infected
Checking `mail'... not infected
Checking `mingetty'... not infected
Checking `netstat'... not infected
Checking `named'... not found
Checking `passwd'... not infected
Checking `pidof'... not infected
Checking `pop2'... not found
Checking `pop3'... not found
Checking `ps'... not infected
Checking `pstree'... INFECTED
Checking `rpcinfo'... not infected
Checking `rlogind'... not infected
Checking `rshd'... not infected
Checking `slogin'... not infected
Checking `sendmail'... not infected
Checking `sshd'... not infected
Checking `syslogd'... not infected
Checking `tar'... not infected
Checking `tcpd'... not infected
Checking `tcpdump'... not infected
Checking `top'... not infected
Checking `telnetd'... not infected
Checking `timed'... not found
Checking `traceroute'... not infected
Checking `w'... not infected
Checking `write'... not infected
Checking `aliens'... /etc/ld.so.hash
Searching for sniffer's logs, it may take a while...
nothing found
Searching for HiDrootkit's default dir... nothing
found
Searching for t0rn's default files and dirs... nothing
found
Searching for t0rn's v8 defaults... Possible t0rn v8
(or variation) rootkit installed
Searching for Lion Worm default files and dirs...
nothing found
Searching for RSHA's default files and dir... nothing
found
Searching for RH-Sharpe's default files... nothing
found
Searching for Ambient's rootkit (ark) default files
and dirs... nothing found
Searching for suspicious files and dirs, it may take a
while...
/usr/lib/perl5/5.6.0/i386-linux/.packlist

Searching for LPD Worm files and dirs... nothing found
Searching for Ramen Worm files and dirs... nothing
found
Searching for Maniac files and dirs... nothing found
Searching for RK17 files and dirs... nothing found
Searching for Ducoci rootkit... nothing found
Searching for Adore Worm... nothing found
Searching for ShitC Worm... nothing found
Searching for Omega Worm... nothing found
Searching for Sadmind/IIS Worm... nothing found
Searching for MonKit... nothing found
Searching for Showtee... Warning: Possible Showtee
Rootkit installed
Searching for OpticKit... nothing found
Searching for T.R.K... nothing found
Searching for Mithra... nothing found
Searching for OBSD rk v1... nothing found
Searching for LOC rootkit ... nothing found
Searching for Romanian rootkit ...
/usr/include/file.h /usr/include/proc.h
Searching for HKRK rootkit ... nothing found
Searching for anomalies in shell history files...
nothing found
Checking `asp'... not infected
Checking `bindshell'... INFECTED (PORTS: 3049)
Checking `lkm'... Checking `rexedcs'... not found
Checking `sniffer'... not tested: can't exec
./ifpromisc
Checking `wted'... not tested: can't exec ./chkwtmp
Checking `scalper'... not infected
Checking `slapper'... not infected
Checking `z2'... not tested: can't exec ./chklastlog

chkrootkit er et (Bourne) shell program jeg havde i version 0.35, opgraderede og fandt flere huller.

Håber dette kan hjælpe nogen:

Henningpetersen

Læs også:
Bagdør i Linuxmaten nr. Il
http://www.linuxin.dk/node/84