Skip to main content
Back
DemonstrationAWS
2 min read

AWS research examined SageMaker notebook access and Lambda layer trust

Environment
Rhino Security Labs’ AWS service-permission research
When
Published July 23, 2019. Test date unknown.Disclosed Jul 23, 2019
Entry
The study examined delegated access to managed notebooks and, in a separate example, control over the origin of a Lambda function’s layers.

Rhino Security Labs showed that someone allowed to open a SageMaker notebook could use the permissions assigned to the notebook itself. Those permissions could exceed the operator’s own. In a separate Lambda demonstration, the researchers showed the risk of running shared code from an untrusted publisher. The report did not identify affected customers.

What the demonstration did

Researcher
Rhino Security Labs
Internet
AWS workloads
Workload access

Research environment / Rhino Security Labs’ AWS service-permission research

  1. 1

    Notebook entry could be delegated to a user

    July 2019 research

    Rhino described a user who could obtain interactive access to a SageMaker notebook instance. Notebook entry and authorization for work done inside it were separate decisions.

  2. 2

    Notebook work inherited the execution role’s scope

    July 2019 research

    The research showed that the IAM role associated with a notebook determined the AWS authority available to workloads running within that notebook.

  3. 3

    An independent Lambda example concerned layer ownership

    A separate July 2019 example

    Rhino described a Lambda function allowed to load a layer from a third-party AWS account. The researchers recommended restricting permitted layer origins.

Impact

Rhino showed how a notebook could expose more workload authority than an individual operator needed. A separate Lambda example demonstrated why the origin of a shared code dependency matters. No affected customer population was reported.

Would the controls have stopped it?

Set notebook and dependency permissions independently

Restrict interactive access to assigned notebooks and give each notebook an execution role limited to its work. In Lambda, require layers to come from organization-owned publishing accounts where those publishers cover every dependency the workload needs.

Incident control assessments

1
Prevented
2
Contained
0
Not covered

How it could have been prevented

The same replay with the controls in place. Green marks where a step is refused, blue where it is bounded, and red where no control reaches it. Open a row to read the control, why it acts, and its caveat.

Researcher
Rhino Security Labs
Internet
AWS workloads
Workload access

Research environment / Rhino Security Labs’ AWS service-permission research

1 · Notebook entry could be delegated to a user

1 Contained

2 · Notebook work inherited the execution role’s scope

1 Contained

3 · An independent Lambda example concerned layer ownership

1 Prevented

Key facts

  • The article was published on July 23, 2019.
  • The SageMaker examples concerned classic notebook instances.
  • The author described evaluating permissions in a test environment.
  • The Lambda example involved the source account of a shared layer.

Sources

Every fact in this breakdown comes from the public reporting below. The replay is a model of that reporting, not a reconstruction of the environment it describes.

  1. 1.
    AWS IAM Privilege Escalation – Methods and Mitigation – Part 2Rhino Security Labs · Jul 23, 2019 · ResearchFirst-hand research reported separate findings about SageMaker notebook access and execution roles, and about the provenance of code dependencies used by Lambda.
  2. 2.
    CreatePresignedNotebookInstanceUrlAmazon Web Services · undated · AdvisoryAWS documents IAM authorization for access to classic notebook instances.
  3. 3.
    How to use SageMaker AI execution rolesAmazon Web Services · undated · AdvisoryAWS documents the execution role’s function and the use of granular workload permissions.
  4. 4.
    Granting users access to a Lambda layerAmazon Web Services · undated · AdvisoryAWS documents the layer condition key for limiting which layers can be used by functions.
  5. 5.
    Permissions boundaries for IAM entitiesAmazon Web Services · undated · AdvisoryAWS describes the maximum identity permissions, explicit denies and the treatment of resource-based grants to sessions.
  6. 6.
    Service control policies (SCPs)Amazon Web Services · undated · AdvisoryAWS describes the member-account scope of SCPs and the management-account and service-linked role exceptions.

The estate in the replay follows the researchers' description of their own test environment. Verdicts describe what a control does when it is in place before the run. They are not an assessment of any company's security program.

More cloud attack breakdowns

All breakdowns