> 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/alibaba-cloud-ecs-instance-that-has-a-public-ip-address-and-is-attached-to-a-security-group-with.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# Alibaba Cloud ECS instance that has a public IP address and is attached to a security group with...

### Synopsis

| Field               | Value                                                                                                            |
| ------------------- | ---------------------------------------------------------------------------------------------------------------- |
| Rule Name           | Alibaba Cloud ECS instance that has a public IP address and is attached to a security group with internet access |
| Rule Type           | Detection                                                                                                        |
| Finding Type        | Alibaba Cloud ECS instance that has a public IP address and is attached to a security group with internet access |
| Finding ID          | 60000342                                                                                                         |
| Generates a Finding | This detection rule also generates a finding                                                                     |
| Severity            | High                                                                                                             |
| Category            | CONFIGURATION                                                                                                    |
| Cloud Providers     | ALIBABA\_CLOUD                                                                                                   |
| Platform Module     | CSPM                                                                                                             |
| Asset Types         | ALIBABA\_CLOUD\_ECS\_INSTANCE                                                                                    |

### Description

Publicly accessible Alibaba Cloud Elastic Compute Service (ECS) instances represent a significant security risk. These instances, when associated with security groups allowing unrestricted internet access, are vulnerable to unauthorized access and compromise.

The ECS service allows assigning public IP addresses to instances, and security groups control network access. However, default configurations often grant excessive permissions, such as 'allow all inbound traffic', exposing the instance to various attacks, including port scanning, brute-force login attempts, and malware infections. Untrusted IP addresses can easily connect and exploit any open ports.

A misconfiguration of this nature could lead to data breaches, system compromise, and significant financial losses. Restricting internet access to only essential ports and IP addresses is crucial for minimizing the attack surface and enhancing the security posture. This best practice reduces the likelihood of successful exploits and limits the impact of any potential compromise.

To mitigate this risk, ensure that ECS instances with public IP addresses are only attached to security groups with strictly defined inbound rules. Limit inbound traffic to necessary ports and only allow connections from trusted IP addresses. Regularly review and update security group rules, removing any unnecessary permissions. Implement robust monitoring to detect and respond promptly to unauthorized access attempts.

### Remediation

To restrict ECS instance public exposure, modify Security Groups rules allowing all traffic.

To restrict Security Groups allowing all traffic, follow the instructions below:

1. Log in to Alibaba Cloud Portal
2. Go to Elastic Compute Service
3. Click on the reported ECS instance
4. In the left-side navigation pane, choose Security Groups
5. Check the rules of each security group by clicking on 'Add Rules' in the Actions column
6. In Inbound tab, Select the rule having 'Action' as Allow and 'Authorization Object' as 0.0.0.0/0, Click Modify in the Actions column
7. Replace the value 0.0.0.0/0 with specific IP address range.
8. Click on 'OK'


---

# 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/alibaba-cloud-ecs-instance-that-has-a-public-ip-address-and-is-attached-to-a-security-group-with.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.
