Skip to content
Atomic Red Team
atomics
T1071.001

T1071.001 - Application Layer Protocol: Web Protocols

Description from ATT&CK (opens in a new tab)

Adversaries may communicate using application layer protocols associated with web traffic to avoid detection/network filtering by blending in with existing traffic. Commands to the remote system, and often the results of those commands, will be embedded within the protocol traffic between the client and server.

Protocols such as HTTP/S(Citation: CrowdStrike Putter Panda) and WebSocket(Citation: Brazking-Websockets) that carry web traffic may be very common in environments. HTTP/S packets have many fields and headers in which data can be concealed. An adversary may abuse these protocols to communicate with systems under their control within a victim network while also mimicking normal, expected traffic.

Atomic Tests


Atomic Test #1 - Malicious User Agents - Powershell

This test simulates an infected host beaconing to command and control. Upon execution, no output will be displayed. Use an application such as Wireshark to record the session and observe user agent strings and responses.

Inspired by APTSimulator - https://github.com/NextronSystems/APTSimulator/blob/master/test-sets/command-and-control/malicious-user-agents.bat (opens in a new tab)

Supported Platforms: Windows

auto_generated_guid: 81c13829-f6c9-45b8-85a6-053366d55297

Inputs:

NameDescriptionTypeDefault Value
domainDefault domain to simulate againststringwww.google.com (opens in a new tab)

Attack Commands: Run with powershell!

Invoke-WebRequest #{domain} -UserAgent "HttpBrowser/1.0" | out-null
Invoke-WebRequest #{domain} -UserAgent "Wget/1.9+cvs-stable (Red Hat modified)" | out-null
Invoke-WebRequest #{domain} -UserAgent "Opera/8.81 (Windows NT 6.0; U; en)" | out-null
Invoke-WebRequest #{domain} -UserAgent "*<|>*" | out-null


Atomic Test #2 - Malicious User Agents - CMD

This test simulates an infected host beaconing to command and control. Upon execution, no out put will be displayed. Use an application such as Wireshark to record the session and observe user agent strings and responses.

Inspired by APTSimulator - https://github.com/NextronSystems/APTSimulator/blob/master/test-sets/command-and-control/malicious-user-agents.bat (opens in a new tab)

Supported Platforms: Windows

auto_generated_guid: dc3488b0-08c7-4fea-b585-905c83b48180

Inputs:

NameDescriptionTypeDefault Value
domainDefault domain to simulate againststringwww.google.com (opens in a new tab)
curl_pathpath to curl.exepathC:\Windows\System32\Curl.exe

Attack Commands: Run with command_prompt!

#{curl_path} -s -A "HttpBrowser/1.0" -m3 #{domain} >nul 2>&1
#{curl_path} -s -A "Wget/1.9+cvs-stable (Red Hat modified)" -m3 #{domain} >nul 2>&1
#{curl_path} -s -A "Opera/8.81 (Windows NT 6.0; U; en)" -m3 #{domain} >nul 2>&1
#{curl_path} -s -A "*<|>*" -m3 #{domain} >nul 2>&1

Dependencies: Run with powershell!

Description: Curl must be installed on system
Check Prereq Commands:
if (Test-Path #{curl_path}) {exit 0} else {exit 1}
Get Prereq Commands:
New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction Ignore -Force | Out-Null
Invoke-WebRequest "https://curl.se/windows/dl-8.6.0_2/curl-8.6.0_2-win32-mingw.zip" -Outfile "PathToAtomicsFolder\..\ExternalPayloads\curl.zip"
Expand-Archive -Path "PathToAtomicsFolder\..\ExternalPayloads\curl.zip" -DestinationPath "PathToAtomicsFolder\..\ExternalPayloads\curl"
Copy-Item "PathToAtomicsFolder\..\ExternalPayloads\curl\curl-8.6.0_2-win32-mingw\bin\curl.exe" #{curl_path}
Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\curl"
Remove-Item "PathToAtomicsFolder\..\ExternalPayloads\curl.zip"


Atomic Test #3 - Malicious User Agents - Nix

This test simulates an infected host beaconing to command and control. Inspired by APTSimulator - https://github.com/NextronSystems/APTSimulator/blob/master/test-sets/command-and-control/malicious-user-agents.bat (opens in a new tab)

Supported Platforms: Linux, macOS

auto_generated_guid: 2d7c471a-e887-4b78-b0dc-b0df1f2e0658

Inputs:

NameDescriptionTypeDefault Value
domainDefault domain to simulate againststringwww.google.com (opens in a new tab)

Attack Commands: Run with sh!

curl -s -A "HttpBrowser/1.0" -m3 #{domain}
curl -s -A "Wget/1.9+cvs-stable (Red Hat modified)" -m3 #{domain}
curl -s -A "Opera/8.81 (Windows NT 6.0; U; en)" -m3 #{domain}
curl -s -A "*<|>*" -m3 #{domain}