| name | cis-ubuntu1604-v200-6-1-10 |
| description | Ensure no world writable files exist |
| category | cis-storage |
| version | 2.0.0 |
| author | cyberstrike-official |
| tags | ["cis","ubuntu","linux","ubuntu-16.04","file-permissions","maintenance"] |
| cis_id | 6.1.10 |
| cis_benchmark | CIS Ubuntu Linux 16.04 LTS Benchmark v2.0.0 |
| tech_stack | ["ubuntu","linux"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
CIS Ubuntu Linux 16.04 LTS Benchmark v2.0.0 - 6.1.10
Profile Applicability
- Level 1 - Server
- Level 1 - Workstation
Description
Unix-based systems support variable settings to control access to files. World writable files are the least secure. See the chmod(2) man page for more information.
Rationale
Data in world-writable files can be modified and compromised by any user on the system. World writable files may also indicate an incorrectly written script or program that could potentially be the cause of a larger compromise to the system's integrity.
Audit Procedure
Command Line
Run the following command and verify no files are returned:
df --local -P | awk '{if (NR!=1) print $6}' | xargs -I '{}' find '{}' -xdev -type f -perm -0002
The command above only searches local filesystems, there may still be compromised items on network mounted partitions. Additionally the --local option to df is not universal to all versions, it can be omitted to search all filesystems on a system including network mounted filesystems or the following command can be run manually for each partition:
find <partition> -xdev -type f -perm -0002
Expected Result
No output should be returned.
Remediation
Command Line
Removing write access for the "other" category (chmod o-w <filename>) is advisable, but always consult relevant vendor documentation to avoid breaking any application dependencies on a given file.
Default Value
Not applicable.
References
- CIS Ubuntu Linux 16.04 LTS Benchmark v2.0.0
CIS Controls
| Controls Version | Control |
|---|
| v7 | 14.6 Protect Information through Access Control Lists Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities. |