Skip to content

Object Model (sample)

colesmj edited this page Oct 6, 2019 · 4 revisions

When looking at an object for threat modeling and architectural modeling, it is important to keep in mind the object's characteristics and functions.

Note: I'm including this information for discussion purposes, and considering that while the core focus of this project may be to do "just threat modeling", with simple architectures and diagrams, the technology could be built in such a way as to describe arbitrary objects (architectural units), diagram them, diagram their connections to other objects, and to assess their state individually or as connected units.

Table of Contents

System Description Language

This section details a description language for systems, which can be used to perform analysis for purposes such as finding security weaknesses. Systems are described in terms of Nodes (process, object, or entity), Edges (channel or path), and Data (abstract objects).

  • Nodes are themselves sub-systems and can be subjects for refinement.
  • The parent system is a Node
  • Nodes operate on, generate, or connect to Data, and may also open communication channels (Edges) as a listener, or client, or both, to other Nodes
  • Nodes have properties and metadata which provide useful information about the construction, operation, and ownership of a subsystem.
  • Data are themselves Nodes; reading or writing data requires an Edge
  • Descriptions may be recursive and self-referential

Entity Relationships

Source Relationship Target Meaning

System

contains

System;

Node

A System is a type of Node that can contain other Systems (as sub-systems, or to define relationships between Systems) Systems can contain Nodes

Node contains Node Nodes can contain Nodes
Node connects_to Port Nodes (as initiator) can communicate to Ports
Node exposes Port Nodes can expose Ports (as target)

Node

Node Node

calls

reads writes

Node

Data Data

Nodes communicate more directly (exe calling a library, for example)

Edge

connects

Node; Port

Edges connect 2 Nodes, or a Node to a Port, or 2 Ports (and their containing Nodes), and describe the path between them

Edge transports Data Data Edges transport Data (object reference)

NODE Attribute Descriptors

Subject Attribute Prefix Attribute Qualifiers Meaning
Node

is.type

.embedded

.cloud .cloud.SaaS .cloud.IaaS .cloud.PaaS .mobile

.mobile.ios .mobile.android .mobile.windows .containerized

.singleton .driver .kernel_object .firmware .hardware .protected .os .os.windows .os.linux .os.mac_os .os.bsd .os.android .os.ios .os.rtos

Node is of any type (default: unknown) Node is an embedded process (non-desktop, mobile, or cloud) Node is any cloud component Cloud - Software as a Service Cloud - Infrastructure as a Service Cloud - Platform as a Service Mobile - platform independent or generic, or unknown Mobile - iOS target Mobile - Android target Mobile - Windows CE or Mobile target Containerized system - Docker or other container subtype Process - singleton Process - device driver Process - kernel module Process - embedded firmware Hardware device Process - protected memory module Operating System (default: unknown or any) Operating System - Windows Operating System - Linux Operating System - Mac OS Operating System - BSD (any) Operating System - Android Operating System - iOS Operating System - Any real-time OS

Node

sourced_from

.unknown .internal .open_source

.commercial

.gov

Node is sourced from some unknown entity Custom development by Company Sourced from an open source project or under an open source license Sourced from a commercial vendor or under a commercial license Sourced from a government entity

Node

protected_method

.unknown .none .signed .signed.cross .signed.dual .encrypted

Process integrity protected by unknown method Process integrity unprotected Process or module signed by single key Process or module signed by a cross-cert Process or module signed multiple times Process or module encrypted

Node Node

delivered_as

uses.source

.source .binary

.binary.msi .binary.rpm .binary.apk .binary.deb .binary.ipk .archive .archive.jar .archive.war .archive.ear .archive.cab .archive.zip

.c .cpp .c# .java .js

.python .python.2

.python.3

.perl

.kotlin

.swift .objective_c

.objective_cpp

.dalvik

.html .html5 .xml

.go

Module delivered in source form Module delivered packaged in an unspecified format Module packaged as MSI Module packaged as RPM Module packaged as APK Module packaged as DEB Module packaged as IPKG or OPKG Module packaged as an archive (default: any) Module packaged as JAR Module packaged as WAR Module packaged as EAR Module packaged as CAB Module packaged as zip Module built from source (default: any) Module built from source code written in C Module built from source code written in C++ Module built from source code written in C# Module built from source code written in Java Module built from source code written in JavaScript Module built from source code written in Python Module built from source code written in Python 2.x Module built from source code written in Python 3.x Module built from source code written in Perl Module built from source code written in Kotlin Module built from source code written in Swift Module built from source code written in Objective-C Module built from source code written in Objective-C++ Module built from source code written in Android Java Module built from source code written in HTML Module built from source code written in HTML5 Module built from source code written in XML or XPath Module built from source code written in Go

Node

uses.technology

.cryptography .cryptography.hashing .cryptography.hashing.hmac .cryptography.symmetric_enc .cryptography.asymmetric_enc .cryptography.dig_sig .cryptography.pgp_gpg

.identity

.identity.pki

.identity.x509

.identity.shared_secret .identity.kerberos

.identity.oauth

.identity.saml

.identity.openid

.secure_boot

Module uses cryptography for any purpose Module uses hashing (SHA, MD, etc) Module uses HMACs Module uses symmetric encryption Module uses asymmetric encryption Module performs or verifies digital signatures Module uses PGP, GPG, or equivalent technologies Module uses any method for identity and authentication Module uses public/private key pairs as part of identity decisions Module uses x509 certificates for any purpose Module uses pre-shared secrets for identity Module uses Kerberos for identity and authentication Module uses OAuth for identity and authentication Module uses SAML for identity and authentication Module uses OpenID for identity and authentication Module performs or relies on Secure Boot (or Trusted Boot, Verified Boot, etc)

Node

requires

.assurance

.assurance.security .assurance.fail_safe .assurance.safety

.assurance.privacy .assurance.thread_safe .privileges.root

.privileges.setuid

.privileges.sudo

.privileges.user

Unit requires any type of assurance for any reason Unit requires security assurance Unit must be fail safe Unit must be safe or is part of a functionally safe system Unit must maintain privacy Unit must be thread safe Process is expected or must run as root or other elevated privileged user Process can execute as temporarily privileged (e.g. to open restricted ports) Process is expected to support temporary user granted elevation of privileges Process is expected or must run as a standard non-privileged user

PORT Attribute Descriptors

Source Relationship Target Meaning
Port

Port

Port

requires

protected.method

protocol

.security

.security.authentication

.security.process_control

.security.physical

.authentication

.access_control

.physical

.physical

.physical.i2c .physical.spi .physical.jtag .physical.usb .physical.infiniband .physical.memory .network .network.tcp .network.tls

.network.ssl

.network.ipv4 .network.ipv6 .network.ipsec .network.mutual_tls .network.dtls .network.udp .network.usb .network.ipc

.network.bt .network.ble .file .file.nfs .file.webdav .file.encryptfs .file.ext4 .file.ntfs .file.luks

Port requires security capabilities of any type Port requires authentication to access (e.g. challenge-response, mutual TLS, etc) Port is expected to be controlled for access externally (e.g. by firewall rules) Port is expected to be physically secured from access (e.g. tamper seals)

Port protected by unspecified security requirements Port is protected by authentication to access (e.g. challenge-response, mutual TLS, etc) Port is protected by control for access externally (e.g. by firewall rules) Port is protected by physical security from access (e.g. tamper seals) Edge represents connectivity over an unknown channel or method Connectivity is over an undefined embedded (physical) channel or method Connectivity is over i2c Connectivity is over SPI Connectivity is over JTAG Connectivity is over USB Connectivity is over Infiniband Connectivity is through shared memory Connectivity is over any network type Connectivity is over any TCP network Connectivity is over the TLS protocol (1.2 or newer) Connectivity is over the SSL or legacy TLS protocols (any SSL, or TLS 1.0 or 1.1) Connectivity is over a generic IPv4 link Connectivity is over a generic IPv6 link Connectivity is over an IPSec or VPN link Connectivity is over a Mutual TLS channel Connectivity is over DTLS Connectivity is over a generic UDP link Connectivity is over a USB-based network Connectivity is over IPC sockets (local) or named pipes Connectivity is over Bluetooth Connectivity is over Bluetooth Low Energy Connectivity is file based (any) File based connectivity - NFS File based connectivity - WebDav File based connectivity - encryptfs File based connectivity - ext4 File based connectivity - NTFS File based connectivity - LUKS

DATA Attribute Descriptors

Source Relationship Target Meaning
Data

encoding

.none .markup .markup.sgml .markup.yaml .markup.xml .markup.json .markup.protobuf .markup.properties

.serialized

Data is raw bits Data is encoded in an undefined format Data is encoded as SGML Data is encoded as YAML Data is encoded as XML Data is encoded as JSON Data is encoded as Protobuf Data is encoded as Properties (name:value pairs) Data is serialization output from any language

Data

protected_by

.none .encrypted

.dig_sig

.crc

Data is un-protected at rest or in transit Data is protected by encryption (e.g. AES or PKI) Data is protected by a digital signature (e.g. XML-DSIG, PGP, etc) Data is protected by a CRC

Data

Data

requires

is_type

.security

.security.none

.security.confidentiality .security.integrity .security.availability .privacy

.internal_only .user .user.pii .user.phi .user.pci .user.voice .user_defined .security_sensitive .ip.internal

.ip.3rd_party

Data is sensitive and requires security assurance Data is non-sensitive or requires no security assurance Data is sensitive and requires confidentiality Data is sensitive and requires integrity Data is sensitive and requires availability Data is sensitive and requires privacy Data is of an unknown or undefined type Data is expected to be internal to Company Data is customer facing but not user defined Data is user PII Data is user PHI Data is user financial data Data is user voice data Data is generated or defined by a user Data is arbitrary security sensitive data Data is internal or company confidential intellectual property Data is 3rd party intellectual property

EDGE Attribute Descriptors

Source Relationship Target Meaning

Edge

persistence

The channel persistence and reliability characteristics are unknown

transports

DATA

Data (object reference) flows over this channel

anchors

NODE; PORT

This channel connects Node A (object reference) to Node B (object reference)

METADATA Descriptors

Source Relationship Target Qualifiers Meaning

Node

Edge Port

Data

metadata

metadata

metadata

metadata

name label

namespace created_by

sourced_from

source_repo_ref scan_project version codename sku

part_type

description

notes

market

name label

name label

port

protocol

service_name name label

Internal-TeamName; Vendor-Name

Any; Unknown; Sample-1; Sample-2; Sample-3; Internal;

Customer Support

None; Unknown; Variable; PORT_NUMBER ANY; API; Other

A name for the Node A label for the Node, for diagramming and reference Referential labels for grouping Who designed, implemented, or delivered the Node The source of the Node is an internal team (name) or a vendor (name) Source repository for this Node Code analysis project, if applicable Version string Codename for this Node, if applicable SKU for Node (containing or top level Nodes only) Type of device or component (containing or top level Nodes only) Free-form text description of the Node - what it is, what it does, etc Free-form notes for additional information * Unspecified market as target for Node * Unknown market target * Sample market 1 * Sample market 2 * Sample market 3 * Node is expected to be consumed by internal teams only * Node is for customer support and maintenance use only A name for the Edge A label for the Edge, for diagramming and reference A name for the Port A label for the Port, for diagramming and reference The physical or logical port assignment

The protocol associated with this Port

A common service name exposed by Port A name for this Data A label for this Data, for diagramming and reference