Skip to content

Create rule-test.yml #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 69 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
0cb1380
Create rule-test.yml
netpicker May 8, 2024
130f8ba
Update rule-test.yml
netpicker May 8, 2024
e959b4c
Update rule-test.yml
netpicker May 8, 2024
ff0b074
Update rule-test.yml
netpicker May 8, 2024
9870745
Update rule-test.yml
netpicker May 8, 2024
4e2ce00
Update rule-test.yml
netpicker May 8, 2024
e86aa4d
Update rule-test.yml
netpicker May 8, 2024
495685f
refactor invocation of test-rules according to new container
netpicker Oct 10, 2024
90a9283
New feature branch (#56)
netpicker May 10, 2024
ec235ae
New feature branch (#57)
netpicker May 13, 2024
63739aa
assert that EIGRP is used but not authenticated (#60)
netpicker Jun 3, 2024
fc73aac
Update rule_122_set_transport_input_ssh_for_line_vty_connections.py (…
netpicker Jun 6, 2024
57d112c
Update rule_224_set_ip_address_for_logging_host.py (#62)
netpicker Jun 11, 2024
e6587eb
junos addition (#63)
netpicker Jul 8, 2024
4b5613b
Junos (#64)
netpicker Jul 8, 2024
6c87607
Junos (#65)
netpicker Jul 8, 2024
682b1b0
removing ruleset files (#67)
netpicker Jul 8, 2024
1fc1cad
Junos (#68)
netpicker Jul 8, 2024
bf671e7
Junos (#70)
netpicker Jul 8, 2024
3108a73
reorganized 3_interfaces folder (#71)
netpicker Jul 8, 2024
3c7f292
Junos (#72)
netpicker Jul 8, 2024
2dede80
adding 5_snmp (#73)
netpicker Jul 8, 2024
34ee6ca
Junos (#74)
netpicker Jul 8, 2024
f6cbe16
modified test-rules (#75)
netpicker Jul 9, 2024
0888ad9
updated rule_1_1 test (#76)
netpicker Jul 10, 2024
f3996f0
updated couple of tests (#77)
netpicker Jul 10, 2024
63c4ffe
updated platform name for juniper in the tests (#78)
netpicker Jul 11, 2024
df078c1
Juniper (#79)
netpicker Jul 11, 2024
a97416c
Juniper (#80)
netpicker Jul 11, 2024
665d752
Juniper (#81)
netpicker Jul 17, 2024
1c16f7c
Juniper removed (#82)
netpicker Jul 17, 2024
3d9facb
removing all other folders (#83)
netpicker Jul 17, 2024
b2762ee
adding wireless tests (#84)
netpicker Aug 2, 2024
ffae559
renamed folders (#85)
netpicker Aug 2, 2024
2ef3b8a
testing juniper (#86)
netpicker Aug 2, 2024
07a9583
Tests and juniper (#87)
netpicker Aug 2, 2024
d93d7b5
Tests and juniper (#88)
netpicker Aug 2, 2024
a8b4eba
Tests and juniper (#89)
netpicker Aug 2, 2024
6bbe26d
renamed folders (#91)
netpicker Aug 2, 2024
2ca4a7f
added first junos rule (#92)
netpicker Aug 2, 2024
37a8058
added first test for junos (#93)
netpicker Aug 2, 2024
00cc71e
Junos aug (#94)
netpicker Aug 2, 2024
ea02387
Tests and juniper (#95)
netpicker Aug 19, 2024
7e12da5
Tests and juniper (#96)
netpicker Aug 19, 2024
2b0be67
Tests and juniper (#98)
netpicker Aug 19, 2024
3e3dc9d
Tests and juniper (#99)
netpicker Aug 19, 2024
91a4ce0
Tests and juniper (#100)
netpicker Aug 19, 2024
212221b
Tests and juniper (#101)
netpicker Aug 20, 2024
913083e
Tests and juniper (#102)
netpicker Aug 20, 2024
88052ec
Tests and juniper (#103)
netpicker Aug 20, 2024
1fb68b9
Tests and juniper (#104)
netpicker Aug 20, 2024
4ce6994
Tests and juniper (#105)
netpicker Aug 20, 2024
332d641
Tests and juniper (#106)
netpicker Aug 20, 2024
7d92219
Tests and juniper (#107)
netpicker Aug 21, 2024
26cbb75
Tests and juniper (#108)
netpicker Aug 21, 2024
508624e
Tests and juniper (#109)
netpicker Aug 21, 2024
199832e
Tests and juniper (#110)
netpicker Aug 21, 2024
3add72e
Add NetBox test (#111)
netpicker Aug 22, 2024
fdd2cb6
Tests and juniper (#112)
netpicker Aug 26, 2024
2c0a2b1
Tests and juniper (#113)
netpicker Aug 26, 2024
d9cd50f
Tests and juniper (#114)
netpicker Aug 26, 2024
88bc67f
Tests and juniper (#115)
netpicker Aug 26, 2024
28fab51
Update EXAMPLES.md (#116)
netpicker Aug 26, 2024
c0d0157
Tests and juniper (#118)
netpicker Aug 26, 2024
c925b0c
Use dot notation for commands (#119)
netpicker Aug 27, 2024
00f2acf
Disable SSL certificate validation (#120)
netpicker Sep 5, 2024
7cf4916
Add Infrahub rule (#121)
netpicker Sep 12, 2024
d509856
adding test for CVE/Cisco_XR rule
Oct 10, 2024
57f07a2
drop nonsense yml tests
Oct 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .flake8
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[flake8]
exclude = .git,__pycache__,docs,old,build,dist,.env/*
max-line-length = 120
Empty file modified .github/workflows/flake8.yml
100644 → 100755
Empty file.
14 changes: 14 additions & 0 deletions .github/workflows/rule-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: CI
on:
push:

jobs:
container-test-job:
runs-on: ubuntu-latest
container:
image: netpicker/crt
options: --cpus 1
steps:
- uses: actions/checkout@v3
- name: Run yaml tests
run: test-rules -p runner.yaml_rules -vvvl --rootdir $PWD $PWD
1 change: 1 addition & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
**/__pycache__
**/*.pyc
.env/
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0 # Update to the latest version available
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/pycqa/flake8
rev: 7.0.0 # Update to the latest version available
hooks:
- id: flake8
2 changes: 1 addition & 1 deletion CIS/.metadata
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ author: [email protected]
description: ""
enabled: true
name: CIS
type: null
type: null
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.rule_111_enable_aaa_new_model:


Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/security/a1/sec-cr-a2.html#GUID-E05C2E00-C01E-4053-9D12-EC37C7E8EEC5
Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/security/a1/sec-cr-a2.html#GUID-E05C2E00-C01E-4053-9D12-EC37C7E8EEC5


Remediation: Globally enable authentication, authorization and accounting (AAA) using the new- model command. hostname(config)#aaa new-model
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/security/a1/sec-cr-a1.html#GUID-3DB1CC8A-4A98-400B-A906-C42F265C7EA2 Additional Information: Only “the default method list is automatically applied to all interfaces except those that have a named method list explicitly defined. A defined method list overrides the default method list.” (1)


Remediation: Configure AAA authentication method(s) for login authentication. hostname(config)#aaa authentication login {default | aaa_list_name} [passwd- expiry] [method1] [method2]
Remediation: Configure AAA authentication method(s) for login authentication. hostname(config)#aaa authentication login {default | aaa_list_name} [passwd- expiry] [method1] [method2]

.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.rule_113_enable_aaa_authentication_enable_default:


Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/security/a1/sec-cr-a1.html#GUID-4171D649-2973-4707-95F3-9D96971893D0
Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/security/a1/sec-cr-a1.html#GUID-4171D649-2973-4707-95F3-9D96971893D0


Remediation: Configure AAA authentication method(s) for enable authentication. hostname(config)#aaa authentication enable default {method1} enable
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.rule_114_set_login_authentication_for_line_vty:


Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/security/d1/sec-cr-k1.html#GUID- 297BDF33-4841-441C-83F3-4DA51C3C7284
Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/security/d1/sec-cr-k1.html#GUID- 297BDF33-4841-441C-83F3-4DA51C3C7284


Remediation: Configure management lines to require login using the default or a named AAA authentication list. This configuration must be set individually for all line types. hostname(config)#line vty {line-number} [<em>ending-line-number] hostname(config-line)#login authentication {default | aaa_list_name}

.
.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.rule_115_set_login_authentication_for_ip_http:


Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/security/d1/sec-cr-k1.html#GUID- 297BDF33-4841-441C-83F3-4DA51C3C7284
Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/security/d1/sec-cr-k1.html#GUID- 297BDF33-4841-441C-83F3-4DA51C3C7284


Remediation: Configure management lines to require login using the default or a named AAA authentication list. This configuration must be set individually for all line types. hostname#(config)ip http secure-server hostname#(config)ip http authentication {default | _aaa\_list\_name_}

.
.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.rule_116_set_aaa_accounting_to_log_all_privileged_use_commands_using_commands_15:


Reference: Additional Information: Valid privilege level entries are integers from 0 through 15.
Reference: Additional Information: Valid privilege level entries are integers from 0 through 15.


Remediation: Configure AAA accounting for commands. hostname(config)#aaa accounting commands 15 {default | list-name | guarantee- first} {start-stop | stop-only | none} {radius | group group-name}

.
.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.rule_117_set_aaa_accounting_connection:


Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/security/a1/sec-cr-a1.html#GUID-0520BCEF-89FB-4505-A5DF-D7F1389F1BBA
Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/security/a1/sec-cr-a1.html#GUID-0520BCEF-89FB-4505-A5DF-D7F1389F1BBA


Remediation: Configure AAA accounting for connections. hostname(config)#aaa accounting connection {default | list-name | guarantee- first} {start-stop | stop-only | none} {radius | group group-name}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.rule_118_set_aaa_accounting_exec:


Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/security/a1/sec-cr-a1.html#GUID-0520BCEF-89FB-4505-A5DF-D7F1389F1BBA
Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/security/a1/sec-cr-a1.html#GUID-0520BCEF-89FB-4505-A5DF-D7F1389F1BBA


Remediation: Configure AAA accounting for EXEC shell session. hostname(config)#aaa accounting exec {default | list-name | guarantee-first} {start-stop | stop-only | none} {radius | group group-name}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/fundamentals/command/D_through_E.html#GUID-76805E6F-9E89-4457-A9DC-5944C8FE5419


Remediation: Configure device timeout (10 minutes or less) to disconnect sessions after a fixed idle time.
Remediation: Configure device timeout (10 minutes or less) to disconnect sessions after a fixed idle time.
ip http timeout-policy idle 600 life {nnnn} requests {nn}

.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.rule_121_set_privilege_1_for_local_users:


Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/security/s1/sec-cr-t2-z.html#GUID-34B3E43E-0F79-40E8-82B6-A4B5F1AFF1AD
Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/security/s1/sec-cr-t2-z.html#GUID-34B3E43E-0F79-40E8-82B6-A4B5F1AFF1AD


Remediation: Set the local user to privilege level 1.
Remediation: Set the local user to privilege level 1.
hostname(config)#username <LOCAL_USERNAME> privilege 1

.
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
commands=dict(chk_cmd='show running-config | sec vty')
)
def rule_122_set_transport_input_ssh_for_line_vty_connections(commands, ref):
assert ' transport input ssh' in commands.chk_cmd, ref
assert 'transport input ssh' in commands.chk_cmd, ref
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
Reference: 1. http://www.cisco.com/en/US/docs/ios/termserv/command/reference/tsv_s1.html#wp1069219


Remediation: Apply SSH to transport input on all VTY management lines
hostname(config)#line vty <line-number> <ending-line-number>
Remediation: Apply SSH to transport input on all VTY management lines
hostname(config)#line vty <line-number> <ending-line-number>
hostname(config-line)#transport input ssh

.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.rule_123_set_no_exec_for_line_aux_0:


Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/fundamentals/command/D_through_E.html#GUID-429A2B8C-FC26-49C4-94C4-0FD99C32EC34
Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/fundamentals/command/D_through_E.html#GUID-429A2B8C-FC26-49C4-94C4-0FD99C32EC34


Remediation: Disable the EXEC process on the auxiliary port.
hostname(config)#line aux 0
Remediation: Disable the EXEC process on the auxiliary port.
hostname(config)#line aux 0
hostname(config-line)#no exec

.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.rule_124_create_access_list_for_use_with_line_vty:


Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/security/a1/sec-cr-a2.html#GUID-9EA733A3-1788-4882-B8C3-AB0A2949120C
Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/security/a1/sec-cr-a2.html#GUID-9EA733A3-1788-4882-B8C3-AB0A2949120C


Remediation: Configure the VTY ACL that will be used to restrict management access to the device.
hostname(config)#access-list <vty_acl_number> permit tcp <vty_acl_block_with_mask> any
hostname(config)#access-list <vty_acl_number> permit tcp host <vty_acl_host> any
Remediation: Configure the VTY ACL that will be used to restrict management access to the device.
hostname(config)#access-list <vty_acl_number> permit tcp <vty_acl_block_with_mask> any
hostname(config)#access-list <vty_acl_number> permit tcp host <vty_acl_host> any
hostname(config)#deny ip any any log

.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.rule_125_set_access_class_for_line_vty:


Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/security/a1/sec-cr-a2.html#GUID-FB9BC58A-F00A-442A-8028-1E9E260E54D3
Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/security/a1/sec-cr-a2.html#GUID-FB9BC58A-F00A-442A-8028-1E9E260E54D3


Remediation: Configure remote management access control restrictions for all VTY lines.
hostname(config)#line vty <line-number> <ending-line-number>
Remediation: Configure remote management access control restrictions for all VTY lines.
hostname(config)#line vty <line-number> <ending-line-number>
hostname(config-line)# access-class <vty_acl_number> in

.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.rule_126_set_exec_timeout_to_less_than_or_equal_to_10_minutes_for_line_aux_0:


Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/fundamentals/command/D_through_E.html#GUID-76805E6F-9E89-4457-A9DC-5944C8FE5419
Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/fundamentals/command/D_through_E.html#GUID-76805E6F-9E89-4457-A9DC-5944C8FE5419


Remediation: Configure device timeout (10 minutes or less) to disconnect sessions after a fixed idle time.
hostname(config)#line aux 0
Remediation: Configure device timeout (10 minutes or less) to disconnect sessions after a fixed idle time.
hostname(config)#line aux 0
hostname(config-line)#exec-timeout <timeout_in_minutes> <timeout_in_seconds>

.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.rule_127_set_exec_timeout_to_less_than_or_equal_to_10_minutes_line_console_0:


Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/fundamentals/command/D_through_E.html#GUID-76805E6F-9E89-4457-A9DC-5944C8FE5419
Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/fundamentals/command/D_through_E.html#GUID-76805E6F-9E89-4457-A9DC-5944C8FE5419


Remediation: Configure device timeout (10 minutes or less) to disconnect sessions after a fixed idle time.
hostname(config)#line con 0
Remediation: Configure device timeout (10 minutes or less) to disconnect sessions after a fixed idle time.
hostname(config)#line con 0
hostname(config-line)#exec-timeout <timeout_in_minutes> <timeout_in_seconds>

.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.rule_128_set_exec_timeout_to_less_than_or_equal_to_10_minutes_line_vty:


Reference: 1. https://www.cisco.com/c/en/us/td/docs/switches/datacenter/mds9000/sw/command/b_cisco_mds_9000_cr_book/l_commands.html#wp3716128869
Reference: 1. https://www.cisco.com/c/en/us/td/docs/switches/datacenter/mds9000/sw/command/b_cisco_mds_9000_cr_book/l_commands.html#wp3716128869


Remediation: Configure device timeout (10 minutes or less) to disconnect sessions after a fixed idle time.
hostname(config)#line vty {line_number} [ending_line_number]
Remediation: Configure device timeout (10 minutes or less) to disconnect sessions after a fixed idle time.
hostname(config)#line vty {line_number} [ending_line_number]
hostname(config-line)#exec-timeout <<span>timeout_in_minutes> <timeout_in_seconds</span>>

.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/fundamentals/command/A_through_B.html#GUID-0DEF5B57-A7D9-4912-861F-E837C82A3881 Additional Information: The default is no banner.


Remediation: Configure the EXEC banner presented to a user when accessing the devices enable prompt.
Remediation: Configure the EXEC banner presented to a user when accessing the devices enable prompt.
hostname(config)#banner exec c Enter TEXT message. End with the character 'c'. <banner-text> c

.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/fundamentals/command/A_through_B.html#GUID-FF0B6890-85B8-4B6A-90DD-1B7140C5D22F


Remediation: Configure the device so a login banner presented to a user attempting to access the device.
Remediation: Configure the device so a login banner presented to a user attempting to access the device.
hostname(config)#banner login c Enter TEXT message. End with the character 'c'. <banner-text> c

.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/fundamentals/command/A_through_B.html#GUID-7416C789-9561-44FC-BB2A-D8D8AFFB77DD


Remediation: Configure the message of the day (MOTD) banner presented when a user first connects to the device.
Remediation: Configure the message of the day (MOTD) banner presented when a user first connects to the device.
hostname(config)#banner motd c Enter TEXT message. End with the character 'c'. <banner-text> c

.
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
commands={'chk_cmd': 'show ip admission auth-proxy-banner http'}
)
def rule_134_set_the_banner_text_for_webauth_banner(commands, ref):
banner_text = commands['chk_cmd']
banner_text = commands.chk_cmd
assert 'Unauthorized access is prohibited' in banner_text, ref + " - Missing or incorrect banner text."
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Reference: 1. https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9500/software/release/16-9/configuration_guide/sec/b_169_sec_9500_cg/configuring_web_based_authentication.html


Remediation: Configure the webauth banner presented when a user connects to the device.
Remediation: Configure the webauth banner presented when a user connects to the device.
hostname(config)#ip admission auth-proxy-banner http {banner-text | filepath}

.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Additional Information: Note: You cannot recover a lost encrypted password. You must clear NVRAM and set a new password.


Remediation: Configure a strong, enable secret password.
Remediation: Configure a strong, enable secret password.
hostname(config)#enable secret 9 {ENABLE_SECRET_PASSWORD}

.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.rule_142_enable_service_password_encryption:


Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/security/s1/sec-cr-s1.html#GUID-CC0E305A-604E-4A74-8A1A-975556CE5871
Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/security/s1/sec-cr-s1.html#GUID-CC0E305A-604E-4A74-8A1A-975556CE5871
Additional Information: Caution: This command does not provide a high level of network security. If you use this command, you should also take additional network security measures. Note: You cannot recover a lost encrypted password. You must clear NVRAM and set a new password.


Remediation: Enable password encryption service to protect sensitive access passwords in the device configuration.
Remediation: Enable password encryption service to protect sensitive access passwords in the device configuration.
hostname(config)#service password-encryption

.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Reference: 1. https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9600/software/release/16-12/configuration_guide/sec/b_1612_sec_9600_cg/controlling_switch_access_with_passwords_and_privilege_levels.html


Remediation: Create a local user with an encrypted, complex (not easily guessed) password.
Remediation: Create a local user with an encrypted, complex (not easily guessed) password.
hostname(config)#username {{em}LOCAL_USERNAME{/em}} secret {{em}LOCAL_PASSWORD{/em}}

.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def rule_1510_require_aes_128_as_minimum_for_snmp_server(configuration, commands
AssertionError: If any SNMPv3 user is not configured with AES 128 encryption.
"""

snmp_users_output = commands['show_snmp_user'].splitlines()
snmp_users_output = commands.show_snmp_user.splitlines()
snmp_v3_users_aes128 = [line for line in snmp_users_output if 'AES 128' in line or 'AES128' in line]

# Verify that there is at least one SNMPv3 user configured with AES 128
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.rule_1510_require_aes_128_as_minimum_for_snmp_server_user_when_using_snmpv3:


Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/snmp/command/nm-snmp-cr-s5.html#GUID-4EED4031-E723-4B84-9BBF-610C3CF60E31
Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/snmp/command/nm-snmp-cr-s5.html#GUID-4EED4031-E723-4B84-9BBF-610C3CF60E31


Remediation: For each SNMPv3 user created on your router add privacy options by issuing the following command.
Remediation: For each SNMPv3 user created on your router add privacy options by issuing the following command.
hostname(config)#snmp-server user {user_name} {group_name} v3 auth sha {auth_password} priv aes 128 {priv_password} {acl_name_or_number}

.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/snmp/command/nm-snmp-cr-s2.html#GUID-2F3F13E4-EE81-4590-871D-6AE1043473DE


Remediation: Disable the default SNMP community string private
Remediation: Disable the default SNMP community string private
hostname(config)#no snmp-server community {private}

.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/snmp/command/nm-snmp-cr-s2.html#GUID-2F3F13E4-EE81-4590-871D-6AE1043473DE


Remediation: Disable the default SNMP community string "public"
Remediation: Disable the default SNMP community string "public"
hostname(config)#no snmp-server community {public}

.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.rule_154_do_not_set_rw_for_any_snmp_server_community:


Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/snmp/command/nm-snmp-cr-s2.html#GUID-2F3F13E4-EE81-4590-871D-6AE1043473DE
Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/snmp/command/nm-snmp-cr-s2.html#GUID-2F3F13E4-EE81-4590-871D-6AE1043473DE


Remediation: Disable SNMP write access.
Remediation: Disable SNMP write access.
hostname(config)#no snmp-server community {<em>write_community_string</em>}

.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Reference: 1. http://www.cisco.com/en/US/docs/ios-xml/ios/snmp/command/nm-snmp-cr-s2.html#GUID-2F3F13E4-EE81-4590-871D-6AE1043473DE


Remediation: Configure authorized SNMP community string and restrict access to authorized management systems.
Remediation: Configure authorized SNMP community string and restrict access to authorized management systems.
hostname(config)#snmp-server community <<em>community_string</em>> ro {<em>snmp_access-list_number | <span>snmp_access-list_name</span></em><span>}</span>

.
File renamed without changes.
Loading
Loading