Cnspec을 사용하여 PLCnext Control에서 오래된 펌웨어 및 잘못된 구성을 감지하는 방법
예를 들어 ARM Cortex-A9 프로세서를 기반으로 하고 IEC 61131 런타임 시스템을 갖춘 Phonix Contact의 PLCnext Control AXC F 2125를 살펴보겠습니다. Cnspec은 Linux 기반 PLCnext Control을 스캔하여 오래된 펌웨어와 잘못된 구성을 감지하는 다양한 옵션을 제공하는 오픈 소스 도구입니다. 이 가이드는 cnspec SSH 공급자를 통해 PLCnext Control을 스캔하는 단계별 지침을 제공합니다.
-
노트북에 cnspec 설치(설치 가이드)
-
다음 명령을 실행하여 연결을 테스트하고 PLCnext Control에 대한 cnspec 쉘을 설정하십시오.
cnspec shell ssh admin@192.168.1.10 --ask-pass
-
cnspec 셸 내에서 다음 MQL 명령을 실행하세요:
file("/etc/plcnext/arpversion").content
보시다시피 SSH를 통해 PLCnext Control에 연결할 수 있었고 첫 번째 MQL 명령을 실행할 수 있었습니다.
→ loaded configuration from /home/user/.config/mondoo/mondoo.yml using source default
Enter password:
→ discover related assets for 1 asset(s)
→ resolved assets resolved-assets=1
___ _ __ ___ _ __ ___ ___
/ __| '_ \/ __| '_ \ / _ \/ __|
| (__| | | \__ \ |_) | __/ (__
\___|_| |_|___/ .__/ \___|\___|
mondoo™ |_|
cnspec> file("/etc/plcnext/arpversion").content
file.content: "Arpversion: 23.0.0.65
GIT Commit Hash: d755854b5b21ecb8dca26b0a560e6842a0c638d7
Build Job: \"jenkins-PLCnext-Yocto_Targets-Yocto_AXCF2152-release%2F23.0.x-65\"
"
-
공개 cnspec-policies 저장소에서 PLCnext Technology 정책을 다운로드하여 다음 명령을 실행하여 기본 보안 검사를 수행하십시오.
git clone https://github.com/mondoohq/cnspec-policies
Cloning into 'cnspec-policies'...
remote: Enumerating objects: 1075, done.
remote: Counting objects: 100% (149/149), done.
remote: Compressing objects: 100% (84/84), done.
remote: Total 1075 (delta 75), reused 115 (delta 61), pack-reused 926
Receiving objects: 100% (1075/1075), 699.81 KiB | 402.00 KiB/s, done.
Resolving deltas: 100% (690/690), done.
-
SSH를 통해 PLCnext Control에서 전체 보안 스캔을 실행하려면 다음 명령을 수행하십시오:
cnspec scan ssh admin@192.168.1.10 -f cnspec-policies/community/mondoo-phoenix-plcnext-security.mql.yaml --ask-pass
전체 출력은 다음과 같아야 합니다:
cnspec scan ssh admin@192.168.1.10 -f cnspec-policies/community/mondoo-phoenix-plcnext-security.mql.yaml --ask-pass
→ loaded configuration from /home/user/.config/mondoo/mondoo.yml using source default
Enter password:
→ using service account credentials
→ discover related assets for 1 asset(s)
→ resolved assets resolved-assets=1
axcf2152 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% score: F
Asset: axcf2152
---------------
Controls:
✕ Fail: Ensure SSH MaxAuthTries is set to 4 or less
✓ Pass: Ensure secure permissions on SSH public host key files are set
✓ Pass: Ensure only strong MAC algorithms are used
✓ Pass: Ensure only strong ciphers are used
✓ Pass: Ensure SSH IgnoreRhosts is enabled
✓ Pass: Ensure SSH Idle Timeout Interval is configured
✕ Fail: Ensure SSH password authentication is disabled
✓ Pass: Ensure current system time is synchronized
✓ Pass: Ensure only strong Key Exchange algorithms are used
✓ Pass: Ensure SSH LoginGraceTime is set to one minute or less
✓ Pass: Ensure SSH Protocol is set to 2
✓ Pass: Ensure SSH root login is disabled or set to prohibit-password
✓ Pass: Ensure SSH LogLevel is appropriate
✓ Pass: Ensure SSH PermitUserEnvironment is disabled
✓ Pass: Ensure SSH HostbasedAuthentication is disabled
✓ Pass: Ensure SSH access is limited
✓ Pass: Ensure secure permissions on SSH private host key files are set
✓ Pass: Ensure SSH warning banner is configured
✕ Fail: Ensure Firewall is active
✓ Pass: Ensure SSH PermitEmptyPasswords is disabled
✓ Pass: Ensure SSH X11 forwarding is disabled
✓ Pass: Ensure latest PLCnext Firmware is installed
Scanned 1 assets
For detailed output, run this scan with "-o full".
오픈 소스 cnspec 보안 솔루션은 IT 및 OT 시스템 모두에서 취약성과 잘못된 구성을 식별하는 포괄적인 접근 방식을 제공합니다. 시스템을 정기적으로 검사하면 잠재적인 보안 문제가 문제가 발생하기 전에 사전에 식별하고 해결할 수 있습니다.
참고:
메이커스 블로그에는 피닉스컨택트의 테스트나 검토를 거치지 않은 커뮤니티 회원의 애플리케이션과 사용자 스토리가 표시됩니다. 자신의 책임하에 사용하십시오.