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
- Screens are defined under
security screen ids-option <name>and applied withsecurity 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.
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
| Category | Example options | Protects against |
|---|---|---|
| ICMP | ping-death, flood, ip-sweep, large, fragment | Oversized pings, ICMP floods, host discovery sweeps |
| IP | spoofing, source-route-option, tear-drop, bad-option, unknown-protocol | Spoofed sources, IP options abuse, overlapping fragments |
| TCP | syn-flood, land, port-scan, syn-fin, tcp-no-flag, winnuke | SYN floods, scans and illegal flag combinations |
| UDP | flood, udp-sweep | UDP floods and sweeps |
| Session limits | limit-session source-ip-based, destination-ip-based | One host opening too many sessions |
Common attacks and their screens
| Attack | What it is | Screen |
|---|---|---|
| Ping of death | An oversized, fragmented ICMP packet that crashes old stacks | icmp ping-death |
| Land attack | A SYN whose source and destination address are the same | tcp land |
| Teardrop | Fragments with overlapping offsets | ip tear-drop |
| IP address spoofing | A source address that does not match the route back to it | ip spoofing |
| IP sweep | ICMP echo to many addresses to find live hosts | icmp ip-sweep |
| Port scan | Probes to many ports on one host | tcp port-scan |
| SYN flood | Many SYNs that are never completed | tcp 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.
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
| Command | Shows |
|---|---|
show security screen ids-option UNTRUST-SCREEN | The options configured in a profile |
show security screen statistics zone untrust | Counters of packets each screen has caught in that zone |
show security zones untrust | Which screen profile the zone uses |
clear security screen statistics zone untrust | Resets 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
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.
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 withsecurity 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-droplogs 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 landscreen.
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.