PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Es ist grad jemand auf meinem Server drauf !! WAS MUSS ICH MACHEN?



Seiten : [1] 2

d@tenmaulwurf
25.04.04, 12:01
Es ist grad jemand auf meinem Server drauf !!
Was muss ich amchen um IP und logs zu bekommen um Beweise zu haben?
Er hat in einem Home-Directory ein Verzeichnis namens: FILME erzeugt - unter diesem User läuft definitiv KEIN prozess !!

Debian Woody, Kernel 2.2.20-idepci
unter WHO kann ich ihn nicht erkennen - FTP läuft nicht drauf

THX im voraus,

d@tenmaulwurf

D_O_Z_E_R
25.04.04, 12:14
hallo,

schau dir mal mit lsof -Pni die Verbindungen an.

d@tenmaulwurf
25.04.04, 12:20
hallo,

schau dir mal mit lsof -Pni die Verbindungen an.

da steht viel... ;)

D_O_Z_E_R
25.04.04, 12:23
hallo,

mach alles zu was du offen hast an netzsachen(browser ftp etc.) musst halt gucken welche verbindung dir merkwürdig vorkommt.

Svenny
25.04.04, 12:25
nen w oder nen netstat sollte auch helfen :)

d@tenmaulwurf
25.04.04, 13:58
Scheinbar wurde nen FTP-Prozess gestartet, hab die PID gekillt.
Scheint so als ob über FTP was hochgeladen wurde...



# netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 268 sonne.unitedsystem.:ssh pD9E0F225.dip.t-di:1071 ESTABLISHED
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags Type State I-Node Path
unix 3 [ ] DGRAM 76 /dev/log
unix 0 [ ] DGRAM 169279
unix 0 [ ] DGRAM 119003
unix 0 [ ] DGRAM 81

# w
16:02:57 up 1 day, 15:27, 1 user, load average: 0.00, 0.00, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/1 pd9e0f225.dip.t- 16:00 0.00s 0.03s 0.01s w


Also mir kommt da alles komisch vor...
Kann man irgendwie sehen, ob jemand via FTP, HTTP oder sonst was grad auf den Server zugreift?
Mit "who" sieht man ja nur SSH-Clients...

D_O_Z_E_R
25.04.04, 14:17
hallo,


mit last kannst du dir zb auch noch die eingelogten user anzeigen. Zu den verbindungsversuchen, entweder die jeweiligen log dateien geben auskunft oder /var/log/messages

Svenny
25.04.04, 14:39
wenn du root zugang per ssh erlaubst ist das kein wunder, dass du mal besuch bekommst, und lass dir auch mal die listen ports bei netstats anzeigen

d@tenmaulwurf
25.04.04, 14:46
wenn du root zugang per ssh erlaubst ist das kein wunder, dass du mal besuch bekommst, und lass dir auch mal die listen ports bei netstats anzeigen

Ich dachte SSH wäre sicher?
oder hab da jetzt was falsch verstanden - also ich bin der einzige der das gut gewählte root-PW kennt.

Svenny
25.04.04, 14:48
ich gehe nun mal davon aus, dass dein server unter sonne.unitedsystem.de errecihbar ist, dann solltest aber noch etwas lernen...


9/tcp open discard?
13/tcp open daytime
22/tcp open ssh OpenSSH 3.4p1 (protocol 2.0)
25/tcp open smtp Exim smtpd 3.35
37/tcp open time
80/tcp open http Apache httpd 1.3.26 ((Unix) Debian GNU/Linux PHP/4.3.6)
111/tcp open rpcbind 2 (rpc #100000)
113/tcp open ident OpenBSD identd
445/tcp filtered microsoft-ds
515/tcp open printer BSD/Linux lpd (access denied)
1024/tcp open status 1 (rpc #100024)
10001/tcp open unknown
12354/tcp open http Webmin httpd

Device type: general purpose
Running: Linux 2.1.X|2.2.X
OS details: Linux 2.1.19 - 2.2.25
Uptime 1.679 days (since Fri Apr 23 23:29:23 2004)



1. webmin ohne ssl, 2. webmin läuft, 3. unnötige daemons, 4. was ist 10001 ?, 5. wieso 2.2er kernel ? etc.pp

d@tenmaulwurf
25.04.04, 14:59
ich gehe nun mal davon aus, dass dein server unter sonne.unitedsystem.de errecihbar ist, dann solltest aber noch etwas lernen...


9/tcp open discard?
13/tcp open daytime
22/tcp open ssh OpenSSH 3.4p1 (protocol 2.0)
25/tcp open smtp Exim smtpd 3.35
37/tcp open time
80/tcp open http Apache httpd 1.3.26 ((Unix) Debian GNU/Linux PHP/4.3.6)
111/tcp open rpcbind 2 (rpc #100000)
113/tcp open ident OpenBSD identd
445/tcp filtered microsoft-ds
515/tcp open printer BSD/Linux lpd (access denied)
1024/tcp open status 1 (rpc #100024)
10001/tcp open unknown
12354/tcp open http Webmin httpd

Device type: general purpose
Running: Linux 2.1.X|2.2.X
OS details: Linux 2.1.19 - 2.2.25
Uptime 1.679 days (since Fri Apr 23 23:29:23 2004)



1. webmin ohne ssl, 2. webmin läuft, 3. unnötige daemons, 4. was ist 10001 ?, 5. wieso 2.2er kernel ? etc.pp

Die 10001 iss TeamSpeak2.
Wie bekomme ich Webmin mit SSL zum Laufen?
Welche Daemons sind unwichtig?
Kernel wird noch geupdated

D_O_Z_E_R
25.04.04, 15:05
hallo,

auha,da is ja richtig was los bei dir am rechner :) . Welche Dienste unnötig sind kannst eigentlich nur du selbst entscheiden. und um eine firewall solltest du dich wohl auch mal kümmern.

Svenny
25.04.04, 15:05
Wie bekomme ich Webmin mit SSL zum Laufen?

In der Config einstellen



Welche Daemons sind unwichtig?

daytime, time, rpcbind, ident, lpd, rpc


www.debianhowto.de


apt-get remove --purge lpr nfs-common portmap pidentd pcmcia-cs pppoe pppoeconf ppp pppconfig


obelix:~# update-inetd --remove daytime
obelix:~# update-inetd --remove telnet
obelix:~# update-inetd --remove time
obelix:~# update-inetd --remove finger
obelix:~# update-inetd --remove talk
obelix:~# update-inetd --remove ntalk
obelix:~# update-inetd --remove ftp
obelix:~# update-inetd --remove discard

WARNING!!!!!! /etc/inetd.conf contains multiple entries for
the `discard' service. You're about to remove these entries.
Do you want to continue? [n] y

Ok, I'll continue ...
obelix:~# /etc/init.d/inetd reload

d@tenmaulwurf
25.04.04, 15:05
ARGH !!

180 ? S 0:00 /usr/sbin/sshd
21804 ? S 0:00 \_ /usr/sbin/sshd
21806 pts/1 S 0:00 | \_ -bash
22387 pts/1 R 0:00 | \_ ps -fax
21837 ? S 0:00 \_ /usr/sbin/sshd
21839 ? S 0:00 \_ /usr/sbin/sshd
21840 ? S 0:00 \_ /usr/lib/sftp-server <---- das war NICHT ich !!
183 ? S 0:00 /usr/sbin/atd


Wie kann ich das starten eines solchen Daemons unterbinden?
Ich hab ihn heut schon 1x killen müssen !!

Svenny
25.04.04, 15:09
das ist scp, den kannst in der ssh config ausstellen, schreib uns mal ne ps faxu

r2k
25.04.04, 15:09
ich gehe nun mal davon aus, dass dein server unter sonne.unitedsystem.de errecihbar ist, dann solltest aber noch etwas lernen...


9/tcp open discard?
13/tcp open daytime
22/tcp open ssh OpenSSH 3.4p1 (protocol 2.0)
25/tcp open smtp Exim smtpd 3.35
37/tcp open time
80/tcp open http Apache httpd 1.3.26 ((Unix) Debian GNU/Linux PHP/4.3.6)
111/tcp open rpcbind 2 (rpc #100000)
113/tcp open ident OpenBSD identd
445/tcp filtered microsoft-ds
515/tcp open printer BSD/Linux lpd (access denied)
1024/tcp open status 1 (rpc #100024)
10001/tcp open unknown
12354/tcp open http Webmin httpd

Device type: general purpose
Running: Linux 2.1.X|2.2.X
OS details: Linux 2.1.19 - 2.2.25
Uptime 1.679 days (since Fri Apr 23 23:29:23 2004)



@Svenny
wie bekomme ich so eine Ausgabe?

geronet
25.04.04, 15:11
Das ist ein Portscan mit nmap z.B.

D_O_Z_E_R
25.04.04, 15:12
nmap zb....

r2k
25.04.04, 15:15
Danke für den Tipp, wusste garnicht das NMAP soviele Informaionen ausgibt.

Ich kannte nur die offenen Ports, nicht aber die Uptime...

Igge
25.04.04, 16:39
Es ist grad jemand auf meinem Server drauf !! WAS MUSS ICH MACHEN?

Formatieren!? Wenn wirklich jmd. dein System gehackt/gecrackt hat, bringt das ja auch nichts, wenn du jetzt per Hand irgendwelche Prozesse killst. Es liegt ja bei deinem Server eh einiges im Argen (zu viele Dienste, keine Firewall, alter Kernel), von daher käme eine Neuinstallation ja gerade recht. Nimm das Ding vom Netz und richte alles nochmal richtig ein. Jedenfalls würde ich das so machen..

Igge

d@tenmaulwurf
25.04.04, 17:31
Formatieren!? Wenn wirklich jmd. dein System gehackt/gecrackt hat, bringt das ja auch nichts, wenn du jetzt per Hand irgendwelche Prozesse killst. Es liegt ja bei deinem Server eh einiges im Argen (zu viele Dienste, keine Firewall, alter Kernel), von daher käme eine Neuinstallation ja gerade recht. Nimm das Ding vom Netz und richte alles nochmal richtig ein. Jedenfalls würde ich das so machen..

Igge

Du würst es nicht glauben, aber das System ist genau einen Tag alt, da mein SuSE9 auch schon gehacked wurde...

HEMIcuda
25.04.04, 17:33
Du würst es nicht glauben, aber das System ist genau einen Tag alt, da mein SuSE9 auch schon gehacked wurde...

LOL! Da machst Du wohl irgendwas falsch.

'cuda

d@tenmaulwurf
25.04.04, 17:39
So, hab jetzt ma das Debianhowto benutzt.
Dürfte jetzt einw enig besser sein...

d@tenmaulwurf
25.04.04, 17:45
LOL! Da machst Du wohl irgendwas falsch.

'cuda


Ja, genau DAS Gefühl hab ich auch...

Ich mein - nach einem Tag ?!

Svenny
25.04.04, 17:52
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 3.4p1 (protocol 2.0)
25/tcp open smtp Exim smtpd 3.35
80/tcp open http Apache httpd 1.3.26 ((Unix) Debian GNU/Linux PHP/4.3.6)
445/tcp filtered microsoft-ds
10001/tcp open unknown
12354/tcp open http Webmin httpd
33457/tcp filtered unknown
33458/tcp filtered unknown
51234/tcp open unknown

Device type: general purpose
Running: Linux 2.1.X|2.2.X
OS details: Linux 2.1.19 - 2.2.25
Uptime 1.807 days (since Fri Apr 23 23:29:23 2004)

was ist auf 445?

mach mal netstat -aput und ps faxu

d@tenmaulwurf
25.04.04, 17:56
Erstma möchte ich mich bei euch allen für eure echt objektiven Rat/Vorschläge danken.
Aufgrund dieses echt denkbar schlechten und "noobigem" Titels hatte ich mehr Posts von der Sorte "mir würde sowas nie passieren" oder "Tja, Rootie kaufen, nicht wissen wie man ihn sichert und dann nach Hilfe schreien" erwartet ;)
Z.T. stimmts ja auch - also nochma vielen Dank :)

d@tenmaulwurf
25.04.04, 17:58
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 3.4p1 (protocol 2.0)
25/tcp open smtp Exim smtpd 3.35
80/tcp open http Apache httpd 1.3.26 ((Unix) Debian GNU/Linux PHP/4.3.6)
445/tcp filtered microsoft-ds
10001/tcp open unknown
12354/tcp open http Webmin httpd
33457/tcp filtered unknown
33458/tcp filtered unknown
51234/tcp open unknown

Device type: general purpose
Running: Linux 2.1.X|2.2.X
OS details: Linux 2.1.19 - 2.2.25
Uptime 1.807 days (since Fri Apr 23 23:29:23 2004)

was ist auf 445?

mach mal netstat -aput und ps faxu


Netstat:


# netstat -aput
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 300 sonne.unitedsystem.:ssh pD9E0F225.dip.t-di:1043 ESTABLISHED 22699/sshd
tcp 0 0 *:www *:* LISTEN 22238/apache
tcp 0 0 *:51234 *:* LISTEN 21755/server_linux
tcp 0 0 *:10001 *:* LISTEN 21755/server_linux
tcp 0 0 *:12354 *:* LISTEN 22988/perl
tcp 0 0 *:ssh *:* LISTEN 180/sshd
tcp 0 0 *:smtp *:* LISTEN 167/inetd
udp 0 0 *:8767 *:* 21755/server_linux
udp 0 0 *:27015 *:* 21727/hlds_amd
udp 0 0 *:10000 *:* 22988/perl

hmm... kann mich net erinnern Perl installed zu haben, aber egal...

ps faxu:


USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.1 1272 484 ? S Apr24 0:07 init [2]
root 2 0.0 0.0 0 0 ? SW Apr24 0:02 [kflushd]
root 3 0.0 0.0 0 0 ? SW Apr24 1:29 [kupdate]
root 4 0.0 0.0 0 0 ? SW Apr24 1:14 [kswapd]
root 5 0.0 0.0 0 0 ? SW Apr24 0:00 [keventd]
root 151 0.0 0.3 2036 780 ? S Apr24 0:00 /sbin/syslogd
root 154 0.0 0.3 1656 816 ? S Apr24 0:00 /sbin/klogd
root 167 0.0 0.2 2000 728 ? S Apr24 0:00 /usr/sbin/inetd
root 180 0.0 0.4 2784 1208 ? S Apr24 0:00 /usr/sbin/sshd
root 22699 0.0 0.7 6416 1968 ? S 19:29 0:00 \_ /usr/sbin/sshd
root 22701 0.0 0.4 2224 1256 pts/1 S 19:29 0:00 \_ -bash
root 23060 0.0 0.4 2924 1084 pts/1 R 20:04 0:00 \_ ps faxu
daemon 183 0.0 0.2 1388 584 ? S Apr24 0:00 /usr/sbin/atd
root 186 0.0 0.2 1652 684 ? S Apr24 0:00 /usr/sbin/cron
root 189 0.0 0.1 1252 468 tty1 S Apr24 0:00 /sbin/getty 38400 tty1
root 190 0.0 0.1 1252 468 tty2 S Apr24 0:00 /sbin/getty 38400 tty2
root 191 0.0 0.1 1252 468 tty3 S Apr24 0:00 /sbin/getty 38400 tty3
root 192 0.0 0.1 1252 468 tty4 S Apr24 0:00 /sbin/getty 38400 tty4
root 193 0.0 0.1 1252 468 tty5 S Apr24 0:00 /sbin/getty 38400 tty5
root 194 0.0 0.1 1252 468 tty6 S Apr24 0:00 /sbin/getty 38400 tty6
root 22988 0.0 1.5 5764 4120 ? S Apr24 0:02 perl /usr/local/webmin/miniserv.pl /etc/webmin/miniserv.conf
root 21176 0.0 0.3 2056 976 ? S 13:53 0:00 sh /usr/bin/mysqld_safe
mysql 21218 0.0 2.1 64052 5556 ? S 13:53 0:00 \_ /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/
mysql 21220 0.0 2.1 64052 5556 ? S 13:53 0:00 \_ /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/
mysql 21221 0.0 2.1 64052 5556 ? S 13:53 0:00 \_ /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/
mysql 21222 0.0 2.1 64052 5556 ? S 13:53 0:00 \_ /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/
hl 21715 0.0 0.3 2112 1020 ? SN 14:17 0:00 sh ./hlds_run -game cstrike -pingboost 2 +maxplayers 10 +map de_dust
hl 21727 0.2 23.6 67664 60984 ? SN 14:17 0:50 \_ ./hlds_amd -game cstrike -pingboost 2 +maxplayers 10 +map de_dust
voice 21755 0.0 0.8 18540 2148 ? SN 14:22 0:02 ./server_linux -PID=tsserver2.pid
voice 21756 0.0 0.8 18540 2148 ? S 14:22 0:00 \_ ./server_linux -PID=tsserver2.pid
voice 21757 0.0 0.8 18540 2148 ? S 14:22 0:02 \_ ./server_linux -PID=tsserver2.pid
voice 21758 0.0 0.8 18540 2148 ? S 14:22 0:05 \_ ./server_linux -PID=tsserver2.pid
voice 21759 0.0 0.8 18540 2148 ? S 14:22 0:06 \_ ./server_linux -PID=tsserver2.pid
voice 21760 0.0 0.8 18540 2148 ? S 14:22 0:00 \_ ./server_linux -PID=tsserver2.pid
voice 21761 0.0 0.8 18540 2148 ? S 14:22 0:00 \_ ./server_linux -PID=tsserver2.pid
voice 21762 0.0 0.8 18540 2148 ? S 14:22 0:00 \_ ./server_linux -PID=tsserver2.pid
voice 21763 0.0 0.8 18540 2148 ? S 14:22 0:00 \_ ./server_linux -PID=tsserver2.pid
root 22238 0.0 1.2 73528 3204 ? S 16:45 0:00 /usr/sbin/apache
www-data 22239 0.0 1.2 73552 3220 ? S 16:45 0:00 \_ /usr/sbin/apache
www-data 22240 0.0 1.2 73552 3220 ? S 16:45 0:00 \_ /usr/sbin/apache
www-data 22675 0.0 1.2 73552 3220 ? S 19:01 0:00 \_ /usr/sbin/apache
www-data 22683 0.0 1.4 73780 3752 ? S 19:01 0:00 \_ /usr/sbin/apache
www-data 22687 0.0 1.2 73576 3256 ? S 19:01 0:00 \_ /usr/sbin/apache
www-data 22688 0.0 1.2 73576 3256 ? S 19:02 0:00 \_ /usr/sbin/apache




was ist auf 445?

Wenn ich das wüsste...

Hitman
25.04.04, 18:06
Port 445 = SMB over TCP

emba
25.04.04, 21:26
Ich dachte SSH wäre sicher?
oder hab da jetzt was falsch verstanden - also ich bin der einzige der das gut gewählte root-PW kennt.

nur zum allgemeinen verständnis:

jedes system ist nur so sicher, wie das schwächste glied - das kann man nicht oft genug sagen!
es gibt keine "sichere software", nur sicherheitssoftware, die einbrüche/spionage erschwert

greez

cane
27.04.04, 07:39
@d@tenmaulwurf

1. Du solltest mal drüber nachdenken, was passiert wenn ein Cracker deinen Server als Relay für Spam benutzt oder sogar verbotene Pics anbietet...
Dann bist Du der Dumme da Du indem Du ein unsicheres System betreibst fahrlässig / grob fahrlässig handelst!

2. Wenn Du schon ein unsicheres System betreibst solltest Du in den oben geposteten Ausgaben deine IP / deinen domainname maskieren.
Oder soll das eine Einladung sein deinen Server mal zu besuchen???
Mach ich gerne - brauch eh noch a bissl Webspace ;)

mfg
cane