Skip to content

Commit 3108a73

Browse files
netpickermailsanjayhere
authored and
imi
committed
reorganized 3_interfaces folder (#71)
* removing ruleset files * adding 3_interface rules and refs * Revert "adding 3_interface rules and refs" This reverts commit 6ec630d. * added 3_interfaces rules and refs again * added 4_protocols tests * restrctured 3_interfaces folder --------- Co-authored-by: mailsanjayhere <mailsanjayhere@gmail.com>
1 parent bf671e7 commit 3108a73

File tree

26 files changed

+311
-0
lines changed

26 files changed

+311
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from comfy.compliance import medium
2+
3+
4+
@medium(
5+
name='rule_3_1_1_ensure_caller_id_is_set',
6+
platform=['juniper'],
7+
commands=dict(chk_cmd='')
8+
)
9+
def rule_3_1_1_ensure_caller_id_is_set(commands, ref):
10+
assert '' in commands.chk_cmd, ref
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.rule_3_1_1_ensure_caller_id_is_set
2+
3+
Reference: Guide, Juniper Networks](http://www.juniper.net/techpubs/software/junos-
4+
security/junos-security95/junos-security-admin-guide/config-usb-modem-
5+
chapter.html#config-usb-modem-chapter)
6+
7+
Remediation: If you have configured a dialer interface to accept incoming calls, you should restrict the
8+
allowable Caller ID by entering the following command under the [edit interfaces dln unit 0
9+
dialer-options] hierarchy (where n is the dialer interface number);
10+
11+
12+
13+
[edit interfaces dln unit 0 dialer-options]
14+
user@host#set incoming-map caller <Approved CallerID Number>
15+
Up to 15 caller numbers may be configured on a dialer interface, repeat the command
16+
above for each number you wish to add.
17+
18+
.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from comfy.compliance import medium
2+
3+
4+
@medium(
5+
name='rule_3_1_2_ensure_access_profile_is_set_to_use_chap',
6+
platform=['juniper'],
7+
commands=dict(chk_cmd='')
8+
)
9+
def rule_3_1_2_ensure_access_profile_is_set_to_use_chap(commands, ref):
10+
assert '' in commands.chk_cmd, ref
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.rule_3_1_2_ensure_access_profile_is_set_to_use_chap
2+
3+
Reference: Guide, Juniper Networks
4+
5+
Remediation: If you have configured a dialer interface to accept incoming calls, you should configure
6+
CHAPS authentication using the following commands from the indicated hierarchy (where
7+
n is the interface number);
8+
9+
10+
11+
[edit access]
12+
user@host#set profile <profile name> client <username> chap-secret <password>
13+
14+
user@host#top
15+
user@host#edit interface dl <n> unit 0
16+
17+
[edit interfaces dl <n> unit 0]
18+
user@host#set ppp-options chap access-profile <profile name>
19+
Repeat the first command for each user that is required.
20+
21+
.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from comfy.compliance import low
2+
3+
4+
@low(
5+
name='rule_3_1_3_forbid_dial_in_access',
6+
platform=['juniper'],
7+
commands=dict(chk_cmd='')
8+
)
9+
def rule_3_1_3_forbid_dial_in_access(commands, ref):
10+
assert '' in commands.chk_cmd, ref
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.rule_3_1_3_forbid_dial_in_access
2+
3+
Reference: Guide, Juniper Networks (http://www.juniper.net/techpubs/software/junos-
4+
security/junos-security95/junos-security-admin-guide/config-usb-modem-
5+
chapter.html#config-usb-modem-chapter)
6+
Requirement 8.3
7+
8+
Remediation: If you have configured a dialer interface to accept incoming calls, you should disable it
9+
using the following commands from the [edit interfaces] hierarchy (where n indicates
10+
the interface number);
11+
[edit interfaces]
12+
user@host#delete interface dl <n>
13+
14+
15+
16+
17+
18+
.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from comfy.compliance import low
2+
3+
4+
@low(
5+
name='rule_3_10_ensure_inbound_firewall_filter_is_set_for_loopback_interface',
6+
platform=['juniper'],
7+
commands=dict(chk_cmd='')
8+
)
9+
def rule_3_10_ensure_inbound_firewall_filter_is_set_for_loopback_interface(commands, ref):
10+
assert '' in commands.chk_cmd, ref
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.rule_3_10_ensure_inbound_firewall_filter_is_set_for_loopback_interface
2+
3+
Reference: Security Agency (NSA)
4+
5+
Remediation: To apply a firewall filter to the loopback interface enter the following command from the
6+
[edit interfaces] hierarchy:
7+
[edit interfaces]
8+
user@host#set lo0 unit 0 family inet filter input <filter name>
9+
10+
.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from comfy.compliance import low
2+
3+
4+
@low(
5+
name='rule_3_2_1_ensure_vrrp_authentication_key_is_set',
6+
platform=['juniper'],
7+
commands=dict(chk_cmd='')
8+
)
9+
def rule_3_2_1_ensure_vrrp_authentication_key_is_set(commands, ref):
10+
assert '' in commands.chk_cmd, ref
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.rule_3_2_1_ensure_vrrp_authentication_key_is_set
2+
3+
Reference: Configuration Guide, Juniper Networks
4+
(http://www.juniper.net/techpubs/software/junos/junos92/swconfig-system-
5+
basics/archival.html%23id-11141986)
6+
7+
Remediation: If you have configured VRRP on one or more interfaces you should configure authentication
8+
using the following commands from the [edit interfaces <interface name> unit
9+
<unit number> family inet address <ip address>] hierarchy;
10+
11+
12+
13+
[edit interfaces `<interface name> unit <unit number> family inet address <ip
14+
address>`]
15+
user@host#set vrrp-group <group number> authentication-key <key>
16+
17+
.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from comfy.compliance import low
2+
3+
4+
@low(
5+
name='rule_3_2_2_ensure_authentication_type_is_set_to_md5',
6+
platform=['juniper'],
7+
commands=dict(chk_cmd='')
8+
)
9+
def rule_3_2_2_ensure_authentication_type_is_set_to_md5(commands, ref):
10+
assert '' in commands.chk_cmd, ref
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.rule_3_2_2_ensure_authentication_type_is_set_to_md5
2+
3+
Reference: Configuration Guide, Juniper Networks
4+
(http://www.juniper.net/techpubs/software/junos/junos92/swconfig-system-
5+
basics/archival.html%23id-11141986)
6+
7+
Remediation: If you have configured VRRP on one or more interfaces you can configure authentication
8+
using MD5-HMAC with the following commands from the [edit interfaces <interface
9+
name> unit <unit number> family inet address <ip address>] hierarchy;
10+
[edit interfaces <interface name> unit <unit number> family inet address <ip
11+
address>]
12+
user@host#set vrrp-group <group number> authentication-type md5
13+
14+
15+
16+
17+
18+
.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from comfy.compliance import medium
2+
3+
4+
@medium(
5+
name='rule_3_3_ensure_unused_interfaces_are_set_to_disable',
6+
platform=['juniper'],
7+
commands=dict(chk_cmd='')
8+
)
9+
def rule_3_3_ensure_unused_interfaces_are_set_to_disable(commands, ref):
10+
assert '' in commands.chk_cmd, ref
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.rule_3_3_ensure_unused_interfaces_are_set_to_disable
2+
3+
Reference:
4+
Remediation: To disable an interface enter the following command from the [edit interfaces
5+
<interface name>] hierarchy.
6+
[edit interfaces <interface name>]
7+
user@host#set disable
8+
9+
.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from comfy.compliance import medium
2+
3+
4+
@medium(
5+
name='rule_3_4_ensure_interface_description_is_set',
6+
platform=['juniper'],
7+
commands=dict(chk_cmd='')
8+
)
9+
def rule_3_4_ensure_interface_description_is_set(commands, ref):
10+
assert '' in commands.chk_cmd, ref
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.rule_3_4_ensure_interface_description_is_set
2+
3+
Reference:
4+
Remediation: To configure an interface description enter the following command from the[edit interfaces
5+
unit ] hierarchy.
6+
[edit interfaces <interface name> unit <unit number>]
7+
user@host#set description <description>
8+
9+
.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from comfy.compliance import low
2+
3+
4+
@low(
5+
name='rule_3_5_ensure_proxy_arp_is_disabled',
6+
platform=['juniper'],
7+
commands=dict(chk_cmd='')
8+
)
9+
def rule_3_5_ensure_proxy_arp_is_disabled(commands, ref):
10+
assert '' in commands.chk_cmd, ref
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.rule_3_5_ensure_proxy_arp_is_disabled
2+
3+
Reference: Security Agency (NSA)
4+
5+
Remediation: To disable Proxy ARP enter the following command from the [edit interfaces
6+
<interface name> unit <unit number>] hierarchy:
7+
[edit interfaces <interface name> unit <unit number>]
8+
user@host#delete proxy-arp
9+
10+
11+
12+
13+
14+
.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from comfy.compliance import medium
2+
3+
4+
@medium(
5+
name='rule_3_6_ensure_icmp_redirects_are_set_to_disabled_on_all_untrusted_ipv4_networks',
6+
platform=['juniper'],
7+
commands=dict(chk_cmd='')
8+
)
9+
def rule_3_6_ensure_icmp_redirects_are_set_to_disabled_on_all_untrusted_ipv4_networks(commands, ref):
10+
assert '' in commands.chk_cmd, ref
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.rule_3_6_ensure_icmp_redirects_are_set_to_disabled_on_all_untrusted_ipv4_networks
2+
3+
Reference: tion-statement/no-redirects-edit-system.html
4+
5+
Remediation: To disable ICMP Redirect message generation on an untrusted network interface, issue the
6+
following command from the [edit interfaces] hierarchy;
7+
[edit interfaces]
8+
user@host#set <interface name> unit <unit number> family <address family> no-
9+
redirects
10+
11+
.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from comfy.compliance import medium
2+
3+
4+
@medium(
5+
name='rule_3_7_ensure_icmp_redirects_are_set_to_disabled_on_all_untrusted_ipv6_networks',
6+
platform=['juniper'],
7+
commands=dict(chk_cmd='')
8+
)
9+
def rule_3_7_ensure_icmp_redirects_are_set_to_disabled_on_all_untrusted_ipv6_networks(commands, ref):
10+
assert '' in commands.chk_cmd, ref
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.rule_3_7_ensure_icmp_redirects_are_set_to_disabled_on_all_untrusted_ipv6_networks
2+
3+
Reference: tion-statement/no-redirects-ipv6-edit-system-interfaces-ex-series.html
4+
5+
Remediation: To disable ICMP Redirect message generation on an untrusted network interface, issue the
6+
following command from the [edit interfaces] hierarchy;
7+
[edit interfaces]
8+
user@host#set <interface name> unit <unit number> family <address family> no-
9+
redirects
10+
11+
.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from comfy.compliance import low
2+
3+
4+
@low(
5+
name='rule_3_8_ensure_loopback_interface_address_is_set',
6+
platform=['juniper'],
7+
commands=dict(chk_cmd='')
8+
)
9+
def rule_3_8_ensure_loopback_interface_address_is_set(commands, ref):
10+
assert '' in commands.chk_cmd, ref
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.rule_3_8_ensure_loopback_interface_address_is_set
2+
3+
Reference: Security Agency (NSA)
4+
5+
Remediation: To create a loopback interface enter the following command from the [edit interfaces]
6+
hierarchy:
7+
[edit interfaces]
8+
user@host#set lo0 unit 0 family inet address <ip address>
9+
10+
11+
12+
13+
14+
.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from comfy.compliance import medium
2+
3+
4+
@medium(
5+
name='rule_3_9_ensure_only_one_loopback_address_is_set',
6+
platform=['juniper'],
7+
commands=dict(chk_cmd='')
8+
)
9+
def rule_3_9_ensure_only_one_loopback_address_is_set(commands, ref):
10+
assert '' in commands.chk_cmd, ref
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.rule_3_9_ensure_only_one_loopback_address_is_set
2+
3+
Reference: Security Agency (NSA)
4+
5+
Remediation: To remove an additional loopback addresses enter the following command from the [edit
6+
interfaces] hierarchy for each address to be removed:
7+
[edit interfaces]
8+
user@host#delete lo0 unit <unit number> family <address family> address
9+
<address to be removed>
10+
11+
.

0 commit comments

Comments
 (0)