Device and Service Hardening
Hardening is the process of making a host or app configuration secure by reducing its attack surface.
- done by:
- running only necessary services
- installing monitoring software to protect against malware and intrusions
- establishing a maintenance schedule to ensure the system is patched against software exploits
Policies of a Secure Configuration
- Change default passwords/credentials
- network devices/appliances often ship with default management passwords
- change on installation
- Enforce password complexity/length requirements
- make passwords highly resistant to guessing and cracking attacks:
- length
- every password > 8 characters
- network appliances passwords should be 14+ characters
- every password > 8 characters
- complexity
- multiple character classes are no longer required by NIST guidelines
- still required by many organization’s policies
- avoiding common passwords
- any password that could be matched to a dictionary term is completely insecure
- length
- make passwords highly resistant to guessing and cracking attacks:
- Configure role-based access
- default administrator, superuser, or root account has unrestricted access to the device
- high risk
- role-based access means that a limited set of permissions is configured for different administrative groups
- separation of duties
- default administrator, superuser, or root account has unrestricted access to the device
- Disable unneeded network services
- any network services that are not used should be disabled
- reduces the attack surface
- the range of things an attacker could possible exploit
- important to disable unused administration interfaces
- Disable insecure ports
- insecure protocols should be deprecated
- use secure protocols instead
- insecure protocols should be deprecated
Windows Services
- found in Task Manager
- view under Services
- Right click to manage
Linux Services
/etc/init.dcontains all serviceslsto view
- managing a service:
- use
systemctlcommandsystemctl status service- view service status
systemctl start service- start service
systemctl stop service- stop service
systemctl restart service- restart service
systemctl is-enabled service- displays whether service is enabled on startup
systemctl enable service- enables service on startup
systemctl disable service- disables service from startup
systemctl is-active service- tells if service is active
- use
Scanning for Unsecure Protocols
Using nmap:
- scan subnet for hosts
ip ashows IP addressnmap NETWORK- shows hosts and their services and open ports
- detailed scan of specific host
nmap -p 1-65535 -sV IPADDRESS-previews ports from 1-65535sVto determine version of software used
- look for unsecure services or protocols and any suspicious port usage