12 - T4 - OS SEC - Linux Hardening
12 - T4 - OS SEC - Linux Hardening
Linux Hardening
system.
There are hardening scripts and tools like Lynis, Bastile
– Hashing
– File permissions
Password hashes should only be found /etc/shadow
Check for other accounts for UID 0 (meaning that they have root privileges clear
Password lifespan
Password Security : PAM Module
PAM configuration file located at /etc/pam.d
Minimum password length
Minimum complexity
applications stand ?
Default Account Cleanup
Most distros will create a significant number of default accounts
Most never used ; remove them.
Easier to detect unusual activity
Limits options for hackers to get a toehold in the system
Default accounts that need to be kept for system operational reasons
Do not delete accounts that you are unsure
To block accounts, change user's entry in /etc/shadow to an invalid
hash value
Suggestion: Look up documentation of /etc/shadow and /etc/passwd
Attempt should be logged and alert generated
Attack Surface
A computer system can be segmented in to consistence and
independent sub systems
Each sub system has its own set of risks and most likely
Eg:
1. A sensitive network services should be accessible by the fewest possible number of computer
systems (routers and check points)
2. It is easier to secure a check point than a whole group of individual systems
Possible Security Measures
Servers - if the servers are publicly accessible
1. Secure the network ports (firewall)
2. Only enable network services you need
3. Change default password
4. Use two factor logins
5. Use failZban to limit brute force password attempts
6. If HTTP, you want to use HTTPS to prevent intermediaries
from sniffing your network traffic
Possible Security Measures
Laptop
1. Travelling with laptop?
2. Risk of being stolen
3. Risk of data being collected from open WIFI hotspots.
4. Full Disk Encryption is needed.
5. Firewall is needed to prevent access to services which are
running
6. VPN to access home servers.
IE3062 | Data and Operating Systems Security | Laneesha Ruggahakotuwa 17
Possible security measures
Network
1. Disable services that are not being used or needed
2. If no firewall and a network service is up, its available to
anyone.
3. Some services have no authorization credentials