Skip to content

Latest commit

 

History

History
98 lines (74 loc) · 5.52 KB

File metadata and controls

98 lines (74 loc) · 5.52 KB

Attack Tree Analysis for permissions-dispatcher/permissionsdispatcher

Objective: Execute Arbitrary Code OR Access Sensitive Data/Functionality via PermissionsDispatcher [CRITICAL]

Attack Tree Visualization

Attacker's Goal: Execute Arbitrary Code OR Access Sensitive Data/Functionality via PermissionsDispatcher [CRITICAL] | ------------------------------------- | | 1. Bypass Permission Checks [CRITICAL] 2.3 Logic Errors | | in Custom ------------------------------------- | Permission Checks | | | | 1.1 Incorrect 1.2 Reflection/ 1.3 Timing | Configuration Annotation Abuse Attacks (TOCTOU) | | | | | ----------|---------- ------|------ ------|------ ------|------ | | | | | | | | | | | | 1.1.1 1.1.2 1.1.3 1.2.1 1.2.2 1.2.3 1.3.1 1.3.2 2.3.1 2.3.2 2.3.3 Missing Weak Wrong Bypass Call Unsafe Race Delay Missing Incorrect Checks Checks Perm. Checks Unsafe Weak Cond. Checks Checks Handling [CRITICAL] (e.g., via Methods Perm. of Edge string) Refl. Checks Cases [CRITICAL] 1.1.1 Missing Checks [CRITICAL] 1.1.2 Weak Checks 1.1.3 Wrong Permission 1.2.1 Bypass Checks via Reflection [CRITICAL] 2.3.1 Missing Checks (in custom logic) [CRITICAL]

  • Description: The attacker aims to circumvent the intended permission restrictions enforced by PermissionsDispatcher. This is a critical branch because successful bypass grants unauthorized access.

Attack Tree Path: 1.1 Incorrect Configuration

  • Description: Exploits errors made by developers when configuring PermissionsDispatcher.
  • Description: The developer forgets to annotate a sensitive method with @NeedsPermission (or other relevant annotations), leaving it completely unprotected. * Likelihood: Medium * Impact: Very High * Effort: Very Low * Skill Level: Novice * Detection Difficulty: Medium

Attack Tree Path: 1.1.2 Weak Checks

  • Description: The developer uses a permission string that is too broad, granting more access than necessary. Or, they use a custom permission that is easily guessable or obtainable. * Likelihood: Medium * Impact: Medium to High * Effort: Low * Skill Level: Novice * Detection Difficulty: Medium

Attack Tree Path: 1.1.3 Wrong Permission

  • Description: The developer uses the incorrect permission string, unintentionally granting access due to a typo or misunderstanding. * Likelihood: Low * Impact: Medium to High * Effort: Very Low * Skill Level: Novice * Detection Difficulty: Medium
  • Description: Exploits how PermissionsDispatcher uses reflection and annotations.
  • Description: The attacker uses Java reflection to directly invoke methods annotated with @NeedsPermission, bypassing the generated permission-checking code. * Likelihood: Medium * Impact: Very High * Effort: Medium * Skill Level: Intermediate to Advanced * Detection Difficulty: Hard

Attack Tree Path: 1.3 Timing Attacks (TOCTOU)

  • Description: Exploits race conditions between the permission check and the actual use of the protected resource. Although present in the full tree, it is not considered high-risk due to low likelihood.
  • Description: Exploits vulnerabilities introduced by developers when implementing custom permission handling logic.
  • Description: The custom permission handling logic omits necessary checks, allowing unauthorized access. * Likelihood: Medium * Impact: High * Effort: Low * Skill Level: Intermediate * Detection Difficulty: Medium