|
21 | 21 | title 'Ensure cron daemon is enabled' |
22 | 22 | desc ' |
23 | 23 | The cron daemon is used to execute batch jobs on the system. |
24 | | - |
| 24 | +
|
25 | 25 | Rationale: |
26 | 26 |
|
27 | 27 | While there may not be user jobs that need to be run on the system, the system does have maintenance jobs that may include |
|
47 | 47 | desc ' |
48 | 48 | The /etc/crontab file is used by cron to control its own jobs. The commands in this item make sure that root |
49 | 49 | is the user and group owner of the file and that only the owner can access the file. |
50 | | - |
| 50 | +
|
51 | 51 | Rationale: |
52 | | - |
| 52 | +
|
53 | 53 | This file contains information on what system jobs are run by cron. Write access to these files could provide |
54 | 54 | unprivileged users with the ability to elevate their privileges. Read access to these files could provide user |
55 | 55 | with the ability to gain insight on system jobs that run on the system and could provide them a way to gain |
|
80 | 80 | directory cannot be manipulated by the crontab command, but are instead edited by system administrators |
81 | 81 | using a text editor. The commands below restrict read/write and search access to user and group root, |
82 | 82 | preventing regular users from accessing this directory. |
83 | | - |
| 83 | +
|
84 | 84 | Rationale: |
85 | | - |
| 85 | +
|
86 | 86 | Granting write access to this directory for non-privileged users could provide them the means |
87 | 87 | for gaining unauthorized elevated privileges. Granting read access to this directory could give |
88 | 88 | an unprivileged user insight in how to gain elevated privileges or circumvent auditing controls. |
|
112 | 112 | The files in this directory cannot be manipulated by the crontab command, but are instead edited |
113 | 113 | by system administrators using a text editor. The commands below restrict read/write and search |
114 | 114 | access to user and group root, preventing regular users from accessing this directory. |
115 | | - |
| 115 | +
|
116 | 116 | Rationale: |
117 | | - |
| 117 | +
|
118 | 118 | Granting write access to this directory for non-privileged users could provide them the means for gaining |
119 | 119 | unauthorized elevated privileges. Granting read access to this directory could give an unprivileged user |
120 | 120 | insight in how to gain elevated privileges or circumvent auditing controls. |
|
144 | 144 | in this directory cannot be manipulated by the crontab command, but are instead edited by system |
145 | 145 | administrators using a text editor. The commands below restrict read/write and search access to user |
146 | 146 | and group root, preventing regular users from accessing this directory. |
147 | | - |
| 147 | +
|
148 | 148 | Rationale: |
149 | | - |
| 149 | +
|
150 | 150 | Granting write access to this directory for non-privileged users could provide them the means for gaining |
151 | 151 | unauthorized elevated privileges. Granting read access to this directory could give an unprivileged user |
152 | 152 | insight in how to gain elevated privileges or circumvent auditing controls. |
|
176 | 176 | in this directory cannot be manipulated by the crontab command, but are instead edited by system |
177 | 177 | administrators using a text editor. The commands below restrict read/write and search access to user and |
178 | 178 | group root, preventing regular users from accessing this directory. |
179 | | - |
| 179 | +
|
180 | 180 | Rationale: |
181 | | - |
| 181 | +
|
182 | 182 | Granting write access to this directory for non-privileged users could provide them the means for gaining |
183 | 183 | unauthorized elevated privileges. Granting read access to this directory could give an unprivileged user |
184 | 184 | insight in how to gain elevated privileges or circumvent auditing controls. |
|
209 | 209 | The files in this directory cannot be manipulated by the crontab command, but are instead edited by system |
210 | 210 | administrators using a text editor. The commands below restrict read/write and search access to user and group |
211 | 211 | root, preventing regular users from accessing this directory. |
212 | | - |
| 212 | +
|
213 | 213 | Rationale: |
214 | | - |
| 214 | +
|
215 | 215 | Granting write access to this directory for non-privileged users could provide them the means for gaining unauthorized |
216 | 216 | elevated privileges. Granting read access to this directory could give an unprivileged user insight in how to gain |
217 | 217 | elevated privileges or circumvent auditing controls. |
|
240 | 240 | Configure /etc/cron.allow and /etc/at.allow to allow specific users to use these services. |
241 | 241 | If /etc/cron.allow or /etc/at.allow do not exist, then /etc/at.deny and /etc/cron.deny are checked. |
242 | 242 | Any user not specifically defined in those files is allowed to use at and cron. By removing the files, |
243 | | - only users in /etc/cron.allow and /etc/at.allow are allowed to use at and cron. |
244 | | - |
| 243 | + only users in /etc/cron.allow and /etc/at.allow are allowed to use at and cron. |
| 244 | +
|
245 | 245 | Note that even though a given user is not listed in cron.allow, cron jobs can still be run as that user. |
246 | 246 | The cron.allow file only controls administrative access to the crontab command for scheduling and modifying |
247 | 247 | cron jobs. |
248 | | - |
| 248 | +
|
249 | 249 | Rationale: |
250 | | - |
| 250 | +
|
251 | 251 | On many systems, only the system administrator is authorized to schedule cron jobs. Using the cron.allow file |
252 | 252 | to control who can run cron jobs enforces this policy. It is easier to manage an allow list than a deny list. |
253 | 253 | In a deny list, you could potentially add a user ID to the system and forget to add it to the deny files. |
|
0 commit comments