T1583.004

Server

Adversaries may buy, lease, rent, or obtain physical servers that can be used during targeting. Use of servers allows an adversary to stage, launch, and execute an operation. During post-compromise activity, adversaries may utilize servers for various tasks, such as watering hole operations in Drive-by Compromise, enabling Phishing operations, or facilitating Command and Control. Instead of compromising a third-party server or renting a Virtual Private Server, adversaries may opt to configure and run their own servers in support of operations. Free trial periods of cloud servers may also be abused. Real-world examples include GALLIUM operating Taiwan-based exclusive servers, Kimsuky purchasing hosting servers with virtual currency and prepaid cards, Sandworm Team leasing servers through resellers to obscure attribution, Earth Lusca acquiring multiple servers with distinct roles per operation, Mustard Tempest hosting second-stage SocGholish payloads on short-lived acquired servers, and CURIUM creating dedicated servers for C2 and exfiltration. Because the adversary action of acquiring the server occurs entirely outside the target environment, detection must focus on identifying the operational use of adversary-controlled server infrastructure: C2 beaconing patterns, connections to known malicious hosting infrastructure, and suspicious DNS resolution to adversary-controlled domains.

Microsoft Sentinel / Defender
kusto
// Detect potential C2 beaconing to adversary-controlled server infrastructure
// Primary strategy: regular-interval outbound connections from non-browser processes to public IPs
let TimeWindow = 24h;
let MinConnections = 10;
let KnownGoodDomains = dynamic([
  "microsoft.com", "windows.com", "windowsupdate.com", "office.com",
  "live.com", "azure.com", "microsoftonline.com", "office365.com",
  "akamaiedge.net", "akamaitechnologies.com", "cloudflare.com",
  "cloudflare-dns.com", "amazonaws.com", "googleusercontent.com",
  "googleapis.com", "apple.com", "icloud.com", "digicert.com",
  "verisign.com", "ocsp.sectigo.com", "crl.microsoft.com",
  "ctldl.windowsupdate.com", "login.microsoftonline.com"
]);
let SuspiciousProcesses = dynamic([
  "powershell.exe", "pwsh.exe", "cmd.exe", "wscript.exe", "cscript.exe",
  "rundll32.exe", "regsvr32.exe", "mshta.exe", "certutil.exe",
  "bitsadmin.exe", "curl.exe", "wget.exe", "msiexec.exe",
  "odbcconf.exe", "wmic.exe", "msbuild.exe", "csc.exe"
]);
DeviceNetworkEvents
| where Timestamp > ago(TimeWindow)
| where ActionType == "ConnectionSuccess"
| where RemoteIPType == "Public"
| where not(RemoteUrl has_any (KnownGoodDomains))
| where InitiatingProcessFileName !in~ (
    "msedge.exe", "chrome.exe", "firefox.exe", "iexplore.exe",
    "opera.exe", "brave.exe", "outlook.exe", "teams.exe",
    "slack.exe", "zoom.exe", "onedrive.exe", "dropbox.exe",
    "steam.exe", "msedgewebview2.exe", "MicrosoftEdgeCP.exe"
  )
| summarize
    ConnectionCount = count(),
    FirstSeen = min(Timestamp),
    LastSeen = max(Timestamp),
    DistinctPorts = dcount(RemotePort),
    Ports = make_set(RemotePort, 10),
    Processes = make_set(InitiatingProcessFileName, 5)
  by DeviceName, AccountName, RemoteIP, RemoteUrl
| where ConnectionCount >= MinConnections
| extend DurationMinutes = datetime_diff('minute', LastSeen, FirstSeen)
| where DurationMinutes > 30
| extend AvgIntervalMinutes = toreal(DurationMinutes) / toreal(ConnectionCount)
| extend IsSuspiciousProcess = Processes has_any (SuspiciousProcesses)
| extend IsBeaconInterval = AvgIntervalMinutes between (0.5 .. 60.0)
| where IsBeaconInterval or IsSuspiciousProcess
| extend RiskScore = case(
    IsSuspiciousProcess and IsBeaconInterval, 3,
    IsSuspiciousProcess, 2,
    IsBeaconInterval and ConnectionCount > 30, 2,
    1
  )
| project
    Timestamp = LastSeen,
    DeviceName,
    AccountName,
    RemoteIP,
    RemoteUrl,
    ConnectionCount,
    DurationMinutes,
    AvgIntervalMinutes,
    DistinctPorts,
    Ports,
    Processes,
    IsSuspiciousProcess,
    IsBeaconInterval,
    RiskScore
| sort by RiskScore desc, ConnectionCount desc
medium severity medium confidence

Data Sources

Network Traffic: Network Connection Creation Network Traffic: Network Traffic Flow Microsoft Defender for Endpoint

Required Tables

DeviceNetworkEvents

False Positives

  • Monitoring and telemetry agents (Datadog, Elastic Agent, Splunk Universal Forwarder, Dynatrace OneAgent) making regular check-ins to cloud-hosted collection endpoints at consistent intervals
  • Software update mechanisms (Chocolatey, WinGet, vendor update services) polling cloud update servers not covered by the known-good domain exclusion list
  • Enterprise applications with cloud-hosted license servers or API backends making periodic heartbeat connections
  • Remote management and monitoring tools (ConnectWise, N-able, TeamViewer, Splashtop) maintaining persistent outbound management connections
  • Security tools performing regular threat intelligence feed updates, CRL checks, or OCSP queries to non-standard CA endpoints
  • DevOps pipeline agents (GitHub Actions runner, Jenkins agent, GitLab runner) polling orchestration servers at regular intervals

Unlock Pro Content

Get the full detection package for T1583.004 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections