พบช่องโหว่ RCE ระดับ Critical บน Azure Synapse ทำให้เข้าถึงข้อมูล tenant ของผู้ใช้งานรายอื่นได้

Tzah Pahima นักวิจัยจาก Orca พบช่องโหว่ Remote Code Execution (RCE) ระดับ Critical บน Azure Synapse Analytics ที่ทำให้ผู้โจมตีสามารถเข้าถึง tenant ของผู้ใช้งานรายอื่นได้ และอื่นๆดังนี้

  • สามารถขโมย credentials จาก Azure Synapse จาก accounts ของผู้ใช้งานรายอื่น
  • สามารถเข้าควบคุม Azure Synapse workspaces ได้
  • สั่งรันโค้ดที่เป็นอันตรายบนเครื่องของผู้ใช้งานรายอื่นภายใน Azure Synapse Analytics service
  • สามารถขโมย credentials external data sources ของผู้ใช้งานรายอื่น

Azure Synapse Analytics คืออะไร

Azure Synapse Analytics ทำหน้าที่ import และประมวลผลข้อมูลจาก data sources ของผู้ใช้งานเช่น CosmosDB, Azure Data Lake, หรือ external sources Amazon S3 แต่ละ Synapse instance จะถูกเรียกว่า workspace เพื่อที่จะ import data จาก external data source ผู้ใช้งานต้องใส่ credentials และเชือมต่อไปที่ data source ผ่าน Integration Runtimes (เครื่องที่ทำหน้าเชือมต่อ data sources จากหลายๆที่) Integration Runtimes สามารถใช้เป็น self-hosted (on-premise) หรือ hosted บน Azure cloud (Azure Integration Runtimes) ก็ได้

ช่องโหว่ Remote Code Execution (RCE)

ในเครื่อง integration runtimes (self-hosted) นักวิจัยพบช่องโหว่ shell injection RCE (CVE-2022-29972) ใน Magnitude Simba Redshift ODBC connector ที่ถูกใช้โดย Microsoft
โดยที่ shell injection นั้นถูกพบใน SAML authentication plugin ของ connector ซึ่ง code ในส่วนที่มีช่องโหวทำหน้าที่ไว้เปิด browser แต่ผู้โจมตีสามารถ inject shell command ลงไปได้

รวมถึงยังพบช่องโหว่ที่คล้ายกันใน Magnitude Simba:

  • Amazon Athena ODBC Driver (CVE-2022-29971)
  • Amazon Redshift JDBC Driver (CVE-2022-30240)
  • Amazon Athena JDBC Driver (CVE-2022-30239)

การเจาะเข้าเครื่อง shared integration runtime

integration runtime ที่ host บน azure (Azure IR) โดยไม่มี Managed Virtual Network จะเป็นเครื่องที่ถูก share กับผู้ใช้งานหลายราย นักวิจัยพบว่าช่องโหว่ RCE ที่พบบนเครื่อง self-hosted ก็สามารถใช้ได้กับ Azure IR และ Permission ที่ใช้ Run app ก็ได้สิทธิ์เป็น Authority\SYSTEM

หลังจากที่นักวิจัยสามารถเข้าควมคุมเครื่อง Azure IR ได้แล้วยังพบว่าภายในเครื่องยังมี client certificate ที่ใช้ authentication เข้า internal management server ได้อีกด้วย
management server API สามารถ query integration runtimes และ workspace อื่นๆ ที่เป็นของผู้ใช้งานรายอื่น ทำให้นักวิจัยสามารถจะทำอะไรก็ได้กับ workspace ของผู้ใช้งานรวมถึงใช้ช่องโหว่ remote เข้าไปยัง integration runtime ของผู้ใช้งานรายอื่น

วิธีแก้ไข:

  • สำหรับลูกค้าที่ใช้ Azure Integration Runtime (Cloud) หรือ self-hosted แล้วเปิด auto-updates ไว้แล้ว ไม่ต้องดำเนินการใดๆ
  • หากยังไม่ได้อัปเดตแนะนำให้อัปเดต Self-hosted Integration Runtimes (SHIRs) เป็น version 5.17.8154.2

ที่มา : orca.security, msrc-blog.microsoft.com, insightsoftware.com