> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/oci-network-security-groups-nsg-has-stateful-security-rules.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# OCI Network Security Groups (NSG) has stateful security rules

### Synopsis

| Field               | Value                                                         |
| ------------------- | ------------------------------------------------------------- |
| Rule Type           | Detection                                                     |
| Finding Type        | OCI Network Security Groups (NSG) has stateful security rules |
| Finding ID          | 60000485                                                      |
| Generates a Finding | This detection rule also generates a finding                  |
| Severity            | Medium                                                        |
| Category            | CONFIGURATION                                                 |
| Cloud Providers     | OCI                                                           |
| Platform Module     | CSPM                                                          |
| Asset Types         | OCI\_NETWORKING\_NSG                                          |
| ATT\&CK Tactic      | TA0112 (TA0112)                                               |
| ATT\&CK Technique   | T1685 (T1685)                                                 |

### Description

Oracle Cloud Infrastructure (OCI) Network Security Groups (NSGs) with stateful ingress rules present a security risk. Stateful rules maintain connection tracking, increasing the impact of denial-of-service (DoS) attacks by allowing established connections to persist even after an attack begins.

OCI NSGs control network traffic to Virtual Machines (VMs) and other resources. Stateless rules examine each packet individually, providing better protection against DoS attacks as they don't maintain connection state. Stateful rules, however, maintain connection state, meaning an attacker can leverage existing connections to bypass security controls during a DoS attack, potentially leading to resource exhaustion and service disruption.

A successful DoS attack against a Virtual Machine protected by a stateful NSG rule could lead to service unavailability, impacting business operations and potentially exposing other resources. Stateless rules mitigate this risk by not maintaining connection state, forcing the attacker to establish new connections, which are more easily blocked.

Implement stateless ingress rules on all OCI NSGs. Regularly review and update NSG rules to ensure they align with security best practices. Employ robust monitoring to quickly detect and respond to unusual network traffic patterns indicative of a DoS attack. Consider using rate limiting and other traffic shaping techniques to further enhance protection.

### Remediation

**Manual steps:**

OCI Networking NSG - Manual remediation steps:

1. Login to the OCI Console
2. Type the resource reported in the alert into the Search box at the top of the Console.
3. Click the resource reported in the alert from the Resources submenu
4. Select the security rule from Security rules pane where Stateless is set to No and Direction set to Ingress
5. Click on Edit
6. Select the checkbox STATELESS
7. Click on Save Changes


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/oci-network-security-groups-nsg-has-stateful-security-rules.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
