Spotting who explores the network: decoys

John Smith Ltd's firewall sees everything that passes between the network and the internet and between one zone and another. What it does not see is the traffic between two computers of the same…

Situation

John Smith Ltd’s firewall sees everything that passes between the network and the internet and between one zone and another. What it does not see is the traffic between two computers of the same network: that goes through the switch.

That is exactly where a ransomware that came in with an e-mail does its work. Before encrypting, it explores the network looking for shares (SMB, port 445), remote desktops (3389), SSH and NAS, and meanwhile moves from one PC to another. By the time someone notices, the files are usually encrypted already.

IT Support Ltd, the partner, wants to know the moment the exploration begins. In Argos this is Protection → Decoys: a few addresses of each internal zone that nobody has a reason to contact. A PC that minds its own business never touches them; a scan of the network finds them all. Whoever contacts them gives themselves away, and Argos:

  • records it (who, when, with what);
  • sends a mail to the partner;
  • if you want, puts it in quarantine for an hour: it reaches neither the other zones nor the internet, but it still reaches the appliance.

The decoys are not fake services: they answer only the lookup on the network (ARP) and ping, and drop everything else. They add nothing through which to attack the appliance, and they do not touch the firewall’s rules.

Protection → Decoys in the example companyProtection → Decoys in the example company
Protection → Decoys in the example company

What you need

  • The internal zones with their interfaces (here: the offices on eth1, the guests on eth1.20, production on eth1.30; see First office, A separate guest network on a VLAN and Separating production).
  • The e-mail notifications switched on in System → E-mail notifications, so that the alarms reach the partner (see Automatic updates).
  • The pool of each network’s DHCP server. Argos knows its own, but not that of another server (an Atlas, a router, a Windows server): the decoy must stay out of that pool.
  • The IT’s tools that explore the network (inventory, monitoring), to be exempted.

Steps

The decoys

In Protection → Decoys, “Add decoy” for each internal zone:

  1. “Interface”: eth1 · lan. Its networks appear below (192.168.10.1/24).
  2. “Propose”: Argos picks a free address, about a third of the way into the network (192.168.10.77), outside its DHCP pool (.128–.254), not among the neighbours it knows and silent when tried. You can also type one yourself.
  3. “Description”: “Offices’ decoy”.
  4. “Save decoy”.

In the same way, eth1.20 · guests with 192.168.20.77 “Guest network’s decoy” and eth1.30 · production with 10.30.0.77 “Production’s decoy”.

The example company's three decoysThe example company's three decoys
The example company's three decoys

Every row says “answering”: the decoy is on the network. The save applies at once, without “Apply”.

The quarantine

In the “Quarantine” card switch on “Put in quarantine” and press “Save”. From then on a device that sets off an alarm, for an hour:

  • does not reach the other zones and the internet;
  • still reaches the appliance: console, SSH, DNS and DHCP.

A device that keeps contacting a decoy stays in quarantine. The quarantine never takes a gateway, a router, a DNS or DHCP server the appliance uses, nor an exempted source.

If you prefer to start gently, leave it off for a few days: the contacts arrive all the same, and you see who touches the decoys before deciding.

The IT’s tools

The IT’s inventory tool explores the network as part of its job and would touch the decoys. In Protection → Exemptions, “Add source” with its address, the description “Network inventory”, “Decoys” on and “DNS protection” and “Inspection” off. Its contacts stay visible, with the “excluded” badge, but set off no alarm. See Protection, “Exemptions”.

Verification

From an office PC, in PowerShell:

Test-NetConnection 192.168.10.77 -Port 445

The command does not find the port open: the decoy drops silently. Within a minute:

  • the “Contacts” card shows the PC with the “alarm” badge and tcp/445;
  • if the quarantine is on, the PC no longer browses and has the “in quarantine” badge; the appliance’s console still answers it;
  • the mail “A device contacted a decoy” (or “… and is in quarantine”) arrives;
  • Status shows the warning in the “Attention” strip.
The example company's contacts: a guest that explored its network, a PC looking for shares, the NAS's ARP requestThe example company's contacts: a guest that explored its network, a PC looking for shares, the NAS's ARP request
The example company's contacts: a guest that explored its network, a PC looking for shares, the NAS's ARP request

Then, in the “Quarantine” card, “Release” on the PC’s row: the PC browses again at once.

The “Quarantine” card with the guest in quarantineThe “Quarantine” card with the guest in quarantine
The “Quarantine” card with the guest in quarantine

Reading the contacts

What you see What it means What to do
An office PC with “alarm” on tcp/445, tcp/139 It was looking for shares on addresses it does not know: that is how a ransomware or a worm behaves. Unplug the PC from the network and have it checked. The quarantine keeps it away from the other zones and the internet, not from the other PCs of the same network.
A guest with “alarm” on many ports A scan of the guest network: an infected device or someone being curious. The guest network is separate; the quarantine keeps it off the internet for an hour.
“clue”, only “ARP request” A device looked for the address and then did not contact it: an old address in a configuration, a NAS looking for printers. Keep an eye on it; if it repeats, find out which device it is.
“clue”, only “ping” A monitoring tool or a test ping. If it is the IT’s, exempt it.
The IT’s tool with “alarm” It is not exempted yet. Exempt it as above.

If something goes wrong

Symptom Cause Remedy
The decoy says “waiting for its interface” The VLAN or the NIC is not there yet (it has not come up yet). Check Network and uplinks → Interfaces; the decoy starts as soon as the interface is there.
The decoy says “out of line” The interface left its zone or moved to the WAN side, or a DHCP pool now covers the address. The row says which. Put the interface back in an internal zone, or give the decoy another address.
“Something answers at this address: it is in use” A device already has that address, perhaps one that is usually off. Pick another one with “Propose”.
A client reports an IP address conflict Another DHCP server handed out the decoy’s address. Move the decoy out of that server’s pool.
No mail The e-mail notifications are off (the “Quarantine” card says so), or a mail for the same device already went out in the last six hours. Switch them on in System → E-mail notifications.
A device in quarantine still talks to the PCs of its network That traffic goes through the switch, not through the appliance. Unplug it from the network (or switch off its port on the switch).
Status says “Decoys: N not answering” An enabled decoy is not on the network: its row says why. See the rows above.

For the technician The decoys are L2 ipvlan interfaces in the network namespace argos-decoy (ip netns exec argos-decoy ip -br addr), with their own rules (ip netns exec argos-decoy nft list ruleset). The quarantine is nft list table inet argos_decoy. The contacts come from the kernel journal: journalctl -k --grep 'argos-(drop|pass|arp) decoy-'. The service at boot is argos-decoy.service, the read every minute argos-decoy-watch.timer. From the shell: argos firewall decoys (see Argos from the shell).

LET’S TALK INFRASTRUCTURE

Control starts with a conversation.

Tell us about your infrastructure. Let’s start with what you actually need.

Talk to an engineer