Join our Newsletter — 33% off our NHI Course
Home› Guides› D3-AEM Application Exception Monitoring: Using PLC Fault Counters…
Guide OT & IoT Security

D3-AEM Application Exception Monitoring: Using PLC Fault Counters and Timers as Tamper Signals

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 12 November 2026 12 min read
On this page

Controllers count their own faults and timer failures all the time, and when someone changes their logic or parameters those counters often move before anything else does. MITRE D3FEND names this countermeasure Application Exception Monitoring (D3-AEM), synonym Application Failure Monitoring, and defines it as "Monitoring the failures of system counters and timers." It sits under the Detect tactic as a child of Application Performance Monitoring (D3-APM), and it monitors two digital artefacts: the Application Failure Count Variable and the Log. D3FEND's knowledge base article and its single reference, the Top 20 Secure PLC Coding Practices, place it firmly in industrial control: PLC error flags, timer and counter status bits, and fault logs. This card explains what D3-AEM detects, how D3FEND relates it to ATT&CK, how to implement and verify it on controllers, and where the same idea applies to IT applications. It is written for OT security engineers, controls engineers and the SOC analysts who receive their alerts.

Key takeaways

  • It watches the controller's own error bookkeeping. Error flags such as divide by zero, counter overflow, negative timer or counter presets and I/O scan overrun are counted and alerted on rather than silently cleared.
  • Safety and security share the signal. D3FEND notes that timer and counter failures matter for both safety and security, and may reveal tampering with the device or the process it controls.
  • The ATT&CK links are inferred through the Log artefact. D3FEND relates D3-AEM to 14 enterprise techniques that modify or may modify a log, such as Clear Command History (T1070.003) and DCSync (T1003.006); the PLC-specific mappings come from the Top 20 practices, not from D3FEND.
  • It needs no new hardware. The Top 20 practices that underpin it use functions native to the PLC and the HMI, so the main cost is engineering time and alarm design.
  • Thin on its own. Fault counters detect clumsy or disruptive changes; a careful adversary who changes logic without tripping a fault needs integrity checks and cycle time monitoring as well.

D3-AEM at a glance

AttributeValue
D3FEND IDD3-AEM (d3f:ApplicationExceptionMonitoring)
SynonymApplication Failure Monitoring
TacticDetect
Parent techniqueApplication Performance Monitoring (D3-APM), which monitors controller cycle count and duration
Digital artefactsApplication Failure Count Variable (monitors); Log (monitors)
Artefact definitionApplication Failure Count Variable: "Variables that keep count of various failures and errors"
Vendor tag examples in D3FENDAllen-Bradley S:ERR (system error), T4:0.DN (timer status bit), C5:0.OV (counter overflow bit)
D3FEND referenceTop 20 Secure PLC Coding Practices, V1.0 (15 June 2021)
Main limitationOnly detects changes that cause faults or timer and counter anomalies

How it works

D3FEND's description is brief: monitoring timer and counter failures or exceedances can reveal issues with the program or platform, and may help identify tampering or malicious activity affecting the device or the processes it controls. The artefact note adds that controller brands expose different system tags for this, giving Allen-Bradley examples for a system error, a timer done bit and a counter overflow bit.

The Top 20 Secure PLC Coding Practices, which D3FEND cites, turn this into concrete practices:

  • Practice 4, Use PLC flags as integrity checks: count error flags such as divide by zero, counter overflow, negative counter or timer presets and I/O scan overrun so that unexpected faults are investigated rather than ignored. Because most PLCs offer no cryptographic integrity checking, unexpected flags can indicate that logic was changed. The document maps this to Modify Parameter (T0836).
  • Practice 6, Validate timers and counters: check preset values written to timers and counters against an allowed range inside the PLC rather than trusting the HMI. The document's examples: a 1.3 second alarm timer preset to 5 minutes would never fire in time, and a stop counter at 10,000 set to 11,000 would never reach its stop point. Mapped to T0836.
  • Practice 18, Log PLC hard stops and trend them on the HMI: store fault and shutdown events, read and clear the controller's last fault codes and forward them to a syslog server, with time synchronisation for accurate timestamps. Mapped to Device Restart/Shutdown (T0816).
  • Practice 20, Trap false negatives and false positives for critical alerts: compare each critical alarm's trigger bit with its trigger conditions, so a suppressed alarm or a fake alarm is itself detected. Mapped to Alarm Suppression (T0878).

Practices 16 (cycle times), 17 (uptime) and 19 (memory usage) belong to the parent, Application Performance Monitoring, and to the related Platform Uptime Monitoring technique; they complement D3-AEM and are usually implemented on the same HMI trend screens.

Signals to collect

SignalWhere it livesWhat a change may indicate
Math and overflow error flags (divide by zero, counter overflow)Controller status file or system tagsNew or altered logic, out-of-range parameters written remotely
Negative or out-of-range timer and counter presetsTimer and counter structuresParameter tampering intended to delay or prevent an action (T0836)
I/O scan overrunController diagnosticsAdded logic or abnormal communication load
Major and minor fault codes, hard stopsController fault log, read with vendor instructions (for Rockwell, the GSV instruction named in the Top 20 document)Forced restarts or crashing logic (T0816)
Alarm trigger bit versus trigger conditionsPLC logic written for the purposeAlarm suppression or false alarm injection (T0878)

ATT&CK techniques D3FEND relates to D3-AEM

Relationship type: inferred only. D3FEND lists no direct ATT&CK mapping for D3-AEM. Every row below is inferred through the Log artefact: D3-AEM monitors Log, and each technique modifies or may modify a Log or one of its sub-artefacts such as Event Log or Command History Log. D3FEND labels these relations inferred and experimental (D3FEND 1.6.0, checked November 2026). D3FEND shows no ATT&CK for ICS mapping for D3-AEM. D3FEND also lists Clear Windows Event Logs under an ID that ATT&CK has since revoked; its ATT&CK v20 successor is T1685.005, shown below. Each ID was checked against ATT&CK v20.

ATT&CK IDTechniquePractical relevance to D3-AEM
T1070.003Clear Command HistoryLog tampering on engineering workstations; the log monitoring side of D3-AEM
T1685.005Clear Windows Event LogsGaps or clears in host logs that sit beside fault logs
T1134.002, T1134.003Create Process with Token, Make and Impersonate TokenMay modify event logs; weak relation for controller monitoring
T1546.003, T1546.005Windows Management Instrumentation Event Subscription, TrapLog modification on IT hosts; weak relation
T1548.003Sudo and Sudo CachingConfiguration and log effects on Linux hosts; weak relation
T1110.001, T1110.003, T1110.004Password Guessing, Password Spraying, Credential StuffingFailure counts in authentication logs, the IT analogue of a failure counter
T1003.005, T1003.006Cached Domain Credentials, DCSyncMay modify logs; weak relation
T1140Deobfuscate/Decode Files or InformationMay modify event logs; weak relation
T1187Forced AuthenticationEntries in authentication logs; weak relation for controller monitoring

In NHI Mgmt Group's view most of these enterprise relations are a by-product of the generic Log artefact rather than what D3-AEM is for. The techniques that matter for controller fault monitoring come from the Top 20 practices: MITRE ATT&CK for ICS T0836 Modify Parameter, MITRE ATT&CK for ICS T0816 Device Restart/Shutdown and MITRE ATT&CK for ICS T0878 Alarm Suppression.

Where it is implemented

Implementation classWhat it providesFits when
PLC logicCounting error flags, range-checking presets and comparing alarm bits with conditions inside the controller, as the Top 20 practices describeAlways; it is the closest point to the process and needs no extra hardware
HMI and SCADA alarms and trendsAlarms on fault count increases and trend screens for faults, cycle time, uptime and memoryOperators need to see the signal next to the process
Historian and syslog forwardingLong-term storage of fault codes and hard stops, with synchronised timestampsInvestigations and baselining over months
OT network monitoring platformsPassive collection of controller diagnostics, mode changes and program downloads seen on the networkMany controllers, mixed vendors, a central OT SOC
IT application monitoring (analogue, NHI Mgmt Group view)Exception and crash counts from application performance monitoring and error tracking toolsThe same pattern applied to business applications, where a spike in exceptions can accompany injection or fuzzing

Controller-side hardening is in the PLC Security Guide and network-side collection in the OT Network Security Monitoring Guide. For the IT analogue, secure exception handling is covered in the Secure Error Handling and Logging Guide.

Implementation steps

  1. Inventory the fault signals per controller family. For each PLC model, list the system tags or diagnostic functions that expose error flags, fault codes and timer and counter status, from the vendor's programming documentation.
  2. Agree ranges with process engineers. For every safety- or quality-relevant timer and counter, record the allowed preset range. This is engineering knowledge, not security knowledge, and it is the basis for Practice 6.
  3. Add counting and validation logic in a test environment. Count flags rather than clearing them, validate presets inside the PLC, and write alarm trap logic for critical alarms. Test on a simulator or spare controller first, because added logic changes cycle time.
  4. Surface on the HMI and forward off the controller. Create alarms for fault count increases and trends for faults and hard stops; forward fault codes to syslog or the historian with synchronised time.
  5. Baseline. Some processes produce benign faults routinely. Record a few weeks of counts (the period is an example, not a standard) and set alarm thresholds above normal background.
  6. Route to the right responders. A fault spike may be maintenance, process upset or tampering. Agree in the OT Incident Response Guide process who looks first and when security is called.
  7. Roll back safely. Keep the previous program version under change control so added monitoring logic can be removed in a planned window if it causes cycle time or alarm problems.

How to verify it works

  • Bench test: on a test controller, force each monitored condition (an out-of-range preset, a divide by zero in a test routine, a forced alarm bit) and confirm the count increments, the HMI alarms and the event reaches the historian or SIEM.
  • Alarm trap test: during a planned window, assert a critical alarm's conditions with the trigger bit held off in a test routine and confirm Practice 20 logic reports a false negative.
  • Restart evidence: after a planned restart, confirm the hard stop is logged with the correct timestamp.
  • Exercise inclusion: in tabletop or purple team exercises, include a scenario where parameters are changed remotely and check that fault signals were seen.
MetricExample target (NHI Mgmt Group suggestion, not a standard)Why it matters
Critical controllers with fault counting and forwarding in place100% of safety- and production-critical PLCsCoverage of the assets that matter
Critical timers and counters with documented allowed rangesRising towards 100%Validation is impossible without ranges
Bench test conditions detected end to end100% per test cycleProves the chain from PLC to responder
Fault alarms investigated with a recorded causeAll high-priority alarmsPrevents alarm fatigue hiding tampering

Limits, bypasses and failure patterns

  • Clearing faults instead of counting them: code that silently resets error flags to keep the process running removes the very signal D3-AEM depends on.
  • Careful changes that never fault: an adversary who modifies logic or parameters within valid ranges trips no flag. Pair D3-AEM with program integrity checks (Practice 5) and cycle time and memory trending from the parent technique; see T0889 Modify Program.
  • Alarm logic that can itself be suppressed: the Top 20 document cites the Triton attack, where rogue code suppressed alerts. Alarm trap logic and off-controller logging make suppression harder to hide; see the ICS Malware History Guide.
  • Writable diagnostics: where controller web servers or protocols expose variables with misconfigured access rights, alert bits can be changed remotely. Restrict variable access, as in D3-OVAR OT Variable Access Restriction.
  • Unsynchronised clocks: fault logs without reliable time cannot be correlated with engineering workstation or network events.
  • Performance surprises: extra logic adds scan time; adding it to a heavily loaded controller without testing can cause the overrun it is meant to detect.

Framework mapping

FrameworkReferenceRelevance
NIST SP 800-53 Rev 5SI-4 System MonitoringMonitoring the system to detect attacks and anomalies
NIST SP 800-53 Rev 5SI-7 Software, Firmware, and Information IntegrityFault signals as an indirect integrity indicator for controller logic
NIST SP 800-53 Rev 5AU-6 Audit Record Review, Analysis, and ReportingReview of forwarded fault and hard stop logs
NIST CSF 2.0DE.CM-09, DE.AE-02Monitoring computing hardware, software and runtime environments; analysing adverse events
Top 20 Secure PLC Coding PracticesPractices 4, 6, 18, 20The concrete source practices behind D3-AEM
MITRE D3FENDD3-APM, D3-AEMParent and technique
  • Application Performance Monitoring (D3-APM): the parent, covering cycle count and duration.
  • Platform Uptime Monitoring (D3-PUM): restarts and uptime trends, Practice 17.
  • OT Variable Access Restriction (D3-OVAR): limits who can write the variables D3-AEM watches.
  • Operating Mode Restriction (D3-OPR): blocks program changes while the controller is in run mode; see D3-OPR Operating Mode Restriction.

Practitioner checklist

  • List the error flag, fault code and timer and counter status tags for each controller family.
  • Count error flags instead of silently clearing them.
  • Validate timer and counter presets inside the PLC against ranges agreed with process engineers.
  • Write alarm trap logic for every critical alarm.
  • Forward fault codes and hard stops to syslog or the historian with synchronised time.
  • Test added logic on a simulator or spare controller for cycle time impact.
  • Baseline normal fault counts before setting alarm thresholds.
  • Bench test every monitored condition end to end each test cycle.
  • Pair fault monitoring with program integrity checks and cycle time trending.

Standards and references

Related NHI Mgmt Group resources: MITRE D3FEND Guide · PLC Security Guide · OT Security Guide · HMI and SCADA Server Hardening Guide · OT Network Security Monitoring Guide

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 12 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org