Junos OS Security Objects · Topic 2 of 4

Screens

Learn SRX screen options: ICMP, IP, TCP and UDP attack checks, SYN flood protection, applying an ids-option to a zone and reading screen statistics.

  • 6 min
In a nutshell
  • Screens are defined under security screen ids-option <name> and applied with security zones security-zone <zone> screen <name>.
  • One profile per zone; a profile can be reused on many zones.
  • Screens are checked on the ingress zone, first in the first packet path and also on the fast path.

What it is

A screen is a built-in check that protects a zone from network-level attacks: floods, scans and malformed or suspicious packets. Screens are grouped into a named screen profile, called an ids-option, and the profile is applied to a security zone.

Screens run at the very start of flow processing, before the route and policy lookup, so a flood can be dropped before it costs the SRX a session.

Packet arrivesIngress zonescreen profileattackDroppedand countedIngress zonescreen profilecleanSession lookup

How it works

Two steps: define, then apply

You define the screen options in a profile under security screen ids-option, then attach that profile to a zone. A profile that is not applied to any zone does nothing.

security {
    screen {
        ids-option UNTRUST-SCREEN {
            icmp {
                ping-death;
                ip-sweep;
            }
            ip {
                spoofing;
                source-route-option;
                tear-drop;
            }
            tcp {
                syn-flood;
                land;
                port-scan;
            }
        }
    }
    zones {
        security-zone untrust {
            screen UNTRUST-SCREEN;
        }
    }
}

The same profile in set form:

user@srx# set security screen ids-option UNTRUST-SCREEN icmp ping-death
user@srx# set security screen ids-option UNTRUST-SCREEN icmp ip-sweep
user@srx# set security screen ids-option UNTRUST-SCREEN ip spoofing
user@srx# set security screen ids-option UNTRUST-SCREEN ip source-route-option
user@srx# set security screen ids-option UNTRUST-SCREEN ip tear-drop
user@srx# set security screen ids-option UNTRUST-SCREEN tcp syn-flood
user@srx# set security screen ids-option UNTRUST-SCREEN tcp land
user@srx# set security screen ids-option UNTRUST-SCREEN tcp port-scan
user@srx# set security zones security-zone untrust screen UNTRUST-SCREEN

A zone takes one screen profile, and one profile can be applied to many zones.

Screen categories

CategoryExample optionsProtects against
ICMPping-death, flood, ip-sweep, large, fragmentOversized pings, ICMP floods, host discovery sweeps
IPspoofing, source-route-option, tear-drop, bad-option, unknown-protocolSpoofed sources, IP options abuse, overlapping fragments
TCPsyn-flood, land, port-scan, syn-fin, tcp-no-flag, winnukeSYN floods, scans and illegal flag combinations
UDPflood, udp-sweepUDP floods and sweeps
Session limitslimit-session source-ip-based, destination-ip-basedOne host opening too many sessions

Common attacks and their screens

AttackWhat it isScreen
Ping of deathAn oversized, fragmented ICMP packet that crashes old stacksicmp ping-death
Land attackA SYN whose source and destination address are the sametcp land
TeardropFragments with overlapping offsetsip tear-drop
IP address spoofingA source address that does not match the route back to itip spoofing
IP sweepICMP echo to many addresses to find live hostsicmp ip-sweep
Port scanProbes to many ports on one hosttcp port-scan
SYN floodMany SYNs that are never completedtcp syn-flood

The spoofing screen checks the source address against the route table. If the route back to the source does not point out the interface the packet arrived on, the packet is treated as spoofed.

SYN flood thresholds

The syn-flood screen has its own thresholds, such as alarm-threshold, attack-threshold, source-threshold and destination-threshold. Above the attack threshold, the SRX starts protecting the targets of the flood.

user@srx# set security screen ids-option UNTRUST-SCREEN tcp syn-flood attack-threshold 500
user@srx# set security screen ids-option UNTRUST-SCREEN tcp syn-flood alarm-threshold 250

Where screens run in the flow

Screens are the first step of the first packet path and they are also checked on the fast path. They are applied on the ingress zone only.

Ingress zone screensStatic anddestination NATRoute lookupPolicy lookup

Because screens come before the policy lookup, a packet blocked by a screen never reaches the security policies, and no policy log or hit count shows it.

Alarm without drop

To test a profile before enforcing it, you can make it log matches without dropping:

user@srx# set security screen ids-option UNTRUST-SCREEN alarm-without-drop

Monitoring screens

CommandShows
show security screen ids-option UNTRUST-SCREENThe options configured in a profile
show security screen statistics zone untrustCounters of packets each screen has caught in that zone
show security zones untrustWhich screen profile the zone uses
clear security screen statistics zone untrustResets the zone's screen counters
user@srx> show security screen statistics zone untrust
Screen statistics:
  IDS attack type                              Statistics
  ICMP flood                                   0
  ICMP ping of death                           14
  TCP land attack                              3
  TCP SYN flood                                0
Exam tip

When traffic disappears with no policy deny in the logs, check show security screen statistics for the ingress zone. A screen drop happens before the policy lookup, so it is invisible to policy counters.

Common mistakes

Defining a profile but never applying it. An ids-option does nothing until a zone references it with screen.

Applying the screen to the wrong zone. Screens check traffic arriving on the zone. To protect against attacks from the internet, apply the profile to the zone that faces the internet.

Expecting a policy to override a screen. Screens run before the policy lookup. A permit policy cannot let through a packet that a screen drops.

Thinking screens are per interface. Screen profiles are applied per zone, and every interface in that zone gets the same checks.

Watch out

Tight thresholds, such as a low session limit or SYN flood threshold, can drop legitimate traffic from busy hosts or NAT gateways. Exam scenarios sometimes describe users losing access right after a screen change.

What to remember for the exam

  • Screens are defined under security screen ids-option <name> and applied with security zones security-zone <zone> screen <name>.
  • One profile per zone; a profile can be reused on many zones.
  • Screens are checked on the ingress zone, first in the first packet path and also on the fast path.
  • Categories: ICMP, IP, TCP, UDP and session limits.
  • Land is same source and destination; teardrop is overlapping fragments; ping of death is an oversized ICMP packet.
  • alarm-without-drop logs matches without dropping.
  • show security screen statistics zone <zone> shows what was caught.

Check yourself

  • A screen profile is configured but its counters stay at zero during an attack. What is the likely cause?

    The profile is not applied to the ingress zone with set security zones security-zone <zone> screen <name>.

  • Can a permit policy allow a packet that a screen drops?

    No. Screens run before the policy lookup, so the packet is dropped before any policy is checked.

  • Which screen catches a SYN whose source and destination IP addresses are identical?

    The tcp land screen.

Topic 2 of 4 in Junos OS Security Objects

Test yourself on Junos OS Security Objects

The full Juniper JNCIA-SEC JN0-232 question bank has 658 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Juniper. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.