skip to content

Staying Resident and Reachable

Access is worth only what survives a reboot and a takedown: the trigger that relaunches the code, the carrier the estate already permits, and how an implant finds a new address once the first is gone.

on this pageshow

explore

questions

8

Why does an implant pick HTTPS to a permitted destination over a hard-coded IP on a custom port?

level: juniorimportance: must knowfreq 72%

answer

  1. the path has to already exist
  2. nothing new is opened on the way out
  3. it travels with everyone else's browsing
  4. blocking cost decides whether it survives

basics

~20 s

Because the path already exists. In a fully proxied estate an arbitrary address on an odd port has no route outward at all, while port 443 to a destination the organisation already permits needs no new opening and looks like ordinary browsing.

solid answer

~50 s

The carrier is chosen before the first outbound request, and the code does not get to invent a path. In an estate where every request must traverse a forward proxy and only the internal resolver may speak outward, a compiled-in address on a custom port simply never leaves: nothing forwards it, and the operator loses the foothold they just worked to get. HTTPS to a destination the business already reaches - a large hosting or content-delivery domain, a service the organisation is contractually obliged to permit - uses the path that exists, needs nothing opened, and arrives mixed in with the same requests every employee makes. It is also block economics: a compiled-in address costs the operator nothing and dies at the first block, while a destination the victim cannot afford to stop reaching survives being noticed.

go deeper

for a junior

Be ready to say why an outbound path has to already exist before code can use it, and why 443 to a well-known destination is the cheapest such path in a corporate network.

for a middle

Explain what the proxy mediates on that path, and why a compiled-in address on a custom port never leaves a fully proxied estate rather than merely being noticed.

for a senior

Show the block economics: judge which destinations your organisation could realistically stop reaching, and argue why address blocking only prices out the cheap end of the market.

for a principal

Own the tradeoff between an allow-listed egress posture and the business friction it creates, and be able to state exactly what residual channel each exception accepts.

### The choice, and when it is made A command channel is the path from code on a victim host back to whoever is operating it. The choice of *carrier* - which protocol, which port, which destination - is made when the implant is built, before it has ever spoken to its operator. Everything else about the intrusion is negotiable later; this is not, because a foothold that cannot reach out is worth nothing. ### Why arbitrary egress is a dead end Consider an estate with no direct outbound path at all: every web request must traverse an authenticating forward proxy, and the internal resolver is the only thing permitted to talk to the outside world. Code that opens a socket to `203.0.113.10:4444` in that estate does not get filtered - it gets *nowhere*. There is no default route for it, no device configured to relay it, and no fallback. The operator loses the host silently. This is why carrier choice is a design constraint rather than a stealth preference. The implant has to use a path the estate maintains for its own reasons: HTTP through the proxy, or name resolution through the resolver. Those are the two doors, and both are held open by the business, not by the attacker. ### What a permitted destination actually buys Three things, and they are different from each other: 1. **A route.** Port 443 to a name in a category the proxy allows is relayed because relaying it is the proxy's job. Nothing has to be opened, disabled, or reconfigured on the victim's side. 2. **Company.** The same destination is being reached all day by real users and real software updaters. The implant's requests are not the only ones going there, which raises the cost of separating them from everything else. 3. **Block resistance.** This is the part candidates usually miss. A destination is only useful for as long as the victim tolerates it. A throwaway address costs nothing to abandon *and* nothing to block. A destination the organisation is contractually or operationally obliged to reach cannot be closed without breaking the business, so blocking it is a decision with a price attached. ### The economics behind the two ends of the market The contrast is sharp. Commodity crimeware compiles in an address or a cheap throwaway name. It is disposable by design: the operator expects to lose implants and compensates with volume. Against a fully proxied estate it often never connects once. A well-resourced operator pays for the other side of that trade. They acquire presence on infrastructure the victim already permits - shared hosting, a large provider, a service the organisation is obliged to reach - and accept the constraints that come with it: shared tenancy, provider policy, the risk of the account being pulled, ongoing cost and re-registration. What they buy is a channel that survives being identified, because the counter-move costs the victim something. This is what *well-resourced* predicts in practice. Not exotic code - infrastructure the defender cannot cheaply take away. ### The control class that bites Blocking an address is a tax on the cheap end of the market. It works against the compiled-in destination and does nothing against the operator who can buy another permitted-looking one. The control class that removes what this technique depends on is the one that removes *arbitrary permitted egress*: default-deny outbound with an allow-listed set of destinations, so that landing on something inside the list stops being free. That posture has a real business cost, which is exactly why most estates do not have it and why the technique keeps working. ### What the choice does not buy A permitted destination does not make the request unmediated. It still goes through the proxy, it still names a destination, and it still has to be authenticated on the way out in an estate that demands it. The operator gains permission, not invisibility - and confusing those two is the most common error in reasoning about this.

  • What does the operator give up by using a large shared hosting destination instead of their own address?
    Control and predictability. The destination is shared with real customers, can be reassigned or pulled by the provider without warning, and has to be paid for or re-registered. They also inherit the provider's own limits on request size, rate and content. What they buy for that is a path the victim already permits and cannot cheaply close.
  • Which control class actually takes away what this choice depends on?
    One that removes arbitrary permitted egress, not one that blocks an address. Under default-deny outbound with an allow-listed destination set, choosing a permitted carrier stops being free - the operator has to land on something already inside the list. Blocking single addresses only prices out the commodity end of the market, because a resourced operator buys another permitted-looking destination.

A courier who can only leave through the staffed front door does not cut a hole in the wall - they walk out carrying the same kind of parcel everyone else is carrying.

saying these in an interview costs you the question

  • Says the implant just opens a socket to any address it likes
  • Thinks HTTPS hides the destination from the proxy
  • Assumes an unusual port is stealthier than 443
  • Treats blocking one address as removing the channel

context

open as a page

Why can whoever holds a malware sample pre-register its generated C2 domains?

level: middleimportance: must knowfreq 48%

basics

~20 s

Because the generator is deterministic. Algorithm plus seed — usually the current date and a constant compiled in — produces the same names for the implant and for anyone running the sample forward, so future names are computable, not secret.

open as a page

Your proxy re-originates TLS on every outbound session - why doesn't that remove command and control?

level: seniorimportance: must knowfreq 56%

basics

~20 s

Interception yields plaintext only where the endpoint trusts the interception authority and does not pin, and exempt populations exist by design. Even where it works, the recovered body can be encrypted by the implant itself - and the destination was permitted anyway.

open as a page

Why does malware ship with more than one command-and-control address?

level: juniorimportance: should knowfreq 55%

basics

~20 s

Because the first address gets seized, suspended or switched off, and an implant that cannot reach its operator is dead code. Fallback paths are the operator's insurance against losing an entire installed base to one removal.

open as a page

How does an internal DNS resolver carry commands for a host with no outbound path?

level: middleimportance: should knowfreq 44%

basics

~20 s

The host never talks outside. It asks the internal resolver, which recurses on its behalf; the name asked for is attacker-chosen data, and the operator's own authoritative server answers it. Bytes cross both ways through a permitted intermediary.

open as a page

Fast flux rotates hundreds of addresses behind one name — what is the fixed point?

level: middleimportance: should knowfreq 38%

basics

~20 s

The name's delegation. Addresses churn every few minutes among disposable relay hosts and, under double flux, the nameservers move too — but the parent zone's delegation of that name is single, static and held at the registry.

open as a page

How does implant code get out through a forward proxy that demands authentication?

level: middleimportance: nice to knowfreq 34%

basics

~20 s

It borrows the logged-on user. The platform's own HTTP stack already knows the configured proxy and answers its challenge with the session's Kerberos ticket or NTLM response, so the channel leaves as that user with no password ever typed.

open as a page

As a registrar's abuse engineer, do you suspend 30,000 pre-computed botnet domains?

level: principalimportance: nice to knowfreq 20%

basics

~20 s

Mostly no, and never on the list alone. A registrar can act only on names it sponsors, with evidence and legal cover. Most of a crop is unregistered or held elsewhere, and acting early just moves the population one rung down.

open as a page