2021年10月22日星期五

How to find the service in CentOS and Red Hat Linux?

 




Step1. netstat -tnlp 

           and then find the Program name 

[root@study /]# netstat -tlunp
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:514                                  0.0.0.0:*               LISTEN      1711/rsyslogd      
tcp        0      0 0.0.0.0:111                                  0.0.0.0:*               LISTEN      1/systemd          
tcp        0      0 192.168.122.1:53                        0.0.0.0:*               LISTEN      2411/dnsmasq       
tcp        0      0 0.0.0.0:22                                     0.0.0.0:*              LISTEN      1274/sshd          
tcp        0      0 127.0.0.1:631                               0.0.0.0:*              LISTEN      1264/cupsd         
tcp        0      0 127.0.0.1:25                                  0.0.0.0:*             LISTEN      8264/master        
tcp6       0      0 :::514                                                      :::*            LISTEN      1711/rsyslogd      
tcp6       0      0 :::111                                                      :::*            LISTEN      1/systemd          
tcp6       0      0 :::80                                                        :::*            LISTEN      1714/httpd         
tcp6       0      0 :::21                                                        :::*            LISTEN      1717/vsftpd        
tcp6       0      0 :::22                                                        :::*            LISTEN      1274/sshd          
tcp6       0      0 ::1:631                                                     :::*           LISTEN      1264/cupsd         
tcp6       0      0 ::1:25                                                      :::*            LISTEN      8264/master        
udp        0      0 0.0.0.0:46637                                 0.0.0.0:*                                 881/avahi-daemon: r
udp        0      0 192.168.122.1:53                            0.0.0.0:*                               2411/dnsmasq       
udp        0      0 0.0.0.0:67                                        0.0.0.0:*                               2411/dnsmasq       
udp        0      0 0.0.0.0:111                                      0.0.0.0:*                               1/systemd          
udp        0      0 0.0.0.0:5353                                    0.0.0.0:*                               881/avahi-daemon: r
udp        0      0 127.0.0.1:323                                   0.0.0.0:*                               897/chronyd        
udp6       0      0 :::111                                                        :::*                                1/systemd          
udp6       0      0 :::35040                                                    :::*                                881/avahi-daemon: r
udp6       0      0 :::5353                                                      :::*                                881/avahi-daemon: r
udp6       0      0 ::1:323                                                      :::*                                897/chronyd        
[root@study /]#
         




 

沒有留言:

發佈留言

歡迎留下寶貴意見

暗藏危機的http

 暗藏危機的http 剛才在翻公司過往的文件,偶然發現公司2008年合作夥伴的合作資料。想著好久沒見了,想去看看網站是否還在。結果是http port 80連線,想寫信提醒更新https時發現警訊。原來https 443 port已經被New CobaltStrike found...