Strona 3 z 4 PierwszyPierwszy 1234 OstatniOstatni
Pokaż wyniki 21 do 30 z 35

Temat: Zamykanie portów

  1. #21

    Domyślnie

    Kod:
    [root@localhost squealer]# cd /etc/xinted.d
    bash: cd: /etc/xinted.d: Nie ma takiego pliku ani katalogu
    [root@localhost squealer]#
    Kod:
    [root@localhost squealer]# ls -la
    razem 10555
    drwx--x--x 48 squealer squealer    2048 kwi 14 18:22 ./
    drwxr-xr-x  4 root     root        1024 kwi  5 13:49 ../
    -rw-------  1 squealer squealer    9579 kwi 14 12:56 .bash_history
    -rw-r--r--  1 squealer squealer      24 kwi  5 13:49 .bash_logout
    -rw-r--r--  1 squealer squealer     376 kwi  5 13:49 .bash_profile
    -rw-r--r--  1 squealer squealer     124 kwi  5 13:49 .bashrc
    drwxr-xr-x  2 squealer squealer    1024 cze 17  2002 bin/
    drwxr-xr-x  3 squealer squealer    1024 kwi 14 12:26 byacc-20050813/
    drwx------  3 squealer squealer    1024 kwi  5 12:44 .config/
    -rw-rw-r--  1 squealer squealer     110 kwi  5 22:26 .csmashrc
    -rw-rw-r--  1 squealer squealer      56 kwi 14 18:22 .DCOPserver_localhost__0
    lrwxrwxrwx  1 squealer squealer      39 kwi 14 18:22 .DCOPserver_localhost_:0 -> /home/squealer/.DCOPserver_localhost__0
    drwx------  7 squealer squealer    1024 kwi 14 12:33 Desktop/
    -rw-------  1 squealer squealer      26 kwi  5 11:53 .dmrc
    drwxrwxr-x  2 squealer squealer    1024 kwi  5 11:53 Dokumenty/
    -rw-rw-r--  1 squealer squealer  287767 kwi  7 10:11 Firefox_wallpaper.png
    drwxrwxr-x  2 squealer squealer    1024 kwi  7 11:37 .fontconfig/
    -rw-rw-r--  1 squealer squealer     516 kwi  7 14:01 .fonts.conf
    drwx------  3 squealer squealer    1024 kwi 14 18:22 .gconf/
    drwx------  2 squealer squealer    1024 kwi 14 18:23 .gconfd/
    drwxr-xr-x 22 squealer squealer    1024 kwi 13 14:13 .gimp-2.3/
    drwxr-xr-x  5 squealer squealer    1024 kwi  8 08:43 .gkrellm2/
    drwxr-xr-x  6 squealer squealer    1024 gru  8  2003 gkrellm-2.1.28/
    -rw-rw-r--  1 squealer squealer  891913 kwi  7 22:09 gkrellm-2.1.28.tar.gz
    drwx------  3 squealer squealer    1024 kwi  5 11:55 .gnome2/
    drwx------  2 squealer squealer    1024 kwi  5 11:55 .gnome2_private/
    -rw-rw-r--  1 squealer squealer     275 kwi  5 11:53 .gtk-bookmarks
    -rw-------  1 squealer squealer     195 kwi 14 18:22 .ICEauthority
    drwx------  4 squealer squealer    2048 kwi 14 18:22 .kadu/
    drwx------  7 squealer squealer    1024 kwi  5 11:53 .kde/
    drwxr-xr-x 10 squealer squealer    1024 kwi 14 08:03 krusader-1.70.1/
    -rw-rw-r--  1 squealer squealer 4144314 kwi 14 07:51 krusader-1.70.1.tar.gz
    -rw-rw-r--  1 squealer squealer  239561 kwi 10 14:20 libnet-1.1.2.1-1mdk.i586.rpm
    drwxrwxr-x 14      305      305    3072 kwi 14 12:26 libpcap-2007.04.14/
    -rw-rw-r--  1 squealer squealer  459899 kwi 14 12:20 libpcap-current.tar.gz
    drwx------  3 squealer squealer    1024 kwi  5 11:53 .local/
    drwx------  3 squealer squealer    1024 kwi  6 19:08 .macromedia/
    drwxr-xr-x  2 squealer squealer    1024 kwi 13 15:59 .mc/
    drwxr-xr-x  3 squealer squealer    1024 kwi  5 11:53 .mcop/
    drwxrwxr-x  2 squealer squealer    1024 kwi  5 11:53 .mdk-folders/
    -rw-rw-r--  1 squealer squealer       0 kwi  5 11:53 .mdk-menu-migrated
    drwxr-xr-x  2 squealer squealer    1024 kwi  5 11:53 .MdkOnline/
    drwx------  3 squealer squealer    1024 kwi  5 11:54 .mozilla/
    drwxrwxr-x  2 squealer squealer    1024 kwi  5 16:46 .mplayer/
    drwxrwxr-x  2 squealer squealer    1024 kwi  5 11:53 Muzyka/
    drwxr-xr-x  4 squealer squealer    1024 kwi 14 12:56 nemesis-1.4/
    -rw-rw-r--  1 squealer squealer  144187 kwi 10 14:28 nemesis-1.4.tar.gz
    -rwxrwxr-x  1 squealer squealer      18 kwi  7 12:37 .net_monitorrc*
    drwxr-xr-x 12 squealer squealer    4096 kwi 10 10:00 nmap-4.21ALPHA4/
    drwxr-xr-x  4      501 games       1024 lut  3  2004 NmapFE for OSX/
    drwxrwxr-x  3 squealer squealer    1024 kwi  6 08:40 .nvu/
    drwxrwxr-x  2 squealer squealer    1024 kwi  5 11:53 Obrazy/
    drwx------  3 squealer squealer    1024 kwi  9 10:29 .ooo-2.0/
    -rw-rw-r--  1 squealer squealer     584 kwi 10 13:36 perl.pl
    drwxrwxr-x  2 squealer squealer    1024 kwi  5 11:53 Pobieranie/
    drwxrwxr-x  2 squealer squealer    1024 kwi 14 18:22 .qt/
    -rw-------  1 squealer squealer     934 kwi 13 14:13 .recently-used
    -rw-rw-r--  1 squealer squealer     143 kwi  8 18:14 .rpmdrake
    -rw-r--r--  1 squealer squealer    3793 kwi  5 13:49 .screenrc
    drwx------  3 squealer squealer    1024 kwi 11 20:23 .Skype/
    drwxr-xr-x 10 squealer squealer    1024 kwi 14 12:34 snort-2.6.1.4/
    -rw-rw-r--  1 squealer squealer 3716052 kwi 14 12:31 snort-2.6.1.4.tar.gz
    drwxr-xr-x 18 squealer squealer    1024 kwi 17  2002 src/
    drwx------  2 squealer squealer    1024 kwi  6 21:48 .ssh/
    drwxr-xr-x  6 squealer squealer    5120 kwi 11 22:07 tcpdump-3.9.5/
    -rw-rw-r--  1 squealer squealer  712411 kwi 11 22:00 tcpdump-3.9.5.tar.gz
    drwxr-xr-x 13 squealer squealer    1024 maj 16  2002 test/
    drwx------  4 squealer squealer    1024 kwi  7 11:38 .thumbnails/
    drwx------  6 squealer squealer    1024 kwi 14 12:56 tmp/
    drwxrwxr-x  3 squealer squealer    1024 kwi 14 12:40 var/
    drwxrwxr-x  2 squealer squealer    1024 kwi  5 11:53 Wideo/
    -rw-------  1 squealer squealer     164 kwi 14 18:21 .Xauthority
    -rw-------  1 squealer squealer     192 kwi  9 08:33 .xcompmgrrc
    drwxr-xr-x  2 root     root        1024 kwi  7 22:20 .xdg_menu_cache/
    drwxr-xr-x  2 squealer squealer    1024 kwi  5 16:42 .xine/
    -rw-------  1 squealer squealer   32756 kwi 14 18:25 .xsession-errors
    -rw-rw-r--  1 squealer squealer   31053 kwi  7 11:24 yingyang.jpg
    [root@localhost squealer]#
    cd - zmiana katalogu
    ls - wyswietla katalogi

    Wacele sie tu nie musisz udzielac jesli to tak bardzo cie denerwuje.........(lagodnie mowiac....)

  2. #22
    Zarejestrowany
    Nov 2006
    Skąd
    Polska/Poland
    Postów
    1,191

    Domyślnie

    zrób ls w /etc

    i nie bądź taki delikatny

    literówke zrobiłem powinno być xinetd.d
    ***********
    * markossx *
    ***********

  3. #23

    Domyślnie


    Kod:
    [squealer@localhost ~]$ cd /etc
    [squealer@localhost etc]$ ls
    a2ps.cfg              hotplug/                ppp/
    a2ps-site.cfg         ifplugd/                printcap
    acpi/                 iftab                   product.id
    adjtime               ifw/                    profile
    alternatives/         im_palette.pal          profile.d/
    apm/                  im_palette-small.pal    protocols
    armagetron/           im_palette-tiny.pal     pwdb.conf
    asound.names          imrc                    pythonrc.py
    asound.state          info-dir                qt_plugins_3.3rc
    at.deny               init.d@                 qtrc
    avahi/                initlog.conf            rc@
    bash_completion.d/    inittab                 rc0.d@
    bashrc                inputrc                 rc1.d@
    bonobo-activation/    iproute2/               rc2.d@
    bootsplash/           issue                   rc3.d@
    chipcard2-client/     issue.net.msec          rc4.d@
    chipcard2-server/     kde/                    rc5.d@
    clamd.conf            kderc                   rc6.d@
    cron.d/               krb5.conf               rc.d/
    cron.daily/           ksysguarddrc            rc.local@
    cron.hourly/          laptop-mode/            rc.modules*
    cron.monthly/         ld.so.cache             rc.sysinit@
    crontab               ld.so.conf              redhat-release@
    cron.weekly/          ld.so.conf.d/           release@
    cron.yearly/          lftp.conf               resolv.conf
    csh.cshrc             libuser.conf            rmt@
    csh.login             lilo.conf               rpc
    cups/                 lisarc                  rpm/
    cvs/                  locale/                 RPM-GPG-KEYS/
    dbus-1/               localtime               rwtab
    default/              login.defs              rwtab.d/
    DIR_COLORS            logrotate.conf          samba/
    dirmngr/              logrotate.d/            sane.d/
    dumpdates             lsb-release             sasl2/
    dynamic/              lsb-release.d/          screenrc
    emacs/                lynx-site.cfg           scrollkeeper.conf
    enscript/             makedev.d/              scsi_id.config
    enscript.cfg          man.config              secure-mcservusers
    environment           mandrakelinux-release@  securetty
    esd.conf              mandrake-release@       security/
    exports               mandriva-release        services
    fax.config            mcc.conf*               sgml/
    fdprm                 menu.d/                 shadow
    filesystems           mirrordir/              shadow-
    firefox.cfg           mke2fs.conf             shadow.lock
    fonts/                modprobe.conf           shells
    foomatic/             modprobe.d/             shorewall/
    freshclam.conf        modprobe.preload        skel/
    fstab                 modprobe.preload.d/     sound/
    fstab.rpmnew          modules                 ssh/
    gateways              motd                    ssl/
    gconf/                mplayer/                subversion/
    ggi/                  mtab                    sudoers
    gimp/                 mtools.conf             sysconfig/
    gnome-vfs-2.0/        nail.rc                 sysctl.conf
    gnome-vfs-mime-magic  netprofile/             syslog.conf
    gnucash/              networks                termcap
    group                 nscd.conf               udev/
    group-                nsswitch.conf           updatedb.conf
    group.lock            openldap/               urpmi/
    gshadow               opensc.conf             version
    gshadow-              opt/                    vim/
    gtk-2.0/              pam.d/                  wgetrc
    gwen-public-ca.crt    pango/                  X11/
    hal/                  passwd                  xclass-mime.types
    host.conf             passwd-                 xclassrc
    hosts                 passwd.lock             xdg/
    hosts.allow           php.d/                  xinetd.d/
    hosts.deny            php.ini                 xml/
    hosts.equiv           pki/
    hosts.lpd             postfix/
    [squealer@localhost etc]$
    hmm i co teraz?

  4. #24
    Zarejestrowany
    Nov 2006
    Skąd
    Polska/Poland
    Postów
    1,191

    Domyślnie

    wleź do xinetd.d/
    i wylistuj (ls)
    ***********
    * markossx *
    ***********

  5. #25

    Domyślnie

    Kod:
    [root@localhost etc]# cd xinetd.d/
    [root@localhost xinetd.d]# ls
    cvs  rsync
    [root@localhost xinetd.d]#

  6. #26
    Zarejestrowany
    Nov 2006
    Skąd
    Polska/Poland
    Postów
    1,191

    Domyślnie

    teraz jasne:
    spróbuj:

    lsof | grep telnet

    i

    ps -ef | grep telnet

    i zapodaj jak coś znajdzie...
    ***********
    * markossx *
    ***********

  7. #27

    Domyślnie

    1.
    Kod:
    [root@localhost squealer]# lsof | grep telnet
    [root@localhost squealer]#
    2.
    Kod:
    [root@localhost squealer]# ps -ef | grep telnet
    root     23806 23763  0 19:56 pts/1    00:00:00 grep --color telnet
    [root@localhost squealer]#

  8. #28
    Zarejestrowany
    Nov 2006
    Skąd
    Polska/Poland
    Postów
    1,191

    Domyślnie

    jaka to dystrybucja?
    spróbuj jeszcze:

    lsof -i :23

    lsof -i TCP:23

    netstat -anp --inet

    powyżej dałem parę opcji bo nie pamiętam a nie mam w tej chwili gdzie sprawdzić ja kto idzie
    netstat -ano | grep LISTEN

    edit: ciekawe co to ten --color
    edit2: usunąłem dwa polecenia bo były błędne, podałem poprawione
    Ostatnio edytowane przez markossx : 04-14-2007 - 22:29
    ***********
    * markossx *
    ***********

  9. #29

    Domyślnie

    Kod:
    [root@localhost squealer]# lsof -i :23
    [root@localhost squealer]#
    2.
    Kod:
    [root@localhost squealer]# lsof --init3:23
    lsof: illegal option character: -
    lsof: unknown protocol name (nit3) in: -i nit3:23
    lsof 4.76
     latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/
     latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ
     latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man
     usage: [-?abhlnNoOPRstUvVX] [+|-c c] [+|-d s] [+D D] [+|-f]
     [-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+m [m]] [+|-M] [-o [o]]
    [-p s] [+|-r [t]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names]
    Use the ``-h'' option to get more help information.
    [root@localhost squealer]#
    3.
    Kod:
    [root@localhost squealer]# lsof --init4:23
    lsof: illegal option character: -
    lsof: unknown protocol name (nit4) in: -i nit4:23
    lsof 4.76
     latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/
     latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ
     latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man
     usage: [-?abhlnNoOPRstUvVX] [+|-c c] [+|-d s] [+D D] [+|-f]
     [-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+m [m]] [+|-M] [-o [o]]
    [-p s] [+|-r [t]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names]
    Use the ``-h'' option to get more help information.
    [root@localhost squealer]#
    5.
    Kod:
    [root@localhost squealer]# lsof -i TCP:23
    [root@localhost squealer]#
    mandriva 2007 ale paczka z innym juz nielugo dojdzie

  10. #30
    Zarejestrowany
    Nov 2006
    Skąd
    Polska/Poland
    Postów
    1,191

    Domyślnie

    killall -v telnet

    jak dasz killall to zabijesz go tylko w tej sesji - żeby ci sie nie włączał trzeba określić co go uruchamia - masz mandrivę z którą ja nie miałem doczynienia (i nie mam zamiaru mieć) - tam może być inaczej nie wiem. na twoim miejscu pogrzebał bym w narzedziach graficznych tego systemu; musi być gdzieś jakieś coś które pozwala zarządzać programami/usługami startującymi podczas uruchamiania systemu. od biedy dropuj pakiety na ten port za pomocą firewall...
    iptables -A INPUT --dport 23 -j DROP (mandriva ma w ogóle firewalla
    brutalnym rozwiązaniem jest:
    find / -name telnet*
    i tam gdzie znajdzie (może być /bin /sbin) telnet przenieść go do /home i będziesz miał z głowy - odpalarka go nie znajdzie więc go nie odpali
    nie chce mi się już z tym babrać bo w ciemno to sobie można w łeb strzelić jedynie.....
    na forum mandrivy byłeś? tam spece powinni wiedzieć....
    a może ty nie masz go odpalonego tylko tak ci sie zdaje...
    ***********
    * markossx *
    ***********

Zasady Postowania

  • Nie możesz zakładać nowych tematów
  • Nie możesz pisać wiadomości
  • Nie możesz dodawać załączników
  • Nie możesz edytować swoich postów
  •  
Subskrybuj