Home > Security Tips > Weekly Security Planner > Week 43: Permissions -- How world-writeable are you?
Security Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

WEEKLY SECURITY PLANNER

Week 43: Permissions -- How world-writeable are you?


Shelley Bard, CISSP
10.14.2004
Rating: -5.00- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


When
Daily if automated; weekly if ad-hoc. Daily if your system is an attractive target for intrusion attempts or you have such a history.

Why
Files, directories and devices that can be modified by any user are known as "world–writable" and are dangerous security holes. Ratcheting down your permissions also protects legitimate users from mistakes.

Strategy
Unix describes file permissions using a 10-character reference. The first indicates the type of file; the next nine characters taken in groups of three show who on your computer can read, write and execute the file. Three classes of permissions show who can modify it -- owner, group and other. For example, -rwxr-x--- is a plain file whose owner has read, write and execute privileges, those in the group can read and execute it, and no access is granted to anyone else.

Vulnerable files that should not be world–writable include: .login; .rhosts; dev/drum; /dev/mem; /dev/kmem (nor world-readable either); /etc/passwd and /etc/group (owner root and mode 644 recommended); and device files for hard disk partitions.

If you have a server that exports file systems containing system programs like in the /bin and /usr/bin directory, you might export them Read Only, thus rendering the client unable to modify files in that directory. To export a file system Read Only, you must specify the Read Only option in the /etc/export or /etc/dfs/dfstab file on the server.

In general, files beginning with a period should not be world- or group-writable. Home directories and their associated files should be writable only by the owner. Many files should only be readable by the owner as well, hindering an intruder searching for other attack avenues. Using the 4-digit octal representation of permissions, this would be 0600.

Before editing existing file privileges, be sure to back up data, and/or create a restore point for your system. To find either group or world writable files beginning with a period in the Example file system, execute the following:

# find /example –perm -2 –o –perm -20 –name .* -ls

You can pipe the results to a file to keep a report. To do this regularly, put it in a cron script, and mail the results to your admin account. For a list of all setuid root files, for example, execute:

# find / -user root –perm -4000 –print | mail –s "setuid root files" myname@myorganization.com

To find out what permissions a Windows user or group has, use Effective Permissions: To view effective permissions on files and folders (indicated by a check mark):
1. Open Windows Explorer and locate the file or folder.
2. Right-click on it, click Properties and click the Security tab.
3. Click Advanced, then the Effective Permissions tab.
4. Click the Select button.
5. In Name, enter the name of a user or group and click OK. The selected check boxes indicate the effective permissions of the user/group for that file/folder.

Information displayed here is read-only. It takes the permissions in effect from group membership into account, as well as any permissions inherited from the parent object, and will look up all domain and local groups the user or group is a member of. This excludes these security identifiers: anonymous logon, authenticated users, batch, creator group, creator owner, dialup, enterprise domain controllers, interactive, network, proxy, restricted, self, service, system and terminal server user). Note the "everyone group" will always be included as long as the selected user or group is not a member of the anonymous logon group.

More information
See the Unix man pages for more on Unix permissions and the find command. More information on Windows permissions and access control lists and entries; a good overview on Windows permissions.

About the author
Shelley Bard, CISSP, CISM, is a senior security network engineer with Verizon Federal Network Systems (FNS). An information security professional for 17 years, Bard has briefed and written infosecurity assessments and technical reports for the White House and Department of Defense, special interest groups, industry and academia. Please e-mail any comments.

Opinions expressed in this column are those of Shelley Bard and don't necessarily reflect those of Verizon FNS.

Rate this Tip
To rate tips, you must be a member of SearchSecurity.com.
Register now to start rating these tips. Log in if you are already a member.




BROWSE BY TAG
Data Analysis and Classification,   Enterprise Data Protection,   Alternative OS security: Mac, Linux, Unix, etc.,   Application and Platform Security,   Operating System Security,   Weekly Security Planner,   VIEW ALL TAGS

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Data Analysis and Classification
Creating an enterprise data protection framework
Analyst DLP study finds maturity, ranks top DLP vendors
PCI DSS compliance requirements: Ensuring data integrity
Trustwave acquires data loss prevention vendor Vericept
Data has become too distributed to secure, Forrester says
Compliance in the cloud
Database monitoring, encryption vital in tight economy, Forrester says
Best practices for log data retention
Data classification best practices: Techniques, methods and projects
HIPAA changes force healthcare to improve data flow
Data Analysis and Classification Research

Alternative OS security: Mac, Linux, Unix, etc.
Machiavelli Mac OS X rootkit unveiled at Black Hat
How secure is 'Platform as a Service (PaaS)?'
Security comparison: Mac OS X vs. Windows
Mac OS memory flaws pose challenges for enterprise endpoint protection
Rootkit Hunter demo: Detect and remove Linux rootkits
Oracle to buy Sun Microsystems for $7.4 billion
How to harden Linux operating systems
Serious holes in Mac OS X memory, researcher shows
What is the best operating system for an FTP server implementation?
Black Hat DC 2009: Mac OS attack method
Alternative OS security: Mac, Linux, Unix, etc. Research

Weekly Security Planner
Weekly Security Planner: April
Weekly Security Planner: March
Weekly Security Planner: January
Weekly Security Planner: February
Weekly Security Planner: December
Weekly Security Planner: November
Weekly Security Planner: September
Weekly Security Planner: October
Weekly Security Planner: August
Weekly Security Planner: June

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
trusted computing  (SearchSecurity.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Research Solutions for Network Security, Access Control and Security Threats
TechTarget Security Media
Information Security View this month\\'s issue and subscribe today.
Information Security Decisions Apply online for free conference admission.
SearchSecurity.com
HomeNewsMagazineMultimediaWhite PapersLearningAdviceTopicsEventsAbout Us

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts