|
Softpanorama |
May the source be with you, but remember the KISS principle ;-)
Softpanorama Search
|
| News | See Also | Recommended Links | TCP Flow Control | |
| TCP handshake | Sequence numbers | IP troubleshooting | Humor | Etc |
route | grep link-local
link-local*
255.255.0.0 U 00
0 eth2Disabling
Edit /etc/sysconfig/network
Add NOZEROCONF=yes
Then remove the avahi package and its dependencies
netstat -tanp | grep LISTEN
Typical output:
[root ]# netstat -tanp | grep LISTENtcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN 2256/nasd
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 2166/mysqldtcp 0 0 127.0.0.1:4690 0.0.0.0:* LISTEN 2376/prelude-manage
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2057/cupsdtcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2244/master
tcp 0 0 :::22 :::* LISTEN 2068/sshd
Locate the pid in the netstat command
cat /proc/<pid>/cmdline
If not full path, run which or locate to find utility
rpm -qf full-path-of-daemon
rpm -e package
If difficult to remove due to dependencies:
chkconfig <service> off
# Don't reply to broadcasts. Prevents joining a smurf attacknet.ipv4.icmp_echo_ignore_broadcasts = 1
# Enable protection for bad icmp error messagesnet.ipv4.icmp_ignore_bogus_error_responses = 1
# Enable syncookies for SYN flood attack protectionnet.ipv4.tcp_syncookies = 1
# Log spoofed, source routed, and redirect packetsnet.ipv4.conf.all.log_martians = 1
net.ipv4.conf.default.log_martians = 1# Don't allow source routed packets
net.ipv4.conf.all.accept_source_route = 0net.ipv4.conf.default.accept_source_route = 0
# Turn on reverse path filteringnet.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1# Don't allow outsiders to alter the routing tables
net.ipv4.conf.all.accept_redirects = 0net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.secure_redirects = 0net.ipv4.conf.default.secure_redirects = 0
# Don't pass traffic between networks or act as a routernet.ipv4.ip_forward = 0
net.ipv4.conf.all.send_redirects = 0net.ipv4.conf.default.send_redirects = 0
Example:smbd: 192.168.1.
Remove all daemons (and packages) not being used
This reduces attack footprint and improves performance
Many daemons listen on the network and could be accessible
Viewingchkconfig –list
Disabling
rpm -qf /etc/rc.d/init.d/name
rpm -e package-nameOR chkconfig <service> off
NotesLeave cpuspeed for speedshifting cpu and irqbalance for multicore
CPU
Disable readahead, mcstransd, firstboot, (and NetworkManager for
machines without wireless networking) since they are not needed.Only allow root and people with verified need to run cron jobs
Setup cron.allow and cron.deny
Setup equivalents if you have 'at' installed
Sshd| Page 29 |
Hide Apache Information
You should hide apache banner information from being displayed so the attackers are not aware of what version of Apache version you are running and thus making it more difficult for them to exploit any system holes and thus making vulnerability scanners work harder and in some cases impossible without knowing banner information.
How To:
Modify /etc/httpd/conf/httpd.conf
Change the ServerSignature line to: ServerSignature Off
Change the ServerTokens line to: ServerTokens Prod
Restart Apache: /sbin/service httpd restart
Disable IP Source Routing
Source Routing is used to specify a path or route through the network from
source to destination. This feature can be used by network people for diagnosing
problems. However, if an intruder was able to send a source routed packet
into the network, then he could intercept the replies and your server might
not know that it's not communicating with a trusted server.
To enable Source Route Verification, edit the
/etc/sysctl.conf file and add the following line:
net.ipv4.conf.all.accept_source_route = 0
To enable TCP SYN Cookie Protection, edit the /etc/sysctl.conf file and add the following line:
net.ipv4.tcp_syncookies = 1Disable ICMP Redirect Acceptance
net.ipv4.conf.all.accept_redirects = 0Enable IP Spoofing Protection
net.ipv4.conf.all.rp_filter = 1Enable Ignoring to ICMP Requests
net.ipv4.icmp_echo_ignore_all = 1This cannot be done in many environments.
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_ignore_bogus_error_responses = 1Enable Logging of Spoofed Packets, Source Routed Packets, Redirect Packets
net.ipv4.conf.all.log_martians = 1References for Kernel Tunable Parameters
Copyright © 1996-2009 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Site uses AdSense so you need to be aware of Google privacy policy. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
Disclaimer:
Last updated: August 14, 2009