<def-group>
  <definition class="compliance" id="audit_rules_networkconfig_modification" version="2">
    <metadata>
      <title>Record Events that Modify the System's Network Environment</title>
      <affected family="unix">
        <platform>Red Hat Enterprise Linux 6</platform>
      </affected>
      <description>The network environment should not be modified by anything other than
      administrator action. Any change to network parameters should be audited.</description>
      <reference source="JL" ref_id="RHEL6_20141210" ref_url="test_attestation" />
    </metadata>
    <criteria operator="AND">
      <criterion comment="network modification syscall" test_ref="test_audit_rules_networkconfig_modification_syscall" />
      <criterion comment="/etc/issue modification" test_ref="test_audit_rules_networkconfig_modification_etc_issue" />
      <criterion comment="/etc/issue.net modification" test_ref="test_audit_rules_networkconfig_modification_etc_issue_net" />
      <criterion comment="/etc/hosts modification" test_ref="test_audit_rules_networkconfig_modification_etc_hosts" />
      <criterion comment="/etc/sysconfig/network modification" test_ref="test_audit_rules_networkconfig_modification_etc_sysconfig_network" />
    </criteria>
  </definition>
  <ind:textfilecontent54_test check="all" comment="network modification syscall" id="test_audit_rules_networkconfig_modification_syscall" version="1">
    <ind:object object_ref="object_audit_rules_networkconfig_modification_syscall" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_test check="all" comment="/etc/issue modification" id="test_audit_rules_networkconfig_modification_etc_issue" version="1">
    <ind:object object_ref="object_audit_rules_networkconfig_modification_etc_issue" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_test check="all" comment="/etc/issue.net modification" id="test_audit_rules_networkconfig_modification_etc_issue_net" version="1">
    <ind:object object_ref="object_audit_rules_networkconfig_modification_etc_issue_net" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_test check="all" comment="/etc/hosts modification" id="test_audit_rules_networkconfig_modification_etc_hosts" version="1">
    <ind:object object_ref="object_audit_rules_networkconfig_modification_etc_hosts" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_test check="all" comment="/etc/sysconfig/network modification" id="test_audit_rules_networkconfig_modification_etc_sysconfig_network" version="1">
    <ind:object object_ref="object_audit_rules_networkconfig_modification_etc_sysconfig_network" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_audit_rules_networkconfig_modification_syscall" version="1">
    <ind:filepath>/etc/audit/audit.rules</ind:filepath>
    <ind:pattern operation="pattern match">^\-a\s+always,exit\s+(\-F\s+arch=(b64|b32)\s+)?\-S\s+sethostname\s+\-S\s+setdomainname\s+\-k\s+[-\w]+\s*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>
  <ind:textfilecontent54_object id="object_audit_rules_networkconfig_modification_etc_issue" version="1">
    <ind:filepath>/etc/audit/audit.rules</ind:filepath>
    <ind:pattern operation="pattern match">^\-w[\s]+/etc/issue[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>
  <ind:textfilecontent54_object id="object_audit_rules_networkconfig_modification_etc_issue_net" version="1">
    <ind:filepath>/etc/audit/audit.rules</ind:filepath>
    <ind:pattern operation="pattern match">^\-w[\s]+/etc/issue\.net[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>
  <ind:textfilecontent54_object id="object_audit_rules_networkconfig_modification_etc_hosts" version="1">
    <ind:filepath>/etc/audit/audit.rules</ind:filepath>
    <ind:pattern operation="pattern match">^\-w[\s]+/etc/hosts[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>
  <ind:textfilecontent54_object id="object_audit_rules_networkconfig_modification_etc_sysconfig_network" version="1">
    <ind:filepath>/etc/audit/audit.rules</ind:filepath>
    <ind:pattern operation="pattern match">^\-w[\s]+/etc/sysconfig/network[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b[\s]+\-k[\s]+[-\w]+[\s]*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>
</def-group>
