forked from simp/inspec-profile-disa_stig-el7
-
Notifications
You must be signed in to change notification settings - Fork 14
/
inspec.yml
751 lines (651 loc) · 23.2 KB
/
inspec.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
name: redhat-enterprise-linux-7-stig-baseline
title: Red Hat Enterprise Linux 7 Security Technical Implementation Guide
maintainer: MITRE SAF Team
copyright: MITRE, 2022
copyright_email: [email protected]
license: Apache-2.0
summary: "Inspec Validation Profile for Red Hat Enterprise Linux 7 STIG"
version: 3.10.1
inspec_version: ">= 4.26"
supports:
- platform-name: centos
release: 7.*
- platform-name: redhat
release: 7.*
- platform-name: amazon
release: 2*
# The following defines the default inputs for the configurable controls used in the RHEL 7 DISA STIG.
inputs:
# SV-204393, SV-204394, SV-204395, SV-204397, SV-204426, SV-204431, SV-204447, SV-204448
# SV-204578, SV-204580, SV-204595, SV-204603, SV-204631, SV-204632, SV-204633
- name: org_name
desc: "Name of the organization running this profile"
type: Hash
value:
acronym: "DoD"
full_form: "Department of Defense"
- name: disable_slow_controls
desc: Controls that are known to consistently have long run times can be disabled with this attribute
type: Boolean
value: false
# SV-204513, SV-204514
- name: storage_volume
desc: Maximum amount of space (in percentage) used by the audit storage volume
type: Numeric
value: 75
# SV-204513
- name: min_space_left
desc: Minimum amount of space (in percentage) left in the audit storage volume
type: Numeric
value: 25
# SV-204504
- name: monitor_kernel_log
desc: Set this to false if your system availability concern is not documented or there is no monitoring of the kernel log
type: Boolean
value: true
# SV-204392
- name: rpm_verify_perms_except
desc: List of system files that should be allowed to change from an rpm verify point of view
type: Array
value:
- "/etc/issue"
# SV-214799
- name: rpm_verify_integrity_except
desc: List of system files that should be allowed to change from an rpm verify point of view
type: Array
value: []
# SV-204393
- name: banner_message_enabled
desc: Set to 'true' if the login banner message should be enabled
type: Boolean
value: true
# SV-204575
- name: log_aggregation_server
desc: Set to 'true' if the system is being used as a log aggregation server
type: Boolean
value: false
# SV-204624
- name: x11_enabled
desc: Set to 'true' if X11 is needed on the system.
type: Boolean
value: false
# SV-204460
- name: user_accounts
desc: Accounts of known managed users
type: Array
value: []
- name: known_system_accounts
desc: System accounts that support approved system activities.
type: Array
value:
- "root"
- "bin"
- "daemon"
- "adm"
- "lp"
- "sync"
- "shutdown"
- "halt"
- "mail"
- "operator"
- "nobody"
- "systemd-bus-proxy"
- "dbus"
- "polkitd"
- "postfix"
- "sssd"
- "chrony"
- "systemd-network"
- "sshd"
- "ntp"
# SV-204393/SV-204397
- name: dconf_user
desc: User to use to check dconf settings. Nil means to use whatever user is running inspec currently.
type: String
value: ""
# You are accessing a U.S. Government (USG) Information System (IS) that is provided for USG-authorized use only.
# By using this IS (which includes any device attached to this IS), you consent to the following conditions:
# - The USG routinely intercepts and monitors communications on this IS for purposes including, but not limited to, penetration testing, COMSEC monitoring, network operations and defense, personnel misconduct (PM), law enforcement (LE), and counterintelligence (CI) investigations.
# - At any time, the USG may inspect and seize data stored on this IS.
# - Communications using, or data stored on, this IS are not private, are subject to routine monitoring, interception, and search, and may be disclosed or used for any USG-authorized purpose.
# - This IS includes security measures (e.g., authentication and access controls) to protect USG interests--not for your personal benefit or privacy.
# - Notwithstanding the above, using this IS does not constitute consent to PM, LE or CI investigative searching or monitoring of the content of privileged communications, or work product, related to personal representation or services by attorneys, psychotherapists, or clergy, and their assistants. Such communications and work product are private and confidential. See User Agreement for details.
# SV-204393 SV-204394
- name: banner_message_text_gui
desc: Banner message text for graphical user interface logins.
type: String
value:
"You are accessing a U.S. Government (USG) Information System (IS) that is \
provided for USG-authorized use only. By using this IS (which includes any \
device attached to this IS), you consent to the following conditions: -The USG \
routinely intercepts and monitors communications on this IS for purposes \
including, but not limited to, penetration testing, COMSEC monitoring, network \
operations and defense, personnel misconduct (PM), law enforcement (LE), and \
counterintelligence (CI) investigations. -At any time, the USG may inspect and \
seize data stored on this IS. -Communications using, or data stored on, this \
IS are not private, are subject to routine monitoring, interception, and \
search, and may be disclosed or used for any USG-authorized purpose. -This IS \
includes security measures (e.g., authentication and access controls) to \
protect USG interests--not for your personal benefit or privacy. \
-Notwithstanding the above, using this IS does not constitute consent to PM, \
LE or CI investigative searching or monitoring of the content of privileged \
communications, or work product, related to personal representation or \
services by attorneys, psychotherapists, or clergy, and their assistants. Such \
communications and work product are private and confidential. See User \
Agreement for details."
- name: banner_message_text_gui_limited
desc: Banner message text for limited-resource graphical user interface logins.
type: String
value: "I've read & consent to terms in IS user agreem't."
# SV-204395
- name: banner_message_text_cli
desc: Banner message text for command line interface logins.
type: String
value:
"You are accessing a U.S. Government (USG) Information System (IS) that is \
provided for USG-authorized use only. By using this IS (which includes any \
device attached to this IS), you consent to the following conditions: -The USG \
routinely intercepts and monitors communications on this IS for purposes \
including, but not limited to, penetration testing, COMSEC monitoring, network \
operations and defense, personnel misconduct (PM), law enforcement (LE), and \
counterintelligence (CI) investigations. -At any time, the USG may inspect and \
seize data stored on this IS. -Communications using, or data stored on, this \
IS are not private, are subject to routine monitoring, interception, and \
search, and may be disclosed or used for any USG-authorized purpose. -This IS \
includes security measures (e.g., authentication and access controls) to \
protect USG interests--not for your personal benefit or privacy. \
-Notwithstanding the above, using this IS does not constitute consent to PM, \
LE or CI investigative searching or monitoring of the content of privileged \
communications, or work product, related to personal representation or \
services by attorneys, psychotherapists, or clergy, and their assistants. Such \
communications and work product are private and confidential. See User \
Agreement for details."
- name: banner_message_text_cli_limited
desc: Banner message text for resource-limited command line interface logins.
type: String
value: "I've read & consent to terms in IS user agreem't."
# SV-204580
- name: banner_message_text_ral
desc: Banner message text for remote access logins.
type: String
value:
"You are accessing a U.S. Government (USG) Information System (IS) that is \
provided for USG-authorized use only. By using this IS (which includes any \
device attached to this IS), you consent to the following conditions: -The USG \
routinely intercepts and monitors communications on this IS for purposes \
including, but not limited to, penetration testing, COMSEC monitoring, network \
operations and defense, personnel misconduct (PM), law enforcement (LE), and \
counterintelligence (CI) investigations. -At any time, the USG may inspect and \
seize data stored on this IS. -Communications using, or data stored on, this \
IS are not private, are subject to routine monitoring, interception, and \
search, and may be disclosed or used for any USG-authorized purpose. -This IS \
includes security measures (e.g., authentication and access controls) to \
protect USG interests--not for your personal benefit or privacy. \
-Notwithstanding the above, using this IS does not constitute consent to PM, \
LE or CI investigative searching or monitoring of the content of privileged \
communications, or work product, related to personal representation or \
services by attorneys, psychotherapists, or clergy, and their assistants. Such \
communications and work product are private and confidential. See User \
Agreement for details."
- name: banner_message_text_ral_limited
desc: Banner message text for resource-limited remote access logins.
type: String
value: "I've read & consent to terms in IS user agreem't."
# SV-204404
- name: lock_delay
desc: Maximum value for the screensaver lock-delay
type: Numeric
value: 5
# SV-204411
- name: difok
desc: Minimum number of characters that must be different from previous password, by policy
type: Numeric
value: 8
# SV-204413
- name: passwd_repeats
desc: Maximum number of allowed same consecutive characters in a new password, by policy
type: Numeric
value: 3
# SV-204422
- name: min_reuse_generations
desc: Minimum number of reuse generations for passwords by policy
type: Numeric
value: 5
# SV-204423
- name: min_len
desc: Minimum number of characters a password needs, by policy
type: Numeric
value: 15
# SV-204426
- name: days_of_inactivity
desc: Maximum allowable number of days an account can stay inactive before deactivation.
type: Numeric
value: 35
# SV-SV-204427, SV-204428, SV-255928
- name: unsuccessful_attempts
desc: Maximum number of unsuccessful attempts by policy
type: Numeric
value: 3
# SV-204427
- name: lockout_time
desc: Minimum amount of time account must be locked out after failed logins (in seconds)
type: Numeric
value: 900
- name: fail_interval
desc: Maximum interval of time, according to policy, in which the consecutive failed logon attempts must occur in order for the account to be locked out (time in seconds)
type: Numeric
value: 900
# SV-204445 SV-251705
- name: file_integrity_tool
desc: Name of tool
type: String
value: "aide"
# SV-204498 SV-204499 SV-204500
- name: aide_conf_path
desc: Path to the aide.conf file
type: String
value: "/etc/aide.conf"
# SV-204445
- name: file_integrity_interval
desc: Interval to run the file integrity tool (monthly, weekly, or daily).
type: String
value: "weekly"
# SV-204398 SV-204399 SV-204400 SV-204402 SV-204403 SV-204579 SV-214937 SV-255926
- name: system_activity_timeout
desc: Period of system inactivity leading to session lock (time in seconds).
type: Numeric
value: 900
# SV-204587
- name: client_alive_interval
desc: Value of the client alive interval (time in seconds).
type: Numeric
value: 600
# SV-204441, SV-204631, SV-204633
- name: smart_card_status
desc: Smart card status (enabled or disabled)
type: String
value: "enabled"
# SV-204489/V-204574
- name: log_pkg_paths
desc: Paths to files and directories that may include logging config
type: Array
value:
- "/etc/rsyslog.conf"
- "/etc/rsyslog.d/*"
# SV-204467 SV-204468 SV-204469 SV-204470 SV-204471 SV-204472
# SV-204473 SV-204474 SV-204475 SV-204476 SV-204477 SV-204478 SV-204493
- name: exempt_home_users
desc: Users exempt from home directory-based controls in array format
type: Array
value: []
# SV-244557
- name: grub_main_cfg
desc: Main grub boot config file
type: String
value: "/boot/grub2/grub.cfg"
# SV-204440 SV-244558
- name: grub_uefi_main_cfg
desc: Main grub boot config file
type: String
value: "/boot/efi/EFI/redhat/grub.cfg"
- name: grub_user_boot_files
desc: Grub boot config files
type: Array
value:
- "/boot/grub2/user.cfg"
- name: grub_uefi_user_boot_files
desc: Grub boot config files
type: Array
value:
- "/boot/efi/EFI/redhat/user.cfg"
# SV-204444
- name: admin_logins
desc: System accounts that support approved system activities
type: Array
value: []
# SV-204631
- name: mfa_pkg_list
desc: The list of packages (including dependencies) needed for MFA
type: Array
value:
- "nss-tools"
- "nss-pam-ldapd"
- "esc"
- "pam_pkcs11"
- "pam_krb5"
- "opensc"
- "pcsc-lite-ccid"
- "gdm"
- "authconfig"
- "authconfig-gtk"
- "krb5-libs"
- "krb5-workstation"
- "krb5-pkinit"
- "pcsc-lite"
- "pcsc-lite-libs"
# SV-204397
- name: multifactor_enabled
desc: Should dconf have smart card authentication
type: Boolean
value: true
- name: non_interactive_shells
desc: These shells do not allow a user to login
type: Array
value:
- "/sbin/nologin"
- "/sbin/halt"
- "/sbin/shutdown"
- "/bin/false"
- "/bin/sync"
- "/bin/true"
# SV-204584
- name: randomize_va_space
desc: Randomize virtual address space kernel parameter
type: Numeric
value: 2
# SV-204481
- name: non_removable_media_fs
desc: File systems that don't correspond to removable media
type: Array
value:
- "xfs"
- "ext4"
- "swap"
- "tmpfs"
# SV-204629
- name: approved_tunnels
desc: Approved configured tunnels prepended with word 'conn' (e.g., ['conn myTunnel'])
type: Array
value: []
# SV-204479
- name: virtual_machine
desc: Is the target expected to be a virtual machine
type: Boolean
value: false
# SV-204406
- name: retry
desc: Number of chances the user gets to create a strong password
type: Numeric
value: 3
# SV-204628, SV-204577
- name: firewalld_services
desc: "Services that firewalld should be configured to allow."
type: Array
# Examples
# 'dhcpv6-client',
# 'ssh'
value: []
- name: firewalld_hosts_allow
desc: "Hosts that firewalld should be configured to allow."
type: Array
value: []
- name: firewalld_hosts_deny
desc: "Hosts that firewalld should be configured to deny."
type: Array
value: []
- name: firewalld_ports_allow
desc: "Ports that firewalld should be configured to allow."
type: Array
# Examples
# '22/tcp',
# '4722/tcp'
value: []
- name: firewalld_ports_deny
desc: "Ports that firewalld should be configured to deny."
type: Hash
# Examples
# 'public':
# - '22/tcp'
# - '4722/tcp'
value: {}
- name: tcpwrappers_allow
desc: "Allow rules from etc/hosts.allow."
# Example
# 'daemon': 'ALL'
# 'client_list':
# - 'ALL'
# 'options': []
type: Hash
value: {}
- name: tcpwrappers_deny
desc: "Deny rules from etc/hosts.deny."
type: Hash
# Example
# 'daemon': 'ALL'
# 'client_list':
# - 'ALL'
# 'options': []
value: {}
- name: iptables_rules
desc: "Iptable rules that should exist."
type: Array
# Example
# '-P INPUT ACCEPT',
value: []
# SV-204577
- name: firewalld_services_deny
desc: "Services that firewalld should be configured to deny."
type: Hash
# Examples (zone:[services])
# public:
# - 'ssh'
# - 'icmp'
# dmz:
# - 'http'
value: {}
- name: firewalld_zones
desc: "Zones that should be present on the system."
type: Array
# Examples
# - 'drop'
# - 'block'
# - 'public'
# - 'external'
# - 'dmz'
# - 'work'
# - 'home'
# - 'internal'
# - 'trusted'
value: []
# SV-204604
- name: firewall_application_package
desc: "If a third-party firewall application is in use (other than firewalld or iptables), indicate the package name here. Otherwise, set this value to an empty string"
type: String
value: ""
# SV-204604
- name: firewall_application_service
desc: "If a third-party firewall application is in use (other than firewalld or iptables), indicate the service name here. Otherwise, set this value to an empty string"
type: String
value: ""
# SV-204576
- name: maxlogins_limit
desc: "Value for the maxlogins setting."
type: Numeric
value: 10
# SV-214801
- name: custom_antivirus
desc: "Whether an antivirus solution, other than nails, is in use."
type: Boolean
value: false
- name: custom_antivirus_description
desc: "Description of custom antivirus solution, when in use."
type: String
# Default of 'None' is used by control code -- DO NOT CHANGE DEFAULT
value: "None"
# SV-204500
- name: aide_exclude_patterns
desc: "It is reasonable and advisable to skip checksum on frequently changing files"
type: Array
value: []
# SV-204427
- name: required_rules
desc: "Required PAM rules"
type: Array
value:
- "auth required pam_faillock.so unlock_time=.*"
- "auth sufficient pam_unix.so try_first_pass"
- "auth [default=die] pam_faillock.so unlock_time=.*"
- name: alternate_rules
desc: "Alternate PAM rules"
type: Array
value:
- "auth required pam_faillock.so unlock_time=.*"
- "auth sufficient pam_sss.so forward_pass"
- "auth sufficient pam_unix.so try_first_pass"
- "auth [default=die] pam_faillock.so unlock_time=.*"
- name: alternate_logs
desc: "An alternate method is used for logs than rsyslog"
type: Boolean
value: false
# SV-204598
- name: gssapi_approved
desc: "is GSSAPI authentication approved"
type: Boolean
value: true
# SV-204599
- name: disconnected_system
desc: "Set flag to true if the target system is disconnected"
type: Boolean
value: false
# SV-219059
- name: automount_config
desc: "Full path to config file for automount settings"
type: String
value: "/etc/dconf/db/local.d/00-No-Automount"
# SV-219059
- name: automount_locks_config
desc: "Full path to locks config file for automount settings"
type: String
value: "/etc/dconf/db/local.d/locks/00-No-Automount"
# SV-204414
- name: max_classrepeat
desc: "System setting for the maximum number of allowed same consecutive characters in the same class of a new password."
type: Numeric
value: 4
# SV-204603
- name: maxpoll
desc: "This option specifies the maximum interval between requests sent to the NTP server as a power of 2 in seconds."
type: Numeric
value: 16
# SV-204420
- name: pass_max_days
desc: "Password lifetime restriction for new user accounts"
type: Numeric
value: 60
# SV-204431
- name: fail_delay
desc: "Value for the delay between logon prompts following a failed console logon attempt in seconds"
type: Numeric
value: 4
# SV-204468
- name: home_dir_mode
desc: Maximum mode allowed for user home directories (in octal format)
type: String
value: "0750"
# SV-204473
- name: home_dir_files_mode
desc: Maximum mode allowed for files contained within user home directories (in octal format)
type: String
value: "0750"
# SV-204476
- name: init_files_mode
desc: Maximum mode allowed for initialization files (in octal format)
type: String
value: "0740"
# SV-204488
- name: user_umask
desc: Expected value for all user UMASK values (in octal format)
type: String
value: "0077"
# SV-204509
- name: audit_remote_server
desc: "Address of the remote server to which audit logs can be sent -- if left blank, control will check that any non-local server is in use"
type: String
value: ""
# SV-204511
- name: expected_disk_full_action
desc: "Action that the server should take to preserve audit logs when the disk becomes full -- must be one of syslog, single, halt"
type: String
value: "single"
# SV-204512
- name: expected_network_failure_action
desc: "Action that the server should take to preserve audit logs when the network fails -- must be one of syslog, single, halt"
type: String
value: "single"
# SV-204513
- name: min_space_left
desc: "Minimum percentage for the space remaining in the audit log file before an alert is generated"
type: Numeric
value: 25
# SV-204596
- name: public_host_key_file_mode
desc: Maximum mode allowed for directories containing SSH public host keys (in octal format)
type: String
value: "0644"
# SV-204596
- name: public_host_key_directories
desc: "List of any directories containing SSH public host keys"
type: Array
value:
- /etc/ssh
# SV-204597
- name: private_host_key_file_mode
desc: Maximum mode allowed for directories containing SSH private host keys (in octal format)
type: String
value: "0640"
# SV-204597
- name: private_host_key_directories
desc: "List of any directories containing SSH private host keys"
type: Array
value:
- /
# SV-228564
- name: max_audit_file_mode
desc: Maximum mode allowed for the audit log (in octal format)
type: String
value: "0600"
# SV-204412
- name: minclass
desc: "Value for the minimum number of character classes that must change between password resets"
type: Numeric
value: 4
# SV-204419
- name: min_password_lifetime
desc: "Minimum lifetime of a password before it can be a reset"
type: Numeric
value: 1
# SV-204421
- name: max_password_lifetime
desc: "Maximum lifetime of a password before it needs a reset"
type: Numeric
value: 60
# SV-254523
- name: emergency_accounts
desc: Emergency user accounts
type: Array
value: []
# SV-254523
- name: emergency_account_disable
desc: Expiration time for an emergency account (in hours)
type: Numeric
value: 72
# SV-204407
- name: min_uppercase_characters
desc: Minimum number of upper-case characters required in a password
type: Numeric
value: 1
# SV-204408
- name: min_lowercase_characters
desc: Minimum number of lower-case characters required in a password
type: Numeric
value: 1
# SV-204409
- name: min_numeric_characters
desc: Minimum number of numeric characters required in a password
type: Numeric
value: 1
# SV-204410
- name: min_special_characters
desc: Minimum number of special characters required in a password
type: Numeric
value: 1