Practical UNIX and Internet Security, 3rd Edition
by Simson Garfinkel, Gene Spafford, Alan Schwartz
Preventing Attacks
No matter what the threat is called, how it enters your system, or what the motives of the person(s) who wrote it may be, the potential for damage is your main concern. Any of these problems can result in downtime and lost or damaged resources. Understanding the nature of a threat can’t prevent it from occurring.
At the same time, remember that you do not need many special precautions or special software to protect against programmed threats. The same simple, effective measures you would take to protect your system against unauthorized entry or malicious damage from insiders will also protect your system against these other threats.
File Protections
Files, directories, and devices that are writable by any user on the system can be dangerous security holes. An attacker who gains access to your system can gain even more access by modifying these files, directories, and devices. Maintaining a vigilant watch over your file protections protects against intrusion and protects your system’s legitimate users from each other’s mistakes and antics. (Chapter 6 introduces file permissions and describes how you can change them.)
World-writable user files and directories
Many inexperienced users (and even careless experienced users) make themselves vulnerable to attack by improperly setting the permissions on files in their home directories.
The .login file is a particularly vulnerable file. For example, if a user has a .login file that is world-writable, an attacker can modify ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access