By Lerpong Intaraworrapath | January 17th ,2022

Workaround instructions to address CVE-2021-44228 and CVE-2021-45046 in vRealize Operations 8.x (87076)
ในบทความนี้ เราจะมาทำ workaround ในการแก้ปัญหา instructions to address CVE-2021-44228 and CVE-2021-45046 in VMware vRealize Operations Manager 8.x โดยจะ followup วิธีการ จาก KB87076.
Note: ในส่วนของ Product อื่นของ VMware และ ข้อมูล CVE-2021-44228 and CVE-2021-45046 ให้ อ่านได้จาก VMSA-2021-0028.
Impact / Risks
- Recommended ให้ take snapshots vRealize Operations ทุก nodes ก่อน apply workaroundโดยสามารถ ทำตามได้จาก link How to take a Snapshot of vRealize Operations.
- Mitigation จะยังคงเกิดขึ้นอยู่ ถ้ามีการ installed management pack หรือ activated หลังจาก apply patch. แนะนำให้ installed หรือ activated ให้เรียบร้อยก่อน แล้วถึงจะทำการ apply workaround.
- การ appy workaround แนะนำให้ reapplied หลังจากมีการ deploying หรือ updating new vRealize Operations nodes or Cloud Proxies ที่ไม่มี bug fixed.
- Mitigation ของ WAR files จะยังคงเกิดขึ้นอยู่ ถ้ามีการ redeployed vRealize Operations.
Resolution
This issue is resolved in the following releases:
- vRealize Operations 8.1.1 Hot Fix 10 (87224)
- vRealize Operations 8.2 Hot Fix 10 (87225)
- vRealize Operations 8.3 Hot Fix 9 (87226)
- vRealize Operations 8.4 Hot Fix 6 (87227)
- vRealize Operations 8.5 Hot Fix 5 (87228)
- vRealize Operations 8.6.2 (87154)
Workaround ในบทความนี้เป็น Temporary solution เท่านั้น แนะนำ.
Workaround
Notice: The below content has been updated as of 12/15/2021 to add workaround steps for the related CVE-2021-45046 as noted above. Please re-run all of the below steps even if you have already implemented the original CVE-2021-44228 workaround steps by running the data-rc-witness-log4j-fix.sh and cp-log4j-fix.sh scripts.
ในบทความนี้เราจะทำการ apply workaround สำหรับ “vRealize Operations Manager version 8.4.0” โดยจะประกอบ ด้วย
-Analytic (Primary, Replica, Data), Remote Collector 2 nodes จำนวนทั้งหมด 5 nodes (จะไม่มี Cloud Proxies).
โดยเราจะ ใช้ 2 scripts ด้วยกัน data-rc-witness-log4j-fix.sh and vrops-log4j-fix.sh โดย download ได้จาก KB87076
1.ทำการ Log in to the vRealize Operations Manager Admin UI โดยใช้ local admin user (https://vROPs-Name or vROPs-IP/admin).

2.ทำการ Click “TAKE CLUSTER OFFLINE” under Cluster Status.

Note: Wait for Cluster Status to show as Offline.
ถ้าเราพบว่าหน้า vROPs admin จะไม่สามารถ access ได้ ให้เรา access โดยตรงไป ที่ vROPs Master node IP address (https://vROPs-Master node name or IP address/admin).


3.ทำการ take snapshots vRealize Operations nodes ทั้ง 5 nodes [Analytic (Primary, Replica, Data), Remote Collector 2 nodes] ก่อนจะ apply workaround (How to take a Snapshot of vRealize Operations.).

4.ทำการ copy file data-rc-witness-log4j-fix.sh และ vrops-log4j-fix.sh ไปที่ path /tmp ของ vROPs ทั้ง 5 nodes [Analytic (Primary, Replica, Data), Remote Collector 2 nodes] โดยอาจจะใช้ SCP หรือ Tools ที่สามารถ copy file ได้.


5.เราจะ เริ่มทำที่ Master nodes เป็นตัวแรกก่อน.
6.ให้เรา SSH หรือ Console โดยใช้ root login account ในการ access.

7.ทำการ cd ไปที่ patch /tmp แล้วทำการตรวจสอบ ดูว่าทั้ง 2 files ปรากฏ อยู่ใน path ครบไหม.

8.ทำการ run command เพื่อสามารถจะ execute scripts data-rc-witness-log4j-fix.shได้.
chmod +x data-rc-witness-log4j-fix.sh

9.ทำการ run command เพื่อสามารถจะ execute scripts vrops-log4j-fix.shได้.
chmod +x vrops-log4j-fix.sh

10.ทำการ run command execute scripts “data-rc-witness-log4j-fix.sh“.
./data-rc-witness-log4j-fix.sh

Note: ให้ตรวจสอบให้แน่ใจหลังจาก run command จะต้องไม่มี ERROR (NO ERROR).

11.ทำการ run command execute scripts “./vrops-log4j-fix.sh“.
./vrops-log4j-fix.sh

Note: ให้ตรวจสอบให้แน่ใจหลังจาก run command จะต้องไม่มี ERROR (NO ERROR).

12.ทำการ restart the “CaSA service”:
service vmware-casa restart

Verify the change
ทำการ verify the workaround for CVE-2021-44228 ที่เราทำการ applied to vRealize Operations ว่าถูกต้องไหม ตาม step ด้านล่าง.
1.ทำการ run command สำหรับ verify ถ้า the data-rc-witness-log4j-fix.sh script สำเร็จ:
ps axf | grep --color log4j2.formatMsgNoLookups | grep -v grep

Note: โดยหลังจาก run command จะต้องมี output ออกมา; ถ้าไม่มี output ออกมาแสดงว่า applied workaround ไม่สำเร็จ.
2.ทำการ run command สำหรับ verify ถ้า the vrops-log4j-fix.sh script สำเร็จ:
./tmp/vrops-log4j-fix.sh

Note: ผลลัพธ์ ที่ได้จาก run command
Searching for impacted .jar files. Please wait…
No impacted .jar files found
Next step
ให้ทำการ Repeat Workaround step ตั้งแต่ข้อ 6 จนถึง Verify the change สำหรับ node ที่เหลือ อีก 4 nodes [Analytic (Replica, Data), Remote Collector 2 nodes].
Remark
โดยถ้า ท่านมี Cloud Proxies ก็ให้ทำ Cloud Proxies เพิ่มเติมจากใน KB87076 โดยใช้ script “cp-log4j-fix.sh” เพิ่มเติม.
Last step
หลังจากเราทำการ apply script ครบทุก node (ให้ตรวจสอบ ให้แน่ใจ ว่าเราทำครบทุก node).
1.ทำการ Log in to the vRealize Operations Manager Admin UI โดยใช้ local admin user (https://vROPs-Master node or vROPs-IP Master node/admin).

2.เราจะพบว่า cluster จะยังเป็น status offline.

3.ให้เราทำการ click “BRING CLUSTER ONLINE“.

4.ให้รอจน cluster status “ONLINE“.

5.แล้วหลังจากนั้นให้ login vROPs UI console.
https://vrops name or ip address/ui

Conclusion
ในบทความนี้จะเป็น workaround สำหรับ VMware vRealize Operations Manager 8.x เท่านั้น โดย fix version สามารถเข้าไป download และ apply ตาม version ที่ท่านใช้งานอยู่ โดย ให้ทุกท่านติดตาม VMSA-2021-0028 ในการทำ workaround หรือ fix version รวมถึง Product อื่นๆ ของ VMware ที่ได้รับผลกระทบ เช่นกัน.