<html dir="ltr"><head>

<style id="owaParaStyle">P {
        MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px
}
</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="color: rgb(0, 0, 0); font-family: Tahoma; font-size: 10pt; direction: ltr;">
<div>
<p>Currently it looks like the momentum is towards tables.&nbsp; The updates from Maura Dailey [1] for systemd fixed the majority of the checks.&nbsp; Additionally future editions of RHEL 7 may include nftables as it&#8217;s currently in Tech Preview.<br></p>
<p>&#8226;&nbsp;IPTables work is already done, seems to still be valid, and requires no obvious updates.<br>&#8226;&nbsp;FirewallD, will require some work (see below).<br>&#8226;&nbsp;NFTables, TBD.<br></p>
<p>If the intent is to support both, then the logical fork would be at the currently active service.&nbsp; Further checks will need to rely on the results of which firewall is in use.&nbsp; Is it possible to logically fork in OVAL?</p>
<p>&nbsp;</p>
<p>From the rhel7-guide and stig table it appears that our only automated checks are:<br></p>
<p>1) Is it enabled?<br></p>
<p>The actual requirement is that the system provides an IPv4 and IPv6 firewall.&nbsp; FirewallD is both an IPv4 and and IPv6 firewall and satisfies this requirement.<br></p>
<p>Resolution: `systemctl is-active&nbsp;firewalld` should return "active".<br></p>
<p>2) Are the default INPUT/FORWARD policies set to DROP?<br></p>
<p>The actual requirement is the firewall must be DAPE (Deny All Permit by Exception), the FirewallD Zone/Target is synonymous with this requirement.&nbsp;<br></p>
<p>firewalld always leaves the tables policy as ACCEPT, additionally firewalld doesn&#8217;t use /etc/sysconfig/ip[6]tables. Thus the current check will always fail.&nbsp;Further, compliant /etc/sysconfig/ip[6]tables files while using firewalld could lead to a false-negative.<br></p>
<p>All default zones appear to meet this requirement except trusted which defaults to ACCEPT.&nbsp; The end-user can create and modify zones with the ACCEPT target.&nbsp; A check of the active zones&#8217; targets should verify that none are set to ACCEPT.<br></p>
<p>Proposal: the check should simply ensure that active zones&#8217; targets&nbsp;are not set to ACCEPT.&nbsp; `firewall-cmd --get-default-zone` , `firewall-cmd --get-active-zones` , `firewall-cmd --get-target` , `firewall-cmd --zone=&lt;zone&gt; --get-target`.</p>
<p>&nbsp;</p>
<p>The get-target output will be one of DROP, %%REJECT%%, ACCEPT or {chain}_{zone}.&nbsp; {chain}_{zone} was changed to &#8220;default&#8221; upstream with commit 267bb9d103f7134d8d0116ab0b7d3aaf38f5f3c8 [2].&nbsp; As far as I can tell, as long as the target is not ACCEPT, it&#8217;s a DAPE firewall.<br></p>
<p>Further hardening</p>
<p>&nbsp;</p>
<p>More firewalld work is required to support ICMP hardening, suspicious source log drops, and services hardening for both implementation and evaluation.&nbsp; Services seems pretty simple, ICMP and suspicious source appear to require RichLanguage [3].<br></p>
<p>Whether firewalld is capable of accepting the current ICMP rules isn&#8217;t immediately obvious as Fedora&#8217;s [4] and Red Hat&#8217;s [5] documentation only point to &#8220;icmp-block&#8221;.&nbsp; Potentially the logic can be reversed.&nbsp; Change the current allow echo-reply (0), destination-unreachable (3), time-exceeded (11) and instead block the remaining firewalld supported icmp types; parameter-problem (12), redirect (5), router-advertisement (9), router-solicitation (10), source-quench (4).&nbsp; However, this doesn't address over 30 other defined and 200 undefined ICMP types that would be allowed because they can&#8217;t be blocked by firewalld.<br></p>
<p>With firewalld there may be additional checks to add.&nbsp; For example, the default zone &#8220;external&#8221; includes masquerading, this zone shouldn&#8217;t be active unless the system is a router.&nbsp; To check for the presence of masquerading `firewall-cmd --zone=&lt;zone&gt; --query-masquerade` should return no for active zones.<br></p>
<p>References<br>[1] <a href="https://lists.fedorahosted.org/pipermail/scap-security-guide/2014-February/005015.html" target="_blank">https://lists.fedorahosted.org/pipermail/scap-security-guide/2014-February/005015.html</a><br>[2] <a href="https://git.fedorahosted.org/cgit/firewalld.git/commit/?id=267bb9d103f7134d8d0116ab0b7d3aaf38f5f3c8" target="_blank">https://git.fedorahosted.org/cgit/firewalld.git/commit/?id=267bb9d103f7134d8d0116ab0b7d3aaf38f5f3c8</a><br>[3] <a href="https://fedoraproject.org/wiki/FirewallD" target="_blank">https://fedoraproject.org/wiki/FirewallD</a><br>[4] <a href="http://fedoraproject.org/wiki/Features/FirewalldRichLanguage" target="_blank">http://fedoraproject.org/wiki/Features/FirewalldRichLanguage</a><br>[5] <a href="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Guide/sec-Using_Firewalls.html" target="_blank">https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Guide/sec-Using_Firewalls.html</a></p>
<p>&nbsp;</p>
<div style="font-family: Tahoma; font-size: 13px;">
<p class="MsoNormal"><span style="font-size: 10.5pt;">--</span></p>
<p class="MsoNormal"><b><i><span style='font-family: "Tahoma","sans-serif"; font-size: 16pt;'>Nicholas P. Crawford</span></i></b></p>
<p class="MsoNormal"><i><span style="font-size: 12pt;">Senior UNIX Systems Administrator</span></i></p>
<p class="MsoNormal"><span style="font-size: 12pt;"><font size="2">contractor, </font><u>General Dynamics Information Technology</u></span></p>
<p class="MsoNormal"><span style="font-size: 12pt;">NVESD Network Services Branch, US Army</span></p>
<p class="MsoNormal"><span style='font-family: "Tahoma","sans-serif"; font-size: 9pt;'>email: <a tabindex="0" href="https://web.mail.mil/owa/redir.aspx?C=00688bcc9fc8448894ffb85cfe4572f0&amp;URL=mailto%3aNicholas.Crawford%40gdit.com" target="_blank"><font color="#0000ff">Nicholas.Crawford@gdit.com</font></a></span></p>
<p class="MsoNormal"><span style='font-family: "Tahoma","sans-serif"; font-size: 9pt;'>comm: (703) 704-2299 dsn: (312) 654-2299</span></p>
<p class="MsoNormal"><span style='font-family: "Tahoma","sans-serif"; font-size: 9pt;'>cell: (571) 225-1283</span></p></div></div></div></body></html>