Skip to content

Commit 3e3635b

Browse files
author
Patrick Meier
committed
added control for trusted hosts login and Dot in PATH variable
Signed-off-by: Patrick Meier <patrick.meier111@googlemail.com>
1 parent ad9f9b9 commit 3e3635b

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

default/os_spec.rb

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# encoding: utf-8
2+
# author: Christoph Hartmann
3+
# author: Dominik Richter
4+
5+
control '01' do
6+
impact 1.0
7+
title "trusted hosts login"
8+
desc "Rhosts/hosts.equiv files are a weak implemenation of authentication. Disabling the .rhosts and hosts.equiv support helps to prevent users from subverting the system's normal access control mechanisms of the system."
9+
describe command('find / -name \'.rhosts\'') do
10+
its('stdout') { should be_empty }
11+
end
12+
describe command('find / -name \'hosts.equiv\' ') do
13+
its('stdout') { should be_empty }
14+
end
15+
end
16+
17+
control '02' do
18+
impact 1.0
19+
title "Dot in PATH variable"
20+
desc "Do not include the current working directory in PATH variable. This makes it easier for an attacker to gain extensive rigths by executing a Trojan program"
21+
describe command('echo $PATH') do
22+
its('stdout') { should_not include(":.:") }
23+
end
24+
end

0 commit comments

Comments
 (0)