Offene Ports --> aber wovon?

Rund um die Sicherheit des Systems und die Applikationen
Post Reply
ice
Posts: 140
Joined: 2002-08-21 13:08
 

Offene Ports --> aber wovon?

Post by ice »

Moin,

hab mal ne komische ausgabe vom nmap, die ich nicht erklären kann:

Code: Select all

Starting nmap V. 2.54BETA31 ( www.insecure.org/nmap/ )
Interesting ports on  (IP):
(The 1544 ports scanned but not shown below are in state: closed)
Port       State       Service
21/tcp     open        ftp
22/tcp     open        ssh
25/tcp     open        smtp
80/tcp     open        http
135/tcp    filtered    loc-srv
137/tcp    filtered    netbios-ns
138/tcp    filtered    netbios-dgm
139/tcp    filtered    netbios-ssn
445/tcp    filtered    microsoft-ds
587/tcp    open        submission


Nmap run completed -- 1 IP address (1 host up) scanned in 2 seconds
Auf dem gescannten Server zeigt mir lsof -i von allen Ports das:

Code: Select all

gsz001:~# lsof -i :135
gsz001:~# lsof -i :137
gsz001:~# lsof -i :138
gsz001:~# lsof -i :139
gsz001:~# lsof -i :445
gsz001:~# lsof -i :587
COMMAND    PID USER   FD   TYPE DEVICE SIZE NODE NAME
sendmail 10068 root    5u  IPv4  90821       TCP *:587 (LISTEN)
gsz001:~#
und pstree das:

Code: Select all

gsz001:~# pstree
init-+-apache---9*[apache]
     |-cron---cron-+-parser_start.pl
     |             `-sendmail
     |-eth0
     |-102*[hlstats.pl]
     |-i2oevtd
     |-inetd
     |-keventd
     |-khubd
     |-klogd
     |-safe_mysqld---mysqld---mysqld---3*[mysqld]
     |-sendmail
     |-sshd---sshd---bash---pstree
     `-syslogd
gsz001:~#
Und nu?

Sieht sauber aus. Wie kann ich noch herausfinden was da los ist? Oder sollte man der Ausgabe von nmap nicht immer trauen?
pf4
Posts: 91
Joined: 2002-12-09 10:27
 

Re: Offene Ports --> aber wovon?

Post by pf4 »

Vollgende Vermutung !!!

Da die Ports "filtred" angezeigt werden vermute ich das diese Ports aufgrund des Windows RCP Bugs 1und1 die Ports schon am Switch ausfiltert. Daher wird das Scannergebnis verfälscht.


PS: Is nich überall so, nur in Subnetzen in dehnen Windows kisten stehen


Kann sein das es Quatch ist klingt aber logisch
oxygen
Posts: 2138
Joined: 2002-12-15 00:10
Location: Bergheim
 

Re: Offene Ports --> aber wovon?

Post by oxygen »

da hat PF4 recht, die Ports sind gefiltert. Ã?brigends das richtige Programm findet man nicht mit lsof, das ist quatsch. Viel einfacher ist netstat -nlp
dodolin
Posts: 3840
Joined: 2003-01-21 01:59
Location: Sinsheim/Karlsruhe
Contact:
 

Re: Offene Ports --> aber wovon?

Post by dodolin »

Laut Vertrag dürfte 1&1 aber nix filtern, außer wenn wirklich ein _konkreter_ DoS zu befürchten ist. Und bei meinem 1&1 Rootserver ist auch nix filtered, da ist alles entweder open oder closed, so wie sich das gehört. Meine Vermutung geht dahin in Richtung verblödeter SuSE-Firewall.
captaincrunch
Userprojekt
Userprojekt
Posts: 7066
Joined: 2002-10-09 14:30
Location: Dorsten
Contact:
 

Re: Offene Ports --> aber wovon?

Post by captaincrunch »

In dem Fall wären auch die Optionen extrem interessant, die nmap mit auf den Weg gegeben wurden, da das Ergebnis des Scans ganz extrem dadurch beeinflusst wird.
DebianHowTo
echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq"|dc
ice
Posts: 140
Joined: 2002-08-21 13:08
 

Re: Offene Ports --> aber wovon?

Post by ice »

So, ich hab mal die Vorschläge so umgesetzt und werde die Ergebnisse mal zeigen.

Also :

Code: Select all

gsz001:~# netstat -nlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:587             0.0.0.0:*               LISTEN      10068/sendmail: MTA
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      10598/apache
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      4351/inetd
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      178/sshd
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      10068/sendmail: MTA
udp        0      0 0.0.0.0:29184           0.0.0.0:*                           8062/perl
.
.
.
udp        0      0 0.0.0.0:29183           0.0.0.0:*                           8059/perl
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node PID/Program name    Path
unix  2      [ ACC ]     STREAM     LISTENING     298866 15759/mysqld        /var/run/mysqld/mysqld.sock
unix  2      [ ACC ]     STREAM     LISTENING     90822  10068/sendmail: MTA /var/run/sendmail/mta/smcontrol
gsz001:~#
Die offenen udps sind ok.

nmap hatte ich ohne parameter gestartet und es handelt sich um ein Woody. :wink:
cyrus-tc
Posts: 5
Joined: 2003-08-18 22:32
Location: Hamburg
 

Re: Offene Ports --> aber wovon?

Post by cyrus-tc »

Mach mal bitte iptables -L ..

Die Ports werden vermutlich durch ein iptables - Skript gefiltert...

Die Ports werden dann als "filtered" angezeigt obwohl dahinter gar kein Dienst existiert...
ice
Posts: 140
Joined: 2002-08-21 13:08
 

Re: Offene Ports --> aber wovon?

Post by ice »

Nene Du. Das alles schier. :?

Code: Select all

gsz001:~# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
gsz001:~#
pf4
Posts: 91
Joined: 2002-12-09 10:27
 

Re: Offene Ports --> aber wovon?

Post by pf4 »

EDIT:

Irtum leider,

das is doch nich immer so.

Scanne doch einfach mal den Server in deiner IP Umgebung ob da auch die Ports filtered sind.
Last edited by pf4 on 2003-08-25 22:44, edited 2 times in total.
cyrus-tc
Posts: 5
Joined: 2003-08-18 22:32
Location: Hamburg
 

Re: Offene Ports --> aber wovon?

Post by cyrus-tc »

PF4 wrote:Habs gerade getestet.

In Subnetzen in dehnen Windowskisten stehen werden die PORTS 135-139 und 445 gebklockt. Das hat einfach mit der Problematik der Ports auch ohne den RCP Bug.
[ironie]
als os würd ich mich auch davor schützen... :D
[/ironie]
captaincrunch
Userprojekt
Userprojekt
Posts: 7066
Joined: 2002-10-09 14:30
Location: Dorsten
Contact:
 

Re: Offene Ports --> aber wovon?

Post by captaincrunch »

Die manpage zu nmap ist zu diesen Thema auch recht hilfreich. nmap ohne Optionen ist auch nicht besser als jeder x-beliebige Portscanner.
DebianHowTo
echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq"|dc
Anonymous
 

Re: Offene Ports --> aber wovon?

Post by Anonymous »

Hallo,
also ich habe bei meinem s4f-vserver auch diese gefilterten Ports, bei mir sind es Port 135 und 24. Die benachbarten IP's haben die Ports auch gefiltert

Die scheinen wohl doch von den Providern gefiltert zu werden.

Gruß Peter Lang
captaincrunch
Userprojekt
Userprojekt
Posts: 7066
Joined: 2002-10-09 14:30
Location: Dorsten
Contact:
 

Re: Offene Ports --> aber wovon?

Post by captaincrunch »

Die scheinen wohl doch von den Providern gefiltert zu werden.
Warum schließt du von S4F auf 1&1 / Puretec ?

In meinem Subnetz wird z.B. defintiv nichts gefiltert, und ich behaupte immer noch, dass es an schlicht und ergreifend an "falschen" nmap-Optionen liegt.
DebianHowTo
echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq"|dc
Post Reply