# comm\_with\_malware\_external\_internal

**Explanation**

The comm\_with\_malware\_external\_internal NDM is designed to detect connections from identified malware command and control (C2) nodes to hosts on your network. Because flows occur in both directions within a TCP/IP connection, this NDM determines the direction of a connection by comparing source and destination ports - usually TCP/IP connections flow from a higher port to a lower port. This NDM triggers on the response traffic flows from the server that received the connection (the source host) back to the malware command and control (C2) node that initiated it (the destination host).

These detections can indicate a serious event. In some cases, malware, and especially web-shells, are controlled by attackers using inbound traffic. However, these detections may also be the result of probing and scanning of your external infrastructure from a malware command and control node. That scenario may be a lower risk than an infection.

**What to Look For**

Internal hosts involved in a comm\_with\_malware\_external\_internal event should be reviewed for unknown or unauthorized ports exposed to inbound Internet traffic, and web server logs should be reviewed for suspicious requests. External hosts should be blocked to prevent further communication with C2 nodes.

**Related MITRE ATT\&CK Categories**

[Command and Control: Application Layer Protocol, Technique T1071 - Enterprise](https://attack.mitre.org/techniques/T1071)

[Command and Control: Non-Application Layer Protocol, Technique T1095 - Enterprise](https://attack.mitre.org/techniques/T1095)

[Command and Control: Non-Standard Port, Technique T1571 - Enterprise](https://attack.mitre.org/techniques/T1571)


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fusion.vectra.ai/detection-models/library/post-compromise/comm_with_malware_external_internal.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
