アクセス用の管理インターフェイスで脆弱な暗号とキーを修正する方法 SSH
292682
Created On 10/18/19 13:11 PM - Last Modified 09/21/22 02:55 AM
Objective
脆弱性スキャンを実行するお客様は、 の管理インターフェイスで実行されます firewall 。 これらのレポートが失敗した場合に戻ってくることがあります。
報告された失敗は主に、 で使用される弱い暗号によるものです firewall 。
最も一般的なケースは、管理インターフェイスの弱い ssh 暗号化暗号です。 CVE-2016クアリースキャンでスウィート32または-2183と呼ばれることもあります(下の写真)。
影響を受ける暗号暗号は、ブロックサイズが64ビット(3DES、Blowfish)のブロック暗号です。 これらは、安全な環境で使用することは弱く、安全でないと考えられています。
この記事では、これらの弱い暗号を無効にし、脆弱ではない暗号を使用する方法に関する情報を提供します。
Environment
- 任意パロアルト Firewall .
- 任意 Panorama の .
- PAN-OS 8.0以上。
Procedure
問題を解決するには、次のコマンドを使用します CLI 。 コマンドを実行する前に、使用している端末ツールが完全に最新であることを確認してください。最新の状態のパテや他のターミナルエミュレータは、弱い暗号の使用のために接続が失敗する原因となる可能性があります。
> configure
# delete deviceconfig system ssh
# set deviceconfig system ssh ciphers mgmt aes256-ctr
# set deviceconfig system ssh ciphers mgmt aes256-gcm
# set deviceconfig system ssh default-hostkey mgmt key-type ECDSA 256
# set deviceconfig system ssh regenerate-hostkeys mgmt key-type ECDSA key-length 256
# set deviceconfig system ssh session-rekey mgmt interval 3600
# set deviceconfig system ssh mac mgmt hmac-sha2-256
# set deviceconfig system ssh mac mgmt hmac-sha2-512
# commit
# exit
> set ssh service-restart mgmt
最初のコマンドはデバイス設定をクリア SSH し、残りのコマンドはパラメータを再度設定します SSH 。 これらのコマンドを実行することにより、Sweet 32 と管理プレーン上の弱い暗号脆弱性を使用する攻撃が軽減されます。 最後のコマンドは、接続をリセットします。 再ログインします CLI 。
暗号鍵交換の設定:
次に示すように、スキャナーがキー交換アルゴリズムの非推奨の ssh キー交換値を示している場合は、以下のコマンドを実行します。 これらのコマンドは 9.0 以降でのみ実行できることに注意 PAN-OS してください。
> configure
# delete deviceconfig system ssh kex mgmt
# set deviceconfig system ssh kex mgmt ecdh-sha2-nistp521
# commit
# exit
> set ssh service-restart mgmt
これで、ssh 接続用の管理プレーンを強化するために必要なすべての変更が完了します。
テスト:
A スキャンを再実行すると、これらの脆弱性が軽減されたことが示されます。
テストするもう 1 つの方法は NMAP 、(Windows の Zenmap) を使用してスクリプトを実行することです。nmap --スクリプト ssh2-enum-algos -sV <your_firewall_ip></your_firewall_ip> -p 22
例:
user1@Linux:~$ nmap --script ssh2-enum-algos -sV -p 22 x.y.z.q //Replace x.y.z.q with firewall management IP
Starting Nmap 7.70 ( https://nmap.org ) at 2020-03-18 15:35 PDT
Nmap scan report for 10.46.161.116
Host is up (0.0059s latency).
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 12.1 (protocol 2.0)
| ssh2-enum-algos:
| kex_algorithms: (7)
| ecdh-sha2-nistp256
| ecdh-sha2-nistp384
| ecdh-sha2-nistp521
| diffie-hellman-group-exchange-sha256
| diffie-hellman-group14-sha1
| diffie-hellman-group-exchange-sha1
| diffie-hellman-group1-sha1
| server_host_key_algorithms: (1)
| ecdsa-sha2-nistp256
| encryption_algorithms: (2)
| aes256-cbc
| aes256-gcm@openssh.com
| mac_algorithms: (1)
| hmac-sha2-512
| compression_algorithms: (2)
| none
|_ zlib@openssh.com
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 1.97 seconds
This scan should not reveal any no weak algorithms and should display the key exchange algorithm set to a secure algorithm.
Additional Information
Web アクセスの弱い暗号の無効化 GUI が機能しない