Compliance

Phase 1, Phase 2, then keep it running

A fixed-price gap analysis, remediation through to your audit, and upkeep after it. All in a workspace you keep.

All compliance →
Security

Find it before a buyer does

Testing, assessments and security leadership, run by the researcher who found the Mirai botnet kill switch.

All security →
Industries

Prove you are secure

To the people you sell to, raise from or answer to.

All industries →
Resources

Learn the space

Original research, free tools and plain-language guides, from a published security researcher.

Read the blog →
Security

How to Check if an Edge Appliance Was Compromised After You Patch It

Patching an internet-facing appliance fixes the vulnerability. It does not remove webshells, planted accounts, stolen session tokens or config changes an attacker made before you got there. After you apply the update, you need a deliberate compromise check: review authentication logs, compare the running configuration against a known good baseline, look for unexpected files and accounts on the appliance, and invalidate every active session and credential that passed through it.

This comes up now because the Canadian Centre for Cyber Security issued alert AL26-024 on September 27 for two critical vulnerabilities in Citrix NetScaler ADC and NetScaler Gateway, then updated it again on October 3. When the same alert moves twice in a week, the situation on the ground is changing, not the paperwork.

The order of work on the day the advisory lands

Teams under pressure tend to patch first and think second. The patch is urgent, but a few minutes spent before it saves a great deal of guesswork afterwards, because an update can restart services, rotate logs or clear temporary directories that held the only trace of what happened.

  • Confirm exposure. Check the exact version and build on every affected device against the advisory. Include the standby unit in a high availability pair and any test or disaster recovery appliance someone forgot was internet facing.
  • Preserve first. Take a support bundle or diagnostic archive and export the logs from the device before you change anything. Note the time and who took it.
  • Patch. Apply the fixed version through your normal emergency change path and record the change.
  • Check for compromise. Work through the list below. Use any indicator of compromise script the vendor or the advisory provides, but treat it as one input rather than the whole check.
  • Reset. Kill sessions and rotate credentials only after you have captured what you need, since a reset removes the evidence of which sessions were active.
  • Watch. Keep closer monitoring on the device and the accounts that used it for a few weeks. Attackers who lost their foothold sometimes come back with credentials they stole while they had it.

What to look for after the patch

  • Config diff. Export the running config and compare it to your last known good copy. Attackers add authentication policies, bind scripts and redirect rules that survive an update.
  • Accounts and keys. List local admin accounts, API keys and SSH keys on the device. Anything you cannot trace to a person or a ticket gets removed.
  • Files on disk. Appliance shells are restricted for a reason, but if the vendor gives you a way to list recently modified files in web-accessible directories, use it. Webshells are the common persistence method on gateways.
  • Authentication logs. Look for logins from unusual geographies, successful authentications without a matching MFA event, and sessions that ran long after business hours.
  • Outbound traffic. Check your firewall or flow logs for connections initiated by the appliance itself to addresses you do not recognize. A gateway should rarely be the one calling out.
  • Session and credential reset. Kill all active sessions, rotate the device admin credentials, rotate any service account the appliance holds, and force reauthentication for users whose tokens could have been captured.

If you find something you cannot explain, stop touching the device and preserve what you have. A support bundle and a log export taken before you start cleaning are worth more than a tidy box.

When the check becomes an incident

A compromise check that finds nothing is routine operations. One that finds an unexplained account, a modified configuration or traffic you cannot account for has turned into an incident, and your incident response plan should take over from the patching ticket. Decide in advance where that line is, so nobody has to argue about it at midnight.

Once you are in incident territory, the questions change from what is on the box to what passed through it. A remote access gateway sees credentials, session tokens and, depending on configuration, traffic to internal applications. Work out which users authenticated through the device during the exposure window, which internal systems they could reach, and whether any of those systems hold personal information.

That last point drives your notification duties. Under PIPEDA, a breach of security safeguards involving personal information that creates a real risk of significant harm must be reported to the Privacy Commissioner and to affected individuals as soon as feasible, and every breach of safeguards must be recorded and the record kept for 24 months, whether or not it was reportable. Your customer contracts may impose shorter notification timelines of their own. Bring counsel in early if the answer is anything other than a clear no, and see what to do after a data breach for the steps that follow.

Free weekly email

Get The Compliance Brief every Tuesday

One email a week from Jacob Masse: the security and compliance stories that changed something that week, and what each one means if you sell software to enterprise buyers. Five stories, a take on each, five minutes to read.

Free. Unsubscribe in one click, and replies reach Jacob directly. Read the latest issue or browse the archive.

Nobody owns the gateway

In assessments, the edge appliance is almost always the piece of the stack with no named owner. It was installed by someone who has since left, it sits outside the configuration management the application team uses, and its patch cadence depends on whoever happens to read the vendor bulletin. That is why it gets compromised. Put a person's name against every internet-facing device in your asset inventory, with a documented patch window and a defined source for vendor advisories. The security side of the house gets much easier once that list is real.

What auditors expect to see

Under SOC 2 and ISO 27001, the control is not "we patched it." It is evidence that you detected the advisory, assessed exposure, acted inside your own stated timeline and considered whether an incident occurred. Keep the advisory link, the date you were notified, the affected asset list, the patch confirmation and the compromise assessment notes together in one ticket. That single artifact answers a vulnerability management question, a change management question and an incident response question at once.

Set a standing rule: any critical vulnerability on an internet-facing device triggers both a patch and a compromise check, with the second step written down even when it finds nothing. The empty result is the evidence.

Reducing your exposure before the next advisory

Edge appliances will keep producing critical advisories. The practical goal is to make the next one less dangerous and faster to assess.

  • Take the management interface off the internet. Administrative access should come from a management network or a jump host, never from any address in the world.
  • Ship logs off the device. Logs stored only on the appliance can be altered or wiped by whoever controls it. Forward authentication and system logs to a central store with enough retention to look back at least 90 days.
  • Enforce MFA on everything the gateway fronts, and on the device's own admin accounts.
  • Subscribe to the right feeds. The vendor's security bulletins and the Cyber Centre's alerts, routed to the named owner rather than a general inbox.
  • Ask whether you still need it. Some gateways exist because they were the answer to remote access years ago. If a modern zero trust access product or your identity provider can do the job, retiring the appliance removes the problem entirely.

Common questions about checking a patched appliance

Is the vendor's scanning script enough?

It checks for the indicators the vendor knew about when the script was written. It will not catch an attacker who used different tooling or cleaned up after themselves. Run it, keep the output, and do the manual checks as well.

Should we rebuild the appliance instead of cleaning it?

If you find evidence of compromise, rebuilding from a clean image and restoring a known good configuration is usually safer than trying to remove everything an attacker might have left. Many vendors recommend exactly that after a confirmed compromise.

How far back should we look?

At least to the date the vulnerability became public, and ideally to whenever exploitation is reported to have started, which can be earlier. If your logs do not reach that far, write down the gap in the assessment. Knowing where your visibility ends is part of the answer.

This started as a story in The Compliance Brief. Every Tuesday, Jacob picks the five security and compliance stories that change something for a company selling to enterprise buyers, and says what to do about each. This one was in issue 9.

Get the Brief every Tuesday

Before you go

Want the rest of this by email?

If this was useful, I send a few short notes on security posture. Unsubscribe in one click, and replies reach me directly.

From Jacob Masse, principal of traztech: the files by email, then a few short notes over the next month. No spam, unsubscribe in one click.

Want a second opinion on where you stand?

We run SOC 2, ISO 27001 and the rest of the compliance stack for startups and SMEs, and the security testing that sits behind it. The first call is free, and we will tell you if you are not ready to start yet.

Book a free call