>From a8ca1e26ce99c643f205a04498c0915d7a0cc7ae Mon Sep 17 00:00:00 2001
From: Shawn Wells <[email protected]>
Date: Sat, 20 Apr 2013 01:28:36 -0400
Subject: [PATCH 2/3] Created OVAL for set_password_hashing_algorithm_logindefs
 - Updated XCCDF
 - Created OVAL

Testing:
[root@rhel6 checks]# grep ENCRYPT_METHOD /etc/login.defs

[root@rhel6 checks]# ./testcheck.py set_password_hashing_algorithm_logindefs.xml
Evaluating with OVAL tempfile : 
/tmp/accounts_password_hashing_algorithmh_Bhvi.xml
Definition oval:scap-security-guide.testing:def:311: false
Evaluation done.

[root@rhel6 checks]# vim /etc/login.defs

[root@rhel6 checks]# grep ENCRYPT_METHOD /etc/login.defs
ENCRYPT_METHOD SHA512

[root@rhel6 checks]# ./testcheck.py set_password_hashing_algorithm_logindefs.xml
Evaluating with OVAL tempfile : 
/tmp/accounts_password_hashing_algorithml5BoL6.xml
Definition oval:scap-security-guide.testing:def:311: true
Evaluation done.
---
 .../set_password_hashing_algorithm_logindefs.xml   |   24 ++++++++++++++++++++
 RHEL6/input/system/accounts/pam.xml                |    1 +
 2 files changed, 25 insertions(+), 0 deletions(-)
 create mode 100644 
RHEL6/input/checks/set_password_hashing_algorithm_logindefs.xml

diff --git a/RHEL6/input/checks/set_password_hashing_algorithm_logindefs.xml 
b/RHEL6/input/checks/set_password_hashing_algorithm_logindefs.xml
new file mode 100644
index 0000000..12fbe2c
--- /dev/null
+++ b/RHEL6/input/checks/set_password_hashing_algorithm_logindefs.xml
@@ -0,0 +1,24 @@
+<def-group>
+  <definition class="compliance" id="accounts_password_hashing_algorithm" 
version="1">
+    <metadata>
+      <title>Set SHA512 Password Hashing Algorithm In /etc/login.defs</title>
+      <affected family="unix">
+        <platform>Red Hat Enterprise Linux 6</platform>
+      </affected>
+      <description>The password hashing algorithm should be set correctly in 
/etc/login.defs.</description>
+    </metadata>
+    <criteria operator="AND">
+      <criterion test_ref="test_etc_logins_defs_encrypt_method" />
+    </criteria>
+  </definition>
+
+  <ind:textfilecontent54_test check="all" comment="check ENCRYPT_METHOD in 
/etc/login.defs" id="test_etc_logins_defs_encrypt_method" version="1">
+    <ind:object object_ref="object_etc_logins_defs_encrypt_method" />
+  </ind:textfilecontent54_test>
+
+  <ind:textfilecontent54_object comment="check ENCRYPT_METHOD in 
/etc/login.defs" id="object_etc_logins_defs_encrypt_method" version="1">
+    <ind:filepath>/etc/login.defs</ind:filepath>
+    <ind:pattern operation="pattern 
match">^\s*ENCRYPT_METHOD\s+SHA512\s*$</ind:pattern>
+    <ind:instance datatype="int">1</ind:instance>
+  </ind:textfilecontent54_object>
+</def-group>
diff --git a/RHEL6/input/system/accounts/pam.xml 
b/RHEL6/input/system/accounts/pam.xml
index 5f87568..cf99247 100644
--- a/RHEL6/input/system/accounts/pam.xml
+++ b/RHEL6/input/system/accounts/pam.xml
@@ -564,6 +564,7 @@ Using a stronger hashing algorithm makes password cracking 
attacks more difficul
 <ident cce="27228-6" />
 <ref nist="IA-5" disa="803"/>
 <tested by="DS" on="20121024"/>
+<oval id="set_password_hashing_algorithm_logindefs" />
 </Rule>
 
 <Rule id="set_password_hashing_algorithm_libuserconf" severity="medium">
-- 
1.7.1

_______________________________________________
scap-security-guide mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/scap-security-guide

Reply via email to