<section title="18.4. Intrusion Detection and Prevention"><subsection title="Objective"><paragraph
    title="18.4.1."


><![CDATA[<p>An intrusion detection and prevention strategy is implemented for systems in order to respond promptly to incidents and preserve availability, confidentiality and integrity of systems.</p>]]></paragraph>
 </subsection>
<subsection title="Context"> <block title="Scope"><paragraph
    title="18.4.2."


><![CDATA[<p>This section covers information relating to detection and prevention of malicious code propagating through networks as well as the detection and prevention of unusual or malicious activities.</p>]]></paragraph>
</block>
<block title="Methods of infections or delivery"><paragraph
    title="18.4.3."


><![CDATA[<p>Malicious code can spread through a system from a number of sources including:</p><ul>
<li>files containing macro viruses or worms;</li>
<li>email attachments and Web downloads with malicious active content;</li>
<li>executable code in the form of applications;</li>
<li>security weaknesses in a system or network;</li>
<li>security weaknesses in an application; </li>
<li>contact with an infected system or media; or</li>
<li>deliberate introduction of malicious code.</li>
</ul>]]></paragraph>
<paragraph
    title="18.4.4."


><![CDATA[<p>The speed at which malicious code can spread through a system presents significant challenges and an important part of any defensive strategy is to contain the attack and limit damage.</p>]]></paragraph>
</block>
</subsection>
<subsection title="References"><paragraph
    title="18.4.5."


><![CDATA[<table class="table-main">
<tbody>
<tr>
<td><strong>Reference</strong></td>
<td><strong>Title</strong></td>
<td>
<p><strong>Publisher</strong></p>
</td>
<td>
<p><strong>Source</strong></p>
</td>
</tr>
<tr>
<td>
<p><strong>ISO/IEC 27001:2013</strong></p>
</td>
<td>
<p class="no-uppercase"><strong>Information technology — Security techniques — Information security management systems — Requirements</strong><strong>, A.15.3,&nbsp;</strong><strong>Information Systems Audit Considerations</strong></p>
</td>
<td style="text-align: center;">
<p>ISO</p>
</td>
<td>
<p><a title="Information technology — Security techniques — Information security management systems — Requirements" rel="noopener noreferrer" href="https://www.iso.org/standard/54534.html" target="_blank">https://www.iso.org/standard/54534.html</a></p>
</td>
</tr>
<tr>
<td><strong>HB 171:2003</strong></td>
<td><strong>Guidelines for the Management of Information Technology Evidence</strong></td>
<td style="text-align: center;">Standards NZ</td>
<td>
<p><a rel="noopener noreferrer" href="https://www.saiglobal.com/PDFTemp/Previews/OSH/as/misc/handbook/HB171.PDF" target="_blank">https://www.saiglobal.com/PDFTemp/Previews/OSH/as/misc/handbook/HB171.PDF [PDF, 350 KB]</a></p>
</td>
</tr>
</tbody>
</table>]]></paragraph>
 </subsection>
<subsection title="References - Endpoint Security"><paragraph
    title="18.4.6."


><![CDATA[<table class="table-main">
<tbody>
<tr>
<td><strong>Reference</strong></td>
<td><strong>Title</strong></td>
<td><strong>Publisher</strong></td>
<td><strong>Source</strong></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><strong>Transport Layer Protection&nbsp;Cheat Sheet</strong></td>
<td style="text-align: center;">OWASP</td>
<td><a rel="noopener noreferrer" href="https://www.owasp.org/index.php/Transport_Layer_Protection_Cheat_Sheet" target="_blank">https://www.owasp.org/index.php/Transport_Layer_Protection_Cheat_Sheet</a>&nbsp;</td>
</tr>
<tr>
<td><strong>RFC 5246</strong></td>
<td><strong>The Transport Layer Security (TLS) Protocol Version 1.2</strong></td>
<td style="text-align: center;">IETF</td>
<td><a title="The Transport Layer Security (TLS) Protocol Version 1.2" rel="noopener noreferrer" href="https://datatracker.ietf.org/doc/html/rfc5246" target="_blank">https://datatracker.ietf.org/doc/html/rfc5246</a></td>
</tr>
<tr>
<td><strong>RFC 8446</strong></td>
<td><strong>The Transport Layer Security (TLS) Protocol Version 1.3</strong></td>
<td style="text-align: center;"><span>IETF</span></td>
<td><a title="The Transport Layer Security (TLS) Protocol Version 1.3" rel="noopener noreferrer" href="https://datatracker.ietf.org/doc/html/rfc8446" target="_blank">https://datatracker.ietf.org/doc/html/rfc8446</a></td>
</tr>
<tr>
<td><strong>RFC 7525</strong></td>
<td><strong>Recommendations for Secure Use of Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)</strong></td>
<td style="text-align: center;"><span>IETF</span></td>
<td><a title="Recommendations for Secure Use of Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)" rel="noopener noreferrer" href="https://datatracker.ietf.org/doc/html/rfc7525" target="_blank">https://datatracker.ietf.org/doc/html/rfc7525</a></td>
</tr>
<tr>
<td><strong>RFC 6749</strong></td>
<td><strong>The OAuth 2.0&nbsp;Authorization Framework</strong></td>
<td style="text-align: center;"><span>IETF</span></td>
<td><a title="The OAuth 2.0 Authorization Framework" rel="noopener noreferrer" href="https://datatracker.ietf.org/doc/html/rfc6749" target="_blank">https://datatracker.ietf.org/doc/html/rfc6749</a></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><strong>OpenID Connect</strong></td>
<td style="text-align: center;">OpenID Foundation</td>
<td><a rel="noopener noreferrer" href="https://openid.net/connect/" target="_blank">https://openid.net/connect/</a></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><strong>New Zealand Security Assertion Messaging Standard&nbsp;</strong></td>
<td style="text-align: center;">
<p>NZ Government</p>
<p>Department of internal affairs</p>
</td>
<td><a rel="noopener noreferrer" href="https://www.digital.govt.nz/standards-and-guidance/technology-and-architecture/new-zealand-security-assertion-messaging-standard/" target="_blank">New Zealand Security Assertion Messaging Standard | NZ Digital government</a></td>
</tr>
</tbody>
</table>]]></paragraph>
 </subsection>
<subsection title="Rationale &amp; Controls"> <block title="Intrusion Detection and Prevention strategy (IDS/IPS)"><paragraph
    title="18.4.7.R.01."

    tags="Network Security,Technical"


><![CDATA[<p>An IDS/IPS when configured correctly, kept up to date and supported by appropriate processes, can be an effective way of identifying, responding to and containing known attack types, specific attack profiles or anomalous or suspicious network activities.</p>]]></paragraph>
<paragraph
    title="18.4.7.C.01."

    tags="Network Security,Technical"


    classification="Top Secret, Secret, Confidential"
    compliance="Must"
    cid="3802"
><![CDATA[<p>Agencies MUST develop, implement and maintain an intrusion detection strategy that includes:</p><ul>
<li>appropriate intrusion detection mechanisms, including network-based IDS/IPSs and host-based IDS/IPSs as necessary;</li>
<li>the audit analysis of event logs, including IDS/IPS logs;</li>
<li>a periodic audit of intrusion detection procedures;</li>
<li>information security awareness and training programs;</li>
<li>a documented Incident Response Plans (IRP); and</li>
<li>provide the capability to detect information security incidents and attempted network intrusions on gateways and provide real-time alerts.</li>
</ul>]]></paragraph>
<paragraph
    title="18.4.7.C.02."

    tags="Network Security,Technical"


    classification="All Classifications"
    compliance="Should"
    cid="3803"
><![CDATA[<p>Agencies SHOULD develop, implement and maintain an intrusion detection strategy that includes:</p><ul>
<li>appropriate intrusion detection mechanisms, including network-based IDS/IPSs and host-based IDS/IPSs as necessary;</li>
<li>the audit analysis of event logs, including IDS/IPS logs;</li>
<li>a periodic audit of intrusion detection procedures;</li>
<li>information security awareness and training programs; and</li>
<li>a documented IRP.</li>
</ul>]]></paragraph>
<paragraph
    title="18.4.7.C.03."

    tags="Network Security,Technical"


    classification="All Classifications"
    compliance="Should"
    cid="3804"
><![CDATA[<p>Agencies SHOULD ensure sufficient resources are provided for the maintenance and monitoring of IDS/IPS.</p>]]></paragraph>
</block>
<block title="IDS/IPSs on gateways"><paragraph
    title="18.4.8.R.01."

    tags="Network Security,Technical,Gateways"


><![CDATA[<p>If the firewall is configured to block all traffic on a particular range of port numbers, then the IDS should inspect traffic for these port numbers and alert if they are detected.</p>]]></paragraph>
<paragraph
    title="18.4.8.C.01."

    tags="Network Security,Technical,Gateways"


    classification="All Classifications"
    compliance="Should"
    cid="3807"
><![CDATA[<p>Agencies SHOULD deploy IDS/IPSs in all gateways between the agency’s networks and unsecure public networks or BYOD wireless networks.</p>]]></paragraph>
<paragraph
    title="18.4.8.C.02."

    tags="Network Security,Technical,Gateways"


    classification="All Classifications"
    compliance="Should"
    cid="3808"
><![CDATA[<p>Agencies SHOULD deploy IDS/IPSs at all gateways between the agency’s networks and any network not managed by the agency.</p>]]></paragraph>
<paragraph
    title="18.4.8.C.03."

    tags="Network Security,Technical,Gateways"


    classification="All Classifications"
    compliance="Should"
    cid="3809"
><![CDATA[<p>Agencies SHOULD locate IDS/IPSs within the gateway environment, immediately inside the outermost firewall.</p>]]></paragraph>
</block>
<block title="IDS/IPS Maintenance"><paragraph
    title="18.4.9.R.01."

    tags="Network Security,Technical"


><![CDATA[<p>When signature-based intrusion detection is used, the effectiveness of the IDS/IPS will degrade over time as new intrusion methods are developed.  It is for this reason that IDS/IPS systems and signatures need to be up to date to identify the latest intrusion detection methods.</p>]]></paragraph>
<paragraph
    title="18.4.9.C.01."

    tags="Network Security,Technical"


    classification="All Classifications"
    compliance="Must"
    cid="3815"
><![CDATA[<p>Agencies MUST select IDS / IPS that monitor uncharacteristic and suspicious activities.</p>]]></paragraph>
<paragraph
    title="18.4.9.C.02."

    tags="Network Security,Technical"


    classification="All Classifications"
    compliance="Must"
    cid="3843"
><![CDATA[<p>When signature-based intrusion detection is used, agencies MUST keep the signatures and system patching up to date.</p>]]></paragraph>
</block>
<block title="Malicious code counter-measures"><paragraph
    title="18.4.10.R.01."

    tags="Network Security,Technical"


><![CDATA[<p>Implementing policies and procedures for preventing and dealing with malicious code outbreaks that enables agencies to provide consistent incident response, as well as giving clear directions to system users on how to respond to an information security incident.</p>]]></paragraph>
<paragraph
    title="18.4.10.C.01."

    tags="Network Security,Technical"


    classification="All Classifications"
    compliance="Must"
    cid="3851"
><![CDATA[<p>Agencies MUST:</p><ul>
<li>develop and maintain a set of policies and procedures covering how to:
<ul style="list-style-type: circle;">
<li>minimise the likelihood of malicious code being introduced into a system;</li>
<li>prevent all unauthorised code from executing on an agency network;&nbsp;</li>
<li>detect any malicious code installed on a system;</li>
</ul>
</li>
<li>make their system users aware of the agency’s policies and procedures; and</li>
<li>ensure that all instances of detected malicious code outbreaks are handled according to established procedures.</li>
</ul>]]></paragraph>
</block>
<block title="Configuring the IDS/IPS"><paragraph
    title="18.4.11.R.01."

    tags="Network Security,Technical"


><![CDATA[<p>Generating alerts for any information flows that contravene any rule within the firewall rule set will assist security personnel in identifying and reporting to any possible breaches of agency systems.</p>]]></paragraph>
<paragraph
    title="18.4.11.C.01."

    tags="Network Security,Technical"


    classification="All Classifications"
    compliance="Should"
    cid="3857"
><![CDATA[<p>In addition to agency defined configuration requirements, agencies SHOULD ensure that IDS/IPSs located inside a firewall are configured to generate a log entry, and an alert, for any information flows that contravene any rule within the firewall rule set.</p>]]></paragraph>
<paragraph
    title="18.4.11.C.02."

    tags="Network Security,Technical"


    classification="All Classifications"
    compliance="Should"
    cid="3859"
><![CDATA[<p>Agencies SHOULD test IDS/IPSs rule sets prior to implementation to ensure that they perform as expected.</p>]]></paragraph>
<paragraph
    title="18.4.11.C.03."

    tags="Network Security,Technical"


    classification="All Classifications"
    compliance="Should"
    cid="3864"
><![CDATA[<p>If a firewall is configured to block all traffic on a particular range of port numbers, the IDP/IPSs SHOULD inspect traffic for these port numbers and generate an alert if they are detected.</p>]]></paragraph>
</block>
<block title="Event management and correlation"><paragraph
    title="18.4.12.R.01."

    tags="Network Security,Technical,Event Logging"


><![CDATA[<p>Deploying tools to manage correlation of suspicious events or events of interest across all agency networks will assist in identifying suspicious patterns in information flows throughout the agency.</p>]]></paragraph>
<paragraph
    title="18.4.12.R.02."

    tags="Network Security,Technical,Event Logging"


><![CDATA[<p>The history of events is important in this analysis and should be accommodated in any archiving decisions.</p>]]></paragraph>
<paragraph
    title="18.4.12.C.01."

    tags="Network Security,Technical,Event Logging"


    classification="All Classifications"
    compliance="Should"
    cid="3875"
><![CDATA[<p>Agencies SHOULD deploy tools for:</p><ul>
<li>the management and archive of security event information; and</li>
<li>the correlation of suspicious events or events of interest across all agency networks.</li>
</ul>]]></paragraph>
</block>
<block title="Host-based IDS/IPSs"><paragraph
    title="18.4.13.R.01."

    tags="Network Security,Technical"


><![CDATA[<p>Host-based IDS/IPS use behaviour-based detection schemes and can therefore assist in the detection of previously unidentified anomalous and suspicious activities such as:</p><ul>
<li>process injection;</li>
<li>keystroke logging;</li>
<li>driver loading;</li>
<li>library additions or supercessions;</li>
<li>call hooking.</li>
</ul><p>They may also identify new malicious code. It should be noted that some anti-virus and similar security products are evolving into converged endpoint security products that incorporate HIDS/HIPS.</p>]]></paragraph>
<paragraph
    title="18.4.13.C.01."

    tags="Network Security,Technical"


    classification="All Classifications"
    compliance="Should"
    cid="3886"
><![CDATA[<p>Agencies SHOULD install host-based IDS/IPSs on authentication, DNS, email, Web and other high value servers.</p>]]></paragraph>
</block>
<block title="Active content blocking"><paragraph
    title="18.4.14.R.01."

    tags="Network Security,Technical"


><![CDATA[<p>Filtering unnecessary content and disabling unwanted functionality reduces the number of possible entry points that an attacker can exploit.</p>]]></paragraph>
<paragraph
    title="18.4.14.C.01."

    tags="Network Security,Technical"


    classification="All Classifications"
    compliance="Should"
    cid="3892"
><![CDATA[<p>Agencies SHOULD use:</p><ul>
<li>filters to block unwanted content and exploits against applications that cannot be patched;</li>
<li>settings within the applications to disable unwanted functionality; and</li>
<li>digital signatures to restrict active content to trusted sources only.</li>
</ul>]]></paragraph>
</block>
</subsection>
</section>
