thomas1905
New Member
So nun hat es mich leider auch einmal erwischt.
Mein Server wurde als DDOS Angriff auf andere Rechner verwendet. Jetzt bräuchte ich mal etwas Unterstützung bei der Fehlerbeseitigung/-diganose. Wie lokalisiere ich am besten ob der Angriff über eine Schwachstelle des Servers kam oder ob ein schwaches PHP Skript schuld ist.
Der Server liegt bei Strato und ist mittlerweile vom Netz. Ich habe eine Debian/Sarge Installation nach dieser hier installiert.
weiterhin habe ich regelmäßige Updates mit Aptitude update/upgrade gemacht.
top -b -n 1
Installiert ist:
MySQL, PHP, AMAVIS, Apache, Postfix, mda-Tools für den Raid, clamav, VHCS (mit Patch)
Eine Neuinstallation ist eh klar, aber ich möchte vorher gern das Problem erkennen um nach der Installation nicht wieder gehackt zu werden.
beste grüße
thomas
Mein Server wurde als DDOS Angriff auf andere Rechner verwendet. Jetzt bräuchte ich mal etwas Unterstützung bei der Fehlerbeseitigung/-diganose. Wie lokalisiere ich am besten ob der Angriff über eine Schwachstelle des Servers kam oder ob ein schwaches PHP Skript schuld ist.
Der Server liegt bei Strato und ist mittlerweile vom Netz. Ich habe eine Debian/Sarge Installation nach dieser hier installiert.
weiterhin habe ich regelmäßige Updates mit Aptitude update/upgrade gemacht.
Code:
ps waux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 1504 512 ? S 11:07 0:01 init [2]
root 2 0.0 0.0 0 0 ? SN 11:07 0:00 [ksoftirqd/0]
root 3 0.1 0.0 0 0 ? S< 11:07 0:03 [events/0]
root 4 0.0 0.0 0 0 ? S< 11:07 0:00 [khelper]
root 5 0.0 0.0 0 0 ? S< 11:07 0:00 [kacpid]
root 38 0.0 0.0 0 0 ? S< 11:07 0:00 [kblockd/0]
root 48 0.0 0.0 0 0 ? S 11:07 0:00 [pdflush]
root 49 0.0 0.0 0 0 ? S 11:07 0:00 [pdflush]
root 51 0.0 0.0 0 0 ? S< 11:07 0:00 [aio/0]
root 50 0.0 0.0 0 0 ? S 11:07 0:00 [kswapd0]
root 187 0.0 0.0 0 0 ? S 11:07 0:00 [kseriod]
root 274 0.0 0.0 0 0 ? S 11:07 0:00 [md1_raid1]
root 305 0.0 0.0 0 0 ? S 11:07 0:00 [kjournald]
root 628 0.0 0.0 0 0 ? S 11:08 0:00 [md0_raid1]
root 655 0.0 0.0 0 0 ? S 11:08 0:00 [md2_raid1]
root 678 0.0 0.0 0 0 ? S 11:08 0:00 [md3_raid1]
root 702 0.0 0.0 0 0 ? S 11:08 0:00 [md4_raid1]
root 747 0.0 0.0 0 0 ? S 11:08 0:00 [kjournald]
root 748 0.0 0.0 0 0 ? S 11:08 0:00 [kjournald]
root 749 0.0 0.0 0 0 ? S 11:08 0:00 [kjournald]
root 750 0.0 0.0 0 0 ? S 11:08 0:00 [kjournald]
root 903 0.0 0.0 1560 592 ? Ss 11:10 0:00 /sbin/syslogd
root 906 0.0 0.1 2412 1476 ? Ss 11:10 0:00 /sbin/klogd
bind 914 0.0 0.3 29864 3124 ? Ss 11:10 0:00 /usr/sbin/named -u bind
root 934 0.0 0.1 2508 1236 ? S 11:10 0:00 /bin/sh /usr/bin/mysqld_safe
mysql 971 0.0 2.5 119712 26688 ? S 11:10 0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql
root 972 0.0 0.0 1488 500 ? S 11:10 0:00 logger -p daemon.err -t mysqld_safe -i -t mysqld
amavis 1019 0.0 6.3 68392 65432 ? Ss 11:10 0:01 amavisd (master)
clamav 1030 0.0 2.0 40528 21696 ? Ss 11:10 0:00 /usr/sbin/clamd
clamav 1081 0.0 0.1 4104 1312 ? Ss 11:10 0:00 /usr/bin/freshclam -p /var/run/clamav/freshclam.pid -d --quiet
root 1089 0.0 0.0 1672 476 ? S 11:10 0:00 /usr/sbin/courierlogger -pid=/var/run/courier/authdaemon/pid -start /
root 1090 0.0 0.0 1808 508 ? S 11:10 0:00 /usr/lib/courier/authlib/authdaemond.plain
root 1092 0.0 0.0 1808 508 ? S 11:10 0:00 /usr/lib/courier/authlib/authdaemond.plain
root 1093 0.0 0.0 1808 508 ? S 11:10 0:00 /usr/lib/courier/authlib/authdaemond.plain
root 1094 0.0 0.0 1808 508 ? S 11:10 0:00 /usr/lib/courier/authlib/authdaemond.plain
root 1095 0.0 0.0 1808 508 ? S 11:10 0:00 /usr/lib/courier/authlib/authdaemond.plain
root 1096 0.0 0.0 1808 508 ? S 11:10 0:00 /usr/lib/courier/authlib/authdaemond.plain
root 1101 0.0 0.0 1776 540 ? S 11:10 0:00 /usr/sbin/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogge
root 1103 0.0 0.0 1540 300 ? S 11:10 0:00 /usr/sbin/courierlogger imaplogin
root 1109 0.0 0.0 1776 540 ? S 11:10 0:00 /usr/sbin/couriertcpd -pid=/var/run/courier/pop3d.pid -stderrlogger=/
root 1111 0.0 0.0 1540 300 ? S 11:10 0:00 /usr/sbin/courierlogger courierpop3login
root 1118 0.0 0.0 1496 444 ? Ss 11:10 0:00 /usr/sbin/inetd
root 1215 0.0 0.1 2972 1184 ? Ss 11:10 0:00 /usr/lib/postfix/master
postfix 1216 0.0 0.1 2980 1216 ? S 11:10 0:00 pickup -l -t fifo -u -c
postfix 1217 0.0 0.1 3012 1276 ? S 11:10 0:00 qmgr -l -t fifo -u -c
root 1275 0.0 0.0 1844 836 ? S 11:10 0:00 /usr/sbin/smartd --pidfile /var/run/smartd.pid
root 1281 0.0 0.1 3468 1504 ? Ss 11:10 0:00 /usr/sbin/sshd
root 1285 0.0 0.0 1696 692 ? Ss 11:10 0:00 /sbin/mdadm -F -i /var/run/mdadm.pid -m [EMAIL="ruth@witouris.de"]ruth@witouris.de[/EMAIL] -f -s
amavis 1293 0.0 6.4 69360 66620 ? S 11:10 0:01 amavisd (ch3-avail)
amavis 1294 0.1 6.7 73416 70432 ? S 11:10 0:04 amavisd (ch2-avail)
daemon 1316 0.0 0.0 1684 628 ? Ss 11:11 0:00 /usr/sbin/atd
root 1319 0.0 0.0 1764 820 ? Ss 11:11 0:00 /usr/sbin/cron
root 1379 0.0 0.8 20348 8800 ? Ss 11:12 0:00 /usr/sbin/apache2 -k start -DSSL
root 1416 0.0 0.0 1492 472 ? S 11:12 0:00 /var/www/vhcs2/daemon/vhcs2_daemon -p /var/run/vhcs2-daemon.pid
root 1429 0.0 0.0 1500 484 tty1 Ss+ 11:12 0:00 /sbin/getty 38400 tty1
root 1430 0.0 0.0 1500 484 tty2 Ss+ 11:12 0:00 /sbin/getty 38400 tty2
root 1431 0.0 0.0 1500 484 tty3 Ss+ 11:12 0:00 /sbin/getty 38400 tty3
root 1432 0.0 0.0 1500 484 tty4 Ss+ 11:12 0:00 /sbin/getty 38400 tty4
root 1433 0.0 0.0 1500 484 tty5 Ss+ 11:12 0:00 /sbin/getty 38400 tty5
root 1434 0.0 0.0 1500 484 tty6 Ss+ 11:12 0:00 /sbin/getty 38400 tty6
www-data 2142 0.0 0.8 20348 8824 ? S 11:13 0:00 /usr/sbin/apache2 -k start -DSSL
www-data 2143 0.0 0.8 20348 8824 ? S 11:13 0:00 /usr/sbin/apache2 -k start -DSSL
www-data 2144 0.0 0.8 20348 8824 ? S 11:13 0:00 /usr/sbin/apache2 -k start -DSSL
www-data 2145 0.0 0.8 20348 8824 ? S 11:13 0:00 /usr/sbin/apache2 -k start -DSSL
www-data 2146 0.0 0.8 20348 8824 ? S 11:13 0:00 /usr/sbin/apache2 -k start -DSSL
root 2301 0.0 0.1 2576 1420 ttyS0 Ss 11:31 0:00 -bash
postfix 3217 0.0 0.1 3176 1572 ? S 12:02 0:00 cleanup -z -t unix -u -c
postfix 3218 0.0 0.1 3508 1548 ? S 12:02 0:00 trivial-rewrite -n rewrite -t unix -u -c
postfix 3221 0.0 0.1 4360 1608 ? S 12:02 0:00 smtp -n smtp-amavis -t unix -u -o smtp_data_done_timeout 1200 -o smtp
postfix 3222 0.0 0.1 4360 1608 ? S 12:02 0:00 smtp -n smtp-amavis -t unix -u -o smtp_data_done_timeout 1200 -o smtp
postfix 3232 0.0 0.2 5468 2352 ? S 12:02 0:00 smtpd -n localhost:10025 -t inet -u -o content_filter -o receive_ove
root 3245 0.0 0.0 2496 844 ttyS0 R+ 12:04 0:00
top -b -n 1
Code:
top - 12:32:14 up 1:24, 1 user, load average: 0.07, 0.07, 0.02
Tasks: 68 total, 1 running, 67 sleeping, 0 stopped, 0 zombie
Cpu(s): 1.0% us, 0.2% sy, 0.1% ni, 97.5% id, 1.2% wa, 0.0% hi, 0.0% si
Mem: 1036524k total, 446032k used, 590492k free, 13552k buffers
Swap: 4000168k total, 0k used, 4000168k free, 228544k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 16 0 1504 512 1352 S 0.0 0.0 0:01.49 init
2 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
3 root 5 -10 0 0 0 S 0.0 0.0 0:03.89 events/0
4 root 14 -10 0 0 0 S 0.0 0.0 0:00.00 khelper
5 root 13 -10 0 0 0 S 0.0 0.0 0:00.00 kacpid
38 root 5 -10 0 0 0 S 0.0 0.0 0:00.01 kblockd/0
48 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pdflush
49 root 15 0 0 0 0 S 0.0 0.0 0:00.00 pdflush
51 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 aio/0
50 root 25 0 0 0 0 S 0.0 0.0 0:00.00 kswapd0
187 root 25 0 0 0 0 S 0.0 0.0 0:00.00 kseriod
274 root 15 0 0 0 0 S 0.0 0.0 0:00.00 md1_raid1
305 root 15 0 0 0 0 S 0.0 0.0 0:00.01 kjournald
628 root 15 0 0 0 0 S 0.0 0.0 0:00.00 md0_raid1
655 root 15 0 0 0 0 S 0.0 0.0 0:00.00 md2_raid1
678 root 15 0 0 0 0 S 0.0 0.0 0:00.00 md3_raid1
702 root 15 0 0 0 0 S 0.0 0.0 0:00.00 md4_raid1
747 root 15 0 0 0 0 S 0.0 0.0 0:00.07 kjournald
748 root 18 0 0 0 0 S 0.0 0.0 0:00.00 kjournald
749 root 15 0 0 0 0 S 0.0 0.0 0:00.00 kjournald
750 root 15 0 0 0 0 S 0.0 0.0 0:00.02 kjournald
903 root 16 0 1560 592 1392 S 0.0 0.1 0:00.01 syslogd
906 root 16 0 2412 1476 1344 S 0.0 0.1 0:00.06 klogd
914 bind 18 0 29864 3124 4248 S 0.0 0.3 0:00.00 named
934 root 22 0 2508 1236 2380 S 0.0 0.1 0:00.00 mysqld_safe
971 mysql 16 0 116m 26m 8920 S 0.0 2.6 0:00.04 mysqld
972 root 16 0 1488 500 1332 S 0.0 0.0 0:00.00 logger
1019 amavis 16 0 68392 63m 5196 S 0.0 6.3 0:01.39 amavisd-new
1030 clamav 16 0 40528 21m 3796 S 0.0 2.1 0:00.00 clamd
1081 clamav 16 0 4104 1312 3876 S 0.0 0.1 0:00.00 freshclam
1089 root 19 0 1672 476 1360 S 0.0 0.0 0:00.00 courierlogger
1090 root 16 0 1808 508 1468 S 0.0 0.0 0:00.00 authdaemond.pla
1092 root 16 0 1808 508 1468 S 0.0 0.0 0:00.00 authdaemond.pla
1093 root 16 0 1808 508 1468 S 0.0 0.0 0:00.00 authdaemond.pla
1094 root 16 0 1808 508 1468 S 0.0 0.0 0:00.00 authdaemond.pla
1095 root 16 0 1808 508 1468 S 0.0 0.0 0:00.00 authdaemond.pla
1096 root 16 0 1808 508 1468 S 0.0 0.0 0:00.00 authdaemond.pla
1101 root 22 0 1776 540 1464 S 0.0 0.1 0:00.00 couriertcpd
1103 root 22 0 1540 300 1360 S 0.0 0.0 0:00.00 courierlogger
1109 root 23 0 1776 540 1464 S 0.0 0.1 0:00.00 couriertcpd
1111 root 23 0 1540 300 1360 S 0.0 0.0 0:00.00 courierlogger
1118 root 19 0 1496 444 1344 S 0.0 0.0 0:00.00 inetd
1215 root 16 0 2972 1184 2780 S 0.0 0.1 0:00.00 master
1216 postfix 16 0 2980 1216 2788 S 0.0 0.1 0:00.00 pickup
1217 postfix 16 0 3012 1276 2820 S 0.0 0.1 0:00.01 qmgr
1275 root 16 0 1844 836 1500 S 0.0 0.1 0:00.00 smartd
1281 root 18 0 3468 1504 3092 S 0.0 0.1 0:00.00 sshd
1285 root 16 0 1696 692 1408 S 0.0 0.1 0:00.10 mdadm
1293 amavis 16 0 69360 65m 5212 S 0.0 6.4 0:01.14 amavisd-new
1294 amavis 16 0 73416 68m 5196 S 0.0 6.8 0:04.66 amavisd-new
1316 daemon 16 0 1684 628 1520 S 0.0 0.1 0:00.00 atd
1319 root 16 0 1764 820 1576 S 0.0 0.1 0:00.00 cron
1379 root 16 0 20348 8800 15m S 0.0 0.8 0:00.11 apache2
1416 root 22 0 1492 472 1336 S 0.0 0.0 0:00.00 vhcs2_daemon
1429 root 16 0 1500 484 1336 S 0.0 0.0 0:00.00 getty
1430 root 16 0 1500 484 1336 S 0.0 0.0 0:00.00 getty
1431 root 16 0 1500 484 1336 S 0.0 0.0 0:00.00 getty
1432 root 16 0 1500 484 1336 S 0.0 0.0 0:00.00 getty
1433 root 16 0 1500 484 1336 S 0.0 0.0 0:00.00 getty
1434 root 16 0 1500 484 1336 S 0.0 0.0 0:00.00 getty
2142 www-data 17 0 20348 8824 15m S 0.0 0.9 0:00.00 apache2
2143 www-data 17 0 20348 8824 15m S 0.0 0.9 0:00.00 apache2
2144 www-data 17 0 20348 8824 15m S 0.0 0.9 0:00.00 apache2
2145 www-data 19 0 20348 8824 15m S 0.0 0.9 0:00.00 apache2
2146 www-data 19 0 20348 8824 15m S 0.0 0.9 0:00.00 apache2
2301 root 15 0 2576 1424 2380 S 0.0 0.1 0:00.00 bash
3467 postfix 16 0 3508 1552 2796 S 0.0 0.1 0:00.00 trivial-rewrite
3474 root 15 0 2060 932 1852 R 0.0 0.1 0:00.00 top
Installiert ist:
MySQL, PHP, AMAVIS, Apache, Postfix, mda-Tools für den Raid, clamav, VHCS (mit Patch)
Eine Neuinstallation ist eh klar, aber ich möchte vorher gern das Problem erkennen um nach der Installation nicht wieder gehackt zu werden.
beste grüße
thomas
Last edited by a moderator: