Skip to content

Latest commit

 

History

History
88 lines (70 loc) · 4.4 KB

File metadata and controls

88 lines (70 loc) · 4.4 KB

Attack Tree Analysis for tencent/rapidjson

Objective: Execute Arbitrary Code OR Cause DoS via RapidJSON [CRITICAL]

Attack Tree Visualization

Attacker's Goal: Execute Arbitrary Code OR Cause DoS via RapidJSON [CRITICAL] | ------------------------------------------------- | 1. Denial of Service (DoS) [CRITICAL] | ------------------------------ | | 1.1 Stack 1.2 Heap Exhaustion Exhaustion [HIGH RISK] [HIGH RISK] | | | 1.1.1 Deeply 1.2.1 Large Nested JSON Number of Objects JSON Objects [HIGH RISK] [HIGH RISK] | | |--------> 1.2.1 Large String Values [HIGH RISK]

  • Description: The ultimate objective of the attacker is to either gain control of the system by executing arbitrary code (RCE) or to disrupt the service by causing a denial of service (DoS). This is achieved by exploiting vulnerabilities or weaknesses within the RapidJSON library.
  • Criticality: This is the root node and represents the overall threat.
  • Description: The attacker aims to make the application unavailable to legitimate users. This is typically achieved by exhausting system resources or triggering a crash.
  • Criticality: This is a major outcome and a direct path to achieving the attacker's goal.
  • Description: The attacker exploits RapidJSON's recursive parsing by providing deeply nested JSON structures. This can lead to a stack overflow, crashing the application.
  • Likelihood: Medium
  • Impact: High (Application crash, DoS)
  • Effort: Low
  • Skill Level: Intermediate
  • Detection Difficulty: Medium
  • Mitigation: Limit the maximum nesting depth of JSON objects.
  • Description: The attacker crafts a JSON document with many levels of nested objects (e.g., {"a":{"b":{"c":{"d":...}}}}). This is the specific technique used to trigger stack exhaustion.
  • Likelihood: Medium
  • Impact: High (Application crash, DoS)
  • Effort: Low
  • Skill Level: Intermediate
  • Detection Difficulty: Medium
  • Mitigation: Enforce a strict limit on the maximum nesting depth allowed in the JSON input.
  • Description: The attacker provides a JSON document that consumes an excessive amount of memory, causing the application to run out of memory and crash.
  • Likelihood: Medium
  • Impact: High (Application crash, DoS)
  • Effort: Low
  • Skill Level: Intermediate
  • Detection Difficulty: Medium
  • Mitigation: Set limits on the total size of the JSON document and the size of individual strings.
  • Description: The attacker creates a JSON document containing a massive number of objects, even if the individual objects are small.
  • Likelihood: Medium
  • Impact: High (Application crash, DoS)
  • Effort: Low
  • Skill Level: Intermediate
  • Detection Difficulty: Medium
  • Mitigation: Enforce a strict limit on the total size of the JSON document.
  • Description: The attacker includes very long strings within the JSON document.
  • Likelihood: Medium
  • Impact: High (Application crash, DoS)
  • Effort: Low
  • Skill Level: Intermediate
  • Detection Difficulty: Medium
  • Mitigation: Enforce strict maximum lengths for all JSON strings.