Portsentry restlos entfernen! Wie??

Rund um die Sicherheit des Systems und die Applikationen
acheron
Posts: 23
Joined: 2004-10-08 17:57
 

Portsentry restlos entfernen! Wie??

Post by acheron »

Habe auf einem Testrechner Suse 9.0 Portsentry 1.2 installiert. Nachdem ich bemerkt habe, dass es ein Fehler war und Portsentry nichts taugt, wollte ich es entfernen, doch irgendetwas habe ich wohl übersehen.

Installiert nach dem HowTo von:
http://www.netsecond.net/howto/index.ph ... artlang=de

Folgende Schritte wurden unternommen:
1. /etc/init.d/rcportsentry stop
2. /etc/init.d/rc3.d/S08portsentry gelöscht
3. /etc/init.d/rc3.d/K17portsentry gelöscht
4. /etc/cron.d/filtermgr gelöscht
5. Alle Portsentry Dateien in /usr/ gelöscht

Wo könnte der Fehler liegen? Wie kann ich ihn beheben?

Folgende Meldung kommt in der Messages-Datei, wenn ich zum Test Scanne:

Code: Select all

Jan  4 02:12:37 server portsentry[8691]: attackalert: ERROR: cannot open ignore file. Blocking host anyway.
Jan  4 02:12:37 server portsentry[8691]: attackalert: TCP SYN/Normal scan from host: 217.167.118.221/217.167.118.221 to TCP port: 13
Jan  4 02:12:37 server portsentry[8691]: adminalert: ERROR: Cannot open blocked file: /usr/local/psionic/portsentry/portsentry.block
Jan  4 02:12:37 server portsentry[8691]: attackalert: Host 217.167.118.221 has been blocked via wrappers with string: "ALL: 217.167.
Jan  4 02:12:37 server portsentry[8691]: attackalert: External command run for host: 217.167.118.221 using command: "/usr/local/psio
Jan  4 02:12:37 server portsentry[8691]: adminalert: ERROR: Cannot open blocked file: /usr/local/psionic/portsentry/portsentry.block
Jan  4 02:12:37 server portsentry[8691]: adminalert: ERROR: Cannot open history file: /usr/local/psionic/portsentry/portsentry.histo
Jan  4 02:12:37 server portsentry[8691]: attackalert: ERROR: cannot open ignore file. Blocking host anyway.
Jan  4 02:12:38 server portsentry[8691]: attackalert: TCP SYN/Normal scan from host: 217.167.118.221/217.167.118.221 to TCP port: 13
Jan  4 02:12:38 server portsentry[8691]: adminalert: ERROR: Cannot open blocked file: /usr/local/psionic/portsentry/portsentry.block
Jan  4 02:12:38 server portsentry[8691]: attackalert: Host 217.167.118.221 has been blocked via wrappers with string: "ALL: 217.167.
Jan  4 02:12:38 server portsentry[8691]: attackalert: External command run for host: 217.167.118.221 using command: "/usr/local/psio
Jan  4 02:12:38 server portsentry[8691]: adminalert: ERROR: Cannot open blocked file: /usr/local/psionic/portsentry/portsentry.block
Jan  4 02:12:38 server portsentry[8691]: adminalert: ERROR: Cannot open history file: /usr/local/psionic/portsentry/portsentry.histo
Jan  4 02:12:38 server portsentry[8691]: attackalert: ERROR: cannot open ignore file. Blocking host anyway.
Jan  4 02:12:38 server portsentry[8691]: attackalert: TCP SYN/Normal scan from host: 217.167.118.221/217.167.118.221 to TCP port: 13
Jan  4 02:12:38 server portsentry[8691]: adminalert: ERROR: Cannot open blocked file: /usr/local/psionic/portsentry/portsentry.block
Jan  4 02:12:38 server portsentry[8691]: attackalert: Host 217.167.118.221 has been blocked via wrappers with string: "ALL: 217.167.
Jan  4 02:12:38 server portsentry[8691]: attackalert: External command run for host: 217.167.118.221 using command: "/usr/local/psio
Jan  4 02:12:38 server portsentry[8691]: adminalert: ERROR: Cannot open blocked file: /usr/local/psionic/portsentry/portsentry.block
Jan  4 02:12:38 server portsentry[8691]: adminalert: ERROR: Cannot open history file: /usr/local/psionic/portsentry/portsentry.histo
Jan  4 02:13:22 server portsentry[8691]: attackalert: ERROR: cannot open ignore file. Blocking host anyway.
Jan  4 02:13:23 server portsentry[8691]: attackalert: TCP SYN/Normal scan from host: adsl_lav178_187.datastream.com.mt/217.22.178.18
Jan  4 02:13:23 server portsentry[8691]: adminalert: ERROR: Cannot open blocked file: /usr/local/psionic/portsentry/portsentry.block
Jan  4 02:13:23 server portsentry[8691]: attackalert: Host 217.22.178.187 has been blocked via wrappers with string: "ALL: 217.22.17
Jan  4 02:13:23 server portsentry[8691]: attackalert: External command run for host: 217.22.178.187 using command: "/usr/local/psion
Jan  4 02:13:23 server portsentry[8691]: adminalert: ERROR: Cannot open blocked file: /usr/local/psionic/portsentry/portsentry.block
Jan  4 02:13:23 server portsentry[8691]: adminalert: ERROR: Cannot open history file: /usr/local/psionic/portsentry/portsentry.histo
Jan  4 02:13:41 server xinetd[5345]: libwrap refused connection to ftp (libwrap=vsftpd) from 127.0.0.1
Jan  4 02:14:00 server /USR/SBIN/CRON[5350]: (root) CMD (/usr/local/confixx/confixx_counterscript.pl)
Jan  4 02:14:40 server xinetd[5367]: libwrap refused connection to ftp (libwrap=vsftpd) from 127.0.0.1
Jan  4 02:14:46 server xinetd[5370]: libwrap refused connection to ftp (libwrap=vsftpd) from 127.0.0.1
Jan  4 02:16:00 server /USR/SBIN/CRON[5400]: (root) CMD (/usr/local/confixx/confixx_counterscript.pl)
Jan  4 02:17:27 server kernel: addrconf: valid lifetime 2592000 is too long; adjusted to 2147482.
Vielen Dank für die Hilfe!
pg-computer
Posts: 144
Joined: 2002-09-27 19:28
Location: Drebach / Erzgebirge
 

Re: Portsentry restlos entfernen! Wie??

Post by pg-computer »

Hoi Hoi,

hmm ist der Cronjob als File wirklich weg?
Mal crontab geprüft?

Und da läuft wirklich kein Prozess mehr???
acheron
Posts: 23
Joined: 2004-10-08 17:57
 

Re: Portsentry restlos entfernen! Wie??

Post by acheron »

Danke, für deine Bemühungen.

Habe den Befehl ausgeführt. Und in der messages.log kommen immer noch diese Fehler, wenn ich Scanne:

Code: Select all

Jan  4 16:30:22 server portsentry[8691]: attackalert: Host 217.235.87.140 has been blocked via wrappers w
Jan  4 16:30:22 server portsentry[8691]: attackalert: External command run for host: 217.235.87.140 using
Jan  4 16:30:22 server portsentry[8691]: adminalert: ERROR: Cannot open blocked file: /usr/local/psionic/
Jan  4 16:30:22 server portsentry[8691]: adminalert: ERROR: Cannot open history file: /usr/local/psionic/
Jan  4 16:30:37 server xinetd[24907]: libwrap refused connection to ftp (libwrap=vsftpd) from 127.0.0.1
Jan  4 16:31:08 server xinetd[24937]: libwrap refused connection to ftp (libwrap=vsftpd) from 127.0.0.1
Jan  4 16:31:16 server xinetd[24940]: libwrap refused connection to pop3 (libwrap=popper) from 217.235.87
Nach dem Scan kann ich dann keine Mails mehr abrufen. Wie kann das sein? Dachte, dass ich alle wichtigen Files gelöscht habe und trotzdem hat das Prog anscheinend noch Einfluss...


Läuft anscheinend nichtmehr:

Code: Select all

# crontab -l

*/2 * * * *   /usr/local/confixx/confixx_counterscript.pl
-45 2 * * * /usr/local/confixx/auto_reg.pl 2>/dev/null >/dev/null
45 2 * * * /usr/sbin/netdate ntp1.intergenia.de 2>/dev/null >/dev/null && hwclock -w 2>/dev/null >/dev/null
0 */6 * * * /usr/local/confixx/runwebalizer.sh 2>/dev/null >/dev/null
PS aux

Code: Select all

USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   620  256 ?        S     2004   0:05 init [3]
root         2  0.0  0.0     0    0 ?        SW    2004   0:00 [keventd]
root         3  0.0  0.0     0    0 ?        SWN   2004   0:00 [ksoftirqd_CPU0]
root         4  0.0  0.0     0    0 ?        SW    2004   0:11 [kswapd]
root         5  0.0  0.0     0    0 ?        SW    2004   0:00 [bdflush]
root         6  0.0  0.0     0    0 ?        SW    2004   0:00 [kupdated]
root         7  0.0  0.0     0    0 ?        SW    2004   0:01 [kinoded]
root         8  0.0  0.0     0    0 ?        SW    2004   0:00 [mdrecoveryd]
root        12  0.0  0.0     0    0 ?        SW    2004   0:19 [kjournald]
root        55  0.0  0.0     0    0 ?        SW    2004   0:00 [kcopyd]
root       458  0.0  0.1  1560  572 ?        S     2004   0:03 /sbin/syslogd -a /var/lib/named/dev/log
root       461  0.0  0.3  2384 1436 ?        S     2004   0:00 /sbin/klogd -c 1 -2
root       488  0.0  0.0  1524  248 ?        S     2004   0:00 /sbin/resmgrd
bin        490  0.0  0.0  1524  420 ?        S     2004   0:00 /sbin/portmap
root       492  0.0  0.2  4456 1112 ?        S     2004   0:00 /usr/sbin/saslauthd -a pam
root       493  0.0  0.2  4456 1092 ?        S     2004   0:00 /usr/sbin/saslauthd -a pam
root       494  0.0  0.2  4456 1092 ?        S     2004   0:00 /usr/sbin/saslauthd -a pam
root       495  0.0  0.2  4456 1092 ?        S     2004   0:00 /usr/sbin/saslauthd -a pam
root       496  0.0  0.2  4456 1092 ?        S     2004   0:00 /usr/sbin/saslauthd -a pam
at         538  0.0  0.0  1684  292 ?        S     2004   0:00 /usr/sbin/atd
root       565  0.0  0.1  1504  476 ?        S     2004   0:00 /usr/sbin/acpid
root       571  0.0  0.2  4916  996 ?        S     2004   0:02 /usr/sbin/sshd -o PidFile=/var/run/sshd.init.
root       573  0.0  0.2  2460 1092 ?        S     2004   0:00 /bin/sh /usr/bin/mysqld_safe --user=mysql --p
mysql      613  0.0  4.8 74248 21700 ?       S     2004   0:06 /usr/sbin/mysqld-max --basedir=/usr --datadir
mysql      620  0.0  4.8 74248 21700 ?       S     2004   0:07 /usr/sbin/mysqld-max --basedir=/usr --datadir
mysql      621  0.0  4.8 74248 21700 ?       S     2004   0:00 /usr/sbin/mysqld-max --basedir=/usr --datadir
mysql      622  0.0  4.8 74248 21700 ?       S     2004   0:00 /usr/sbin/mysqld-max --basedir=/usr --datadir
mysql      623  0.0  4.8 74248 21700 ?       S     2004   0:00 /usr/sbin/mysqld-max --basedir=/usr --datadir
mysql      624  0.0  4.8 74248 21700 ?       S     2004   0:00 /usr/sbin/mysqld-max --basedir=/usr --datadir
mysql      626  0.0  4.8 74248 21700 ?       S     2004   0:00 /usr/sbin/mysqld-max --basedir=/usr --datadir
mysql      627  0.0  4.8 74248 21700 ?       S     2004   0:00 /usr/sbin/mysqld-max --basedir=/usr --datadir
mysql      628  0.0  4.8 74248 21700 ?       S     2004   0:00 /usr/sbin/mysqld-max --basedir=/usr --datadir
mysql      629  0.0  4.8 74248 21700 ?       S     2004   0:07 /usr/sbin/mysqld-max --basedir=/usr --datadir
mysql      630  0.0  4.8 74248 21700 ?       S     2004   0:00 /usr/sbin/mysqld-max --basedir=/usr --datadir
root       664  0.0  0.0  1708  436 ?        S     2004   0:00 /usr/sbin/cron
root       820  0.0  0.0 12272  436 ?        S     2004   0:04 /usr/sbin/nscd
root       821  0.0  0.0 12272  436 ?        S     2004   0:00 /usr/sbin/nscd
root       822  0.0  0.0 12272  436 ?        S     2004   0:04 /usr/sbin/nscd
root       823  0.0  0.0 12272  436 ?        S     2004   0:00 /usr/sbin/nscd
root       824  0.0  0.0 12272  436 ?        S     2004   0:00 /usr/sbin/nscd
root       825  0.0  0.0 12272  436 ?        S     2004   0:00 /usr/sbin/nscd
root       826  0.0  0.0 12272  436 ?        S     2004   0:00 /usr/sbin/nscd
root       846  0.0  0.0  1500    4 tty1     S     2004   0:00 /sbin/mingetty --noclear tty1
root       847  0.0  0.0  1500    4 tty2     S     2004   0:00 /sbin/mingetty tty2
root       848  0.0  0.0  1500    4 tty3     S     2004   0:00 /sbin/mingetty tty3
root       849  0.0  0.0  1500    4 tty4     S     2004   0:00 /sbin/mingetty tty4
root       850  0.0  0.0  1500    4 tty5     S     2004   0:00 /sbin/mingetty tty5
root       851  0.0  0.0  1500    4 tty6     S     2004   0:00 /sbin/mingetty tty6
root     24268  0.0  1.1  6752 5052 ?        S     2004   0:00 /usr/lib/AntiVir/antivir --updater-daemon -q
root      8691  0.0  0.1  1652  684 ?        S    Jan03   0:04 /usr/local/psionic/portsentry/portsentry -atc
root      8693  0.0  0.1  1652  680 ?        S    Jan03   0:00 /usr/local/psionic/portsentry/portsentry -aud
root      1296  0.0  0.1  2108  840 ?        S    01:43   0:00 /usr/sbin/xinetd
named    14156  0.0  0.6 12536 3100 ?        S    12:32   0:00 /usr/sbin/named -t /var/lib/named -u named
named    14157  0.0  0.6 12536 3100 ?        S    12:32   0:00 /usr/sbin/named -t /var/lib/named -u named
named    14158  0.0  0.6 12536 3100 ?        S    12:32   0:00 /usr/sbin/named -t /var/lib/named -u named
named    14159  0.0  0.6 12536 3100 ?        S    12:32   0:00 /usr/sbin/named -t /var/lib/named -u named
named    14160  0.0  0.6 12536 3100 ?        S    12:32   0:00 /usr/sbin/named -t /var/lib/named -u named
root     22883  0.0  0.2  3312 1296 ?        S    15:39   0:00 /usr/bin/perl /usr/local/confixx/pipelog.pl
root     23106  0.0  1.2  8416 5820 ?        S    15:44   0:00 /usr/bin/perl /usr/lib/webmin/miniserv.pl /et
root     23421  0.0  0.4  5580 2040 ?        S    15:56   0:00 sshd: root@pts/0
root     23448  0.0  0.4  5580 2040 ?        S    15:56   0:00 sshd: root@pts/0
root     23450  0.0  0.3  2968 1676 pts/0    S    15:56   0:00 -bash
root     23892  0.0  0.5  5480 2324 ?        S    16:08   0:00 sendmail: accepting connections
mail     23896  0.0  0.4  5092 1980 ?        S    16:08   0:00 sendmail: Queue control
mail     23897  0.0  0.4  5092 2036 ?        S    16:08   0:00 sendmail: running queue: /var/spool/clientmqu
root     24769  0.1  1.7 49484 8064 ?        S    16:29   0:01 /usr/sbin/httpd2-prefork -f /etc/apache2/http
nobody   24923  0.0  0.2  2220  928 ?        S    16:30   0:00 vsftpd
nobody   25384  0.0  0.2  2220  928 ?        S    16:38   0:00 vsftpd
root     25492  0.0  0.3  3312 1356 ?        S    16:40   0:00 /usr/bin/perl /usr/local/confixx/pipelog.pl
wwwrun   25502  0.1  2.6 52696 12128 ?       S    16:40   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/http
wwwrun   25505  0.0  2.1 50512 9724 ?        S    16:40   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/http
wwwrun   25506  0.2  2.7 52996 12224 ?       S    16:40   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/http
wwwrun   25513 14.5  2.5 52056 11440 ?       S    16:40   0:30 /usr/sbin/httpd2-prefork -f /etc/apache2/http
wwwrun   25523  0.1  2.7 53052 12332 ?       S    16:41   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/http
wwwrun   25531  0.0  2.1 50492 9708 ?        S    16:41   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/http
wwwrun   25532  0.0  2.2 50724 10016 ?       S    16:41   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/http
wwwrun   25535  0.0  2.0 50144 9104 ?        S    16:41   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/http
wwwrun   25536  0.0  2.5 52268 11468 ?       S    16:41   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/http
wwwrun   25537  0.0  2.5 52060 11272 ?       S    16:41   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/http
wwwrun   25538 19.3  2.2 51104 9964 ?        S    16:41   0:30 /usr/sbin/httpd2-prefork -f /etc/apache2/http
wwwrun   25551  0.1  2.5 52048 11408 ?       S    16:41   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/http
wwwrun   25588  0.1  2.4 51944 11128 ?       S    16:42   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/http
wwwrun   25600  0.0  1.8 49688 8224 ?        S    16:42   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/http
wwwrun   25606  0.0  1.8 49552 8216 ?        S    16:42   0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/http
nobody   25607  0.0  0.2  2220  928 ?        S    16:42   0:00 vsftpd
root     25640  0.0  0.1  2668  720 pts/0    R    16:43   0:00 ps aux
superuser1
Posts: 291
Joined: 2003-11-26 18:43
Location: earth
 

Re: Portsentry restlos entfernen! Wie??

Post by superuser1 »

Hi...

und was ist das ?

Code: Select all

root      8691  0.0  0.1  1652  684 ?        S    Jan03   0:04 /usr/local/psionic/portsentry/portsentry -atc
root      8693  0.0  0.1  1652  680 ?        S    Jan03   0:00 /usr/local/psionic/portsentry/portsentry -aud
Evtl. hilft dir ein 'locate portsentry' weiter.

:roll:
pg-computer
Posts: 144
Joined: 2002-09-27 19:28
Location: Drebach / Erzgebirge
 

Re: Portsentry restlos entfernen! Wie??

Post by pg-computer »

hoi hoi,

jo dann einfach ein kill -9 PID
acheron
Posts: 23
Joined: 2004-10-08 17:57
 

Re: Portsentry restlos entfernen! Wie??

Post by acheron »

Danke, superuser1 und PG-Computer!

Das hab ich nicht gesehen :cry:

Funktioniert hervorragend!!! :-D
Outlaw
Posts: 1500
Joined: 2002-12-04 10:22
Location: 4. Server von rechts, 2. Reihe von oben
 

Re: Portsentry restlos entfernen! Wie??

Post by Outlaw »

Nunja, ich hatte damal portsentry auch wieder runtrbekommen, bin einfach dei Anleitung nochmal durchgegangen und habe eben alles wieder rückgängig gemacht und den Dienst (vorher) gestoppt ....

Gruß Outi

PS: Zitat aus dem HowTo:
"Hinweis von Outlaw: Im Rootforum.de Forum ist man mehrheitlich der Meinung, daß der Einsatz von Portsentry eher mehr schadet als nützt, ...."
Zitat Ende ;):D
obsolete
Posts: 17
Joined: 2003-10-25 17:32
 

Re: Portsentry restlos entfernen! Wie??

Post by obsolete »

hallo,

warum willst du es denn überhaupt deinstallieren?
was heisst "es taugt überhaupt nichts"... ich vermute da eher
eine gewisse unfähigkeit zu konfigurieren, kann das sein ;-) ?
dodolin
Posts: 3840
Joined: 2003-01-21 01:59
Location: Sinsheim/Karlsruhe
 

Re: Portsentry restlos entfernen! Wie??

Post by dodolin »

eine gewisse unfähigkeit zu konfigurieren
Nicht nur zu konfigurieren, auch die Ausgaben sinngemäß zu interpretieren.
acheron
Posts: 23
Joined: 2004-10-08 17:57
 

Re: Portsentry restlos entfernen! Wie??

Post by acheron »

Für mich war das Thema zwar schon erledigt...

Das Tool hat natürlich die Aufgaben perfekt erfüllt. Die Konfiguration war somit auch korrekt. Das Zitat "es taugt überhaupt nichts" ist falsch wiedergegeben! Im ersten Beitrag sagte ich "es taug nichts" und zu diesem Schluss kam ich, als ich mich im Rootforum erkundigte und die kritische Meinung des Captains laß. Anscheinend bringt das Programm nicht zusätzliche Sicherheit, sondern fordert Hacker eher auf eine andere Möglichkeit zu finden.

Die (ehemalige) Meinung von Crunch empfand ich als einleuchtend und ich sicherte meinen Rechner nun durch andere Methoden. Ein Portscan ist ja nichts schlimmes und sollte nicht unbedingt unterbunden werden. Wenn Firewall & Co. richtig eingestellt sind, für was benötige ich dann noch Portsentry?

Verstehe auch gar nicht, warum ihr dieses Thema überhaupt weitergeführt habt. Meine Frage wurde gelöst und wenn euch langweilig ist, dann macht euch über jemand anderen her.

=> Thema kann geschlossen werden.
Outlaw
Posts: 1500
Joined: 2002-12-04 10:22
Location: 4. Server von rechts, 2. Reihe von oben
 

Re: Portsentry restlos entfernen! Wie??

Post by Outlaw »

Nunja, auch ich kann mich noch daran erinnern, daß damals die Mehrheit eher dagegen war und das waren nicht wenige der Forengurus hier .... ;):D

Gruß Outi
obsolete
Posts: 17
Joined: 2003-10-25 17:32
 

Re: Portsentry restlos entfernen! Wie??

Post by obsolete »

Nur weil die Mehrheit einer anderen Meinung ist, heißt das nicht, dass die Mehrheit recht hat. Auch Millionen Fliegen können irren.

In diesem Sinne: eigene Meinung bilden! Ich jedenfalls kann nur positiv über portsentry resümieren.

Falls Du Probleme beim konfigurieren hast, ich helfe Dir gerne...


-obsolete