Skip to main content
PSUT / IoTEngineering learning studio
WORKSPACE
Offline-first portalDr. Mohammad Alja’afreh
Cyber Defense StudioIoT Security and PrivacyExperimentsWorkspaces
ENGINEERING WORKSPACE
Home / Kali security course / K11
IoTPSUT IoT Engineering StudioPrincess Sumaya University for Technology · Dr. Mohammad Alja’afreh
WSL LABORATORIES / KALI LINUX / SECURITY & PRIVACY
IoT Security and Privacy

K11 · Threat modeling & integrated security review

Ask Dr. Mohammad · K11 →

Practical IoT Security & Privacy · Kali WSL · 50 min

Design experiment & verify evidence →
K11 · Laboratory mentorAsk about the current experiment, its algorithms or Python notebook.
Ask Dr. MohammadAdaptive practice
Learning workflow · Kali & IoT securityK11 · Threat modeling & integrated security review
V19.0 · Contextual AI workspace

Ask your engineering assistants

K11 · current context

Ask Dr. Mohammad locally, or prepare an experiment-aware prompt for ChatGPT, Gemini or Claude. The external providers open in their own tabs; nothing is automatically submitted.

Dr. Mohammad · offline
Dr. Mohammad

Offline curriculum-grounded assistance.

Open local tutor
K11 · Threat modeling & integrated security review

Public course objective, displayed commands, source excerpts and procedure. Private assessment content is not collected.

Prepare a contextual AI prompt

0 characters

Common secret and email patterns are redacted on preparation; this is not a comprehensive privacy filter. Review the entire editable prompt, including student work and unpublished research, before sharing. The providers apply their own accounts, privacy settings and limits.

Prepare → review → copy & open your selected provider → paste and submit there.

Readiness checksRevision deckEngineering workspaceRecord evidence
K11 · Academic orientation

Scope and objectives

Scope of the experiment

Build a threat register around IoT data-flow trust boundaries and calculate justified DREAD scores.

The focus of this experiment is to identify assets, trust boundaries and threat scenarios. Students then assign consistent risk scores and compare countermeasures, and validate an authorized review using evidence and documented assumptions. The Concepts view explains the operation before the practical work; the Simulation view is used to examine reference and changed inputs, not to substitute for actual measurements.

Learning objectives

  • Identify assets, trust boundaries and threat scenarios.
  • Assign consistent risk scores and compare countermeasures.
  • Validate an authorized review using evidence and documented assumptions.
  • Identify the configured inputs (STRIDE category; Damage (0–10); Reproducibility; Exploitability; Affected users) and record the corresponding observed outputs with units where applicable.
  • Compare the reference calculation or decision with an independent implementation or authorized observation; state any discrepancy and the applicable model boundary.

Expected learning outcomes

On completion, students can identify assets, trust boundaries and threat scenarios, assign consistent risk scores and compare countermeasures, and validate an authorized review using evidence and documented assumptions.

Required deliverables

Submit the derivation or state trace for the named operation, the exact reference and changed configurations, the associated simulator or practical evidence, and a short validation statement addressing validate an authorized review using evidence and documented assumptions. Separate predicted values from observations.

Prerequisite knowledge and related learning

Review the following catalogue prerequisites before starting. After completion, continue to K12 · Mutual TLS and device identity.

Environment and experimental methodology

The specified isolated laboratory environment, with local synthetic inputs and authorized services only. Use the experiment-specific setup and verification instructions.

Begin with a manual prediction, record the baseline, change one independent condition at a time, and compare the resulting trace or measurements with the original prediction. Record observations and uncertainty separately from reference values. Follow the experiment’s specific procedure, safety limits, and acceptance checks.

CONCEPTS / ACTIVE RECALL

Understand the experiment

IoT trust boundaries and STRIDE

Threat classification attaches to assets and directed data flows, not only components
Threat classification attaches to assets and directed data flows, not only components

Scientific architecture · STRIDE and DREAD threat-modeling workbench

Scientific concept map: Sensor — Device trust boundary; Gateway — STRIDE threat selection; Broker — Asset and flow; Dashboard — Risk likelihood × impact; Mitigation — Residual risk.
Scientific concept map: Sensor — Device trust boundary; Gateway — STRIDE threat selection; Broker — Asset and flow; Dashboard — Risk likelihood × impact; Mitigation — Residual risk.

Scientific foundations and analytical reasoning

STRIDE classifies threat types; DREAD scores five dimensions on an explicitly defined scale. Residual risk must reflect tested control evidence.

Before operating the equipment or executing the program, derive the expected outcome using the required theoretical work in Experiment. Use the diagram to identify the variables and system boundaries.

Scientific theory · Threat classification and risk evidence

STRIDE separates spoofing, tampering, repudiation, information disclosure, denial of service and elevation of privilege. A data-flow diagram identifies assets and trust boundaries. DREAD is a structured subjective scoring method; define each dimension and scale before averaging. Residual scores require control evidence.

Worked example and engineering interpretation

For five dimension scores 8,6,5,7,4 on a 0–10 scale, the mean is 6.0. A control that reduces exposure may alter selected dimensions without removing the threat. Document assumptions and verification tests; the score is not a measured probability of compromise.

Engineering principles · additional worked teaching example

STRIDE classifies threat types; DREAD scores are rubric-dependent prioritization, not measured probability. For scores 4,6,5,3,2, mean4. If a tested mitigation changes one component to2, recalculate rather than claim risk eliminated.

From theory to experiment

Predict the reference result before operating the workbench; check the actual intermediate state, units and constraints. The existing simulation, implementation and procedure below are distinct sources of evidence.

How to investigate K11 · Threat modeling & integrated security review

Combine schema and signed-manifest controls with STRIDE/DREAD and residual-risk analysis.

Analytical investigation means collecting an observation, identifying the mechanism, using a calculation or state trace to explain it, and checking your conclusion against evidence. Controlled comparison means changing one independent variable, holding the remaining relevant conditions constant, and measuring a dependent variable against a baseline. Experimental validation means comparing a predicted result to a reproducible observation or assertion; agreement inside a model does not certify hardware. Evidence-based reasoning connects a specific observation to a theoretical rule and states uncertainty, not merely an opinion. Performance characterization records a named metric and its units across conditions; sensitivity analysis changes one parameter across several values. A threat assessment links an asset, threat, consequence and evidence to a mitigation.

Experiment-specific guided practice

Objective: Combine schema and signed-manifest controls with STRIDE/DREAD and residual-risk analysis.

  1. Inspect the diagram: sensor → gateway → broker → storage → dashboard. Select Spoofing and identify the sensor/gateway trust boundary. Enter and justify five 0–10 scores; the default mean is 7.0.
  2. Keep the inherent scores fixed, enter proposed residual values and leave evidence at not tested. Residual result must stay Unverified.
  3. Select Tampering and assign 9, 8, 7, 9, 7. Confirm mean 8.0 and explain why the asset and treatment differ from Spoofing.
  4. For each of the remaining STRIDE categories choose the correct boundary, identify the protected asset, justify five scores, and save a separate trial.

Reference check:

Model boundary:

Independent task and submission evidence

2. Keep the inherent scores fixed, enter proposed residual values and leave evidence at not tested. Residual result must stay Unverified. Record the named input, prediction, actual output and one limitation; restore the original condition and repeat.

Before execution write the independent variable and its levels, dependent observation with units where applicable, baseline, controlled variables, measurement method and expected result. For a state machine use state/event/output rather than inventing a numeric metric. Record failures and repeat the baseline. A weak conclusion is “it works”; a supported conclusion names the changed setting, observed value/state, corresponding rule and one limitation.

TrialChanged settingFixed settingsPredicted resultActual observation / unitsEvidence / uncertainty
A: baselineReferenceRecordPredictRecordRecord
B: one changeRecordSame as APredictRecordRecord
A: repeatRestoreSame as APredictRecordRecord

Completion: submit the filled table, relevant simulator screenshot or terminal/notebook output, reasoning with units/assumptions, and one limitation. Preserve the independent assessment questions; this guide does not fill their answers.

Worked engineering reasoning and boundary conditions

Engineering reference configuration: STRIDE category = Spoofing; Damage (0–10) = 8; Reproducibility = 7; Exploitability = 6; Affected users = 8; Discoverability = 6; Control evidence = not tested; Residual damage = 8; Residual reproducibility = 3; Residual exploitability = 2; Residual affected users = 4; Residual discoverability = 6. In the classroom model, Inherent DREAD mean = 7 /10; Residual DREAD mean = Unverified; Mitigation evidence = Unverified mitigation; Priority = Medium. DREAD is an ordinal teaching prioritization, not probability. Residual score is only displayed as evidence-entered when the student declares both controls were verified; the simulator cannot independently verify that declaration. Threat-modeling worksheet and arithmetic. Evidence labels are student-entered, not automatically verified.

Use the diagram to follow the calculation or state progression. Keep the teaching configuration separate from the independent exercise values; compare observations with the actual model and implementation.

Concept animation · independent state notebook

Explore the teaching example independently of the simulator. Each step reveals an operation, data relationship or calculated state. The Simulation view has separate editable inputs.

K11 · Threat modeling & integrated security review: independent state notebook123456Calculated state 1ComponentDamageInherent 0–108Proposed residual 0–108

Step 1 of 6 · Calculated state 1

Calculated state 1

Component
Damage
Inherent 0–10
8
Proposed residual 0–10
8

Teaching example only; inspect live calculations or real practical evidence separately.

Recall the concept before revealing its explanation.

0 / 3 revealed
K11 · 01 / 08What is STRIDE?Reveal explanation
Engineering explanation

A structured categorization of threats across trust boundaries.

K11 · 02 / 08What is DREAD?Reveal explanation
Engineering explanation

A subjective risk prioritization worksheet, not a probability estimate.

K11 · 03 / 08What assets, boundaries and risk criteria must be identified before STRIDE/DREAD?Reveal explanation
Engineering explanation

Run the capstone before reading its JSON. Signed fictional manifest checks do not implement secure boot. Record residual risks; stop A and B, then verify the two dedicated ports no longer listen.

K11 · 04 / 08What is a trust boundary in an IoT architecture?Reveal explanation
Engineering reasoning

A transition between components or zones with different trust assumptions or access controls.

K11 · 05 / 08Why document residual risk after applying controls?Reveal explanation
Engineering reasoning

Controls may reduce likelihood or impact without eliminating a threat; remaining risk needs ownership and verification.

K11 · 06 / 08An IoT threat model is reviewed. Select every technically valid statement. A. Identify trust boundaries and assets. B. Record residual risk after controls. C. STRIDE scoring proves a system has no vulnerabilities. D. A threat model replaces all control verification.Reveal explanation
Applied scenario

Correct: A. Identify trust boundaries and assets.; B. Record residual risk after controls.

K11 · 07 / 08In K11 · Threat modeling & integrated security review, which command or code executes the final documented practical action?Reveal explanation
Implementation recall

ss -ltn | grep -E ":18884|:18885"

K11 · 08 / 08For K11 · Threat modeling & integrated security review, which actual output or state confirms the prescribed practical run succeeded, and what does it not establish?Reveal explanation
Evidence & acceptance

Run lab.py capstone and inspect K11-INTEGRATED.json. All eight controls must pass. Combine with separately captured K03–K05 evidence; this test is not actual secure boot, live gateway or firmware rollback enforcement. Document residual STRIDE/DREAD risks, then Ctrl+C only your own foreground brokers.

Loading experiment-specific apparatus…
K11 · Model-linked instrumentation

Visual observation lens

Back to controls ↑

Closed two-condition teaching fixture; actual security validation requires the practical procedure.

Loading instrument…

Awaiting model display.

Experimental instrumentation · A/B

Compare two model conditions

Capture a baseline, change one experimental condition, run the model if required and capture the comparison. Snapshots contain visible controls and display text, not physical sensor readings. Review before exporting.

Open simulation view
Baseline A
Not captured
Comparison B
Not captured

Capture a baseline to begin.

Evidence portfolio →

Experimental protocol

Before you run / verification gate

Run the capstone before reading its JSON. Signed fictional manifest checks do not implement secure boot. Record residual risks; stop A and B, then verify the two dedicated ports no longer listen.

Experimental protocol

Prerequisites
K03–K10 completed or exceptions documented
Procedure
Run integrated schema and signed-manifest tests, then complete threat matrix.
Acceptance
Eight controls pass; invalid fields, tampered signature/content and signed old version rejected. This is not actual firmware update or secure boot.
Evidence
K11-INTEGRATED.json, STRIDE/DREAD risk register, requirements-to-evidence traceability and residual risks.
Standards link
Software update / state awareness / data protection
Discussion
Which controls remain unverified on physical ESP32 or Raspberry Pi?
K11 engineering diagram
Engineering diagram · K11. Use the interactive workstation to investigate the calculated state.

Run & verify — acceptance checklist

Build verification: Actual eight integrated schema/manifest controls passed.

Run lab.py capstone and inspect K11-INTEGRATED.json. All eight controls must pass. Combine with separately captured K03–K05 evidence; this test is not actual secure boot, live gateway or firmware rollback enforcement. Document residual STRIDE/DREAD risks, then Ctrl+C only your own foreground brokers.

Record the actual output, source (mock/model or physical), and any error. A missing tool, timeout or untested external service is not a pass.

Complete lab-by-lab verification report →Open automated verification center → Ask Engineering Copilot →

Independent theoretical exercises

Before the simulation or practical, solve both experiment-specific tasks. List the given inputs, show the intermediate calculation or state trace, identify the expected observation, and state a limitation. Show formulas and intermediate calculations where relevant, or draw the requested state/sequence diagram. These are independent classroom fixtures; where they differ from the reference configuration below, do not treat them as measured values. Compare your predictions with the corresponding experiment afterwards.

01 · Predict and derive using the given inputs

Calculate mean inherent DREAD from 8,7,6,8,6 and residual mean from 8,3,2,4,6. Calculate difference.

02 · Compare or justify using evidence

Draw a sensor–gateway–broker–dashboard trust-boundary diagram and assign one distinct STRIDE threat to each of six categories; identify control and validation evidence.

03 · Risk analysis

Risk analysis · Independent work

Given scores 9,5,4,6,6, compute mean and revised mean if exploitability drops from4 to1. Give required evidence to justify reduction.

Work is saved locally when browser storage is available. Export it for submission; no remote upload or automatic grade is assigned.

Expanded independent theoretical exercise bank

Progress from calculation and interpretation to diagnosis and controlled engineering design. Complete the questions without opening the simulation first; show intermediate steps.

Intermediate · Explain a changed-input result

Independent theoretical exercise · K11-01

Use the reference configuration (STRIDE category = Spoofing; Damage (0–10) = 8; Reproducibility = 7; Exploitability = 6; Affected users = 8; Discoverability = 6; Control evidence = not tested; Residual damage = 8; Residual reproducibility = 3; Residual exploitability = 2; Residual affected users = 4; Residual discoverability = 6), but change Damage (0–10) = 10. The model reports Inherent DREAD mean = 7.4 /10. Explain the governing rule and assumptions that make this output plausible; identify an independent verification method.

Intermediate · Quantitative comparison

Independent theoretical exercise · K11-02

Two model observations of Inherent DREAD mean are 7 /10 (reference) and 7.4 /10 (changed condition). Compute signed change and, when the reference is nonzero, percentage change. Explain why units matter.

Intermediate · Interpret a technical trace

Independent theoretical exercise · K11-03

For Reproducibility = 9, the model supplies this excerpt from DREAD component scoring · Spoofing: Component · Inherent 0–10 · Proposed residual 0–10 Damage · 8 · 8 Reproducibility · 9 · 3 Exploitability · 6 · 2 Affected users · 8 · 4 Discoverability · 6 · 6 Compute the range (maximum minus minimum) of the Inherent 0–10 column in these rows. Identify the maximum observation. Do not extrapolate beyond these rows.

Advanced · Reverse reasoning

Independent theoretical exercise · K11-04

An observation is Inherent DREAD mean = 7.4 /10. Candidate A uses STRIDE category = Spoofing; Damage (0–10) = 8; Reproducibility = 7; Exploitability = 6; Affected users = 8; Discoverability = 6; Control evidence = not tested; Residual damage = 8; Residual reproducibility = 3; Residual exploitability = 2; Residual affected users = 4; Residual discoverability = 6. Candidate B changes the listed settings (Reproducibility = 9) and keeps the remaining settings fixed. Which is consistent with the observation? If both can explain it, say what additional evidence is required.

Advanced · Diagnose a reported mismatch

Independent theoretical exercise · K11-05

A student configures Exploitability = 8 while preserving all other reference settings, but copies the reference report of Inherent DREAD mean = 7 /10. Evaluate whether the report is justified. Identify the first configuration/output check to perform.

Challenging · Design a controlled verification

Independent theoretical exercise · K11-06

Design a controlled comparison for K11 · Threat modeling & integrated security review using reference STRIDE category = Spoofing; Damage (0–10) = 8; Reproducibility = 7; Exploitability = 6; Affected users = 8; Discoverability = 6; Control evidence = not tested; Residual damage = 8; Residual reproducibility = 3; Residual exploitability = 2; Residual affected users = 4; Residual discoverability = 6 and test Damage (0–10) = 10. Specify the changed setting(s), measured metric Inherent DREAD mean, controls, repetitions, an acceptance check and what evidence can distinguish an actual implementation from the model.

Step-by-step experimental procedure

Build a threat register around IoT data-flow trust boundaries and calculate justified DREAD scores.

1 · Reference workbench configuration

Use the named reference workbench and its reference inputs. Additional live instruments may have different controls; use the matching instrument. Record virtual and practical results separately.

STRIDE categorySpoofing
Damage (0–10)8
Reproducibility7
Exploitability6
Affected users8
Discoverability6
Control evidencenot tested
Residual damage8
Residual reproducibility3
Residual exploitability2
Residual affected users4
Residual discoverability6

2 · Perform the investigation in order

  1. Inspect the diagram: sensor → gateway → broker → storage → dashboard. Select Spoofing and identify the sensor/gateway trust boundary. Enter and justify five 0–10 scores; the default mean is 7.0.
  2. Keep the inherent scores fixed, enter proposed residual values and leave evidence at not tested. Residual result must stay Unverified.
  3. Select Tampering and assign 9, 8, 7, 9, 7. Confirm mean 8.0 and explain why the asset and treatment differ from Spoofing.
  4. For each of the remaining STRIDE categories choose the correct boundary, identify the protected asset, justify five scores, and save a separate trial.
  5. Use the provided capstone procedure and the independent K03–K10 results to justify positive and negative tests. Only mark a mitigation verified when you actually have both kinds of evidence. Re-score the residual impact after considering what the treatment does and does not protect.

3 · Compare controlled trials

TrialIndependent changeExpected checkObservation
Spoofing, no verificationUse reference inputs aboveInherent DREAD mean: 7; Residual DREAD mean: UnverifiedRecord actual result
Mitigation with both controlsControl evidence = verified positive and negativeResidual DREAD mean: 4.6Record actual result
Tampering, revised scoresSTRIDE category = Tampering; Damage (0–10) = 9; Reproducibility = 8; Exploitability = 7; Affected users = 9; Discoverability = 7Inherent DREAD mean: 8Record actual result
DoS, limited impactSTRIDE category = Denial of service; Damage (0–10) = 4; Reproducibility = 5; Exploitability = 5; Affected users = 4; Discoverability = 5Inherent DREAD mean: 4.6Record actual result

4 · Analyze and report

Submit a threat register with evidence references and residual risks; discuss why an ordinal mean is not an attack probability.

Required evidence: Six scored STRIDE rows, evidence references, treatment owners and residual scores.

Model boundary: Threat-modeling worksheet and arithmetic. Evidence labels are student-entered, not automatically verified.

Controlled investigation · reproducible evidence

Method. Use the existing reference workbench configuration and the named controlled changes below. A controlled variable stays fixed while the independent variable is intentionally changed; the dependent variable is the resulting observed output. First predict each trial from the Concepts page. Run the baseline, then change only the specified setting and record the outcome. For deterministic traces one execution per case and a repeated verification are sufficient; for timing or stochastic measurements repeat at least five times, recording each run, median and range. Reset to the reference state between independent comparisons.

TrialIndependent changeDependent observation
Spoofing, no verificationUse reference inputs aboveRecord actual outcome and units
Mitigation with both controlsControl evidence = verified positive and negativeRecord actual outcome and units
Tampering, revised scoresSTRIDE category = Tampering; Damage (0–10) = 9; Reproducibility = 8; Exploitability = 7; Affected users = 9; Discoverability = 7Record actual outcome and units
DoS, limited impactSTRIDE category = Denial of service; Damage (0–10) = 4; Reproducibility = 5; Exploitability = 5; Affected users = 4; Discoverability = 5Record actual outcome and units

Evidence: attach the completed comparison table, one trace or screenshot per condition, and actual practical terminal/hardware evidence where applicable. Explain any prediction mismatch and distinguish modeled behavior from measured results.

Loading laboratory-specific procedure…

Python / Google Colab notebook

Original defensive function; ephemeral evidence directory. Validated locally in a fresh Jupyter kernel. Download, then upload to Google Colab.

Download NotebookOpen Google ColabAll Python notebooks
K11 / Kali + Security Studio50 min

Threat modeling & integrated security review

Kali terminal C · working directory
Kali (Bash)
cd ~/kali-labs
bash verify_kali.sh
✓ Expected: Toolkit directory is selected and all dependency checks pass. Do not proceed if any check fails.

Objective: Trace threats to verification evidence, identify residual risks and document mitigations.

Connect STRIDE and DREAD with actual local observations.

ACTION 01 / 04
Kali terminal C — run integrated checks
python3 lab.py capstone
✓ Expected: Eight checks pass: strict telemetry schema, invalid fields, signed manifest, modified content/signature and rollback rejection.
ACTION 02 / 04
Kali terminal C — inspect report
cat "$HOME/.psut-kali-security-v14/evidence/K11-INTEGRATED.json"
✓ Expected: JSON contains actual local execution outcomes and no private key material.
ACTION 03 / 04
Kali terminal C
ls -l "$HOME/.psut-kali-security-v14/evidence"
✓ Expected: The evidence directory lists the JSON files created by completed exercises; absent files mean the corresponding exercise has not produced a record.

Website: Open Security Studio → STRIDE / DREAD / privacy worksheets

Open Security Studio Attach evidence to your project

STRIDE / DREAD deliverable: draw device, MQTT broker, gateway, storage and dashboard trust boundaries. For each STRIDE category, record threat, affected asset, mitigation, positive/negative test, observed evidence, five justified DREAD scores and residual risk. Mark untested controls as unverified.

ACTION 04 / 04
Kali terminal C — after stopping both brokers with Ctrl+C
ss -ltn | grep -E ":18884|:18885"
✓ Expected: No matching listening socket; grep exit status 1 is expected if neither port is listening. If a socket remains, inspect only the dedicated lab processes.

Experimental notebook

Record your own results. Values are not prefilled or independently verified.

Method and implementation

Review the implementation after attempting the practical steps.

Verification matrix · method and source

For each threat, record a testable mitigation, expected result, actual output, evidence file and residual risk. Treat K02–K10 as controls tested in a toy system; do not claim the production IoT deployment is secured.

Verification and notebook

Expected observation / verification

Prepare a matrix: asset, trust boundary, threat, mitigation, experiment, observed outcome, residual risk. Stop both dedicated brokers with Ctrl+C after finishing.

Engineering discussion

Which outcomes demonstrate actual controls, and which remain only design claims?

Python / Google Colab laboratory

K11 · 11 notebook cells · 3 executable Python cells

Complete the theoretical investigation first. Run the cells in order, record actual outputs and compare against your prediction.

How to execute

  1. Download this notebook and open Google Colab. Select File → Upload notebook and choose the downloaded .ipynb.
  2. Read the Markdown instructions before each executable cell. Use a Python runtime, run cells from top to bottom, and resolve imports if necessary.
  3. Perform the baseline and controlled changes. Save the notebook with actual outputs and your written interpretation.

Execution scope: Default computational cells passed isolated local Python execution; physical equipment and live services require separate verification.

01Instructions · Markdown
# K11 · K11 · Threat modeling & integrated security review **PSUT IoT Engineering Studio — Dr. Mohammad Alja’afreh** ## Introduction Combine schema and signed-manifest controls with STRIDE/DREAD and residual-risk analysis. ## How to run 1. Download this notebook from the laboratory page. Open Google Colab → File → Upload notebook. 2. Select a Python CPU runtime. Run cells from top to bottom using Shift+Enter, or Runtime → Run all. 3. Read the printed observations and assertions. Change one parameter at a time and rerun the relevant cell. 4. Save your own outputs and compare them to the portal Experiment tab. **Execution boundary:** Original defensive function; ephemeral evidence directory. Do not run the hardware or service commands in Colab. No real credentials are needed. The notebook is self-contained.
02Instructions · Markdown
## Experiment-specific preparation Combine schema and signed-manifest controls with STRIDE/DREAD and residual-risk analysis. **Reference procedure (use the matching simulator/WSL tool where named, not an unrelated service):** 1. Inspect the diagram: sensor → gateway → broker → storage → dashboard. Select Spoofing and identify the sensor/gateway trust boundary. Enter and justify five 0–10 scores; the default mean is 7.0. 2. Keep the inherent scores fixed, enter proposed residual values and leave evidence at not tested. Residual result must stay Unverified. 3. Select Tampering and assign 9, 8, 7, 9, 7. Confirm mean 8.0 and explain why the asset and treatment differ from Spoofing. 4. For each of the remaining STRIDE categories choose the correct boundary, identify the protected asset, justify five scores, and save a separate trial. 5. Use the provided capstone procedure and the independent K03–K10 results to justify positive and negative tests. Only mark a mitigation verified when you actually have both kinds of evidence. Re-score the residual impact after considering what the treatment does and does not protect. **Evidence:** **Boundary:**
03Instructions · Markdown
## 1. Objectives and reference condition - Reproduce the specific computational mechanism in this laboratory. - Inspect the output, compare the reference condition with a changed or rejected condition where implemented, and explain any discrepancy. - Distinguish actual local Python execution from mock, physical and external-service observations. ## 2. Environment check
04Python · executable cell
PYTHON · Code cell
# =====================================================================
# K11 | Code cell 01 | K11 · Threat modeling & integrated security review
# Purpose: 1. Objectives and reference condition - Reproduce the specific computational mechanism in this laboratory. - Inspect the output, compare the reference condition with a changed or rejected condition where implem
# Inputs: the explicit fixture/settings below and any preceding cell state.
# Output: inspect printed values, returned records or assertions; record evidence.
# =====================================================================
import sys
print("Python",sys.version.split()[0])
# Check the expected invariant so a mismatch fails visibly instead of appearing successful.
assert sys.version_info >= (3,10)
Ask Dr. Mohammad about this cell
05Instructions · Markdown
## 3. Implementation Read the comments and variable definitions before execution. Assertions must pass; inspect values, not just completion.
06Python · executable cell
PYTHON · Code cell
# =====================================================================
# K11 | Code cell 02 | K11 · Threat modeling & integrated security review
# Purpose: 3. Implementation Read the comments and variable definitions before execution. Assertions must pass; inspect values, not just completion.
# Inputs: the explicit fixture/settings below and any preceding cell state.
# Output: inspect printed values, returned records or assertions; record evidence.
# =====================================================================
import hashlib, json, time

from pathlib import Path

# Set HOME for the next computation or reference condition.
HOME=Path.home()/'.psut-kali-security-v14'

# Define the reusable operation save; keep its logic separate from the trial.
def save(name, tests):
    report={'schema':'psut-kali-v14','experiment':name,'source':'local-execution-self-reported','utc':time.strftime('%Y-%m-%dT%H:%M:%SZ',time.gmtime()),'checks':tests}
    out=HOME/'evidence'; out.mkdir(parents=True,exist_ok=True,mode=0o700)
    (out/(name+'.json')).write_text(json.dumps(report,indent=2)+'\n')
    print(json.dumps(report,indent=2)); return all(x['pass'] for x in tests)

# Define the reusable operation check; keep its logic separate from the trial.
def check(name, ok, observation): return {'name':name,'pass':bool(ok),'observation':str(observation)}

# Bounded defensive integration: signed manifest, rollback and strict schema.
def capstone():
    """Bounded defensive integration: signed manifest, rollback and strict schema."""
    import math
    from cryptography.hazmat.primitives.asymmetric import ec
    from cryptography.hazmat.primitives import hashes
    from cryptography.exceptions import InvalidSignature
    def schema(d):
        return (isinstance(d,dict) and set(d)=={'device','temperature','humidity'}
                and d['device']=='demo-01' and all(type(d[k]) in (float,int) and math.isfinite(d[k]) for k in ('temperature','humidity'))
                and -40<=d['temperature']<=80 and 0<=d['humidity']<=100)
    valid={'device':'demo-01','temperature':25,'humidity':60}
    tests=[check('Valid telemetry schema',schema(valid),'accepted'),check('Extra field rejected',not schema(dict(valid,token='dummy')),'rejected'),check('Out-of-range humidity rejected',not schema(dict(valid,humidity=110)),'rejected'),check('Boolean temperature rejected',not schema(dict(valid,temperature=True)),'rejected')]
    key=ec.generate_private_key(ec.SECP256R1());public=key.public_key();current=2
    def manifest(version,content):return json.dumps({'version':version,'sha256':hashlib.sha256(content).hexdigest()},sort_keys=True,separators=(',',':')).encode()
    def accept(record,signature,content):
        try:public.verify(signature,record,ec.ECDSA(hashes.SHA256()))
        except InvalidSignature:return 'invalid signature'
        data=json.loads(record)
        if data['sha256']!=hashlib.sha256(content).hexdigest():return 'digest mismatch'
        if data['version']<=current:return 'rollback rejected'
        return 'accepted'
    artifact=b'fictional update data; not executable';new=manifest(3,artifact);sig=key.sign(new,ec.ECDSA(hashes.SHA256()));old=manifest(1,artifact);old_sig=key.sign(old,ec.ECDSA(hashes.SHA256()))
    for name,record,signature,content,expected in [('Signed newer manifest',new,sig,artifact,'accepted'),('Modified manifest',old,sig,artifact,'invalid signature'),('Modified content',new,sig,artifact+b'x','digest mismatch'),('Signed older version',old,old_sig,artifact,'rollback rejected')]:
        outcome=accept(record,signature,content);tests.append(check(name,outcome==expected,outcome))
    return save('K11-INTEGRATED',tests)
Ask Dr. Mohammad about this cell
07Instructions · Markdown
### Step 2 · Run the reference calculation Read the comments and variable definitions before execution. Assertions must pass; inspect values, not just completion.
08Python · executable cell
PYTHON · Code cell
# =====================================================================
# K11 | Code cell 03 | K11 · Threat modeling & integrated security review
# Purpose: Step 2 · Run the reference calculation Read the comments and variable definitions before execution. Assertions must pass; inspect values, not just completion.
# Inputs: the explicit fixture/settings below and any preceding cell state.
# Output: inspect printed values, returned records or assertions; record evidence.
# =====================================================================
import tempfile
# Limit resource lifetime to this block so files, sockets or temporary state are cleaned up.
with tempfile.TemporaryDirectory() as d:
    HOME=Path(d)
    assert capstone()
Ask Dr. Mohammad about this cell
09Instructions · Markdown
## Original portal implementation (reference only) These are the actual laboratory snippets. They are retained for comparison; follow the portal setup for WSL, hardware or services. They are **not** executed by Run all. ```bash python3 lab.py capstone ```
10Instructions · Markdown
## 4. Results and analysis Record the actual output and whether the assertions pass. Identify a parameter to vary, state your prediction, repeat the reference calculation, then explain the changed result. | Trial | Configuration | Observation | Interpretation | |---|---|---|---| | A | Reference | | | | B | One controlled change | | | | C | Reference repeat | | | **Limitations:** Original defensive function; ephemeral evidence directory. Notebook success does not certify external equipment or services.
11Instructions · Markdown
## Guided reasoning and evidence A controlled comparison changes one independent input while keeping the other relevant inputs fixed; the dependent variable is the recorded output. Use this lab’s reference condition above. **Independent task:** 2. Keep the inherent scores fixed, enter proposed residual values and leave evidence at not tested. Residual result must stay Unverified. Record the named input, prediction, actual output and one limitation; restore the original condition and repeat. | Trial | Input/configuration | Prediction | Observation | Evidence / limitation | |---|---|---|---|---| | A | Reference | | | | | B | Changed input | | | | | A repeat | Reference | | | | A conclusion is supported only when it cites the recorded values or observed states and explains them with the experiment theory.
Shared research workbenches · network designer & advanced studies
Concurrent-device simulation & Monte Carlo research
Distributed digital twin · topology, protocol & battery research