-
Notifications
You must be signed in to change notification settings - Fork 0
/
ubuntu-overview.json
3345 lines (3345 loc) · 391 KB
/
ubuntu-overview.json
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
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"name": "ubuntu",
"title": "InSpec Profile",
"maintainer": "The Authors",
"copyright": "The Authors",
"copyright_email": "you@example.com",
"license": "Apache-2.0",
"summary": "An InSpec Compliance Profile",
"version": "0.1.0",
"supports": [],
"controls": [
{
"title": "1.1 Ensure a separate partition for containers has been created\n(Scored)",
"desc": "All Docker containers and their data and metadata is stored under\n/var/lib/docker\n directory. By default, /var/lib/docker would be mounted under / or /var\npartitions based\n on availability.\n Docker depends on /var/lib/docker as the default directory where all Docker\nrelated files,\n including the images, are stored. This directory might fill up fast and\nsoon Docker and the\n host could become unusable. So, it is advisable to create a separate\npartition (logical\n volume) for storing Docker files.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://www.projectatomic.io/docs/docker-storage-recommendation/\n",
"severity": "medium",
"cis_id": "1.1",
"cis_control": "14 Controlled Access Based on the Need to Know\n",
"cis_level": "Level 1 - Linux Host OS",
"nist": [
"AC-6"
],
"audit": "At the Docker host execute the below command:\ngrep\n/var/lib/docker /etc/fstab\nThis should return the partition details for\n/var/lib/docker mount point.\n",
"fix": "For new installations, create a separate partition for\n/var/lib/docker mount point. For\nsystems that were previously installed, use\nthe Logical Volume Manager (LVM) to create\npartitions.\n",
"Default Value": "By default, /var/lib/docker would be mounted under / or\n/var partitions based on\navailability.\n"
},
"code": "control \"M-1.1\" do\n title \"1.1 Ensure a separate partition for containers has been created\n(Scored)\"\n desc \"\n All Docker containers and their data and metadata is stored under\n/var/lib/docker\n directory. By default, /var/lib/docker would be mounted under / or /var\npartitions based\n on availability.\n Docker depends on /var/lib/docker as the default directory where all Docker\nrelated files,\n including the images, are stored. This directory might fill up fast and\nsoon Docker and the\n host could become unusable. So, it is advisable to create a separate\npartition (logical\n volume) for storing Docker files.\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttps://www.projectatomic.io/docs/docker-storage-recommendation/\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"1.1\"\n tag \"cis_control\": \"14 Controlled Access Based on the Need to Know\\n\"\n tag \"cis_level\": \"Level 1 - Linux Host OS\"\n tag \"nist\": [\"AC-6\"]\n tag \"audit\": \"At the Docker host execute the below command:\\ngrep\n/var/lib/docker /etc/fstab\\nThis should return the partition details for\n/var/lib/docker mount point.\\n\"\n tag \"fix\": \"For new installations, create a separate partition for\n/var/lib/docker mount point. For\\nsystems that were previously installed, use\nthe Logical Volume Manager (LVM) to create\\npartitions.\\n\"\n tag \"Default Value\": \"By default, /var/lib/docker would be mounted under / or\n/var partitions based on\\navailability.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-1.1.rb",
"line": 1
},
"id": "M-1.1"
},
{
"title": "1.10 Ensure auditing is configured for Docker files and directories\n/etc/default/docker (Scored)",
"desc": "Audit /etc/default/docker, if applicable.\n Apart from auditing your regular Linux file system and system calls, audit\nall Docker\n related files and directories. Docker daemon runs with root privileges. Its\nbehavior\n depends on some key files and directories. /etc/default/docker is one such\nfile. It holds\n various parameters for Docker daemon. It must be audited, if applicable.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html\n",
"severity": "medium",
"cis_id": "1.10",
"cis_control": "14.6 Enforce Detailed Audit Logging For Sensitive\nInformation\n",
"cis_level": "Level 1 - Linux Host OS",
"nist": [
"AU-2"
],
"audit": "Verify that there is an audit rule corresponding to\n/etc/default/docker file.\nFor example, execute below command:\nauditctl -l |\ngrep /etc/default/docker\nThis should list a rule for /etc/default/docker\nfile.\n",
"fix": "Add a rule for /etc/default/docker file.\nFor example,\nAdd the\nline as below in /etc/audit/audit.rules file:\n-w /etc/default/docker -k\ndocker\nThen, restart the audit daemon. For example,\nservice auditd restart\n",
"Default Value": "By default, Docker related files and directories are\nnot audited. The file\n/etc/default/docker may not be available on the system.\nIn that case, this\nrecommendation is not applicable.\n"
},
"code": "control \"M-1.10\" do\n title \"1.10 Ensure auditing is configured for Docker files and directories\n/etc/default/docker (Scored)\"\n desc \"\n Audit /etc/default/docker, if applicable.\n Apart from auditing your regular Linux file system and system calls, audit\nall Docker\n related files and directories. Docker daemon runs with root privileges. Its\nbehavior\n depends on some key files and directories. /etc/default/docker is one such\nfile. It holds\n various parameters for Docker daemon. It must be audited, if applicable.\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttps://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"1.10\"\n tag \"cis_control\": \"14.6 Enforce Detailed Audit Logging For Sensitive\nInformation\\n\"\n tag \"cis_level\": \"Level 1 - Linux Host OS\"\n tag \"nist\": [\"AU-2\"]\n tag \"audit\": \"Verify that there is an audit rule corresponding to\n/etc/default/docker file.\\nFor example, execute below command:\\nauditctl -l |\ngrep /etc/default/docker\\nThis should list a rule for /etc/default/docker\nfile.\\n\"\n tag \"fix\": \"Add a rule for /etc/default/docker file.\\nFor example,\\nAdd the\nline as below in /etc/audit/audit.rules file:\\n-w /etc/default/docker -k\ndocker\\nThen, restart the audit daemon. For example,\\nservice auditd restart\\n\"\n tag \"Default Value\": \"By default, Docker related files and directories are\nnot audited. The file\\n/etc/default/docker may not be available on the system.\nIn that case, this\\nrecommendation is not applicable.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-1.10.rb",
"line": 1
},
"id": "M-1.10"
},
{
"title": "1.11 Ensure auditing is configured for Docker files and directories\n/etc/docker/daemon.json (Scored)",
"desc": "Audit /etc/docker/daemon.json, if applicable.\n Apart from auditing your regular Linux file system and system calls, audit\nall Docker\n related files and directories. Docker daemon runs with root privileges. Its\nbehavior\n depends on some key files and directories. /etc/docker/daemon.json is one\nsuch file. It\n holds various parameters for Docker daemon. It must be audited, if\napplicable.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html\n2.\nhttps://docs.docker.com/engine/reference/commandline/dockerd/#daemonconfiguration-file\n",
"severity": "medium",
"cis_id": "1.11",
"cis_control": "14.6 Enforce Detailed Audit Logging For Sensitive\nInformation\n",
"cis_level": "Level 1 - Linux Host OS",
"nist": [
"AU-2"
],
"audit": "Verify that there is an audit rule corresponding to\n/etc/docker/daemon.json file.\nFor example, execute below command:\nauditctl -l\n| grep /etc/docker/daemon.json\nThis should list a rule for\n/etc/docker/daemon.json file.\n",
"fix": "Add a rule for /etc/docker/daemon.json file.\nFor example,\nAdd\nthe line as below in /etc/audit/audit.rules file:\n-w /etc/docker/daemon.json\n-k docker\nThen, restart the audit daemon. For example,\nservice auditd\nrestart\n",
"Default Value": "By default, Docker related files and directories are\nnot audited. The file\n/etc/docker/daemon.json may not be available on the\nsystem. In that case, this\nrecommendation is not applicable.\n"
},
"code": "control \"M-1.11\" do\n title \"1.11 Ensure auditing is configured for Docker files and directories\n/etc/docker/daemon.json (Scored)\"\n desc \"\n Audit /etc/docker/daemon.json, if applicable.\n Apart from auditing your regular Linux file system and system calls, audit\nall Docker\n related files and directories. Docker daemon runs with root privileges. Its\nbehavior\n depends on some key files and directories. /etc/docker/daemon.json is one\nsuch file. It\n holds various parameters for Docker daemon. It must be audited, if\napplicable.\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttps://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html\\n2.\nhttps://docs.docker.com/engine/reference/commandline/dockerd/#daemonconfiguration-file\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"1.11\"\n tag \"cis_control\": \"14.6 Enforce Detailed Audit Logging For Sensitive\nInformation\\n\"\n tag \"cis_level\": \"Level 1 - Linux Host OS\"\n tag \"nist\": [\"AU-2\"]\n tag \"audit\": \"Verify that there is an audit rule corresponding to\n/etc/docker/daemon.json file.\\nFor example, execute below command:\\nauditctl -l\n| grep /etc/docker/daemon.json\\nThis should list a rule for\n/etc/docker/daemon.json file.\\n\"\n tag \"fix\": \"Add a rule for /etc/docker/daemon.json file.\\nFor example,\\nAdd\nthe line as below in /etc/audit/audit.rules file:\\n-w /etc/docker/daemon.json\n-k docker\\nThen, restart the audit daemon. For example,\\nservice auditd\nrestart\\n\"\n tag \"Default Value\": \"By default, Docker related files and directories are\nnot audited. The file\\n/etc/docker/daemon.json may not be available on the\nsystem. In that case, this\\nrecommendation is not applicable.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-1.11.rb",
"line": 1
},
"id": "M-1.11"
},
{
"title": "1.12 Ensure auditing is configured for Docker files and directories\n/usr/bin/docker-containerd (Scored)",
"desc": "Audit /usr/bin/docker-containerd, if applicable.\n Apart from auditing your regular Linux file system and system calls, audit\nall Docker\n related files and directories. Docker daemon runs with root privileges. Its\nbehavior\n depends on some key files and directories. /usr/bin/docker-containerd is\none such file.\n Docker now relies on containerdand runC to spawn containers. It must be\naudited, if\n applicable.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html\n2.\nhttps://github.com/docker/docker/pull/20662\n3. https://containerd.tools/\n",
"severity": "medium",
"cis_id": "1.12",
"cis_control": "14.6 Enforce Detailed Audit Logging For Sensitive\nInformation\n",
"cis_level": "Level 1 - Linux Host OS",
"nist": [
"AU-2"
],
"audit": "Verify that there is an audit rule corresponding to\n/usr/bin/docker-containerd file.\nFor example, execute below command:\nauditctl\n-l | grep /usr/bin/docker-containerd\nThis should list a rule for\n/usr/bin/docker-containerd file.\n",
"fix": "Add a rule for /usr/bin/docker-containerd file.\nFor\nexample,\nAdd the line as below in /etc/audit/audit.rules file:\n-w\n/usr/bin/docker-containerd -k docker\nThen, restart the audit daemon. For\nexample,\nservice auditd restart\n",
"Default Value": "By default, Docker related files and directories are\nnot audited. The file /usr/bin/dockercontainerd may not be available on the\nsystem. In that case, this recommendation is not\napplicable.\n"
},
"code": "control \"M-1.12\" do\n title \"1.12 Ensure auditing is configured for Docker files and directories\n/usr/bin/docker-containerd (Scored)\"\n desc \"\n Audit /usr/bin/docker-containerd, if applicable.\n Apart from auditing your regular Linux file system and system calls, audit\nall Docker\n related files and directories. Docker daemon runs with root privileges. Its\nbehavior\n depends on some key files and directories. /usr/bin/docker-containerd is\none such file.\n Docker now relies on containerdand runC to spawn containers. It must be\naudited, if\n applicable.\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttps://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html\\n2.\nhttps://github.com/docker/docker/pull/20662\\n3. https://containerd.tools/\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"1.12\"\n tag \"cis_control\": \"14.6 Enforce Detailed Audit Logging For Sensitive\nInformation\\n\"\n tag \"cis_level\": \"Level 1 - Linux Host OS\"\n tag \"nist\": [\"AU-2\"]\n tag \"audit\": \"Verify that there is an audit rule corresponding to\n/usr/bin/docker-containerd file.\\nFor example, execute below command:\\nauditctl\n-l | grep /usr/bin/docker-containerd\\nThis should list a rule for\n/usr/bin/docker-containerd file.\\n\"\n tag \"fix\": \"Add a rule for /usr/bin/docker-containerd file.\\nFor\nexample,\\nAdd the line as below in /etc/audit/audit.rules file:\\n-w\n/usr/bin/docker-containerd -k docker\\nThen, restart the audit daemon. For\nexample,\\nservice auditd restart\\n\"\n tag \"Default Value\": \"By default, Docker related files and directories are\nnot audited. The file /usr/bin/dockercontainerd may not be available on the\nsystem. In that case, this recommendation is not\\napplicable.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-1.12.rb",
"line": 1
},
"id": "M-1.12"
},
{
"title": "1.13 Ensure auditing is configured for Docker files and directories\n/usr/bin/docker-runc (Scored)",
"desc": "Audit /usr/bin/docker-runc, if applicable.\n Apart from auditing your regular Linux file system and system calls, audit\nall Docker\n related files and directories. Docker daemon runs with root privileges. Its\nbehavior\n depends on some key files and directories. /usr/bin/docker-runc is one such\nfile. Docker\n now relies on containerd and runC to spawn containers. It must be audited,\nif applicable.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html\n2.\nhttps://github.com/docker/docker/pull/20662\n3. https://containerd.tools/\n4.\nhttps://github.com/opencontainers/runc\n",
"severity": "medium",
"cis_id": "1.13",
"cis_control": "14.6 Enforce Detailed Audit Logging For Sensitive\nInformation\n",
"cis_level": "Level 1 - Linux Host OS",
"nist": [
"AU-2"
],
"audit": "Verify that there is an audit rule corresponding to\n/usr/bin/docker-runc file.\nFor example, execute below command:\nauditctl -l |\ngrep /usr/bin/docker-runc\nThis should list a rule for /usr/bin/docker-runc\nfile.\n",
"fix": "Add a rule for /usr/bin/docker-runc file.\nFor example,\nAdd the\nline as below in /etc/audit/audit.rules file:\n-w /usr/bin/docker-runc -k\ndocker\nThen, restart the audit daemon. For example,\nservice auditd restart\n",
"Default Value": "By default, Docker related files and directories are\nnot audited. The file/usr/bin/dockerrunc may not be available on the system. In\nthat case, this recommendation is not\napplicable.\n"
},
"code": "control \"M-1.13\" do\n title \"1.13 Ensure auditing is configured for Docker files and directories\n/usr/bin/docker-runc (Scored)\"\n desc \"\n Audit /usr/bin/docker-runc, if applicable.\n Apart from auditing your regular Linux file system and system calls, audit\nall Docker\n related files and directories. Docker daemon runs with root privileges. Its\nbehavior\n depends on some key files and directories. /usr/bin/docker-runc is one such\nfile. Docker\n now relies on containerd and runC to spawn containers. It must be audited,\nif applicable.\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttps://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html\\n2.\nhttps://github.com/docker/docker/pull/20662\\n3. https://containerd.tools/\\n4.\nhttps://github.com/opencontainers/runc\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"1.13\"\n tag \"cis_control\": \"14.6 Enforce Detailed Audit Logging For Sensitive\nInformation\\n\"\n tag \"cis_level\": \"Level 1 - Linux Host OS\"\n tag \"nist\": [\"AU-2\"]\n tag \"audit\": \"Verify that there is an audit rule corresponding to\n/usr/bin/docker-runc file.\\nFor example, execute below command:\\nauditctl -l |\ngrep /usr/bin/docker-runc\\nThis should list a rule for /usr/bin/docker-runc\nfile.\\n\"\n tag \"fix\": \"Add a rule for /usr/bin/docker-runc file.\\nFor example,\\nAdd the\nline as below in /etc/audit/audit.rules file:\\n-w /usr/bin/docker-runc -k\ndocker\\nThen, restart the audit daemon. For example,\\nservice auditd restart\\n\"\n tag \"Default Value\": \"By default, Docker related files and directories are\nnot audited. The file/usr/bin/dockerrunc may not be available on the system. In\nthat case, this recommendation is not\\napplicable.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-1.13.rb",
"line": 1
},
"id": "M-1.13"
},
{
"title": "1.2 Ensure the container host has been Hardened (Not Scored)",
"desc": "Containers run on a Linux host. A container host can run one or more\ncontainers. It is of\n utmost importance to harden the host to mitigate host security\nmisconfiguration.\n You should follow infrastructure security best practices and harden your\nhost OS. Keeping\n the host system hardened would ensure that the host vulnerabilities are\nmitigated. Not\n hardening the host system could lead to security exposures and breaches.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://docs.docker.com/engine/security/security/\n2.\n3.\n4.\n5.\n6.\n7.\nhttps://learn.cisecurity.org/benchmarks\nhttps://docs.docker.com/engine/security/security/#other-kernel-security-features\nhttps://grsecurity.net/\nhttps://en.wikibooks.org/wiki/Grsecurity\nhttps://pax.grsecurity.net/\nhttp://en.wikipedia.org/wiki/PaX\n",
"severity": "medium",
"cis_id": "1.2",
"cis_control": "3 Secure Configurations for Hardware and Software on\nMobile Devices, Laptops,\n",
"cis_level": "Level 1 - Linux Host OS",
"nist": [
"CM-6"
],
"audit": "Ensure that the host specific security guidelines are followed.\nAsk the system\nadministrators which security benchmark does current host\nsystem comply with. Ensure\nthat the host systems actually comply with that\nhost specific security benchmark.\n",
"fix": "You may consider various CIS Security Benchmarks for your\ncontainer host. If you have\nother security guidelines or regulatory\nrequirements to adhere to, please follow them as\nsuitable in your\nenvironment.\nAdditionally, you can run a kernel with grsecurity and PaX. This\nwould add many safety\nchecks, both at compile-time and run-time. It is also\ndesigned to defeat many exploits and\nhas powerful security features. These\nfeatures do not require Docker-specific\nconfiguration, since those security\nfeatures apply system-wide, independent of containers.\n",
"Default Value": "By default, host has factory settings. It is not\nhardened.\n"
},
"code": "control \"M-1.2\" do\n title \"1.2 Ensure the container host has been Hardened (Not Scored)\"\n desc \"\n Containers run on a Linux host. A container host can run one or more\ncontainers. It is of\n utmost importance to harden the host to mitigate host security\nmisconfiguration.\n You should follow infrastructure security best practices and harden your\nhost OS. Keeping\n the host system hardened would ensure that the host vulnerabilities are\nmitigated. Not\n hardening the host system could lead to security exposures and breaches.\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttps://docs.docker.com/engine/security/security/\\n2.\\n3.\\n4.\\n5.\\n6.\\n7.\\nhttps://learn.cisecurity.org/benchmarks\\nhttps://docs.docker.com/engine/security/security/#other-kernel-security-features\\nhttps://grsecurity.net/\\nhttps://en.wikibooks.org/wiki/Grsecurity\\nhttps://pax.grsecurity.net/\\nhttp://en.wikipedia.org/wiki/PaX\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"1.2\"\n tag \"cis_control\": \"3 Secure Configurations for Hardware and Software on\nMobile Devices, Laptops,\\n\"\n tag \"cis_level\": \"Level 1 - Linux Host OS\"\n tag \"nist\": [\"CM-6\"]\n tag \"audit\": \"Ensure that the host specific security guidelines are followed.\nAsk the system\\nadministrators which security benchmark does current host\nsystem comply with. Ensure\\nthat the host systems actually comply with that\nhost specific security benchmark.\\n\"\n tag \"fix\": \"You may consider various CIS Security Benchmarks for your\ncontainer host. If you have\\nother security guidelines or regulatory\nrequirements to adhere to, please follow them as\\nsuitable in your\nenvironment.\\nAdditionally, you can run a kernel with grsecurity and PaX. This\nwould add many safety\\nchecks, both at compile-time and run-time. It is also\ndesigned to defeat many exploits and\\nhas powerful security features. These\nfeatures do not require Docker-specific\\nconfiguration, since those security\nfeatures apply system-wide, independent of containers.\\n\"\n tag \"Default Value\": \"By default, host has factory settings. It is not\nhardened.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-1.2.rb",
"line": 1
},
"id": "M-1.2"
},
{
"title": "1.3 Ensure Docker is up to date (Not Scored)",
"desc": "There are frequent releases for Docker software that address security\nvulnerabilities,\n product bugs and bring in new functionality. Keep a tab on these product\nupdates and\n upgrade as frequently as when new security vulnerabilities are fixed or\ndeemed correct for\n your organization.\n By staying up to date on Docker updates, vulnerabilities in the Docker\nsoftware can be\n mitigated. An educated attacker may exploit known vulnerabilities when\nattempting to\n attain access or elevate privileges. Not installing regular Docker updates\nmay leave you\n with running vulnerable Docker software. It might lead to elevation\nprivileges,\n unauthorized access or other security breaches. Keep a track of new\nreleases and update as\n necessary.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1. https://docs.docker.com/engine/installation/\n2.\nhttps://github.com/moby/moby/releases/latest\n3.\nhttps://github.com/docker/docker-ce/releases/latest\n",
"severity": "medium",
"cis_id": "1.3",
"cis_control": "4 Continuous Vulnerability Assessment and Remediation\n",
"cis_level": "Level 1 - Linux Host OS",
"nist": [
"RA-5"
],
"audit": "Execute the below command and verify that the Docker version is\nup to date as deemed\nnecessary. It is not a mandate to be on the latest one,\nthough.\ndocker version\n",
"fix": "Keep a track of Docker releases and update as necessary.\n",
"Default Value": "Not Applicable\n"
},
"code": "control \"M-1.3\" do\n title \"1.3 Ensure Docker is up to date (Not Scored)\"\n desc \"\n There are frequent releases for Docker software that address security\nvulnerabilities,\n product bugs and bring in new functionality. Keep a tab on these product\nupdates and\n upgrade as frequently as when new security vulnerabilities are fixed or\ndeemed correct for\n your organization.\n By staying up to date on Docker updates, vulnerabilities in the Docker\nsoftware can be\n mitigated. An educated attacker may exploit known vulnerabilities when\nattempting to\n attain access or elevate privileges. Not installing regular Docker updates\nmay leave you\n with running vulnerable Docker software. It might lead to elevation\nprivileges,\n unauthorized access or other security breaches. Keep a track of new\nreleases and update as\n necessary.\n\n \"\n impact 0.5\n tag \"ref\": \"1. https://docs.docker.com/engine/installation/\\n2.\nhttps://github.com/moby/moby/releases/latest\\n3.\nhttps://github.com/docker/docker-ce/releases/latest\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"1.3\"\n tag \"cis_control\": \"4 Continuous Vulnerability Assessment and Remediation\\n\"\n tag \"cis_level\": \"Level 1 - Linux Host OS\"\n tag \"nist\": [\"RA-5\"]\n tag \"audit\": \"Execute the below command and verify that the Docker version is\nup to date as deemed\\nnecessary. It is not a mandate to be on the latest one,\nthough.\\ndocker version\\n\"\n tag \"fix\": \"Keep a track of Docker releases and update as necessary.\\n\"\n tag \"Default Value\": \"Not Applicable\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-1.3.rb",
"line": 1
},
"id": "M-1.3"
},
{
"title": "1.4 Ensure only trusted users are allowed to control Docker\ndaemon(Scored)",
"desc": "The Docker daemon currently requires root privileges. A user added to the\ndocker group\n gives him full root access rights.\n Docker allows you to share a directory between the Docker host and a guest\ncontainer\n without limiting the access rights of the container. This means that you\ncan start a\n container and map the / directory on your host to the container. The\ncontainer will then be\n able to alter your host file system without any restrictions. In simple\nterms, it means that\n you can attain elevated privileges with just being a member of the docker\ngroup and then\n starting a container with mapped / directory on the host.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://docs.docker.com/engine/security/security/#docker-daemon-attacksurface\n2.\nhttps://www.andreas-jung.com/contents/on-docker-security-docker-groupconsidered-harmful\n3.\nhttp://www.projectatomic.io/blog/2015/08/why-we-dont-let-non-root-users-rundocker-in-centos-fedora-or-rhel/\n",
"severity": "medium",
"cis_id": "1.4",
"cis_control": "5.1 Minimize And Sparingly Use Administrative\nPrivileges\n",
"cis_level": "Level 1 - Linux Host OS",
"nist": [
"AC-6 (9)"
],
"audit": "Execute the below command on the docker host and ensure that\nonly trusted users are\nmembers of the docker group.\ngetent group docker\n",
"fix": "Remove any users from the docker group that are not trusted.\nAdditionally, do not create a\nmapping of sensitive directories on host to\ncontainer volumes.\n",
"Default Value": "Not Applicable\n"
},
"code": "control \"M-1.4\" do\n title \"1.4 Ensure only trusted users are allowed to control Docker\ndaemon(Scored)\"\n desc \"\n The Docker daemon currently requires root privileges. A user added to the\ndocker group\n gives him full root access rights.\n Docker allows you to share a directory between the Docker host and a guest\ncontainer\n without limiting the access rights of the container. This means that you\ncan start a\n container and map the / directory on your host to the container. The\ncontainer will then be\n able to alter your host file system without any restrictions. In simple\nterms, it means that\n you can attain elevated privileges with just being a member of the docker\ngroup and then\n starting a container with mapped / directory on the host.\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttps://docs.docker.com/engine/security/security/#docker-daemon-attacksurface\\n2.\nhttps://www.andreas-jung.com/contents/on-docker-security-docker-groupconsidered-harmful\\n3.\nhttp://www.projectatomic.io/blog/2015/08/why-we-dont-let-non-root-users-rundocker-in-centos-fedora-or-rhel/\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"1.4\"\n tag \"cis_control\": \"5.1 Minimize And Sparingly Use Administrative\nPrivileges\\n\"\n tag \"cis_level\": \"Level 1 - Linux Host OS\"\n tag \"nist\": [\"AC-6 (9)\"]\n tag \"audit\": \"Execute the below command on the docker host and ensure that\nonly trusted users are\\nmembers of the docker group.\\ngetent group docker\\n\"\n tag \"fix\": \"Remove any users from the docker group that are not trusted.\nAdditionally, do not create a\\nmapping of sensitive directories on host to\ncontainer volumes.\\n\"\n tag \"Default Value\": \"Not Applicable\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-1.4.rb",
"line": 1
},
"id": "M-1.4"
},
{
"title": "1.5 Ensure auditing is configured for the docker daemon (Scored)",
"desc": "Audit all Docker daemon activities.\n Apart from auditing your regular Linux file system and system calls, audit\nDocker daemon\n as well. Docker daemon runs with root privileges. It is thus necessary to\naudit its activities\n and usage.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html\n",
"severity": "medium",
"cis_id": "1.5",
"cis_control": "6.2 Ensure Audit Log Settings Support Appropriate Log\nEntry Formatting\n",
"cis_level": "Level 1 - Linux Host OS",
"nist": [
"AU-3"
],
"audit": "Verify that there is an audit rule for Docker daemon. For\nexample, execute below\ncommand:\nauditctl -l | grep /usr/bin/docker\nThis\nshould list a rule for Docker daemon.\n",
"fix": "Add a rule for Docker daemon.\nFor example,\nAdd the line as\nbelow line in /etc/audit/audit.rules file:\n-w /usr/bin/docker -k docker\nThen,\nrestart the audit daemon. For example,\nservice auditd restart\n",
"Default Value": "By default, Docker daemon is not audited.\n"
},
"code": "control \"M-1.5\" do\n title \"1.5 Ensure auditing is configured for the docker daemon (Scored)\"\n desc \"\n Audit all Docker daemon activities.\n Apart from auditing your regular Linux file system and system calls, audit\nDocker daemon\n as well. Docker daemon runs with root privileges. It is thus necessary to\naudit its activities\n and usage.\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttps://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"1.5\"\n tag \"cis_control\": \"6.2 Ensure Audit Log Settings Support Appropriate Log\nEntry Formatting\\n\"\n tag \"cis_level\": \"Level 1 - Linux Host OS\"\n tag \"nist\": [\"AU-3\"]\n tag \"audit\": \"Verify that there is an audit rule for Docker daemon. For\nexample, execute below\\ncommand:\\nauditctl -l | grep /usr/bin/docker\\nThis\nshould list a rule for Docker daemon.\\n\"\n tag \"fix\": \"Add a rule for Docker daemon.\\nFor example,\\nAdd the line as\nbelow line in /etc/audit/audit.rules file:\\n-w /usr/bin/docker -k docker\\nThen,\nrestart the audit daemon. For example,\\nservice auditd restart\\n\"\n tag \"Default Value\": \"By default, Docker daemon is not audited.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-1.5.rb",
"line": 1
},
"id": "M-1.5"
},
{
"title": "1.6 Ensure auditing is configured for Docker files and directories\n/var/lib/docker (Scored)",
"desc": "Audit /var/lib/docker.\n Apart from auditing your regular Linux file system and system calls, audit\nall Docker\n related files and directories. Docker daemon runs with root privileges. Its\nbehavior\n depends on some key files and directories. /var/lib/docker is one such\ndirectory. It holds\n all the information about containers. It must be audited.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html\n",
"severity": "medium",
"cis_id": "1.6",
"cis_control": "14.6 Enforce Detailed Audit Logging For Sensitive\nInformation\n",
"cis_level": "Level 1 - Linux Host OS",
"nist": [
"AU-2"
],
"audit": "Verify that there is an audit rule corresponding to\n/var/lib/docker directory.\nFor example, execute below command:\nauditctl -l |\ngrep /var/lib/docker\nThis should list a rule for /var/lib/docker directory.\n",
"fix": "Add a rule for /var/lib/docker directory.\nFor example,\nAdd the\nline as below in /etc/audit/audit.rules file:\n-w /var/lib/docker -k\ndocker\nThen, restart the audit daemon. For example,\nservice auditd restart\n",
"Default Value": "By default, Docker related files and directories are\nnot audited.\n"
},
"code": "control \"M-1.6\" do\n title \"1.6 Ensure auditing is configured for Docker files and directories\n/var/lib/docker (Scored)\"\n desc \"\n Audit /var/lib/docker.\n Apart from auditing your regular Linux file system and system calls, audit\nall Docker\n related files and directories. Docker daemon runs with root privileges. Its\nbehavior\n depends on some key files and directories. /var/lib/docker is one such\ndirectory. It holds\n all the information about containers. It must be audited.\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttps://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"1.6\"\n tag \"cis_control\": \"14.6 Enforce Detailed Audit Logging For Sensitive\nInformation\\n\"\n tag \"cis_level\": \"Level 1 - Linux Host OS\"\n tag \"nist\": [\"AU-2\"]\n tag \"audit\": \"Verify that there is an audit rule corresponding to\n/var/lib/docker directory.\\nFor example, execute below command:\\nauditctl -l |\ngrep /var/lib/docker\\nThis should list a rule for /var/lib/docker directory.\\n\"\n tag \"fix\": \"Add a rule for /var/lib/docker directory.\\nFor example,\\nAdd the\nline as below in /etc/audit/audit.rules file:\\n-w /var/lib/docker -k\ndocker\\nThen, restart the audit daemon. For example,\\nservice auditd restart\\n\"\n tag \"Default Value\": \"By default, Docker related files and directories are\nnot audited.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-1.6.rb",
"line": 1
},
"id": "M-1.6"
},
{
"title": "1.7 Ensure auditing is configured for Docker files and directories\n/etc/docker (Scored)",
"desc": "Audit /etc/docker.\n Apart from auditing your regular Linux file system and system calls, audit\nall Docker\n related files and directories. Docker daemon runs with root privileges. Its\nbehavior\n depends on some key files and directories. /etc/docker is one such\ndirectory. It holds\n various certificates and keys used for TLS communication between Docker\ndaemon and\n Docker client. It must be audited.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html\n",
"severity": "medium",
"cis_id": "1.7",
"cis_control": "14.6 Enforce Detailed Audit Logging For Sensitive\nInformation\n",
"cis_level": "Level 1 - Linux Host OS",
"nist": [
"AU-2"
],
"audit": "Verify that there is an audit rule corresponding to /etc/docker\ndirectory.\nFor example, execute below command:\nauditctl -l | grep\n/etc/docker\nThis should list a rule for /etc/docker directory.\n",
"fix": "Add a rule for /etc/docker directory.\nFor example,\nAdd the line\nas below in /etc/audit/audit.rules file:\n-w /etc/docker -k docker\nThen,\nrestart the audit daemon. For example,\nservice auditd restart\n",
"Default Value": "By default, Docker related files and directories are\nnot audited.\n"
},
"code": "control \"M-1.7\" do\n title \"1.7 Ensure auditing is configured for Docker files and directories\n/etc/docker (Scored)\"\n desc \"\n Audit /etc/docker.\n Apart from auditing your regular Linux file system and system calls, audit\nall Docker\n related files and directories. Docker daemon runs with root privileges. Its\nbehavior\n depends on some key files and directories. /etc/docker is one such\ndirectory. It holds\n various certificates and keys used for TLS communication between Docker\ndaemon and\n Docker client. It must be audited.\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttps://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"1.7\"\n tag \"cis_control\": \"14.6 Enforce Detailed Audit Logging For Sensitive\nInformation\\n\"\n tag \"cis_level\": \"Level 1 - Linux Host OS\"\n tag \"nist\": [\"AU-2\"]\n tag \"audit\": \"Verify that there is an audit rule corresponding to /etc/docker\ndirectory.\\nFor example, execute below command:\\nauditctl -l | grep\n/etc/docker\\nThis should list a rule for /etc/docker directory.\\n\"\n tag \"fix\": \"Add a rule for /etc/docker directory.\\nFor example,\\nAdd the line\nas below in /etc/audit/audit.rules file:\\n-w /etc/docker -k docker\\nThen,\nrestart the audit daemon. For example,\\nservice auditd restart\\n\"\n tag \"Default Value\": \"By default, Docker related files and directories are\nnot audited.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-1.7.rb",
"line": 1
},
"id": "M-1.7"
},
{
"title": "1.8 Ensure auditing is configured for Docker files and directories\ndocker.service (Scored)",
"desc": "Audit docker.service, if applicable.\n Apart from auditing your regular Linux file system and system calls, audit\nall Docker\n related files and directories. Docker daemon runs with root privileges. Its\nbehavior\n depends on some key files and directories. docker.service is one such file.\nThe\n docker.service file might be present if the daemon parameters have been\nchanged by an\n administrator. It holds various parameters for Docker daemon. It must be\naudited, if\n applicable.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html\n",
"severity": "medium",
"cis_id": "1.8",
"cis_control": "14.6 Enforce Detailed Audit Logging For Sensitive\nInformation\n",
"cis_level": "Level 1 - Linux Host OS",
"nist": [
"AU-2"
],
"audit": "Step 1: Find out the file location:\nsystemctl show -p\nFragmentPath docker.service\nStep 2: If the file does not exist, this\nrecommendation is not applicable. If the file exists,\nverify that there is an\naudit rule corresponding to the file:\nFor example, execute the below\ncommand:\nauditctl -l | grep docker.service\nThis should list a rule for\ndocker.service as per its location.\n",
"fix": "If the file exists, add a rule for it.\nFor example,\nAdd the\nline as below in /etc/audit/audit.rules file:\n-w\n/usr/lib/systemd/system/docker.service -k docker\nThen, restart the audit\ndaemon. For example,\nservice auditd restart\n",
"Default Value": "By default, Docker related files and directories are\nnot audited. The file docker.service\nmay not be available on the system.\n"
},
"code": "control \"M-1.8\" do\n title \"1.8 Ensure auditing is configured for Docker files and directories\ndocker.service (Scored)\"\n desc \"\n Audit docker.service, if applicable.\n Apart from auditing your regular Linux file system and system calls, audit\nall Docker\n related files and directories. Docker daemon runs with root privileges. Its\nbehavior\n depends on some key files and directories. docker.service is one such file.\nThe\n docker.service file might be present if the daemon parameters have been\nchanged by an\n administrator. It holds various parameters for Docker daemon. It must be\naudited, if\n applicable.\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttps://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"1.8\"\n tag \"cis_control\": \"14.6 Enforce Detailed Audit Logging For Sensitive\nInformation\\n\"\n tag \"cis_level\": \"Level 1 - Linux Host OS\"\n tag \"nist\": [\"AU-2\"]\n tag \"audit\": \"Step 1: Find out the file location:\\nsystemctl show -p\nFragmentPath docker.service\\nStep 2: If the file does not exist, this\nrecommendation is not applicable. If the file exists,\\nverify that there is an\naudit rule corresponding to the file:\\nFor example, execute the below\ncommand:\\nauditctl -l | grep docker.service\\nThis should list a rule for\ndocker.service as per its location.\\n\"\n tag \"fix\": \"If the file exists, add a rule for it.\\nFor example,\\nAdd the\nline as below in /etc/audit/audit.rules file:\\n-w\n/usr/lib/systemd/system/docker.service -k docker\\nThen, restart the audit\ndaemon. For example,\\nservice auditd restart\\n\"\n tag \"Default Value\": \"By default, Docker related files and directories are\nnot audited. The file docker.service\\nmay not be available on the system.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-1.8.rb",
"line": 1
},
"id": "M-1.8"
},
{
"title": "1.9 Ensure auditing is configured for Docker files and directories\ndocker.socket (Scored)",
"desc": "Audit docker.socket, if applicable.\n Apart from auditing your regular Linux file system and system calls, audit\nall Docker\n related files and directories. Docker daemon runs with root privileges. Its\nbehavior\n depends on some key files and directories. docker.socket is one such file.\nIt holds various\n parameters for Docker daemon socket. It must be audited, if applicable.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html\n",
"severity": "medium",
"cis_id": "1.9",
"cis_control": "14.6 Enforce Detailed Audit Logging For Sensitive\nInformation\n",
"cis_level": "Level 1 - Linux Host OS",
"nist": [
"AU-2"
],
"audit": "Step 1: Find out the file location:\nsystemctl show -p\nFragmentPath docker.socket\nStep 2: If the file does not exist, this\nrecommendation is not applicable. If the file exists,\nverify that there is an\naudit rule corresponding to the file:\nFor example, execute the below\ncommand:\nauditctl -l | grep docker.socket\nThis should list a rule for\ndocker.socket as per its location.\n",
"fix": "If the file exists, add a rule for it.\nFor example,\nAdd the\nline as below in /etc/audit/audit.rules file:\n-w\n/usr/lib/systemd/system/docker.socket -k docker\nThen, restart the audit\ndaemon. For example,\nservice auditd restart\n",
"Default Value": "By default, Docker related files and directories are\nnot audited. The file docker.socket may\nnot be available on the system.\n"
},
"code": "control \"M-1.9\" do\n title \"1.9 Ensure auditing is configured for Docker files and directories\ndocker.socket (Scored)\"\n desc \"\n Audit docker.socket, if applicable.\n Apart from auditing your regular Linux file system and system calls, audit\nall Docker\n related files and directories. Docker daemon runs with root privileges. Its\nbehavior\n depends on some key files and directories. docker.socket is one such file.\nIt holds various\n parameters for Docker daemon socket. It must be audited, if applicable.\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttps://access.redhat.com/documentation/enUS/Red_Hat_Enterprise_Linux/6/html/Security_Guide/chap-system_auditing.html\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"1.9\"\n tag \"cis_control\": \"14.6 Enforce Detailed Audit Logging For Sensitive\nInformation\\n\"\n tag \"cis_level\": \"Level 1 - Linux Host OS\"\n tag \"nist\": [\"AU-2\"]\n tag \"audit\": \"Step 1: Find out the file location:\\nsystemctl show -p\nFragmentPath docker.socket\\nStep 2: If the file does not exist, this\nrecommendation is not applicable. If the file exists,\\nverify that there is an\naudit rule corresponding to the file:\\nFor example, execute the below\ncommand:\\nauditctl -l | grep docker.socket\\nThis should list a rule for\ndocker.socket as per its location.\\n\"\n tag \"fix\": \"If the file exists, add a rule for it.\\nFor example,\\nAdd the\nline as below in /etc/audit/audit.rules file:\\n-w\n/usr/lib/systemd/system/docker.socket -k docker\\nThen, restart the audit\ndaemon. For example,\\nservice auditd restart\\n\"\n tag \"Default Value\": \"By default, Docker related files and directories are\nnot audited. The file docker.socket may\\nnot be available on the system.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-1.9.rb",
"line": 1
},
"id": "M-1.9"
},
{
"title": "2.1 Ensure network traffic is restricted between containers on\nthe\ndefault bridge (Scored)",
"desc": "By default, all network traffic is allowed between containers on the same\nhost on the\n default network bridge. If not desired, restrict all the inter-container\ncommunication. Link\n specific containers together that require communication. Alternatively, you\ncan create\n custom network and only join containers that need to communicate to that\ncustom\n network.\n By default, unrestricted network traffic is enabled between all containers\non the same host\n on the default network bridge. Thus, each container has the potential of\nreading all packets\n across the container network on the same host. This might lead to an\nunintended and\n unwanted disclosure of information to other containers. Hence, restrict the\ninter-container\n communication on the default network bridge.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1. https://docs.docker.com/engine/userguide/networking/\n2.\nhttps://docs.docker.com/engine/userguide/networking/default_network/containe\nr-communication/#communication-between-containers\n\n2.2\nEnsure the logging level is set to 'info' (Scored)\nProfile Applicability:\n\nLevel 1 - Docker\nDescription:\nSet Docker daemon log level to\ninfo.\nRationale:\nSetting up an appropriate log level, configures the Docker\ndaemon to log events that you\nwould want to review later. A base log level of\ninfo and above would capture all logs\nexcept debug logs. Until and unless\nrequired, you should not run Docker daemon at debug\nlog level.\nAudit:\nps -ef\n| grep docker\nEnsure that either the --log-level parameter is not present or\nif present, then it is set to\ninfo.\nRemediation:\nRun the Docker daemon as\nbelow:\ndockerd --log-level=\"info\"\nImpact:\nNone.\nDefault Value:\nBy\ndefault, Docker daemon is set to log level of info.\nReferences:\n1.\nhttps://docs.docker.com/edge/engine/reference/commandline/dockerd/\n",
"severity": "medium",
"cis_id": "2.1",
"cis_control": "6.2 Ensure Audit Log Settings Support Appropriate Log\nEntry Formatting\n",
"cis_level": "Level 1 - Docker",
"nist": [
"AU-3"
],
"audit": "Run the below command and verify that the default network\nbridge has been configured to\nrestrict inter-container communication.\ndocker\nnetwork ls --quiet | xargs docker network inspect --format '{{ .Name\n}}: {{\n.Options }}'\nIt should return com.docker.network.bridge.enable_icc:false for\nthe default network\nbridge.\n",
"fix": "Run the docker in daemon mode and pass --icc=false as an\nargument.\nFor Example,\ndockerd --icc=false\nAlternatively, you can follow the\nDocker documentation and create a custom network and\nonly join containers that\nneed to communicate to that custom network. The --icc\nparameter only applies\nto the default docker bridge, if custom networks are used then the\napproach of\nsegmenting networks should be adopted instead.\n",
"Default Value": "By default, all inter-container communication is\nallowed on the default network bridge.\n"
},
"code": "control \"M-2.1\" do\n title \"2.1 Ensure network traffic is restricted between containers on\nthe\\ndefault bridge (Scored)\"\n desc \"\n By default, all network traffic is allowed between containers on the same\nhost on the\n default network bridge. If not desired, restrict all the inter-container\ncommunication. Link\n specific containers together that require communication. Alternatively, you\ncan create\n custom network and only join containers that need to communicate to that\ncustom\n network.\n By default, unrestricted network traffic is enabled between all containers\non the same host\n on the default network bridge. Thus, each container has the potential of\nreading all packets\n across the container network on the same host. This might lead to an\nunintended and\n unwanted disclosure of information to other containers. Hence, restrict the\ninter-container\n communication on the default network bridge.\n\n \"\n impact 0.5\n tag \"ref\": \"1. https://docs.docker.com/engine/userguide/networking/\\n2.\nhttps://docs.docker.com/engine/userguide/networking/default_network/containe\\nr-communication/#communication-between-containers\\n\\n2.2\nEnsure the logging level is set to 'info' (Scored)\\nProfile Applicability:\\n\nLevel 1 - Docker\\nDescription:\\nSet Docker daemon log level to\ninfo.\\nRationale:\\nSetting up an appropriate log level, configures the Docker\ndaemon to log events that you\\nwould want to review later. A base log level of\ninfo and above would capture all logs\\nexcept debug logs. Until and unless\nrequired, you should not run Docker daemon at debug\\nlog level.\\nAudit:\\nps -ef\n| grep docker\\nEnsure that either the --log-level parameter is not present or\nif present, then it is set to\\ninfo.\\nRemediation:\\nRun the Docker daemon as\nbelow:\\ndockerd --log-level=\\\"info\\\"\\nImpact:\\nNone.\\nDefault Value:\\nBy\ndefault, Docker daemon is set to log level of info.\\nReferences:\\n1.\nhttps://docs.docker.com/edge/engine/reference/commandline/dockerd/\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"2.1\"\n tag \"cis_control\": \"6.2 Ensure Audit Log Settings Support Appropriate Log\nEntry Formatting\\n\"\n tag \"cis_level\": \"Level 1 - Docker\"\n tag \"nist\": [\"AU-3\"]\n tag \"audit\": \"Run the below command and verify that the default network\nbridge has been configured to\\nrestrict inter-container communication.\\ndocker\nnetwork ls --quiet | xargs docker network inspect --format '{{ .Name\\n}}: {{\n.Options }}'\\nIt should return com.docker.network.bridge.enable_icc:false for\nthe default network\\nbridge.\\n\"\n tag \"fix\": \"Run the docker in daemon mode and pass --icc=false as an\nargument.\\nFor Example,\\ndockerd --icc=false\\nAlternatively, you can follow the\nDocker documentation and create a custom network and\\nonly join containers that\nneed to communicate to that custom network. The --icc\\nparameter only applies\nto the default docker bridge, if custom networks are used then the\\napproach of\nsegmenting networks should be adopted instead.\\n\"\n tag \"Default Value\": \"By default, all inter-container communication is\nallowed on the default network bridge.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-2.1.rb",
"line": 1
},
"id": "M-2.1"
},
{
"title": "2.10 Ensure base device size is not changed until needed (Scored)",
"desc": "In certain circumstances, you might need containers bigger than 10G in\nsize. In these cases,\n carefully choose the base device size.\n The base device size can be increased at daemon restart. Increasing the\nbase device size\n allows all future images and containers to be of the new base device size.\nA user can use\n this option to expand the base device size however shrinking is not\npermitted. This value\n affects the system-wide “base” empty filesystem that may already be\ninitialized and\n inherited by pulled images.\n Though the file system does not allot the increased size if it is empty, it\nwill use more space\n for the empty case depending upon the device size. This may cause a denial\nof service by\n ending up in file system being over-allocated or full.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://docs.docker.com/engine/reference/commandline/dockerd/#storagedriver-options\n",
"severity": "medium",
"cis_id": "2.10",
"cis_control": "18 Application Software Security\n",
"cis_level": "Level 2 - Docker",
"nist": [
"SI-1"
],
"audit": "ps -ef | grep dockerd\nExecute the above command and it should\nnot show any --storage-opt dm.basesize\nparameters.\n",
"fix": "Do not set --storage-opt dm.basesize until needed.\n",
"Default Value": "The default base device size is 10G.\n"
},
"code": "control \"M-2.10\" do\n title \"2.10 Ensure base device size is not changed until needed (Scored)\"\n desc \"\n In certain circumstances, you might need containers bigger than 10G in\nsize. In these cases,\n carefully choose the base device size.\n The base device size can be increased at daemon restart. Increasing the\nbase device size\n allows all future images and containers to be of the new base device size.\nA user can use\n this option to expand the base device size however shrinking is not\npermitted. This value\n affects the system-wide “base” empty filesystem that may already be\ninitialized and\n inherited by pulled images.\n Though the file system does not allot the increased size if it is empty, it\nwill use more space\n for the empty case depending upon the device size. This may cause a denial\nof service by\n ending up in file system being over-allocated or full.\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttps://docs.docker.com/engine/reference/commandline/dockerd/#storagedriver-options\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"2.10\"\n tag \"cis_control\": \"18 Application Software Security\\n\"\n tag \"cis_level\": \"Level 2 - Docker\"\n tag \"nist\": [\"SI-1\"]\n tag \"audit\": \"ps -ef | grep dockerd\\nExecute the above command and it should\nnot show any --storage-opt dm.basesize\\nparameters.\\n\"\n tag \"fix\": \"Do not set --storage-opt dm.basesize until needed.\\n\"\n tag \"Default Value\": \"The default base device size is 10G.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-2.10.rb",
"line": 1
},
"id": "M-2.10"
},
{
"title": "2.11 Ensure that authorization for Docker client commands is\nenabled(Scored)",
"desc": "Use native Docker authorization plugins or a third party authorization\nmechanism with\n Docker daemon to manage access to Docker client commands.\n Docker’s out-of-the-box authorization model is all or nothing. Any user\nwith permission to\n access the Docker daemon can run any Docker client command. The same is\ntrue for callers\n using Docker’s remote API to contact the daemon. If you require greater\naccess control, you\n can create authorization plugins and add them to your Docker daemon\nconfiguration. Using\n an authorization plugin, a Docker administrator can configure granular\naccess policies for\n managing access to Docker daemon.\n Third party integrations of Docker may implement their own authorization\nmodels to\n require authorization with the Docker daemon outside of docker's native\nauthorization\n plugin (i.e. Kubernetes, Cloud Foundry, Openshift).",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://docs.docker.com/engine/reference/commandline/dockerd/#accessauthorization\n2.\nhttps://docs.docker.com/engine/extend/plugins_authorization/\n3.\nhttps://github.com/twistlock/authz\nNotes:\nAs a scored control, focus should\nbe on a PASS/FAIL if the authentication occurs when a\ndocker client command is\nexecuted against docker daemon to enforce authentication. The\nnative docker\nauthentication plugin is just one method to enforce this control.\n",
"severity": "medium",
"cis_id": "2.11",
"cis_control": "16 Account Monitoring and Control\n",
"cis_level": "Level 2 - Docker",
"nist": [
"AC-2"
],
"audit": "ps -ef | grep dockerd\nEnsure that the --authorization-plugin\nparameter is set as appropriate if using docker\nnative authorization.\ndocker\nsearch hello-world\nEnsure that docker daemon requires authorization to perform\nthe above command.\n",
"fix": "Step 1: Install/Create an authorization plugin.\nStep 2:\nConfigure the authorization policy as desired.\nStep 3: Start the docker daemon\nas below:\ndockerd --authorization-plugin=<PLUGIN_ID>\n",
"Default Value": "By default, authorization plugins are not set up.\n"
},
"code": "control \"M-2.11\" do\n title \"2.11 Ensure that authorization for Docker client commands is\nenabled(Scored)\"\n desc \"\n Use native Docker authorization plugins or a third party authorization\nmechanism with\n Docker daemon to manage access to Docker client commands.\n Docker’s out-of-the-box authorization model is all or nothing. Any user\nwith permission to\n access the Docker daemon can run any Docker client command. The same is\ntrue for callers\n using Docker’s remote API to contact the daemon. If you require greater\naccess control, you\n can create authorization plugins and add them to your Docker daemon\nconfiguration. Using\n an authorization plugin, a Docker administrator can configure granular\naccess policies for\n managing access to Docker daemon.\n Third party integrations of Docker may implement their own authorization\nmodels to\n require authorization with the Docker daemon outside of docker's native\nauthorization\n plugin (i.e. Kubernetes, Cloud Foundry, Openshift).\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttps://docs.docker.com/engine/reference/commandline/dockerd/#accessauthorization\\n2.\nhttps://docs.docker.com/engine/extend/plugins_authorization/\\n3.\nhttps://github.com/twistlock/authz\\nNotes:\\nAs a scored control, focus should\nbe on a PASS/FAIL if the authentication occurs when a\\ndocker client command is\nexecuted against docker daemon to enforce authentication. The\\nnative docker\nauthentication plugin is just one method to enforce this control.\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"2.11\"\n tag \"cis_control\": \"16 Account Monitoring and Control\\n\"\n tag \"cis_level\": \"Level 2 - Docker\"\n tag \"nist\": [\"AC-2\"]\n tag \"audit\": \"ps -ef | grep dockerd\\nEnsure that the --authorization-plugin\nparameter is set as appropriate if using docker\\nnative authorization.\\ndocker\nsearch hello-world\\nEnsure that docker daemon requires authorization to perform\nthe above command.\\n\"\n tag \"fix\": \"Step 1: Install/Create an authorization plugin.\\nStep 2:\nConfigure the authorization policy as desired.\\nStep 3: Start the docker daemon\nas below:\\ndockerd --authorization-plugin=<PLUGIN_ID>\\n\"\n tag \"Default Value\": \"By default, authorization plugins are not set up.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-2.11.rb",
"line": 1
},
"id": "M-2.11"
},
{
"title": "2.12 Ensure centralized and remote logging is configured (Scored)",
"desc": "Docker now supports various log drivers. A preferable way to store logs is\nthe one that\n supports centralized and remote logging.\n Centralized and remote logging ensures that all important log records are\nsafe despite\n catastrophic events. Docker now supports various such logging drivers. Use\nthe one that\n suits your environment the best.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1. https://docs.docker.com/engine/admin/logging/overview/\n",
"severity": "medium",
"cis_id": "2.12",
"cis_control": "6.6 Deploy A SIEM OR Log Analysis Tools For Aggregation\nAnd Correlation/Analysis\n",
"cis_level": "Level 2 - Docker",
"nist": [
"SI-4 (2)"
],
"audit": "Run docker info and ensure that the Logging Driverproperty set\nas appropriate.\ndocker info --format '{{ .LoggingDriver }}'\nAlternatively,\nthe below command would give you the --log-driver setting, if\nconfigured.\nEnsure that it is set as appropriate.\nps -ef | grep dockerd\n",
"fix": "Step 1: Setup the desired log driver by following its\ndocumentation.\nStep 2: Start the docker daemon with that logging driver.\nFor\nexample,\ndockerd --log-driver=syslog --log-opt\nsyslog-address=tcp://192.xxx.xxx.xxx\n",
"Default Value": "By default, container logs are maintained as json\nfiles\n"
},
"code": "control \"M-2.12\" do\n title \"2.12 Ensure centralized and remote logging is configured (Scored)\"\n desc \"\n Docker now supports various log drivers. A preferable way to store logs is\nthe one that\n supports centralized and remote logging.\n Centralized and remote logging ensures that all important log records are\nsafe despite\n catastrophic events. Docker now supports various such logging drivers. Use\nthe one that\n suits your environment the best.\n\n \"\n impact 0.5\n tag \"ref\": \"1. https://docs.docker.com/engine/admin/logging/overview/\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"2.12\"\n tag \"cis_control\": \"6.6 Deploy A SIEM OR Log Analysis Tools For Aggregation\nAnd Correlation/Analysis\\n\"\n tag \"cis_level\": \"Level 2 - Docker\"\n tag \"nist\": [\"SI-4 (2)\"]\n tag \"audit\": \"Run docker info and ensure that the Logging Driverproperty set\nas appropriate.\\ndocker info --format '{{ .LoggingDriver }}'\\nAlternatively,\nthe below command would give you the --log-driver setting, if\nconfigured.\\nEnsure that it is set as appropriate.\\nps -ef | grep dockerd\\n\"\n tag \"fix\": \"Step 1: Setup the desired log driver by following its\ndocumentation.\\nStep 2: Start the docker daemon with that logging driver.\\nFor\nexample,\\ndockerd --log-driver=syslog --log-opt\nsyslog-address=tcp://192.xxx.xxx.xxx\\n\"\n tag \"Default Value\": \"By default, container logs are maintained as json\nfiles\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-2.12.rb",
"line": 1
},
"id": "M-2.12"
},
{
"title": "2.13 Ensure operations on legacy registry (v1) are Disabled (Scored)",
"desc": "The latest Docker registry is v2. All operations on the legacy registry\nversion (v1) should be\n restricted.\n Docker registry v2 brings in many performance and security improvements\nover v1. It\n supports container image provenance and other security features such as\nimage signing\n and verification. Hence, operations on Docker legacy registry should be\nrestricted.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://docs.docker.com/edge/engine/reference/commandline/dockerd/#legacyregistries\n2.\nhttps://docs.docker.com/registry/spec/api/\n3.\nhttps://the.binbashtheory.com/creating-private-docker-registry-2-0-with-tokenauthentication-service/\n4.\nhttps://blog.docker.com/2015/07/new-tool-v1-registry-docker-trusted-registryv2-open-source/\n5.\nhttp://www.slideshare.net/Docker/docker-registry-v2\n",
"severity": "medium",
"cis_id": "2.13",
"cis_control": "18 Application Software Security\n",
"cis_level": "Level 1 - Docker",
"nist": [
"SI-1"
],
"audit": "ps -ef | grep dockerd\nThe above command should list\n--disable-legacy-registry as an option passed to the\ndocker daemon.\n",
"fix": "Start the docker daemon as below:\ndockerd\n--disable-legacy-registry\n",
"Default Value": "By default, legacy registry operations are allowed.\n"
},
"code": "control \"M-2.13\" do\n title \"2.13 Ensure operations on legacy registry (v1) are Disabled (Scored)\"\n desc \"\n The latest Docker registry is v2. All operations on the legacy registry\nversion (v1) should be\n restricted.\n Docker registry v2 brings in many performance and security improvements\nover v1. It\n supports container image provenance and other security features such as\nimage signing\n and verification. Hence, operations on Docker legacy registry should be\nrestricted.\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttps://docs.docker.com/edge/engine/reference/commandline/dockerd/#legacyregistries\\n2.\nhttps://docs.docker.com/registry/spec/api/\\n3.\nhttps://the.binbashtheory.com/creating-private-docker-registry-2-0-with-tokenauthentication-service/\\n4.\nhttps://blog.docker.com/2015/07/new-tool-v1-registry-docker-trusted-registryv2-open-source/\\n5.\nhttp://www.slideshare.net/Docker/docker-registry-v2\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"2.13\"\n tag \"cis_control\": \"18 Application Software Security\\n\"\n tag \"cis_level\": \"Level 1 - Docker\"\n tag \"nist\": [\"SI-1\"]\n tag \"audit\": \"ps -ef | grep dockerd\\nThe above command should list\n--disable-legacy-registry as an option passed to the\\ndocker daemon.\\n\"\n tag \"fix\": \"Start the docker daemon as below:\\ndockerd\n--disable-legacy-registry\\n\"\n tag \"Default Value\": \"By default, legacy registry operations are allowed.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-2.13.rb",
"line": 1
},
"id": "M-2.13"
},
{
"title": "2.14 Ensure live restore is Enabled (Scored)",
"desc": "The --live-restore enables full support of daemon-less containers in\ndocker. It ensures\n that docker does not stop containers on shutdown or restore and properly\nreconnects to\n the container when restarted.\n One of the important security triads is availability. Setting\n--live-restore flag in the\n docker daemon ensures that container execution is not interrupted when the\ndocker\n daemon is not available. This also means that it is now easier to update\nand patch the\n docker daemon without execution downtime.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1. https://docs.docker.com/engine/admin/live-restore/\n",
"severity": "medium",
"cis_id": "2.14",
"cis_control": "18 Application Software Security\n",
"cis_level": "Level 1 - Docker",
"nist": [
"SI-1"
],
"audit": "Run docker info and ensure that the Live Restore Enabled\nproperty is set to true.\ndocker info --format '{{ .LiveRestoreEnabled\n}}'\nAlternatively run the below command and ensure that --live-restore is\nused.\nps -ef | grep dockerd\n",
"fix": "Run the docker in daemon mode and pass --live-restore as an\nargument.\nFor Example,\ndockerd --live-restore\n",
"Default Value": "By default, --live-restore is not enabled.\n"
},
"code": "control \"M-2.14\" do\n title \"2.14 Ensure live restore is Enabled (Scored)\"\n desc \"\n The --live-restore enables full support of daemon-less containers in\ndocker. It ensures\n that docker does not stop containers on shutdown or restore and properly\nreconnects to\n the container when restarted.\n One of the important security triads is availability. Setting\n--live-restore flag in the\n docker daemon ensures that container execution is not interrupted when the\ndocker\n daemon is not available. This also means that it is now easier to update\nand patch the\n docker daemon without execution downtime.\n\n \"\n impact 0.5\n tag \"ref\": \"1. https://docs.docker.com/engine/admin/live-restore/\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"2.14\"\n tag \"cis_control\": \"18 Application Software Security\\n\"\n tag \"cis_level\": \"Level 1 - Docker\"\n tag \"nist\": [\"SI-1\"]\n tag \"audit\": \"Run docker info and ensure that the Live Restore Enabled\nproperty is set to true.\\ndocker info --format '{{ .LiveRestoreEnabled\n}}'\\nAlternatively run the below command and ensure that --live-restore is\nused.\\nps -ef | grep dockerd\\n\"\n tag \"fix\": \"Run the docker in daemon mode and pass --live-restore as an\nargument.\\nFor Example,\\ndockerd --live-restore\\n\"\n tag \"Default Value\": \"By default, --live-restore is not enabled.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-2.14.rb",
"line": 1
},
"id": "M-2.14"
},
{
"title": "2.15 Ensure Userland Proxy is Disabled (Scored)",
"desc": "The docker daemon starts a userland proxy service for port forwarding\nwhenever a port is\n exposed. Where hairpin NAT is available, this service is generally\nsuperfluous to\n requirements and can be disabled.\n Docker engine provides two mechanisms for forwarding ports from the host to\ncontainers,\n hairpin NAT, and a userland proxy. In most circumstances, the hairpin NAT\nmode is\n preferred as it improves performance and makes use of native Linux iptables\nfunctionality\n instead of an additional component.\n Where hairpin NAT is available, the userland proxy should be disabled on\nstartup to reduce\n the attack surface of the installation.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\n2.\n3.\n4.\nhttp://windsock.io/the-docker-proxy/\nhttps://github.com/docker/docker/issues/14856\nhttps://github.com/docker/docker/issues/22741\nhttps://docs.docker.com/engine/userguide/networking/default_network/binding/\n",
"severity": "medium",
"cis_id": "2.15",
"cis_control": "9.1 Limit Open Ports, Protocols, and Services\n",
"cis_level": "Level 1 - Docker",
"nist": [
"CM-7 (1)"
],
"audit": "ps -ef | grep dockerd\nEnsure that the --userland-proxy\nparameter is set to false.\n",
"fix": "Run the Docker daemon as below:\ndockerd --userland-proxy=false\n",
"Default Value": "By default, the userland proxy is enabled.\n"
},
"code": "control \"M-2.15\" do\n title \"2.15 Ensure Userland Proxy is Disabled (Scored)\"\n desc \"\n The docker daemon starts a userland proxy service for port forwarding\nwhenever a port is\n exposed. Where hairpin NAT is available, this service is generally\nsuperfluous to\n requirements and can be disabled.\n Docker engine provides two mechanisms for forwarding ports from the host to\ncontainers,\n hairpin NAT, and a userland proxy. In most circumstances, the hairpin NAT\nmode is\n preferred as it improves performance and makes use of native Linux iptables\nfunctionality\n instead of an additional component.\n Where hairpin NAT is available, the userland proxy should be disabled on\nstartup to reduce\n the attack surface of the installation.\n\n \"\n impact 0.5\n tag \"ref\":\n\"1.\\n2.\\n3.\\n4.\\nhttp://windsock.io/the-docker-proxy/\\nhttps://github.com/docker/docker/issues/14856\\nhttps://github.com/docker/docker/issues/22741\\nhttps://docs.docker.com/engine/userguide/networking/default_network/binding/\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"2.15\"\n tag \"cis_control\": \"9.1 Limit Open Ports, Protocols, and Services\\n\"\n tag \"cis_level\": \"Level 1 - Docker\"\n tag \"nist\": [\"CM-7 (1)\"]\n tag \"audit\": \"ps -ef | grep dockerd\\nEnsure that the --userland-proxy\nparameter is set to false.\\n\"\n tag \"fix\": \"Run the Docker daemon as below:\\ndockerd --userland-proxy=false\\n\"\n tag \"Default Value\": \"By default, the userland proxy is enabled.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-2.15.rb",
"line": 1
},
"id": "M-2.15"
},
{
"title": "2.16 Ensure daemon-wide custom seccomp profile is applied, if\nneeded(Not Scored)",
"desc": "You can choose to apply your custom seccomp profile at the daemon-wide\nlevel if needed\n and override Docker's default seccomp profile.\n A large number of system calls are exposed to every userland process with\nmany of them\n going unused for the entire lifetime of the process. Most of the\napplications do not need all\n the system calls and thus benefit by having a reduced set of available\nsystem calls. The\n reduced set of system calls reduces the total kernel surface exposed to the\napplication and\n thus improvises application security.\n You could apply your own custom seccomp profile instead of Docker's default\nseccomp\n profile. Alternatively, if Docker's default profile is good for your\nenvironment, you can\n choose to ignore this recommendation.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1. https://docs.docker.com/engine/security/seccomp/\n2.\nhttps://github.com/docker/docker/pull/26276\n",
"severity": "medium",
"cis_id": "2.16",
"cis_control": "18 Application Software Security\n",
"cis_level": "Level 2 - Docker",
"nist": [
"SI-1"
],
"audit": "Run the below command and review the seccomp profile listed in\nthe Security Options\nsection. If it is default, that means, Docker's default\nseccomp profile is applied.\ndocker info --format '{{ .SecurityOptions }}'\n",
"fix": "By default, Docker's default seccomp profile is applied. If this\nis good for your environment,\nno action is necessary. Alternatively, if you\nchoose to apply your own seccomp profile, use\nthe --seccomp-profile flag at\ndaemon start or put it in the daemon runtime parameters\nfile.\ndockerd\n--seccomp-profile </path/to/seccomp/profile>\n",
"Default Value": "By default, Docker applies a seccomp profile.\n"
},
"code": "control \"M-2.16\" do\n title \"2.16 Ensure daemon-wide custom seccomp profile is applied, if\nneeded(Not Scored)\"\n desc \"\n You can choose to apply your custom seccomp profile at the daemon-wide\nlevel if needed\n and override Docker's default seccomp profile.\n A large number of system calls are exposed to every userland process with\nmany of them\n going unused for the entire lifetime of the process. Most of the\napplications do not need all\n the system calls and thus benefit by having a reduced set of available\nsystem calls. The\n reduced set of system calls reduces the total kernel surface exposed to the\napplication and\n thus improvises application security.\n You could apply your own custom seccomp profile instead of Docker's default\nseccomp\n profile. Alternatively, if Docker's default profile is good for your\nenvironment, you can\n choose to ignore this recommendation.\n\n \"\n impact 0.5\n tag \"ref\": \"1. https://docs.docker.com/engine/security/seccomp/\\n2.\nhttps://github.com/docker/docker/pull/26276\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"2.16\"\n tag \"cis_control\": \"18 Application Software Security\\n\"\n tag \"cis_level\": \"Level 2 - Docker\"\n tag \"nist\": [\"SI-1\"]\n tag \"audit\": \"Run the below command and review the seccomp profile listed in\nthe Security Options\\nsection. If it is default, that means, Docker's default\nseccomp profile is applied.\\ndocker info --format '{{ .SecurityOptions }}'\\n\"\n tag \"fix\": \"By default, Docker's default seccomp profile is applied. If this\nis good for your environment,\\nno action is necessary. Alternatively, if you\nchoose to apply your own seccomp profile, use\\nthe --seccomp-profile flag at\ndaemon start or put it in the daemon runtime parameters\\nfile.\\ndockerd\n--seccomp-profile </path/to/seccomp/profile>\\n\"\n tag \"Default Value\": \"By default, Docker applies a seccomp profile.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-2.16.rb",
"line": 1
},
"id": "M-2.16"
},
{
"title": "2.17 Ensure experimental features are avoided in production (Scored)",
"desc": "Avoid experimental features in production.\n Experimental is now a runtime docker daemon flag instead of a separate\nbuild. Passing -experimental as a runtime flag to the docker daemon, activates\nexperimental features.\n Experimental is now considered a stable release, but with a couple of\nfeatures which might\n not have tested and guaranteed API stability.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://docs.docker.com/edge/engine/reference/commandline/dockerd/#options\n",
"severity": "medium",
"cis_id": "2.17",
"cis_control": "18 Application Software Security\n",
"cis_level": "Level 1 - Docker",
"nist": [
"SI-1"
],
"audit": "Run the below command and ensure that the Experimental property\nis set to false in the\nServer section.\ndocker version --format '{{\n.Server.Experimental }}'\n",
"fix": "Do not pass --experimental as a runtime parameter to the docker\ndaemon.\n",
"Default Value": "By default, experimental features are not activated on\nthe docker daemon.\n"
},
"code": "control \"M-2.17\" do\n title \"2.17 Ensure experimental features are avoided in production (Scored)\"\n desc \"\n Avoid experimental features in production.\n Experimental is now a runtime docker daemon flag instead of a separate\nbuild. Passing -experimental as a runtime flag to the docker daemon, activates\nexperimental features.\n Experimental is now considered a stable release, but with a couple of\nfeatures which might\n not have tested and guaranteed API stability.\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttps://docs.docker.com/edge/engine/reference/commandline/dockerd/#options\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"2.17\"\n tag \"cis_control\": \"18 Application Software Security\\n\"\n tag \"cis_level\": \"Level 1 - Docker\"\n tag \"nist\": [\"SI-1\"]\n tag \"audit\": \"Run the below command and ensure that the Experimental property\nis set to false in the\\nServer section.\\ndocker version --format '{{\n.Server.Experimental }}'\\n\"\n tag \"fix\": \"Do not pass --experimental as a runtime parameter to the docker\ndaemon.\\n\"\n tag \"Default Value\": \"By default, experimental features are not activated on\nthe docker daemon.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-2.17.rb",
"line": 1
},
"id": "M-2.17"
},
{
"title": "2.18 Ensure containers are restricted from acquiring new\nprivileges(Scored)",
"desc": "Restrict containers from acquiring additional privileges via suid or sgid\nbits, by default.\n A process can set the no_new_priv bit in the kernel. It persists across\nfork, clone and\n execve. The no_new_priv bit ensures that the process or its children\nprocesses do not gain\n any additional privileges via suid or sgid bits. This way a lot of\ndangerous operations\n become a lot less dangerous because there is no possibility of subverting\nprivileged\n binaries.\n Setting this at the daemon level ensures that by default all new containers\nare restricted\n from acquiring new privileges.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1. https://github.com/moby/moby/pull/29984\n2.\nhttps://github.com/moby/moby/pull/20727\n",
"severity": "medium",
"cis_id": "2.18",
"cis_control": "5 Controlled Use of Administration Privileges\n",
"cis_level": "Level 1 - Docker",
"nist": [
"AC-6"
],
"audit": "ps -ef | grep dockerd\nEnsure that the --no-new-privileges\nparameter is present and is not set to false.\n",
"fix": "Run the Docker daemon as below:\ndockerd --no-new-privileges\n",
"Default Value": "By default, containers are not restricted from\nacquiring new privileges.\n"
},
"code": "control \"M-2.18\" do\n title \"2.18 Ensure containers are restricted from acquiring new\nprivileges(Scored)\"\n desc \"\n Restrict containers from acquiring additional privileges via suid or sgid\nbits, by default.\n A process can set the no_new_priv bit in the kernel. It persists across\nfork, clone and\n execve. The no_new_priv bit ensures that the process or its children\nprocesses do not gain\n any additional privileges via suid or sgid bits. This way a lot of\ndangerous operations\n become a lot less dangerous because there is no possibility of subverting\nprivileged\n binaries.\n Setting this at the daemon level ensures that by default all new containers\nare restricted\n from acquiring new privileges.\n\n \"\n impact 0.5\n tag \"ref\": \"1. https://github.com/moby/moby/pull/29984\\n2.\nhttps://github.com/moby/moby/pull/20727\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"2.18\"\n tag \"cis_control\": \"5 Controlled Use of Administration Privileges\\n\"\n tag \"cis_level\": \"Level 1 - Docker\"\n tag \"nist\": [\"AC-6\"]\n tag \"audit\": \"ps -ef | grep dockerd\\nEnsure that the --no-new-privileges\nparameter is present and is not set to false.\\n\"\n tag \"fix\": \"Run the Docker daemon as below:\\ndockerd --no-new-privileges\\n\"\n tag \"Default Value\": \"By default, containers are not restricted from\nacquiring new privileges.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-2.18.rb",
"line": 1
},
"id": "M-2.18"
},
{
"title": "2.3 Ensure Docker is allowed to make changes to iptables (Scored)",
"desc": "Iptables are used to set up, maintain, and inspect the tables of IP packet\nfilter rules in the\n Linux kernel. Allow the Docker daemon to make changes to the iptables.\n Docker will never make changes to your system iptables rules if you choose\nto do so.\n Docker server would automatically make the needed changes to iptables based\non how you\n choose your networking options for the containers if it is allowed to do\nso. It is\n recommended to let Docker server make changes to iptablesautomatically to\navoid\n networking misconfiguration that might hamper the communication between\ncontainers\n and to the outside world. Additionally, it would save you hassles of\nupdating\n iptablesevery time you choose to run the containers or modify networking\noptions.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://docs.docker.com/engine/userguide/networking/default_network/containe\nr-communication/\n2.\nhttps://fralef.me/docker-and-iptables.html\n",
"severity": "medium",
"cis_id": "2.3",
"cis_control": "5 Controlled Use of Administration Privileges\n",
"cis_level": "Level 1 - Docker",
"nist": [
"AC-6"
],
"audit": "ps -ef | grep dockerd\nEnsure that the --iptables parameter is\neither not present or not set to false.\n",
"fix": "Do not run the Docker daemon with --iptables=false parameter. For\nexample, do not\nstart the Docker daemon as below:\ndockerd --iptables=false\n",
"Default Value": "By default, iptables is set to true.\n"
},
"code": "control \"M-2.3\" do\n title \"2.3 Ensure Docker is allowed to make changes to iptables (Scored)\"\n desc \"\n Iptables are used to set up, maintain, and inspect the tables of IP packet\nfilter rules in the\n Linux kernel. Allow the Docker daemon to make changes to the iptables.\n Docker will never make changes to your system iptables rules if you choose\nto do so.\n Docker server would automatically make the needed changes to iptables based\non how you\n choose your networking options for the containers if it is allowed to do\nso. It is\n recommended to let Docker server make changes to iptablesautomatically to\navoid\n networking misconfiguration that might hamper the communication between\ncontainers\n and to the outside world. Additionally, it would save you hassles of\nupdating\n iptablesevery time you choose to run the containers or modify networking\noptions.\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttps://docs.docker.com/engine/userguide/networking/default_network/containe\\nr-communication/\\n2.\nhttps://fralef.me/docker-and-iptables.html\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"2.3\"\n tag \"cis_control\": \"5 Controlled Use of Administration Privileges\\n\"\n tag \"cis_level\": \"Level 1 - Docker\"\n tag \"nist\": [\"AC-6\"]\n tag \"audit\": \"ps -ef | grep dockerd\\nEnsure that the --iptables parameter is\neither not present or not set to false.\\n\"\n tag \"fix\": \"Do not run the Docker daemon with --iptables=false parameter. For\nexample, do not\\nstart the Docker daemon as below:\\ndockerd --iptables=false\\n\"\n tag \"Default Value\": \"By default, iptables is set to true.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-2.3.rb",
"line": 1
},
"id": "M-2.3"
},
{
"title": "2.4 Ensure insecure registries are not used (Scored)",
"desc": "Docker considers a private registry either secure or insecure. By default,\nregistries are\n considered secure.\n A secure registry uses TLS. A copy of registry's CA certificate is placed\non the Docker host at\n /etc/docker/certs.d/<registry-name>/ directory. An insecure registry is the\none not\n having either valid registry certificate or is not using TLS. You should\nnot be using any\n insecure registries in the production environment. Insecure registries can\nbe tampered\n with leading to possible compromise to your production system.\n Additionally, If a registry is marked as insecure then docker pull, docker\npush, and\n docker search commands will not result in an error message and the user\nmight be\n indefinitely working with insecure registries without ever being notified\nof potential\n danger.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1. https://docs.docker.com/registry/insecure/\n",
"severity": "medium",
"cis_id": "2.4",
"cis_control": "14.2 Encrypt All Sensitive Information Over Less-trusted\nNetworks\n",
"cis_level": "Level 1 - Docker",
"nist": [
"SC-8"
],
"audit": "Run docker info or execute the below command to find out if any\ninsecure registries are\nused:\nps -ef | grep dockerd\nEnsure that the\n--insecure-registry parameter is not present.\n",
"fix": "Do not use any insecure registries.\nFor example, do not start\nthe Docker daemon as below:\ndockerd --insecure-registry 10.1.0.0/16\n",
"Default Value": "By default, Docker assumes all, but local, registries\nare secure.\n"
},
"code": "control \"M-2.4\" do\n title \"2.4 Ensure insecure registries are not used (Scored)\"\n desc \"\n Docker considers a private registry either secure or insecure. By default,\nregistries are\n considered secure.\n A secure registry uses TLS. A copy of registry's CA certificate is placed\non the Docker host at\n /etc/docker/certs.d/<registry-name>/ directory. An insecure registry is the\none not\n having either valid registry certificate or is not using TLS. You should\nnot be using any\n insecure registries in the production environment. Insecure registries can\nbe tampered\n with leading to possible compromise to your production system.\n Additionally, If a registry is marked as insecure then docker pull, docker\npush, and\n docker search commands will not result in an error message and the user\nmight be\n indefinitely working with insecure registries without ever being notified\nof potential\n danger.\n\n \"\n impact 0.5\n tag \"ref\": \"1. https://docs.docker.com/registry/insecure/\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"2.4\"\n tag \"cis_control\": \"14.2 Encrypt All Sensitive Information Over Less-trusted\nNetworks\\n\"\n tag \"cis_level\": \"Level 1 - Docker\"\n tag \"nist\": [\"SC-8\"]\n tag \"audit\": \"Run docker info or execute the below command to find out if any\ninsecure registries are\\nused:\\nps -ef | grep dockerd\\nEnsure that the\n--insecure-registry parameter is not present.\\n\"\n tag \"fix\": \"Do not use any insecure registries.\\nFor example, do not start\nthe Docker daemon as below:\\ndockerd --insecure-registry 10.1.0.0/16\\n\"\n tag \"Default Value\": \"By default, Docker assumes all, but local, registries\nare secure.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-2.4.rb",
"line": 1
},
"id": "M-2.4"
},
{
"title": "2.5 Ensure aufs storage driver is not used (Scored)",
"desc": "Do not use aufs as storage driver for your Docker instance.\n The aufs storage driver is the oldest storage driver. It is based on a\nLinux kernel patch-set\n that is unlikely to be merged into the main Linux kernel. aufs driver is\nalso known to cause\n some serious kernel crashes. aufs just has legacy support from Docker. Most\nimportantly,\n aufs is not a supported driver in many Linux distributions using latest\nLinux kernels.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://docs.docker.com/engine/userguide/storagedriver/selectadriver/#support\ned-backing-filesystems\n2.\nhttp://muehe.org/posts/switching-docker-from-aufs-to-devicemapper/\n3.\nhttp://jpetazzo.github.io/assets/2015-03-05-deep-dive-into-docker-storagedrivers.html#1\n4.\nhttps://docs.docker.com/engine/userguide/storagedriver/\n",
"severity": "medium",
"cis_id": "2.5",
"cis_control": "18 Application Software Security\n",
"cis_level": "Level 1 - Docker",
"nist": [
"SI-1"
],
"audit": "Execute the below command and verify that aufs is not used as\nstorage driver:\ndocker info | grep -e \"^Storage Driver:\\s*aufs\\s*$\"\nThe\nabove command should not return anything.\n",
"fix": "Do not explicitly use aufs as storage driver.\nFor example, do\nnot start Docker daemon as below:\ndockerd --storage-driver aufs\n",
"Default Value": "By default, Docker uses devicemapper as the storage\ndriver on most of the platforms.\nDefault storage driver can vary based on your\nOS vendor. You should use the storage driver\nthat is best supported by your\npreferred vendor.\n"
},
"code": "control \"M-2.5\" do\n title \"2.5 Ensure aufs storage driver is not used (Scored)\"\n desc \"\n Do not use aufs as storage driver for your Docker instance.\n The aufs storage driver is the oldest storage driver. It is based on a\nLinux kernel patch-set\n that is unlikely to be merged into the main Linux kernel. aufs driver is\nalso known to cause\n some serious kernel crashes. aufs just has legacy support from Docker. Most\nimportantly,\n aufs is not a supported driver in many Linux distributions using latest\nLinux kernels.\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttps://docs.docker.com/engine/userguide/storagedriver/selectadriver/#support\\ned-backing-filesystems\\n2.\nhttp://muehe.org/posts/switching-docker-from-aufs-to-devicemapper/\\n3.\nhttp://jpetazzo.github.io/assets/2015-03-05-deep-dive-into-docker-storagedrivers.html#1\\n4.\nhttps://docs.docker.com/engine/userguide/storagedriver/\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"2.5\"\n tag \"cis_control\": \"18 Application Software Security\\n\"\n tag \"cis_level\": \"Level 1 - Docker\"\n tag \"nist\": [\"SI-1\"]\n tag \"audit\": \"Execute the below command and verify that aufs is not used as\nstorage driver:\\ndocker info | grep -e \\\"^Storage Driver:\\\\s*aufs\\\\s*$\\\"\\nThe\nabove command should not return anything.\\n\"\n tag \"fix\": \"Do not explicitly use aufs as storage driver.\\nFor example, do\nnot start Docker daemon as below:\\ndockerd --storage-driver aufs\\n\"\n tag \"Default Value\": \"By default, Docker uses devicemapper as the storage\ndriver on most of the platforms.\\nDefault storage driver can vary based on your\nOS vendor. You should use the storage driver\\nthat is best supported by your\npreferred vendor.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-2.5.rb",
"line": 1
},
"id": "M-2.5"
},
{
"title": "2.6 Ensure TLS authentication for Docker daemon is configured (Scored)",
"desc": "It is possible to make the Docker daemon to listen on a specific IP and\nport and any other\n Unix socket other than default Unix socket. Configure TLS authentication to\nrestrict access\n to Docker daemon via IP and port.\n By default, Docker daemon binds to a non-networked Unix socket and runs\nwith root\n privileges. If you change the default docker daemon binding to a TCP port\nor any other Unix\n socket, anyone with access to that port or socket can have full access to\nDocker daemon\n and in turn to the host system. Hence, you should not bind the Docker\ndaemon to another\n IP/port or a Unix socket.\n If you must expose the Docker daemon via a network socket, configure TLS\nauthentication\n for the daemon and Docker Swarm APIs (if using). This would restrict the\nconnections to\n your Docker daemon over the network to a limited number of clients who could\n successfully authenticate over TLS.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1. https://docs.docker.com/engine/security/https/\n",
"severity": "medium",
"cis_id": "2.6",
"cis_control": "9.1 Limit Open Ports, Protocols, and Services\n",
"cis_level": "Level 1 - Docker",
"nist": [
"CM-7 (1)"
],
"audit": "ps -ef | grep dockerd\nEnsure that the below parameters are\npresent:\n--tlsverify\n--tlscacert\n--tlscert\n--tlskey\n",
"fix": "Follow the steps mentioned in the Docker documentation or other\nreferences.\n",
"Default Value": "By default, TLS authentication is not configured.\n"
},
"code": "control \"M-2.6\" do\n title \"2.6 Ensure TLS authentication for Docker daemon is configured (Scored)\"\n desc \"\n It is possible to make the Docker daemon to listen on a specific IP and\nport and any other\n Unix socket other than default Unix socket. Configure TLS authentication to\nrestrict access\n to Docker daemon via IP and port.\n By default, Docker daemon binds to a non-networked Unix socket and runs\nwith root\n privileges. If you change the default docker daemon binding to a TCP port\nor any other Unix\n socket, anyone with access to that port or socket can have full access to\nDocker daemon\n and in turn to the host system. Hence, you should not bind the Docker\ndaemon to another\n IP/port or a Unix socket.\n If you must expose the Docker daemon via a network socket, configure TLS\nauthentication\n for the daemon and Docker Swarm APIs (if using). This would restrict the\nconnections to\n your Docker daemon over the network to a limited number of clients who could\n successfully authenticate over TLS.\n\n \"\n impact 0.5\n tag \"ref\": \"1. https://docs.docker.com/engine/security/https/\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"2.6\"\n tag \"cis_control\": \"9.1 Limit Open Ports, Protocols, and Services\\n\"\n tag \"cis_level\": \"Level 1 - Docker\"\n tag \"nist\": [\"CM-7 (1)\"]\n tag \"audit\": \"ps -ef | grep dockerd\\nEnsure that the below parameters are\npresent:\\n--tlsverify\\n--tlscacert\\n--tlscert\\n--tlskey\\n\"\n tag \"fix\": \"Follow the steps mentioned in the Docker documentation or other\nreferences.\\n\"\n tag \"Default Value\": \"By default, TLS authentication is not configured.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-2.6.rb",
"line": 1
},
"id": "M-2.6"
},
{
"title": "2.7 Ensure the default ulimit is configured appropriately (Not Scored)",
"desc": "Set the default ulimit options as appropriate in your environment.\n ulimit provides control over the resources available to the shell and to\nprocesses started\n by it. Setting system resource limits judiciously saves you from many\ndisasters such as a\n fork bomb. Sometimes, even friendly users and legitimate processes can\noveruse system\n resources and in-turn can make the system unusable.\n Setting default ulimit for the Docker daemon would enforce the ulimit for\nall container\n instances. You would not need to setup ulimit for each container instance.\nHowever, the\n default ulimit can be overridden during container runtime, if needed.\nHence, to control the\n system resources, define a default ulimit as needed in your environment.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://docs.docker.com/edge/engine/reference/commandline/dockerd/#defaultulimits\n",
"severity": "medium",
"cis_id": "2.7",
"cis_control": "18 Application Software Security\n",
"cis_level": "Level 1 - Docker",
"nist": [
"SI-1"
],
"audit": "ps -ef | grep dockerd\nEnsure that the --default-ulimit\nparameter is set as appropriate.\n",
"fix": "Run the docker in daemon mode and pass --default-ulimit as\nargument with respective\nulimits as appropriate in your environment.\nFor\nExample,\ndockerd --default-ulimit nproc=1024:2048 --default-ulimit\nnofile=100:200\n",
"Default Value": "By default, no ulimit is set.\n"
},
"code": "control \"M-2.7\" do\n title \"2.7 Ensure the default ulimit is configured appropriately (Not Scored)\"\n desc \"\n Set the default ulimit options as appropriate in your environment.\n ulimit provides control over the resources available to the shell and to\nprocesses started\n by it. Setting system resource limits judiciously saves you from many\ndisasters such as a\n fork bomb. Sometimes, even friendly users and legitimate processes can\noveruse system\n resources and in-turn can make the system unusable.\n Setting default ulimit for the Docker daemon would enforce the ulimit for\nall container\n instances. You would not need to setup ulimit for each container instance.\nHowever, the\n default ulimit can be overridden during container runtime, if needed.\nHence, to control the\n system resources, define a default ulimit as needed in your environment.\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttps://docs.docker.com/edge/engine/reference/commandline/dockerd/#defaultulimits\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"2.7\"\n tag \"cis_control\": \"18 Application Software Security\\n\"\n tag \"cis_level\": \"Level 1 - Docker\"\n tag \"nist\": [\"SI-1\"]\n tag \"audit\": \"ps -ef | grep dockerd\\nEnsure that the --default-ulimit\nparameter is set as appropriate.\\n\"\n tag \"fix\": \"Run the docker in daemon mode and pass --default-ulimit as\nargument with respective\\nulimits as appropriate in your environment.\\nFor\nExample,\\ndockerd --default-ulimit nproc=1024:2048 --default-ulimit\nnofile=100:200\\n\"\n tag \"Default Value\": \"By default, no ulimit is set.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-2.7.rb",
"line": 1
},
"id": "M-2.7"
},
{
"title": "2.8 Enable user namespace support (Scored)",
"desc": "Enable user namespace support in Docker daemon to utilize container user to\nhost user remapping. This recommendation is beneficial where containers you are\nusing do not have an\n explicit container user defined in the container image. If container images\nthat you are\n using have a pre-defined non-root user, this recommendation may be skipped\nsince this\n feature is still in its infancy and might give you unpredictable issues and\ncomplexities.\n The Linux kernel user namespace support in Docker daemon provides\nadditional security\n for the Docker host system. It allows a container to have a unique range of\nuser and group\n IDs which are outside the traditional user and group range utilized by the\nhost system.\n For example, the root user will have expected administrative privilege\ninside the container\n but can effectively be mapped to an unprivileged UID on the host system.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttp://man7.org/linux/man-pages/man7/user_namespaces.7.html\n2.\nhttps://docs.docker.com/engine/reference/commandline/dockerd/#daemon-usernamespace-options\n3.\nhttp://events.linuxfoundation.org/sites/events/files/slides/User%20Namespaces\n%20-%20ContainerCon%202015%20-%2016-9-final_0.pdf\n",
"severity": "medium",
"cis_id": "2.8",
"cis_control": "18 Application Software Security\n",
"cis_level": "Level 2 - Docker",
"nist": [
"SI-1"
],
"audit": "ps -p $(docker inspect --format='{{ .State.Pid }}' <CONTAINER\nID>) -o\npid,user\nThe above command would find the PID of the container and\nthen would list the host user\nassociated with the container process. If the\ncontainer process is running as root, then this\nrecommendation is\nnon-compliant.\nAlternatively, you can run docker info to ensure that the\nuserns is listed under Security\nOptions:\ndocker info --format '{{\n.SecurityOptions }}'\n",
"fix": "Please consult Docker documentation for various ways in which\nthis can be configured\ndepending upon your requirements. Your steps might also\nvary based on platform - For\nexample, on Red Hat, sub-UIDs and sub-GIDs\nmapping creation does not work\nautomatically. You might have to create your\nown mapping.\nHowever, the high-level steps are as below:\nStep 1: Ensure that\nthe files /etc/subuid and /etc/subgid exist.\ntouch /etc/subuid\n/etc/subgid\nStep 2: Start the docker daemon with --userns-remap flag\ndockerd\n--userns-remap=default\n",
"Default Value": "By default, user namespace is not remapped.\n"
},
"code": "control \"M-2.8\" do\n title \"2.8 Enable user namespace support (Scored)\"\n desc \"\n Enable user namespace support in Docker daemon to utilize container user to\nhost user remapping. This recommendation is beneficial where containers you are\nusing do not have an\n explicit container user defined in the container image. If container images\nthat you are\n using have a pre-defined non-root user, this recommendation may be skipped\nsince this\n feature is still in its infancy and might give you unpredictable issues and\ncomplexities.\n The Linux kernel user namespace support in Docker daemon provides\nadditional security\n for the Docker host system. It allows a container to have a unique range of\nuser and group\n IDs which are outside the traditional user and group range utilized by the\nhost system.\n For example, the root user will have expected administrative privilege\ninside the container\n but can effectively be mapped to an unprivileged UID on the host system.\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttp://man7.org/linux/man-pages/man7/user_namespaces.7.html\\n2.\nhttps://docs.docker.com/engine/reference/commandline/dockerd/#daemon-usernamespace-options\\n3.\nhttp://events.linuxfoundation.org/sites/events/files/slides/User%20Namespaces\\n%20-%20ContainerCon%202015%20-%2016-9-final_0.pdf\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"2.8\"\n tag \"cis_control\": \"18 Application Software Security\\n\"\n tag \"cis_level\": \"Level 2 - Docker\"\n tag \"nist\": [\"SI-1\"]\n tag \"audit\": \"ps -p $(docker inspect --format='{{ .State.Pid }}' <CONTAINER\nID>) -o\\npid,user\\nThe above command would find the PID of the container and\nthen would list the host user\\nassociated with the container process. If the\ncontainer process is running as root, then this\\nrecommendation is\nnon-compliant.\\nAlternatively, you can run docker info to ensure that the\nuserns is listed under Security\\nOptions:\\ndocker info --format '{{\n.SecurityOptions }}'\\n\"\n tag \"fix\": \"Please consult Docker documentation for various ways in which\nthis can be configured\\ndepending upon your requirements. Your steps might also\nvary based on platform - For\\nexample, on Red Hat, sub-UIDs and sub-GIDs\nmapping creation does not work\\nautomatically. You might have to create your\nown mapping.\\nHowever, the high-level steps are as below:\\nStep 1: Ensure that\nthe files /etc/subuid and /etc/subgid exist.\\ntouch /etc/subuid\n/etc/subgid\\nStep 2: Start the docker daemon with --userns-remap flag\\ndockerd\n--userns-remap=default\\n\"\n tag \"Default Value\": \"By default, user namespace is not remapped.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-2.8.rb",
"line": 1
},
"id": "M-2.8"
},
{
"title": "2.9 Ensure the default cgroup usage has been confirmed (Scored)",
"desc": "The --cgroup-parent option allows you to set the default cgroup parent to\nuse for all the\n containers. If there is no specific use case, this setting should be left\nat its default.\n System administrators typically define cgroups under which containers are\nsupposed to\n run. Even if cgroups are not explicitly defined by the system\nadministrators, containers run\n under docker cgroup by default.\n It is possible to attach to a different cgroup other than that is the\ndefault. This usage should\n be monitored and confirmed. By attaching to a different cgroup than the one\nthat is a\n default, it is possible to share resources unevenly and thus might starve\nthe host for\n resources.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://docs.docker.com/engine/reference/commandline/dockerd/#defaultcgroup-parent\n",
"severity": "medium",
"cis_id": "2.9",
"cis_control": "18 Application Software Security\n",
"cis_level": "Level 2 - Docker",
"nist": [
"SI-1"
],
"audit": "ps -ef | grep dockerd\nEnsure that the --cgroup-parent\nparameter is either not set or is set as appropriate nondefault cgroup.\n",
"fix": "The default setting is good enough and can be left as-is. If you\nwant to specifically set a nondefault cgroup, pass --cgroup-parent parameter to\nthe docker daemon when starting it.\nFor Example,\ndockerd\n--cgroup-parent=/foobar\n",
"Default Value": "By default, docker daemon uses /docker for fs cgroup\ndriver and system.slice for\nsystemd cgroup driver.\n"
},
"code": "control \"M-2.9\" do\n title \"2.9 Ensure the default cgroup usage has been confirmed (Scored)\"\n desc \"\n The --cgroup-parent option allows you to set the default cgroup parent to\nuse for all the\n containers. If there is no specific use case, this setting should be left\nat its default.\n System administrators typically define cgroups under which containers are\nsupposed to\n run. Even if cgroups are not explicitly defined by the system\nadministrators, containers run\n under docker cgroup by default.\n It is possible to attach to a different cgroup other than that is the\ndefault. This usage should\n be monitored and confirmed. By attaching to a different cgroup than the one\nthat is a\n default, it is possible to share resources unevenly and thus might starve\nthe host for\n resources.\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttps://docs.docker.com/engine/reference/commandline/dockerd/#defaultcgroup-parent\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"2.9\"\n tag \"cis_control\": \"18 Application Software Security\\n\"\n tag \"cis_level\": \"Level 2 - Docker\"\n tag \"nist\": [\"SI-1\"]\n tag \"audit\": \"ps -ef | grep dockerd\\nEnsure that the --cgroup-parent\nparameter is either not set or is set as appropriate nondefault cgroup.\\n\"\n tag \"fix\": \"The default setting is good enough and can be left as-is. If you\nwant to specifically set a nondefault cgroup, pass --cgroup-parent parameter to\nthe docker daemon when starting it.\\nFor Example,\\ndockerd\n--cgroup-parent=/foobar\\n\"\n tag \"Default Value\": \"By default, docker daemon uses /docker for fs cgroup\ndriver and system.slice for\\nsystemd cgroup driver.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-2.9.rb",
"line": 1
},
"id": "M-2.9"
},
{
"title": "3.1 Ensure that docker.service file ownership is set to root:root\n(Scored)",
"desc": "Verify that the docker.service file ownership and group-ownership are\ncorrectly set to\n root.\n docker.service file contains sensitive parameters that may alter the\nbehavior of Docker\n daemon. Hence, it should be owned and group-owned by root to maintain the\nintegrity of\n the file.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1. https://docs.docker.com/engine/admin/systemd/\n",
"severity": "medium",
"cis_id": "3.1",
"cis_control": "5.1 Minimize And Sparingly Use Administrative\nPrivileges\n",
"cis_level": "Level 1 - Docker",
"nist": [
"AC-6 (9)"
],
"audit": "Step 1: Find out the file location:\nsystemctl show -p\nFragmentPath docker.service\nStep 2: If the file does not exist, this\nrecommendation is not applicable. If the file exists,\nexecute the below\ncommand with the correct file path to verify that the file is owned\nand\ngroup-owned by root.\nFor example,\nstat -c %U:%G\n/usr/lib/systemd/system/docker.service | grep -v root:root\nThe above command\nshould not return anything.\n",
"fix": "Step 1: Find out the file location:\nsystemctl show -p\nFragmentPath docker.service\nStep 2: If the file does not exist, this\nrecommendation is not applicable. If the file exists,\nexecute the below\ncommand with the correct file path to set the ownership and group\nownership\nfor the file to root.\nFor example,\nchown root:root\n/usr/lib/systemd/system/docker.service\n",
"Default Value": "This file may not be present on the system. In that\ncase, this recommendation is not\napplicable. By default, if the file is\npresent, the ownership and group-ownership for this file\nis correctly set to\nroot.\n"
},
"code": "control \"M-3.1\" do\n title \"3.1 Ensure that docker.service file ownership is set to root:root\n(Scored)\"\n desc \"\n Verify that the docker.service file ownership and group-ownership are\ncorrectly set to\n root.\n docker.service file contains sensitive parameters that may alter the\nbehavior of Docker\n daemon. Hence, it should be owned and group-owned by root to maintain the\nintegrity of\n the file.\n\n \"\n impact 0.5\n tag \"ref\": \"1. https://docs.docker.com/engine/admin/systemd/\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"3.1\"\n tag \"cis_control\": \"5.1 Minimize And Sparingly Use Administrative\nPrivileges\\n\"\n tag \"cis_level\": \"Level 1 - Docker\"\n tag \"nist\": [\"AC-6 (9)\"]\n tag \"audit\": \"Step 1: Find out the file location:\\nsystemctl show -p\nFragmentPath docker.service\\nStep 2: If the file does not exist, this\nrecommendation is not applicable. If the file exists,\\nexecute the below\ncommand with the correct file path to verify that the file is owned\nand\\ngroup-owned by root.\\nFor example,\\nstat -c %U:%G\n/usr/lib/systemd/system/docker.service | grep -v root:root\\nThe above command\nshould not return anything.\\n\"\n tag \"fix\": \"Step 1: Find out the file location:\\nsystemctl show -p\nFragmentPath docker.service\\nStep 2: If the file does not exist, this\nrecommendation is not applicable. If the file exists,\\nexecute the below\ncommand with the correct file path to set the ownership and group\\nownership\nfor the file to root.\\nFor example,\\nchown root:root\n/usr/lib/systemd/system/docker.service\\n\"\n tag \"Default Value\": \"This file may not be present on the system. In that\ncase, this recommendation is not\\napplicable. By default, if the file is\npresent, the ownership and group-ownership for this file\\nis correctly set to\nroot.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-3.1.rb",
"line": 1
},
"id": "M-3.1"
},
{
"title": "3.10 Ensure that TLS CA certificate file permissions are set to 444\nor\nmore restrictive (Scored)",
"desc": "Verify that the TLS CA certificate file (the file that is passed alongwith\n--tlscacert\n parameter) has permissions of 444 or more restrictive.\n The TLS CA certificate file should be protected from any tampering. It is\nused to\n authenticate Docker server based on given CA certificate. Hence, it must\nhave permissions\n of 444 to maintain the integrity of the CA certificate.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1. https://docs.docker.com/registry/insecure/\n2.\nhttps://docs.docker.com/engine/security/https/\n",
"severity": "medium",
"cis_id": "3.10",
"cis_control": "14.4 Protect Information With Access Control Lists\n",
"cis_level": "Level 1 - Docker",
"nist": [
"AC-3 (3)"
],
"audit": "Execute the below command to verify that the TLS CA certificate\nfile has permissions of 444\nor more restrictive:\nstat -c %a <path to TLS CA\ncertificate file>\n",
"fix": "chmod 444 <path to TLS CA certificate file>\nThis would set the\nfile permissions of the TLS CA file to 444.\n",
"Default Value": "By default, the permissions for TLS CA certificate file\nmight not be 444. The default file\npermissions are governed by the system or\nuser specific umask values.\n"
},
"code": "control \"M-3.10\" do\n title \"3.10 Ensure that TLS CA certificate file permissions are set to 444\nor\\nmore restrictive (Scored)\"\n desc \"\n Verify that the TLS CA certificate file (the file that is passed alongwith\n--tlscacert\n parameter) has permissions of 444 or more restrictive.\n The TLS CA certificate file should be protected from any tampering. It is\nused to\n authenticate Docker server based on given CA certificate. Hence, it must\nhave permissions\n of 444 to maintain the integrity of the CA certificate.\n\n \"\n impact 0.5\n tag \"ref\": \"1. https://docs.docker.com/registry/insecure/\\n2.\nhttps://docs.docker.com/engine/security/https/\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"3.10\"\n tag \"cis_control\": \"14.4 Protect Information With Access Control Lists\\n\"\n tag \"cis_level\": \"Level 1 - Docker\"\n tag \"nist\": [\"AC-3 (3)\"]\n tag \"audit\": \"Execute the below command to verify that the TLS CA certificate\nfile has permissions of 444\\nor more restrictive:\\nstat -c %a <path to TLS CA\ncertificate file>\\n\"\n tag \"fix\": \"chmod 444 <path to TLS CA certificate file>\\nThis would set the\nfile permissions of the TLS CA file to 444.\\n\"\n tag \"Default Value\": \"By default, the permissions for TLS CA certificate file\nmight not be 444. The default file\\npermissions are governed by the system or\nuser specific umask values.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-3.10.rb",
"line": 1
},
"id": "M-3.10"
},
{
"title": "3.11 Ensure that Docker server certificate file ownership is set\nto\nroot:root (Scored)",
"desc": "Verify that the Docker server certificate file (the file that is passed\nalongwith --tlscert\n parameter) is owned and group-owned by root.\n The Docker server certificate file should be protected from any tampering.\nIt is used to\n authenticate Docker server based on the given server certificate. Hence, it\nmust be owned\n and group-owned by root to maintain the integrity of the certificate.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1. https://docs.docker.com/registry/insecure/\n2.\nhttps://docs.docker.com/engine/security/https/\n",
"severity": "medium",
"cis_id": "3.11",
"cis_control": "5.1 Minimize And Sparingly Use Administrative\nPrivileges\n",
"cis_level": "Level 1 - Docker",
"nist": [
"AC-6 (9)"
],
"audit": "Execute the below command to verify that the Docker server\ncertificate file is owned and\ngroup-owned by root:\nstat -c %U:%G <path to\nDocker server certificate file> | grep -v root:root\nThe above command should\nnot return anything.\n",
"fix": "chown root:root <path to Docker server certificate file>\nThis\nwould set the ownership and group-ownership for the Docker server certificate\nfile to\nroot.\n",
"Default Value": "By default, the ownership and group-ownership for\nDocker server certificate file is\ncorrectly set to root.\n"
},
"code": "control \"M-3.11\" do\n title \"3.11 Ensure that Docker server certificate file ownership is set\nto\\nroot:root (Scored)\"\n desc \"\n Verify that the Docker server certificate file (the file that is passed\nalongwith --tlscert\n parameter) is owned and group-owned by root.\n The Docker server certificate file should be protected from any tampering.\nIt is used to\n authenticate Docker server based on the given server certificate. Hence, it\nmust be owned\n and group-owned by root to maintain the integrity of the certificate.\n\n \"\n impact 0.5\n tag \"ref\": \"1. https://docs.docker.com/registry/insecure/\\n2.\nhttps://docs.docker.com/engine/security/https/\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"3.11\"\n tag \"cis_control\": \"5.1 Minimize And Sparingly Use Administrative\nPrivileges\\n\"\n tag \"cis_level\": \"Level 1 - Docker\"\n tag \"nist\": [\"AC-6 (9)\"]\n tag \"audit\": \"Execute the below command to verify that the Docker server\ncertificate file is owned and\\ngroup-owned by root:\\nstat -c %U:%G <path to\nDocker server certificate file> | grep -v root:root\\nThe above command should\nnot return anything.\\n\"\n tag \"fix\": \"chown root:root <path to Docker server certificate file>\\nThis\nwould set the ownership and group-ownership for the Docker server certificate\nfile to\\nroot.\\n\"\n tag \"Default Value\": \"By default, the ownership and group-ownership for\nDocker server certificate file is\\ncorrectly set to root.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-3.11.rb",
"line": 1
},
"id": "M-3.11"
},
{
"title": "3.12 Ensure that Docker server certificate file permissions are set to\n444\nor more restrictive (Scored)",
"desc": "Verify that the Docker server certificate file (the file that is passed\nalongwith --tlscert\n parameter) has permissions of 444 or more restrictive.\n The Docker server certificate file should be protected from any tampering.\nIt is used to\n authenticate Docker server based on the given server certificate. Hence, it\nmust have\n permissions of 444 to maintain the integrity of the certificate.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1. https://docs.docker.com/registry/insecure/\n2.\nhttps://docs.docker.com/engine/security/https/\n",
"severity": "medium",
"cis_id": "3.12",
"cis_control": "14.4 Protect Information With Access Control Lists\n",
"cis_level": "Level 1 - Docker",
"nist": [
"AC-3 (3)"
],
"audit": "Execute the below command to verify that the Docker server\ncertificate file has\npermissions of 444 or more restrictive:\nstat -c %a <path\nto Docker server certificate file>\n",
"fix": "chmod 444 <path to Docker server certificate file>\nThis would\nset the file permissions of the Docker server file to 444.\n",
"Default Value": "By default, the permissions for Docker server\ncertificate file might not be 444. The default\nfile permissions are governed\nby the system or user specific umask values.\n"
},
"code": "control \"M-3.12\" do\n title \"3.12 Ensure that Docker server certificate file permissions are set to\n444\\nor more restrictive (Scored)\"\n desc \"\n Verify that the Docker server certificate file (the file that is passed\nalongwith --tlscert\n parameter) has permissions of 444 or more restrictive.\n The Docker server certificate file should be protected from any tampering.\nIt is used to\n authenticate Docker server based on the given server certificate. Hence, it\nmust have\n permissions of 444 to maintain the integrity of the certificate.\n\n \"\n impact 0.5\n tag \"ref\": \"1. https://docs.docker.com/registry/insecure/\\n2.\nhttps://docs.docker.com/engine/security/https/\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"3.12\"\n tag \"cis_control\": \"14.4 Protect Information With Access Control Lists\\n\"\n tag \"cis_level\": \"Level 1 - Docker\"\n tag \"nist\": [\"AC-3 (3)\"]\n tag \"audit\": \"Execute the below command to verify that the Docker server\ncertificate file has\\npermissions of 444 or more restrictive:\\nstat -c %a <path\nto Docker server certificate file>\\n\"\n tag \"fix\": \"chmod 444 <path to Docker server certificate file>\\nThis would\nset the file permissions of the Docker server file to 444.\\n\"\n tag \"Default Value\": \"By default, the permissions for Docker server\ncertificate file might not be 444. The default\\nfile permissions are governed\nby the system or user specific umask values.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-3.12.rb",
"line": 1
},
"id": "M-3.12"
},
{
"title": "3.13 Ensure that Docker server certificate key file ownership is set\nto\nroot:root (Scored)",
"desc": "Verify that the Docker server certificate key file (the file that is passed\nalongwith --tlskey\n parameter) is owned and group-owned by root.\n The Docker server certificate key file should be protected from any\ntampering or unneeded\n reads. It holds the private key for the Docker server certificate. Hence,\nit must be owned\n and group-owned by root to maintain the integrity of the Docker server\ncertificate.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1. https://docs.docker.com/registry/insecure/\n2.\nhttps://docs.docker.com/engine/security/https/\n",
"severity": "medium",
"cis_id": "3.13",
"cis_control": "5.1 Minimize And Sparingly Use Administrative\nPrivileges\n",
"cis_level": "Level 1 - Docker",
"nist": [
"AC-6 (9)"
],
"audit": "Execute the below command to verify that the Docker server\ncertificate key file is owned\nand group-owned by root:\nstat -c %U:%G <path to\nDocker server certificate key file> | grep -v\nroot:root\nThe above command\nshould not return anything.\n",
"fix": "chown root:root <path to Docker server certificate key\nfile>\nThis would set the ownership and group-ownership for the Docker server\ncertificate key\nfile to root.\n",
"Default Value": "By default, the ownership and group-ownership for\nDocker server certificate key file is\ncorrectly set to root.\n"
},
"code": "control \"M-3.13\" do\n title \"3.13 Ensure that Docker server certificate key file ownership is set\nto\\nroot:root (Scored)\"\n desc \"\n Verify that the Docker server certificate key file (the file that is passed\nalongwith --tlskey\n parameter) is owned and group-owned by root.\n The Docker server certificate key file should be protected from any\ntampering or unneeded\n reads. It holds the private key for the Docker server certificate. Hence,\nit must be owned\n and group-owned by root to maintain the integrity of the Docker server\ncertificate.\n\n \"\n impact 0.5\n tag \"ref\": \"1. https://docs.docker.com/registry/insecure/\\n2.\nhttps://docs.docker.com/engine/security/https/\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"3.13\"\n tag \"cis_control\": \"5.1 Minimize And Sparingly Use Administrative\nPrivileges\\n\"\n tag \"cis_level\": \"Level 1 - Docker\"\n tag \"nist\": [\"AC-6 (9)\"]\n tag \"audit\": \"Execute the below command to verify that the Docker server\ncertificate key file is owned\\nand group-owned by root:\\nstat -c %U:%G <path to\nDocker server certificate key file> | grep -v\\nroot:root\\nThe above command\nshould not return anything.\\n\"\n tag \"fix\": \"chown root:root <path to Docker server certificate key\nfile>\\nThis would set the ownership and group-ownership for the Docker server\ncertificate key\\nfile to root.\\n\"\n tag \"Default Value\": \"By default, the ownership and group-ownership for\nDocker server certificate key file is\\ncorrectly set to root.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-3.13.rb",
"line": 1
},
"id": "M-3.13"
},
{
"title": "3.14 Ensure that Docker server certificate key file permissions are\nset to\n400 (Scored)",
"desc": "Verify that the Docker server certificate key file (the file that is passed\nalongwith --tlskey\n parameter) has permissions of 400.\n The Docker server certificate key file should be protected from any\ntampering or unneeded\n reads. It holds the private key for the Docker server certificate. Hence,\nit must have\n permissions of 400 to maintain the integrity of the Docker server\ncertificate.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1. https://docs.docker.com/registry/insecure/\n2.\nhttps://docs.docker.com/engine/security/https/\n",
"severity": "medium",
"cis_id": "3.14",
"cis_control": "14.4 Protect Information With Access Control Lists\n",
"cis_level": "Level 1 - Docker",
"nist": [
"AC-3 (3)"
],
"audit": "Execute the below command to verify that the Docker server\ncertificate key file has\npermissions of 400:\nstat -c %a <path to Docker\nserver certificate key file>\n",
"fix": "chmod 400 <path to Docker server certificate key file>\nThis\nwould set the Docker server certificate key file permissions to 400.\n",
"Default Value": "By default, the permissions for Docker server\ncertificate key file might not be 400. The\ndefault file permissions are\ngoverned by the system or user specific umask values.\n"
},
"code": "control \"M-3.14\" do\n title \"3.14 Ensure that Docker server certificate key file permissions are\nset to\\n400 (Scored)\"\n desc \"\n Verify that the Docker server certificate key file (the file that is passed\nalongwith --tlskey\n parameter) has permissions of 400.\n The Docker server certificate key file should be protected from any\ntampering or unneeded\n reads. It holds the private key for the Docker server certificate. Hence,\nit must have\n permissions of 400 to maintain the integrity of the Docker server\ncertificate.\n\n \"\n impact 0.5\n tag \"ref\": \"1. https://docs.docker.com/registry/insecure/\\n2.\nhttps://docs.docker.com/engine/security/https/\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"3.14\"\n tag \"cis_control\": \"14.4 Protect Information With Access Control Lists\\n\"\n tag \"cis_level\": \"Level 1 - Docker\"\n tag \"nist\": [\"AC-3 (3)\"]\n tag \"audit\": \"Execute the below command to verify that the Docker server\ncertificate key file has\\npermissions of 400:\\nstat -c %a <path to Docker\nserver certificate key file>\\n\"\n tag \"fix\": \"chmod 400 <path to Docker server certificate key file>\\nThis\nwould set the Docker server certificate key file permissions to 400.\\n\"\n tag \"Default Value\": \"By default, the permissions for Docker server\ncertificate key file might not be 400. The\\ndefault file permissions are\ngoverned by the system or user specific umask values.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-3.14.rb",
"line": 1
},
"id": "M-3.14"
},
{
"title": "3.15 Ensure that Docker socket file ownership is set to\nroot:docker(Scored)",
"desc": "Verify that the Docker socket file is owned by root and group-owned by\ndocker.\n Docker daemon runs as root. The default Unix socket hence must be owned by\nroot. If any\n other user or process owns this socket, then it might be possible for that\nnon-privileged\n user or process to interact with Docker daemon. Also, such a non-privileged\nuser or\n process might interact with containers. This is neither secure nor desired\nbehavior.\n Additionally, the Docker installer creates a Unix group called docker. You\ncan add users to\n this group, and then those users would be able to read and write to default\nDocker Unix\n socket. The membership to the docker group is tightly controlled by the\nsystem\n administrator. If any other group owns this socket, then it might be\npossible for members\n of that group to interact with Docker daemon. Also, such a group might not\nbe as tightly\n controlled as the docker group. This is neither secure nor desired behavior.\n Hence, the default Docker Unix socket file must be owned by root and\ngroup-owned by\n docker to maintain the integrity of the socket file.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://docs.docker.com/engine/reference/commandline/dockerd/#daemonsocket-option\n2.\nhttps://docs.docker.com/engine/reference/commandline/dockerd/#bind-dockerto-another-hostport-or-a-unix-socket\n",
"severity": "medium",
"cis_id": "3.15",
"cis_control": "5.1 Minimize And Sparingly Use Administrative\nPrivileges\n",
"cis_level": "Level 1 - Docker",
"nist": [
"AC-6 (9)"
],
"audit": "Execute the below command to verify that the Docker socket file\nis owned by root and\ngroup-owned by docker:\nstat -c %U:%G\n/var/run/docker.sock | grep -v root:docker\nThe above command should not return\nanything.\n",
"fix": "chown root:docker /var/run/docker.sock\nThis would set the\nownership to root and group-ownership to docker for default Docker\nsocket\nfile.\n",
"Default Value": "By default, the ownership and group-ownership for\nDocker socket file is correctly set to\nroot:docker.\n"
},
"code": "control \"M-3.15\" do\n title \"3.15 Ensure that Docker socket file ownership is set to\nroot:docker(Scored)\"\n desc \"\n Verify that the Docker socket file is owned by root and group-owned by\ndocker.\n Docker daemon runs as root. The default Unix socket hence must be owned by\nroot. If any\n other user or process owns this socket, then it might be possible for that\nnon-privileged\n user or process to interact with Docker daemon. Also, such a non-privileged\nuser or\n process might interact with containers. This is neither secure nor desired\nbehavior.\n Additionally, the Docker installer creates a Unix group called docker. You\ncan add users to\n this group, and then those users would be able to read and write to default\nDocker Unix\n socket. The membership to the docker group is tightly controlled by the\nsystem\n administrator. If any other group owns this socket, then it might be\npossible for members\n of that group to interact with Docker daemon. Also, such a group might not\nbe as tightly\n controlled as the docker group. This is neither secure nor desired behavior.\n Hence, the default Docker Unix socket file must be owned by root and\ngroup-owned by\n docker to maintain the integrity of the socket file.\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttps://docs.docker.com/engine/reference/commandline/dockerd/#daemonsocket-option\\n2.\nhttps://docs.docker.com/engine/reference/commandline/dockerd/#bind-dockerto-another-hostport-or-a-unix-socket\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"3.15\"\n tag \"cis_control\": \"5.1 Minimize And Sparingly Use Administrative\nPrivileges\\n\"\n tag \"cis_level\": \"Level 1 - Docker\"\n tag \"nist\": [\"AC-6 (9)\"]\n tag \"audit\": \"Execute the below command to verify that the Docker socket file\nis owned by root and\\ngroup-owned by docker:\\nstat -c %U:%G\n/var/run/docker.sock | grep -v root:docker\\nThe above command should not return\nanything.\\n\"\n tag \"fix\": \"chown root:docker /var/run/docker.sock\\nThis would set the\nownership to root and group-ownership to docker for default Docker\\nsocket\nfile.\\n\"\n tag \"Default Value\": \"By default, the ownership and group-ownership for\nDocker socket file is correctly set to\\nroot:docker.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-3.15.rb",
"line": 1
},
"id": "M-3.15"
},
{
"title": "3.16 Ensure that Docker socket file permissions are set to 660 or\nmore\nrestrictive (Scored)",
"desc": "Verify that the Docker socket file has permissions of 660 or more\nrestrictive.\n Only root and members of docker group should be allowed to read and write\nto default\n Docker Unix socket. Hence, the Docket socket file must have permissions of\n660 or more\n restrictive.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://docs.docker.com/engine/reference/commandline/dockerd/#daemonsocket-option\n2.\nhttps://docs.docker.com/engine/reference/commandline/dockerd/#bind-dockerto-another-hostport-or-a-unix-socket\n",
"severity": "medium",
"cis_id": "3.16",
"cis_control": "14.4 Protect Information With Access Control Lists\n",
"cis_level": "Level 1 - Docker",
"nist": [
"AC-3 (3)"
],
"audit": "Execute the below command to verify that the Docker socket file\nhas permissions of 660 or\nmore restrictive:\nstat -c %a /var/run/docker.sock\n",
"fix": "chmod 660 /var/run/docker.sock\nThis would set the file\npermissions of the Docker socket file to 660.\n",
"Default Value": "By default, the permissions for Docker socket file is\ncorrectly set to 660.\n"
},
"code": "control \"M-3.16\" do\n title \"3.16 Ensure that Docker socket file permissions are set to 660 or\nmore\\nrestrictive (Scored)\"\n desc \"\n Verify that the Docker socket file has permissions of 660 or more\nrestrictive.\n Only root and members of docker group should be allowed to read and write\nto default\n Docker Unix socket. Hence, the Docket socket file must have permissions of\n660 or more\n restrictive.\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttps://docs.docker.com/engine/reference/commandline/dockerd/#daemonsocket-option\\n2.\nhttps://docs.docker.com/engine/reference/commandline/dockerd/#bind-dockerto-another-hostport-or-a-unix-socket\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"3.16\"\n tag \"cis_control\": \"14.4 Protect Information With Access Control Lists\\n\"\n tag \"cis_level\": \"Level 1 - Docker\"\n tag \"nist\": [\"AC-3 (3)\"]\n tag \"audit\": \"Execute the below command to verify that the Docker socket file\nhas permissions of 660 or\\nmore restrictive:\\nstat -c %a /var/run/docker.sock\\n\"\n tag \"fix\": \"chmod 660 /var/run/docker.sock\\nThis would set the file\npermissions of the Docker socket file to 660.\\n\"\n tag \"Default Value\": \"By default, the permissions for Docker socket file is\ncorrectly set to 660.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-3.16.rb",
"line": 1
},
"id": "M-3.16"
},
{
"title": "3.17 Ensure that daemon.json file ownership is set to root:root\n(Scored)",
"desc": "Verify that the daemon.json file ownership and group-ownership is correctly\nset to root.\n daemon.json file contains sensitive parameters that may alter the behavior\nof docker\n daemon. Hence, it should be owned and group-owned by root to maintain the\nintegrity of\n the file.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://docs.docker.com/engine/reference/commandline/dockerd/#daemonconfiguration-file\n",
"severity": "medium",
"cis_id": "3.17",
"cis_control": "5.1 Minimize And Sparingly Use Administrative\nPrivileges\n",
"cis_level": "Level 1 - Docker",
"nist": [
"AC-6 (9)"
],
"audit": "Execute the below command to verify that the file is owned and\ngroup-owned by root:\nstat -c %U:%G /etc/docker/daemon.json | grep -v\nroot:root\nThe above command should not return anything.\n",
"fix": "chown root:root /etc/docker/daemon.json\nThis would set the\nownership and group-ownership for the file to root.\n",
"Default Value": "This file may not be present on the system. In that\ncase, this recommendation is not\napplicable.\n"
},
"code": "control \"M-3.17\" do\n title \"3.17 Ensure that daemon.json file ownership is set to root:root\n(Scored)\"\n desc \"\n Verify that the daemon.json file ownership and group-ownership is correctly\nset to root.\n daemon.json file contains sensitive parameters that may alter the behavior\nof docker\n daemon. Hence, it should be owned and group-owned by root to maintain the\nintegrity of\n the file.\n\n \"\n impact 0.5\n tag \"ref\": \"1.\nhttps://docs.docker.com/engine/reference/commandline/dockerd/#daemonconfiguration-file\\n\"\n tag \"severity\": \"medium\"\n tag \"cis_id\": \"3.17\"\n tag \"cis_control\": \"5.1 Minimize And Sparingly Use Administrative\nPrivileges\\n\"\n tag \"cis_level\": \"Level 1 - Docker\"\n tag \"nist\": [\"AC-6 (9)\"]\n tag \"audit\": \"Execute the below command to verify that the file is owned and\ngroup-owned by root:\\nstat -c %U:%G /etc/docker/daemon.json | grep -v\nroot:root\\nThe above command should not return anything.\\n\"\n tag \"fix\": \"chown root:root /etc/docker/daemon.json\\nThis would set the\nownership and group-ownership for the file to root.\\n\"\n tag \"Default Value\": \"This file may not be present on the system. In that\ncase, this recommendation is not\\napplicable.\\n\"\nend\n",
"source_location": {
"ref": "ubuntu/controls/M-3.17.rb",
"line": 1
},
"id": "M-3.17"
},
{
"title": "3.18 Ensure that daemon.json file permissions are set to 644 or\nmore\nrestrictive (Scored)",
"desc": "Verify that the daemon.json file permissions are correctly set to 644 or\nmore restrictive.\n daemon.json file contains sensitive parameters that may alter the behavior\nof docker\n daemon. Hence, it should be writable only by root to maintain the integrity\nof the file.",
"impact": 0.5,
"refs": [],
"tags": {
"ref": "1.\nhttps://docs.docker.com/engine/reference/commandline/dockerd/#daemonconfiguration-file\n",
"severity": "medium",
"cis_id": "3.18",
"cis_control": "14.4 Protect Information With Access Control Lists\n",
"cis_level": "Level 1 - Docker",
"nist": [
"AC-3 (3)"
],