diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/.python-version b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/.python-version new file mode 100644 index 0000000000..a616492698 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/.python-version @@ -0,0 +1 @@ +2.7.18 diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/_index.md b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/_index.md new file mode 100644 index 0000000000..4869ef61e1 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/_index.md @@ -0,0 +1,55 @@ +--- +title: Test Arm PAC/BTI instruction readiness with an AWS IoT Greengrass custom component + +description: Learn how to deploy an AWS IoT Greengrass custom component to Arm devices and verify PAC/BTI support through MQTT-triggered tests. + +draft: true +cascade: + draft: true + +minutes_to_complete: 30 + +who_is_this_for: This Learning Path is for developers who want to use AWS IoT Greengrass to deploy a PAC/BTI test component to Arm platforms. + +learning_objectives: + - Create an AWS IoT Greengrass custom component with the PAC/BTI test harness. + - Register an Armv8 and an Armv9 device as AWS IoT Greengrass core devices. + - Run PAC/BTI checks through MQTT and interpret the results for each device. + +prerequisites: + - A [Amazon AWS](https://aws.amazon.com/) account with access to AWS IoT Greengrass and AWS S3 + + +author: Varun Chari, Doug Anson + +### Tags +skilllevels: Introductory +subjects: Performance and Architecture +cloud_service_providers: + - AWS + +armips: + - Neoverse + +tools_software_languages: + - Python + - Java + - MQTT + - YAML + +operatingsystems: + - Linux + +further_reading: + - resource: + title: AWS IoT Greengrass documentation + link: https://aws.amazon.com/greengrass/ + type: documentation + + +### FIXED, DO NOT MODIFY +# ================================================================================ +weight: 1 # _index.md always has weight of 1 to order correctly +layout: "learningpathall" # All files under learning paths have this same wrapper +learning_path_main_page: "yes" # This should be surfaced when looking for related content. Only set for _index.md of learning path content. +--- diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/_next-steps.md b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/_next-steps.md new file mode 100644 index 0000000000..c3db0de5a2 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/_next-steps.md @@ -0,0 +1,8 @@ +--- +# ================================================================================ +# FIXED, DO NOT MODIFY THIS FILE +# ================================================================================ +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. +--- diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/background.md b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/background.md new file mode 100644 index 0000000000..3b555d1415 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/background.md @@ -0,0 +1,20 @@ +--- +title: Overview of AWS IoT Greengrass and the Arm v9 PAC and BTI instructions + +weight: 2 + +layout: "learningpathall" +--- + +### AWS IoT Greengrass + +AWS IoT Greengrass is an edge runtime and cloud service for building, deploying, and managing software on devices outside the cloud, such as industrial gateways, robots, cameras, and other IoT systems. It lets devices run applications locally for lower latency, reduced bandwidth use, and continued operation when connectivity is limited, while still integrating with AWS services. In Greengrass V2, key features include a modular component model for packaging software, support for Lambda functions, containers, native processes, and custom runtimes, secure communication with AWS IoT Core, local messaging and device state handling, fleet deployments and over-the-air updates, optional stream processing, and edge machine learning inference. + + +### PAC/BTI Arm v9 instructions + +Armv9 Pointer Authentication (PAC) and Branch Target Identification (BTI) are security features designed to make control-flow attacks harder. PAC helps protect return addresses and pointers by adding a cryptographic signature that is checked before the pointer is used, which can detect tampering such as return-oriented programming attempts. BTI complements this by restricting where indirect branches are allowed to land, helping prevent attackers from jumping into unintended instruction sequences. Together, PAC and BTI strengthen software defenses at the instruction-set level, especially for modern operating systems, hypervisors, and applications that need improved resistance to memory-corruption exploits. + +### What you've learned and what's next + +Next, you'll use AWS IoT Greengrass to create and deploy a custom component to local Arm-based devices and verify each device's PAC/BTI support. \ No newline at end of file diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/custom-component.md b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/custom-component.md new file mode 100644 index 0000000000..0c57330614 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/custom-component.md @@ -0,0 +1,170 @@ +--- +title: Creating an AWS IoT Greengrass custom component + +weight: 5 + +layout: "learningpathall" +--- + +### Introduction + +In this section, you create an AWS IoT Greengrass custom component that uses an artifact package to test PAC/BTI support on target Arm devices. + +### S3 bucket creation for the custom component artifact + +1. In the AWS Console, go to **S3**. + +![Creating an S3 bucket](images/s3-1.png "Creating an S3 bucket to store our component's artifact") + +2. Create a bucket and give it a name. Keep the default settings for this tutorial. + +![Creating an S3 bucket](images/s3-2.png "Creating an S3 bucket to store our component's artifact") + +3. Select **Create bucket**. + +![Creating an S3 bucket](images/s3-3.png "Creating an S3 bucket to store our component's artifact") + +4. Record the bucket name. You will use it in the YAML recipe. + +5. On your local machine, clone the asset repository: + +```bash +git clone https://github.com/DougAnsonAustinTx/pac-bti-gg-assets +cd ./pac-bti-gg-assets +``` + +6. In the S3 bucket view, select **Upload** and upload this artifact from the cloned repository: +`./arm-pac-bti-greengrass-demo-mqtt-trigger.zip` + +![Upload to an S3 bucket](images/upload-1.png "Uploading to our S3 bucket") + +7. Select **Add files**, choose the artifact, and then select **Upload**. + +![Upload to an S3 bucket](images/upload-2.png "Uploading to our S3 bucket") + +Your artifact is now available in S3. Next, create the custom Greengrass component. + +### Custom component creation + +1. In the AWS Console, go to **IoT Core** -> **Greengrass devices** and select **Components**. + +2. Select **Create component**. + +![Creating a Greengrass custom component](images/custom-1.png "Creating a custom component") + +3. Select **Enter recipe as YAML** and clear the default sample content. + +![Creating a Greengrass custom component](images/custom-2.png "Creating a custom component") + +4. Copy and paste the following YAML recipe into the editor. + +{{% notice Note %}} +In the YAML code below, locate **YOUR_S3_BUCKET** and replace it with the S3 bucket name you created in the previous step. +{{% /notice %}} + + + +```yaml +RecipeFormatVersion: '2020-01-25' +ComponentName: arm-com.arm.demo.PacBtiDemo +ComponentVersion: '1.0.4' +ComponentDescription: Demonstrate how PAC/BTI changes the exploit outcome for the same vulnerable app deployed with AWS IoT Greengrass. +ComponentPublisher: Arm +ComponentType: aws.greengrass.generic + +ComponentConfiguration: + DefaultConfiguration: + accessControl: + aws.greengrass.ipc.mqttproxy: + com.arm.demo.PacBtiDemo:mqttproxy:1: + policyDescription: Allow the PAC/BTI demo to subscribe for attack triggers and publish result events. + operations: + - aws.greengrass#PublishToIoTCore + - aws.greengrass#SubscribeToIoTCore + resources: + - arm/demo/*/security/pacbti/attack/trigger + - arm/demo/*/security/pacbti/attack/result + +Manifests: + - Platform: + os: linux + + Artifacts: + - Uri: s3://YOUR_S3_BUCKET/arm-pac-bti-greengrass-demo-mqtt-trigger.zip + Unarchive: ZIP + Permission: + Read: OWNER + Execute: OWNER + + Lifecycle: + Install: + RequiresPrivilege: true + Script: |- + set -e + + PROJECT_ROOT="{artifacts:decompressedPath}/arm-pac-bti-greengrass-demo-mqtt-trigger/arm-pac-bti-greengrass-demo" + WORK_DIR="{work:path}" + VENV_DIR="{work:path}/venv" + + python3 -m venv "${VENV_DIR}" + "${VENV_DIR}/bin/python" -m pip install --upgrade pip + "${VENV_DIR}/bin/pip" install --no-cache-dir awsiotsdk + + bash "${PROJECT_ROOT}/greengrass/install.sh" \ + "${PROJECT_ROOT}" \ + "${WORK_DIR}" + + Run: + Script: |- + set -e + + PROJECT_ROOT="{artifacts:decompressedPath}/arm-pac-bti-greengrass-demo-mqtt-trigger/arm-pac-bti-greengrass-demo" + WORK_DIR="{work:path}" + VENV_DIR="{work:path}/venv" + + BUILD_FLAVOR="$(cat "${WORK_DIR}/state/selected_flavor")" + BINARY="${WORK_DIR}/build/${BUILD_FLAVOR}/vuln_demo" + OUTPUT_DIR="${WORK_DIR}/results" + THING_NAME="{iot:thingName}" + TRIGGER_TOPIC="arm/demo/${THING_NAME}/security/pacbti/attack/trigger" + RESULT_TOPIC="arm/demo/${THING_NAME}/security/pacbti/attack/result" + + + mkdir -p "${OUTPUT_DIR}" + + echo "THING_NAME=${THING_NAME}" + echo "TRIGGER_TOPIC=${TRIGGER_TOPIC}" + echo "RESULT_TOPIC=${RESULT_TOPIC}" + + if [ ! -x "${VENV_DIR}/bin/python" ]; then + echo "Virtual environment Python not found at ${VENV_DIR}/bin/python" + exit 1 + fi + + if [ ! -x "${BINARY}" ]; then + echo "Binary not found or not executable: ${BINARY}" + exit 1 + fi + + export PYTHONUNBUFFERED=1 + + exec "${VENV_DIR}/bin/python" "${PROJECT_ROOT}/tools/demo_runner.py" \ + --project-root "${PROJECT_ROOT}" \ + --binary "${BINARY}" \ + --build-flavor "${BUILD_FLAVOR}" \ + --output-dir "${OUTPUT_DIR}" \ + --trigger-topic "${TRIGGER_TOPIC}" \ + --result-topic "${RESULT_TOPIC}" +``` + +5. After you update the bucket name, select **Create component**. + +![Creating a Greengrass custom component](images/custom-3.png "Creating a custom component") + +6. Confirm the custom component appears in the component list. + +![Creating a Greengrass custom component](images/custom-4.png "Creating a custom component") + +### What we've accomplished + +You created an AWS IoT Greengrass custom component and connected it to the S3-hosted artifact. In the next section, you'll deploy it to both Greengrass core devices. \ No newline at end of file diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/deployment.md b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/deployment.md new file mode 100644 index 0000000000..a10ae292f3 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/deployment.md @@ -0,0 +1,47 @@ +--- +title: Deploying an AWS IoT Greengrass custom component + +weight: 6 + +layout: "learningpathall" +--- + +### Introduction + +In this section, you use a Greengrass thing group to deploy a set of components, including your PAC/BTI test component, to both Greengrass core devices. + +### Create Deployment + +1. In the AWS Console, go to **IoT Core** -> **Greengrass** -> **Deployments**, then select **Create**. + +![Creating a Greengrass deployment](images/deploy-1.png "Creating a deployment") + +2. Name your deployment and select the thing group `My_PAC_BTI_Test_Devices`, then select **Next**. + +![Name and select thing group](images/deploy-2.png "Creating a deployment") + +3. Select **Next**. + +![Select Defaults](images/deploy-3.png "Select Defaults") + +4. Select **Next**. + +![Select Defaults](images/deploy-4.png "Select Defaults") + +5. Select **Next**. + +![Select Defaults](images/deploy-5.png "Select Defaults") + +6. Scroll down and select **Deploy**. + +![Deploy](images/deploy-6.png "Deploy") + +7. Once deployed, Greengrass installs and prepares the custom component on each PAC/BTI test device (Thor and RPi5). Wait until the **Execution overview** shows **2** successful targets. + +![Deploy status](images/deploy-7.png "Deploy status") + +When both devices show successful deployment, you're ready to run PAC/BTI tests on each device. + +### What we learned + +In this section, you created a Greengrass deployment that targeted the thing group containing both PAC/BTI test devices. The deployment installed the PAC/BTI custom component by following the YAML recipe you defined. \ No newline at end of file diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/custom-1.png b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/custom-1.png new file mode 100644 index 0000000000..8e9741b150 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/custom-1.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/custom-2.png b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/custom-2.png new file mode 100644 index 0000000000..41530f76d7 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/custom-2.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/custom-3.png b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/custom-3.png new file mode 100644 index 0000000000..891db6d9e7 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/custom-3.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/custom-4.png b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/custom-4.png new file mode 100644 index 0000000000..b6efc6ce11 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/custom-4.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/deploy-1.png b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/deploy-1.png new file mode 100644 index 0000000000..bac94ced88 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/deploy-1.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/deploy-2.png b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/deploy-2.png new file mode 100644 index 0000000000..28baa59242 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/deploy-2.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/deploy-3.png b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/deploy-3.png new file mode 100644 index 0000000000..fed6b59ea6 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/deploy-3.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/deploy-4.png b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/deploy-4.png new file mode 100644 index 0000000000..3fb2c39848 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/deploy-4.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/deploy-5.png b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/deploy-5.png new file mode 100644 index 0000000000..bba0d33a05 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/deploy-5.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/deploy-6.png b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/deploy-6.png new file mode 100644 index 0000000000..bc95894f53 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/deploy-6.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/deploy-7.png b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/deploy-7.png new file mode 100644 index 0000000000..5b78b83a22 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/deploy-7.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/greengrass-1.png b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/greengrass-1.png new file mode 100644 index 0000000000..5d03bfb6f5 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/greengrass-1.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/greengrass-1a.png b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/greengrass-1a.png new file mode 100644 index 0000000000..d7d8cfde25 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/greengrass-1a.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/greengrass-2.png b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/greengrass-2.png new file mode 100644 index 0000000000..af79a1dce4 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/greengrass-2.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/s3-1.png b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/s3-1.png new file mode 100644 index 0000000000..cf7881d681 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/s3-1.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/s3-2.png b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/s3-2.png new file mode 100644 index 0000000000..839572e577 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/s3-2.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/s3-3.png b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/s3-3.png new file mode 100644 index 0000000000..59c99f8756 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/s3-3.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/test-1.png b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/test-1.png new file mode 100644 index 0000000000..798da3edbe Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/test-1.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/test-2.png b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/test-2.png new file mode 100644 index 0000000000..46f8c1023b Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/test-2.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/test-3.png b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/test-3.png new file mode 100644 index 0000000000..303c2232bb Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/test-3.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/test-4.png b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/test-4.png new file mode 100644 index 0000000000..a3ecabbec5 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/test-4.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/upload-1.png b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/upload-1.png new file mode 100644 index 0000000000..4b2ae815ff Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/upload-1.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/upload-2.png b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/upload-2.png new file mode 100644 index 0000000000..922f84e474 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/images/upload-2.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/pacbti-testing.md b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/pacbti-testing.md new file mode 100644 index 0000000000..457eb0677f --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/pacbti-testing.md @@ -0,0 +1,148 @@ +--- +title: Test PAC/BTI availability on your devices via MQTT + +weight: 7 + +layout: "learningpathall" +--- + +### Introduction + +In this section, you run a test through the AWS IoT Core MQTT test client to check PAC/BTI availability on each platform. + +### Dispatching the test invocation command + +1. In the AWS Console, go to **IoT Core** -> **Greengrass devices** -> **Core devices** and record both core device names. + +![Core devices](images/test-1.png "Core devices list") + +2. In the AWS Console, open **IoT Core** -> **MQTT test client** and select **Subscribe to a topic**. + +Enter the following topic: +```json +Topic: arm/demo/+/security/pacbti/attack/result +``` +Select **Subscribe**. + +![Subscribe](images/test-2.png "Subscribe to the result topic") + +3. While still in MQTT test client, select **Publish to a topic** and enter the following, replacing **YOUR_CORE_DEVICE_NAME** with your Thor device name: + +```json +Topic name: **arm/demo/YOUR_CORE_DEVICE_NAME/security/pacbti/attack/trigger** + +Message payload: +{ + "action": "run_attack", + "request_id": "demo-001" +} +``` + +Select **Publish**. + +![Publish to Thor device](images/test-3.png "Publish to Thor device") + +### Reading the results + +In the subscriptions area of the MQTT test client window, you should see results resembling this for your Thor device: + +```output +{ + "binary": "/greengrass/v2/work/danson-com.arm.demo.PacBtiDemo/build/armv9-protected/vuln_demo", + "build_flavor": "armv9-protected", + "device": "thor", + "executed_at": "2026-04-30T21:33:18.796870+00:00", + "exploit_run": { + "returncode": 252, + "stderr": "", + "stdout": "" + }, + "exploit_succeeded": false, + "interpretation": "Exploit did not reach malicious_success(); on PAC/BTI builds a crash or early termination is expected.", + "machine": "aarch64", + "marker_found": false, + "normal_run": { + "returncode": 0, + "stderr": "", + "stdout": "Usage: vuln_demo \n" + }, + "protections": { + "has_autiasp": true, + "has_bti": true, + "has_paciasp": true, + "has_retaa": true + }, + "trigger": { + "payload": { + "action": "run_attack", + "request_id": "demo-001" + }, + "source_topic": "arm/demo/Dougs_Jetson_Thor/security/pacbti/attack/trigger" + } +} +``` + +This result indicates the Thor device (Armv9) reports PAC and BTI capabilities. + +Now test the RPi5. In **Publish to a topic**, replace **YOUR_CORE_DEVICE_NAME** with your RPi5 core device name: + + +```json +Topic name: **arm/demo/YOUR_CORE_DEVICE_NAME/security/pacbti/attack/trigger** + +Message payload: +{ + "action": "run_attack", + "request_id": "demo-001" +} +``` + +Select **Publish**. + +![Publish to RPi5 device](images/test-4.png "Publish to RPi5 device") + +Your output should be similar to the following: + +```output +{ + "binary": "/greengrass/v2/work/danson-com.arm.demo.PacBtiDemo/build/armv8-unprotected/vuln_demo", + "build_flavor": "armv8-unprotected", + "device": "rpi5-desktop-16", + "executed_at": "2026-04-30T21:33:53.526756+00:00", + "exploit_run": { + "returncode": 0, + "stderr": "", + "stdout": "" + }, + "exploit_succeeded": true, + "interpretation": "Exploit reached malicious_success()", + "machine": "aarch64", + "marker_found": true, + "normal_run": { + "returncode": 0, + "stderr": "", + "stdout": "Usage: vuln_demo \n" + }, + "protections": { + "has_autiasp": false, + "has_bti": false, + "has_paciasp": false, + "has_retaa": false + }, + "trigger": { + "payload": { + "action": "run_attack", + "request_id": "demo-001" + }, + "source_topic": "arm/demo/Dougs_RPi5_Hailo_16/security/pacbti/attack/trigger" + } +} +``` + +### Conclusions + +This result indicates the RPi5 device (Armv8) does not report PAC and BTI capabilities and thus could potentially be vulnerable to some attacks that PAC/BTI inhibits. + +### What we learned + +Armv9 devices provide additional control-flow protection features for pointer integrity. You also used AWS IoT Greengrass to deploy and run a custom validation workflow across multiple edge devices. \ No newline at end of file diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/prepare-jetson-thor.md b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/prepare-jetson-thor.md new file mode 100644 index 0000000000..ee7e1aa5c8 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/prepare-jetson-thor.md @@ -0,0 +1,73 @@ +--- +title: Set up and prepare Jetson Thor for AWS IoT Greengrass + +weight: 4 + +layout: "learningpathall" +--- + +### Introduction + +In this section, you prepare a Jetson Thor device as an AWS IoT Greengrass core device. Jetson Thor is an Armv9 platform with PAC/BTI support, so it serves as the positive comparison platform for this test. + +### Basic OS Install + +To install NVIDIA JetPack 7.1 on Jetson Thor, follow this guide: +https://www.youtube.com/watch?v=IpiZyoqQTl8 + + +### Install Java + +Open a terminal on your Jetson Thor and run: + +```bash +sudo apt update +sudo apt -y dist-upgrade +sudo apt install -y default-jdk +``` + +Confirm that Java is available: + +```bash +java --version +``` + +Your output should resemble: + +```output +openjdk 25.0.2 2026-01-20 +OpenJDK Runtime Environment (build 25.0.2+10-Ubuntu-124.04) +OpenJDK 64-Bit Server VM (build 25.0.2+10-Ubuntu-124.04, mixed mode, sharing) +``` + +### Install AWS IoT Greengrass + +Before you complete these steps, create an AWS access key pair for the account you will use. You can follow this short video (or ask your AWS administrator): +https://www.youtube.com/watch?v=QzTkIfQNsVw + +1. Open the AWS Console and go to **IoT Core** -> **Greengrass devices** -> **Core devices**. + +2. Select **Set up core device** -> **Set up one core device**. + +3. Enter a core device name that is different from your RPi5 device. + +4. Select **Select an existing group** and choose `My_PAC_BTI_Test_Devices`. + +5. Select **Greengrass nucleus** for installation. + +6. Select **Linux**. + +![Creating new AWS IoT Greengrass device](images/greengrass-1a.png "Creating an AWS IoT Greengrass device") + +7. Select **Set up a device by downloading and running an installer locally on device**. + +8. Follow the generated installer instructions on the Jetson Thor and authenticate with your AWS credentials. + +![Creating new AWS IoT Greengrass device](images/greengrass-2.png "Creating an AWS IoT Greengrass device") + +9. Confirm registration by selecting **View core devices**. +You should see the Jetson Thor listed with recent activity. + +### What's next + +Your Jetson Thor is now set up as an AWS IoT Greengrass core device. Next, you'll create the custom component used to test PAC/BTI on both devices. \ No newline at end of file diff --git a/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/prepare-rpi5.md b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/prepare-rpi5.md new file mode 100644 index 0000000000..1d0288c9dd --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/aws-greengrass-pacbti-test/prepare-rpi5.md @@ -0,0 +1,74 @@ +--- +title: Set up and prepare an RPi5 for AWS IoT Greengrass + +weight: 3 + +layout: "learningpathall" +--- + +### Introduction + +In this section, you prepare an RPi5 device to become an AWS IoT Greengrass core device. The RPi5 is a suitable Armv8 platform where PAC/BTI instruction support is not available, so it serves as the negative comparison platform for this test. + +### Basic OS Install + +To install the latest Raspberry Pi OS on your RPi, follow the Raspberry Pi setup guide: +https://www.raspberrypi.com/documentation/computers/getting-started.html + + +### Install Java + +Open a terminal on your RPi and run: + +```bash +sudo apt update +sudo apt -y dist-upgrade +sudo apt install -y default-jdk +``` + +Confirm that Java is available: + +```bash +java --version +``` + +Your output should resemble: + +```output +openjdk 21.0.10 2026-01-20 +OpenJDK Runtime Environment (build 21.0.10+7-Debian-1deb13u1) +OpenJDK 64-Bit Server VM (build 21.0.10+7-Debian-1deb13u1, mixed mode, sharing) +``` + +### Install AWS IoT Greengrass + +Before you complete these steps, create an AWS access key pair for the account you will use. You can follow this short video (or ask your AWS administrator): +https://www.youtube.com/watch?v=QzTkIfQNsVw + +1. Open the AWS Console and go to **IoT Core** -> **Greengrass devices** -> **Core devices**. + +2. Select **Set up core device** -> **Set up one core device**. + +3. Enter a name for your core device. + +4. Select **Enter a new group name**. +Use `My_PAC_BTI_Test_Devices` and save it because you'll reuse this group for your Armv9 device in the next section. + +5. Select **Greengrass nucleus** for installation. + +6. Select **Linux**. + +![Creating new AWS IoT Greengrass device](images/greengrass-1.png "Creating an AWS IoT Greengrass device") + +7. Select **Set up a device by downloading and running an installer locally on device**. + +8. Follow the generated installer instructions on the RPi5 and authenticate with the AWS credentials you created. + +![Creating new AWS IoT Greengrass device](images/greengrass-2.png "Creating an AWS IoT Greengrass device") + +9. Confirm registration by selecting **View core devices**. +You should see your RPi5 listed with recent activity. + +### What's next + +Your RPi5 is now set up as an AWS IoT Greengrass core device. Next, you will set up your Armv9 PAC/BTI positive test platform. \ No newline at end of file