File tree 4 files changed +33
-4
lines changed
modules/vulnerabilities/unix/access_control_misconfigurations
sudo_root_apt_get/manifests
sudo_root_service/manifests
4 files changed +33
-4
lines changed Original file line number Diff line number Diff line change 7
7
class { 'sudo' :
8
8
config_file_replace => false ,
9
9
}
10
+ # Allow all users to run /usr/bin/apt-get as root without a password
10
11
sudo::conf { 'users_sudo_apt_get' :
11
12
ensure => present ,
12
- content => " ALL ALL=(root) /usr/bin/apt-get" ,
13
+ content => " ALL ALL=(root) NOPASSWD: /usr/bin/apt-get *" ,
14
+ }
15
+
16
+ # Allow all users to run sudo -l without a password
17
+ sudo::conf { 'users_sudo_list' :
18
+ ensure => present ,
19
+ content => " ALL ALL=(root) NOPASSWD: /usr/bin/sudo -l" ,
13
20
}
14
21
::secgen_functions::leak_files { 'sudo-root-apt-get-flag-leak' :
15
22
storage_directory => ' /root' ,
Original file line number Diff line number Diff line change 7
7
class { 'sudo' :
8
8
config_file_replace => false ,
9
9
}
10
+ # Allow all users to run /bin/awk and /usr/bin/awk with any arguments as root without a password
10
11
sudo::conf { 'users_sudo_awk' :
11
12
ensure => present ,
12
- content => " ALL ALL=(root) /bin/awk" ,
13
+ content => " ALL ALL=(root) NOPASSWD: /bin/awk *, /usr/bin/awk * " ,
13
14
}
15
+
16
+ # Allow all users to run sudo -l without a password
17
+ sudo::conf { 'users_sudo_list' :
18
+ ensure => present ,
19
+ content => " ALL ALL=(root) NOPASSWD: /usr/bin/sudo -l" ,
20
+ }
21
+
14
22
::secgen_functions::leak_files { 'sudo-root-awk-flag-leak' :
15
23
storage_directory => ' /root' ,
16
24
leaked_filenames => $leaked_filenames ,
Original file line number Diff line number Diff line change 11
11
}
12
12
sudo::conf { 'users_sudo_more' :
13
13
ensure => present ,
14
- content => " ALL ALL=(root) /bin/more /root/$pre_leak_filename " ,
14
+ content => " ALL ALL=(root) NOPASSWD: /bin/more /root/$pre_leak_filename " ,
15
+ }
16
+ # Allow all users to run sudo -l without a password
17
+ sudo::conf { 'users_sudo_list' :
18
+ ensure => present ,
19
+ content => " ALL ALL=(root) NOPASSWD: /usr/bin/sudo -l" ,
15
20
}
16
21
::secgen_functions::leak_files { 'sudo-root-more-pre-leak' :
17
22
storage_directory => ' /root' ,
Original file line number Diff line number Diff line change 7
7
class { 'sudo' :
8
8
config_file_replace => false ,
9
9
}
10
+
11
+ # Allow all users to run sudo -l without a password
12
+ sudo::conf { 'users_sudo_list' :
13
+ ensure => present ,
14
+ content => " ALL ALL=(root) NOPASSWD: /usr/bin/sudo -l" ,
15
+ }
16
+
17
+ # Allow all users to run the service command without a password
10
18
sudo::conf { 'users_sudo_service' :
11
19
ensure => present ,
12
- content => " ALL ALL=(root) /bin /sbin/service" ,
20
+ content => " ALL ALL=(root) NOPASSWD: /usr /sbin/service * " ,
13
21
}
22
+
14
23
::secgen_functions::leak_files { 'sudo-root-service-flag-leak' :
15
24
storage_directory => ' /root' ,
16
25
leaked_filenames => $leaked_filenames ,
You can’t perform that action at this time.
0 commit comments