Detect Virtual Private Server in Elastic Security
Adversaries may rent Virtual Private Servers (VPSs) to stage malicious infrastructure including command-and-control (C2) servers, phishing pages, payload delivery endpoints, and exfiltration destinations. VPS providers offer rapid provisioning, geographic flexibility, and—when chosen carefully—minimal registration requirements, making attribution difficult. Because VPS-hosted IPs typically carry commercial hosting ASN reputation rather than residential or known-malicious reputation, they can evade naive geo-blocking and ASN-based controls. Real-world actors documented using this technique include Gamaredon, APT28, LAPSUS$, Ember Bear (GRU Unit 29155), HAFNIUM, APT42, Moonstone Sleet, and Contagious Interview. Detection from a defender perspective focuses on three observable effects: outbound C2 beaconing FROM compromised endpoints TO VPS-hosted IPs, inbound attack traffic (scanning, exploit delivery, phishing redirectors) FROM VPS IP ranges, and identity-based signals such as authentication attempts from datacenter IP space. Because T1583.003 is a Resource Development technique (TA0042), it is not directly observable on victim endpoints—detection is necessarily inferential, relying on behavioral patterns that betray VPS-based infrastructure in use.
MITRE ATT&CK
- Tactic
- Resource Development
- Technique
- T1583 Acquire Infrastructure
- Sub-technique
- T1583.003 Virtual Private Server
- Canonical reference
- https://attack.mitre.org/techniques/T1583/003/
Elastic Detection Query
network where event.type == "connection" and
network.direction == "egress" and
not destination.ip : ("10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "127.0.0.0/8", "::1", "169.254.0.0/16", "224.0.0.0/4", "255.255.255.255") and
not process.name : (
"chrome.exe", "firefox.exe", "msedge.exe", "microsoftedgecp.exe",
"iexplore.exe", "brave.exe", "opera.exe", "safari.exe", "waterfox.exe",
"svchost.exe", "MsMpEng.exe", "wuauclt.exe", "TrustedInstaller.exe",
"msiexec.exe", "teams.exe", "onedrive.exe", "ccmexec.exe"
)
with runs=12 Detects C2 beaconing to VPS-hosted infrastructure by identifying non-browser, non-system processes that make repeated outbound connections (12 or more) to the same public IP within a sliding window. Uses EQL 'with runs=12' to trigger on 12+ occurrences of the same process-to-destination pattern. Deploy as a Threshold or EQL rule in Elastic Security. For richer aggregation (connections-per-minute, byte ratios, unique port counts), pair with an ES|QL rule or Lens aggregation over the same index.
Data Sources
Required Tables
False Positives & Tuning
- Endpoint management agents (SCCM ccmexec.exe, Tanium, BigFix) perform high-frequency check-ins to management servers hosted on cloud or VPS infrastructure; exclude by process name and destination IP/hostname after baselining.
- Telemetry and observability agents such as Elastic Agent, Splunk Universal Forwarder, Datadog agent, and New Relic infrastructure agent make regular heartbeat connections to cloud-hosted collectors; these should be excluded by process path or destination subnet.
- Custom in-house monitoring scripts or scheduled tasks written in Python, PowerShell, or Go that poll internal or external APIs at regular intervals will generate the same beacon-like pattern; correlate against scheduled task or cron baseline to distinguish.
Other platforms for T1583.003
Testing Methodology
Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Simulate C2 Beacon via PowerShell HTTP Check-in to VPS-like Endpoint
Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe and CommandLine containing '-WindowStyle Hidden' and 'Invoke-WebRequest'. Sysmon Event ID 3: 15 network connections from powershell.exe to 127.0.0.1:8443 at approximately 5-second intervals. PowerShell ScriptBlock Log Event ID 4104 with the full script body.
- Test 2Simulate VPS Payload Download via LOLBin (certutil)
Expected signal: Sysmon Event ID 1: Process Create with Image=certutil.exe and CommandLine containing '-urlcache' and '-f'. Sysmon Event ID 3: Network Connection from certutil.exe to 127.0.0.1:8080. Sysmon Event ID 11: File Create attempt for %TEMP%\df00tech-vps-test.exe (may not succeed if no listener). Security Event ID 4688 (if command line auditing enabled).
- Test 3Simulate VPS-based Reconnaissance Inbound Scan Detection (nmap from localhost)
Expected signal: Linux auditd: syscall execve for nmap with full argument list. Syslog: nmap process execution. Network: TCP SYN packets to localhost ports 22, 80, 443, 3389, 8080, 8443. If monitoring inbound scan patterns on perimeter, this generates SYN packets with no corresponding application connection.
- Test 4Simulate Azure AD Authentication from VPS IP Range via PowerShell Graph API Call
Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe. Sysmon Event ID 3: Network Connection from powershell.exe to login.microsoftonline.com:443. Sysmon Event ID 22 (DNS Query): DNS resolution of login.microsoftonline.com. PowerShell ScriptBlock Log Event ID 4104.
References (12)
- https://attack.mitre.org/techniques/T1583/003/
- https://documents.trendmicro.com/assets/wp/wp-criminal-hideouts-for-lease.pdf
- https://michaelkoczwara.medium.com/cobalt-strike-c2-hunting-with-shodan-c448d501a6e2
- https://threatconnect.com/blog/infrastructure-research-hunting/
- https://cloud.google.com/blog/topics/threat-intelligence/scandalous-external-detection-using-network-scan-data-and-automation/
- https://www.cisa.gov/news-events/cybersecurity-advisories/aa24-249a
- https://www.microsoft.com/en-us/security/blog/2022/03/22/dev-0537-criminal-actor-targeting-organizations-for-data-exfiltration-and-destruction/
- https://unit42.paloaltonetworks.com/unit-42-gamaredon-group-russia-linked/
- https://www.sentinelone.com/labs/winter-vivern-all-you-need-is-one-side-loading-and-a-good-lure/
- https://www.ic3.gov/Media/News/2022/220211.pdf
- https://learn.microsoft.com/en-us/azure/sentinel/understand-threat-intelligence
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-devicenetworkevents-table
Unlock Pro Content
Get the full detection package for T1583.003 including response playbook, investigation guide, and atomic red team tests.