Controls on the path: firewalls, lists, sandboxes, decoys

7 min 5 sections 4 practice questions 6 sources citedISC2 objective 7.7

A private members' club has a doorman who works from a list, and a side room where an unknown visitor waits under observation. It also has a display case of fake jewels with an alarm on it. Networks use the same ideas: firewalls, allow and deny lists, sandboxes and honeypots. No background is assumed. A security professional operates these every day and has to know what each stops, what it costs to run and where the law draws a line.

By the end of this unit you will be able to:

  • Explain what operating a firewall involves once it is installed
  • Tell apart an allow list and a deny list, and choose one for a stated case
  • Explain the two uses of a sandbox
  • Explain why any contact with a honeypot is suspicious
  • Tell apart enticement and entrapment

Four hundred rules and nobody knows why

An illustrative example

A regional theatre's firewall holds four hundred rules, added over twelve years by a succession of contractors. Few have a note saying what they are for.

One rule, written in 2019, lets a ticketing supplier's network address reach the box-office database. The theatre changed supplier three years ago. The rule is still there, and the address now belongs to a company that nobody at the theatre has heard of.

The firewall is switched on and working. What job has nobody been doing?

Running a firewall is a daily job

A firewall sits between networks and allows or refuses traffic according to a list of rules. Each generation reads more of the traffic: read addresses and port numbers, stateful firewalls also follow each conversation, and application-level proxies read the content.

Network firewall
Stands at the boundary between networks and decides by address, port, protocol and the state of the connection.
Next-generation firewall (NGFW)
Also recognises which application and which user the traffic belongs to, and usually includes .
Web application firewall (WAF)
Stands in front of one website and reads each web request for attacks on the site itself, such as database commands typed into a form. It does not replace a network firewall.

Installing a firewall is the small part. Operating it is the work.

  • The last rule refuses everything not allowed above it. This is default deny, also called implicit deny.
  • Rules are read from the top and the first match decides, so their order matters.
  • Every rule has an owner, a stated reason and a review date. Rules nobody can explain are removed.
  • Rules change only through . A rule opened for an emergency carries an expiry date.
  • Outbound traffic has rules too.
  • Decisions are logged and sent to the central log system. The firewall's own software is kept patched and its settings are backed up.

Allow lists and deny lists

A doorman can work in two ways. He can hold a list of banned people and admit everyone else, or a guest list and turn everyone else away.

A deny list names what is forbidden and permits the rest. An allow list names what is permitted and refuses the rest. Older texts say and whitelist. The lists can hold programs, websites, email senders, network addresses or devices. Applied to the programs that may run on a computer, the practice is called application control.

Allow list and deny list compared
PointAllow listDeny list
What happens to something not on the listRefusedPermitted
Stops threats nobody has seen beforeYesNo. It stops only what is already known to be bad
UpkeepHigh. Every new legitimate item must be added before it can be usedConstant. New bad items appear daily and the list is never complete
SuitsSystems with one fixed job: tills, cash machines, factory controllers, serversGeneral-purpose computers whose users' needs cannot be predicted

An allow list is default deny applied to software. A program on the list should be identified by its or by its maker's . A file name proves nothing, because malware can borrow any name.

Sandboxing: a safe room for untrusted code

A sandbox is a controlled, isolated environment in which a program runs with restricted access to the rest of the system. It has two uses.

Confinement
Untrusted programs run inside limits as a matter of routine. A web browser keeps each page apart from the computer's files. A phone keeps each app away from the data of other apps. If the code is malicious or faulty, the damage stays inside.
Detonation
A suspicious email attachment or link is opened in a disposable, isolated machine, and its behaviour is watched. Does it alter system files, or contact unknown addresses? NIST calls this a detonation chamber. Email systems often do it before delivering a message.

After each use the is reset to a clean state. Development teams use the same idea to try out new software and fixes away from live systems.

A sandbox has limits. Detonation delays delivery. Some malware checks whether it is in a sandbox and behaves well until it is released. A flaw in the sandbox itself can let code out, which is called a sandbox escape.

Honeypots and honeynets: decoys that only an intruder touches

A honeypot is a decoy system built to look attractive to an intruder. It does no real work and holds no real data. No member of staff has a reason to go near it, so every contact with it is suspicious. That gives it very few false alarms.

Honeynet
Several connected to imitate a real network.
Honeytoken
A decoy item of data: a fake account, a fake customer record, a file named passwords. Any use of it raises an alert.
Padded cell
An isolated, simulated environment to which a detected intruder is quietly moved. The intruder can do no harm there and can be observed.
Pseudo-flaw
An apparent weakness planted on purpose to tempt an intruder and reveal them.

Decoys serve three purposes. They detect an intruder who is already inside. They draw the intruder's time away from real systems. They show which tools and methods the intruder uses, which becomes .

A decoy must be completely separated from real systems, or it becomes a way in. It is watched closely, and legal advice is taken before it is set up.

Enticement is lawful, entrapment is not

The line that decides whether a decoy's evidence can be used
PointEnticementEntrapment
What is doneAn opportunity is left open for someone who already intends wrongdoingA person is persuaded or pressed into an offence they were not disposed to commit
Who takes the first stepThe intruderThe investigator
ExampleA decoy server sits on the network and an intruder finds and attacks itStaff are emailed a link promising the payroll files and urged to try it
StandingGenerally lawful and ethical. The records can be usedA defence in United States criminal law. The case may fail

United States courts treat entrapment as having two elements: the government induced the crime, and the defendant was not already disposed to commit it. Law differs between countries, which is one reason to take advice first.

For a honeypot the practical rule follows. It is left to be found. It is never advertised, and nobody is invited to attack it.

Common misconception

“A honeypot is entrapment, so what it records can never be used.”

A decoy that simply exists, and is attacked by someone who chose to look for targets, is enticement. It becomes entrapment only when people are induced to attack it.

Worked example: Clearing the theatre's firewall

The theatre's firewall has four hundred rules, few with a recorded purpose, and no implicit deny: the last rule allows any traffic that nothing above has refused.

  1. Switch on logging for every rule and collect ninety days of records, so that it is known which rules are ever used.
  2. List the rules that matched nothing in ninety days. There are 230. Each is disabled through a change request, kept for a month in case of complaint, then deleted.
  3. Find an owner for each remaining rule. The box-office manager cannot explain the 2019 supplier rule. It is removed the same day as an urgent change.
  4. Replace the final rule with implicit deny, at a quiet time and with a plan to reverse it, after the logs show nothing legitimate depends on the old rule.
  5. Record an owner, a reason and a review date against every surviving rule, and set a review of the whole list every six months.

The firewall now holds 150 rules that someone can account for, and anything not expressly allowed is refused.

A question, worked through

A hospital has 60 workstations that manage infusion pumps. Each runs the same four programs and nothing else. Updates are slow, because the maker must approve each one. The workstations' anti-malware relies on a deny list of known malicious files, updated weekly. Last month a new strain of ransomware, absent from every list, ran on two of them.

Which control would BEST prevent a repeat?

  1. An allow list that lets only the four approved programs run
  2. A deny list that is updated daily in place of the weekly update
  3. A sandbox that opens each email attachment before it is delivered
  4. A honeypot workstation placed on the same part of the network
Decide on your answer, then open the reasoning
  1. The question asks for prevention. The decisive facts are that the machines have one fixed job with four programs, and that the malware was unknown to every list.
  2. Rule out d. A honeypot would reveal an intruder moving about the network. It detects, and it does not stop a program running on a pump workstation.
  3. Rule out b. A faster deny list is still a list of the known bad. A strain on no list passes it on the first day.
  4. Option c would stop some malware that arrives by email. Nothing says that is how it arrived, and these workstations may not handle email at all.
  5. Option a refuses every program that is not one of the four, known or unknown. A small fixed set of programs is the case an allow list suits. It is the best answer.

Answer: A. An allow list that lets only the four approved programs run

Choosing between good answers

Only a small, fixed set of programs should ever run
choose an allow list. It refuses everything else, including what nobody has seen before.
An attack is carried inside requests to a website
choose a web application firewall, with a fix to the site itself. A network firewall is built to let web traffic through.
A file's behaviour is unknown and must be judged before it reaches users
choose a sandbox that opens it in isolation.
An intruder may be inside and quiet, and false alarms must be few
choose a honeypot or honeytoken.
Investigators want to tempt a suspect
choose enticement: leave an opportunity. Never choose persuading someone to offend, and involve legal counsel first.

Check your understanding

4 questions on this unit, easiest first. Confirm an answer to see the reasoning for it, then the right answer, the other options and the rule to reuse. Your answers are kept in this browser and feed readiness and review.

These questions are drafts that no named reviewer has approved yet.

Question 1 of 4

A firewall reads its rules from the top, and the first match decides. Rule 3 allows all web traffic to the server network. Rule 9 blocks web traffic from one hostile address. That address still reaches the servers.

Which change stops the hostile address?

What to remember

  • Running a firewall means default deny, ordered rules with owners and reasons, regular review, change control and logging.
  • A next-generation firewall recognises applications and users. A web application firewall protects one website by reading its requests.
  • An allow list refuses everything not named and stops unknown threats. A deny list refuses only what is named.
  • A sandbox confines untrusted code, or opens a suspicious file in isolation to watch what it does.
  • A honeypot is a decoy with no real use, so any contact is suspicious. It must be isolated from real systems.
  • Enticement leaves an opportunity for someone already intent on wrongdoing. Entrapment induces the offence and is not acceptable.

Say it from memory

  1. What do network, next-generation and web application firewalls each do, and what does running a firewall involve?

    A network firewall filters traffic between networks by address, port and connection state. A next-generation firewall adds awareness of applications and users, and intrusion prevention. A web application firewall reads web requests to protect one website. Running one means default deny, ordered rules with owners, review, change control and logging.

    Read this part again

  2. What is the difference between an allow list and a deny list?

    An allow list names what is permitted and refuses everything else. It stops unknown threats, needs upkeep and suits fixed-purpose systems. A deny list names what is forbidden and permits everything else. It stops only the known bad.

    Read this part again

  3. What are the two uses of a sandbox?

    Confinement: untrusted programs, such as web pages and phone apps, routinely run inside limits. Detonation: a suspicious file or link is opened in an isolated, disposable environment and its behaviour is watched. Some malware detects a sandbox and stays quiet.

    Read this part again

  4. What are a honeypot, a honeynet and a honeytoken, and where is the legal line?

    A honeypot is a decoy system with no real use, so any contact is suspicious. A honeynet is a network of them. A honeytoken is decoy data. Enticement, leaving an opportunity for someone already intent on wrongdoing, is lawful. Entrapment, inducing an offence, is not.

    Read this part again

Sources