Join our Newsletter — 33% off our NHI Course
Home› Guides› IBM z/OS Security Hardening Guide: APF, SVCs, Exits,…
Guide Endpoint Security

IBM z/OS Security Hardening Guide: APF, SVCs, Exits, PPT and SMF Monitoring

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 14 November 2026 16 min read
On this page

On z/OS, anyone who can put a module into an APF-authorised library, add an SVC or install an exit routine can run code that the security manager never checks. RACF, ACF2 and Top Secret decide who may open which data set, but the operating system trusts whatever runs in supervisor state, in a protection key below 8, or with APF authorisation. This guide covers the integrity layer under the external security manager: the APF list, dynamic LPA and LNKLST, user SVCs, the dynamic exits facility, the Program Properties Table, and the SMF records beyond type 80 that show when any of these change. It is written for z/OS systems programmers, mainframe security administrators and the SOC engineers who receive mainframe telemetry. User IDs, RACF attributes and started task identity are covered in the Mainframe Identity and RACF Security Guide and the Mainframe Service Accounts and Batch Job Identity Guide, so they are not repeated here.

This is an independent guide from NHI Mgmt Group, based on IBM's public z/OS documentation as of November 2026. It is not sponsored or reviewed by IBM. Product features change, so confirm settings against IBM's current documentation for your z/OS release.

Key takeaways

  • Authorised code bypasses the ESM. IBM defines system integrity as unauthorised programs being unable to bypass storage protection, reach RACF-protected resources or gain control in an authorised state, so these lists are part of the security boundary.
  • Protect the dynamic lists in the FACILITY class. CSVAPF, CSVDYLPA, CSVDYNEX, CSVDYNL and CSVLLA profiles decide who can change the running system without an IPL.
  • Write access to an APF library is system access. UPDATE on any data set in the APF list, LPA or authorised LNKLST is equivalent to supervisor authority, so treat those permits as the most privileged entitlements on the platform.
  • Clean the PPT. Entries with NOPASS, NODSI or a key below 8 should exist only for modules that are installed and needed; neutralise the rest with a SCHEDxx entry that grants nothing.
  • Monitor more than type 80. SMF types 14, 15, 17 and 18 on authorised libraries, type 90 subtypes 29 and 31 for LNKLST and LPA changes, and type 92 for z/OS UNIX files show integrity changes that RACF records alone do not.

How system integrity and authorisation work in z/OS

z/OS has two layers of control. The external security manager (ESM), reached through the System Authorization Facility (SAF), answers "may this user access this resource?". Underneath it, the operating system decides which code is trusted to run with privileges that let it ignore those answers. IBM's integrity statement defines system integrity as the guarantee that a program "not authorized by a mechanism under the installation's control" cannot bypass store or fetch protection, cannot reach resources protected by the z/OS Security Server (RACF), and cannot obtain control in an authorised state. Authorised state means supervisor state, a PSW protection key from 0 to 7, or APF authorisation.

IBM ships the mechanisms; the customer decides which libraries, SVCs, exits and PPT entries are trusted.

MechanismWhat it trustsWhere it is definedWho can change it while running
APF listLoad modules link-edited with AC=1 that run from a listed libraryPROGxx APF statements (or IEAAPFxx in static format)SETPROG APF and SET PROG=xx, controlled by FACILITY CSVAPF.*
Link pack area (LPA)Every module in LPA is treated as authorisedLPALSTxx, PROGxx LPA statementsSETPROG LPA, CSVDYLPA macro, FACILITY CSVDYLPA.*
LNKLSTLNKLST libraries can be treated as APF authorised, depending on the IEASYSxx LNKAUTH settingPROGxx LNKLST statementsSETPROG LNKLST, FACILITY CSVDYNL.*; LLA refresh via CSVLLA.*
User SVCsSVC routines run in supervisor state for any caller unless restrictedIEASVCxx, SVCUPDTE macroAuthorised programs using SVCUPDTE
ExitsExit routines run with the authority of the calling system componentPROGxx EXIT statements, SMFPRMxx EXITS, product parmlib membersSETPROG EXIT, CSVDYNEX macro, FACILITY CSVDYNEX.*
Program Properties TableNamed programs may get a system key, bypass password and RACF checks (NOPASS) or skip data set ENQs (NODSI)IBM default PPT plus SCHEDxx PPT statementsSET SCH=xx
z/OS UNIX APF extended attributePrograms in the z/OS UNIX file system marked APF authorisedFile attribute set with extattrUsers with READ to FACILITY BPX.FILEATTR.APF

How APF authorisation is granted

IBM's documentation sets two conditions. The first load module of a job step task must be link-edited with the authorisation code AC=1, stored as a bit in the PDS directory entry, and it must be fetched from an authorised library or from the LPA. If the first module is not authorised, the program cannot become authorised for the life of the job step. Every later module the authorised program loads must also come from an authorised library or LPA, otherwise the system abends the task with X'306'.

Aliases do not belong in the APF list: IBM notes that an alias entry authorises nothing. The volume field matters too: an entry can name a volume serial, ****** for the current SYSRES, *MCAT* for the master catalogue volume, or SMS for SMS-managed data sets. A non-SMS entry for a data set that no longer exists on its volume leaves a name someone else could allocate.

Admin roles and privileged access

Give the small group of systems programmers what it needs through FACILITY and OPERCMDS profiles, and keep everyone else, including security administrators, out.

Resource (class)ControlsRecommended access
CSVAPF.libname (FACILITY)Adding or deleting an APF entry for a libraryUPDATE for named systems programmers only, AUDIT(ALL(READ))
CSVAPF.MVS.SETPROG.FORMAT.DYNAMIC and .STATIC (FACILITY)Switching the APF list formatUPDATE for systems programmers only
CSVDYLPA.** (FACILITY)Adding or deleting modules in dynamic LPASystems programmers and approved authorised started tasks
CSVDYNEX.** (FACILITY)Defining, changing and undefining dynamic exits and exit routinesSystems programmers and approved authorised started tasks
CSVDYNL.** (FACILITY)Defining and activating LNKLST setsSystems programmers only
BPX.FILEATTR.APF (FACILITY)Setting the APF extended attribute on z/OS UNIX filesSystems programmers only, audited
APF, LPA and authorised LNKLST data sets (DATASET)Writing load modules that will run authorisedUACC(NONE); UPDATE and ALTER for systems programmers and the installation tool's started task only
SYS1.PARMLIB and concatenated parmlibs (DATASET)PROGxx, SCHEDxx, IEASVCxx, SMFPRMxx, IEASYSxxUPDATE for systems programmers; READ for auditors
  • No undefined profiles: IBM states that if no FACILITY profile protects one of these entities, no additional access check is made. A missing CSVAPF profile does not fail safe; it means any operator with console authority can change the list.
  • Watch for catch-all profiles: IBM also warns that if a matching FACILITY profile exists, the system uses it. A broad CSV* or ** profile with generous access can silently authorise APF changes.
  • Console authority is not enough: SETPROG requires a console with system authority or higher. Protect the commands themselves through OPERCMDS profiles such as MVS.SETPROG and MVS.SET.PROG, and keep extended MCS consoles tied to individual user IDs.
  • Separate duties: whoever approves APF and exit changes should not control SMF or ESM audit settings. See the Change Management Security guide for the approval model.

Integrations, API tokens and service accounts

Most authorised code arrives through installation tooling and vendor products, so the identities behind those tools are the real control point.

  • Installation and maintenance tooling: SMP/E jobs and the started tasks or batch IDs that run them need UPDATE on target libraries, many of which are APF authorised. Give each its own user ID, restrict it to the target zones it maintains, and audit its writes. The identity patterns are in the Mainframe Service Accounts and Batch Job Identity Guide.
  • Vendor products: many products need an APF library, a PPT entry, an SVC or an exit. Before installation, ask for the full list, the reason for each, and whether the product supports the dynamic APF format and dynamic exits. IBM advises contacting the systems programmer before switching the APF list to dynamic, to confirm that installed programs and vendor products support dynamic APF services.
  • Automation and z/OSMF: IDs that issue SETPROG or SET commands for automation or z/OSMF workflows are privileged: scope their OPERCMDS permits to the commands they really issue and log their use.
  • SMF consumers: any program that reads SMF in real time through an in-memory resource connects to a resource protected by a FACILITY profile beginning IFA. followed by the resource name. The forwarding agent's user ID needs READ to that profile and nothing more.

Logging and detection

RACF type 80 records show access decisions, not a module copied into an APF library or an LPA change. The records below fill that gap; send them to the SIEM with type 80.

SMF typeIBM titleIntegrity use case
14 and 15INPUT or RDBACK data set activity; OUTPUT, UPDAT, INOUT or OUTIN data set activityType 15 on any APF, LPA, LNKLST or parmlib data set: who opened it for output, from which job
17 and 18Scratch data set status; rename non-VSAM data set statusDeletion or renaming of an authorised library, or a rename that moves a new data set onto a listed name
30Common address space workJob, step and program names to tie the other records to a job and user
80Security product processingAccess to CSVAPF, CSVDYLPA, CSVDYNEX, CSVDYNL, CSVLLA and BPX.FILEATTR.APF; OPERCMDS checks for SETPROG and SET
90System statusSubtype 29: LNKLST set activated after IPL by SET PROG or SETPROG; subtype 31: module added to or deleted from LPA after IPL; subtype 8: operator response to the IPL prompt
92File system activityz/OS UNIX file changes, including programs that carry the APF extended attribute

Protect the recording itself

  • Record the right types: the SMFPRMxx default is TYPE(0:255). Confirm every type in the table above is still recorded.
  • Use log streams and sign records: SMFPRMxx RECSIGN digitally signs SMF records written to log streams and requires HASH (SHA1, SHA256, SHA384 or SHA512), SIGNATURE (RSA or ECDSA) and TOKENNAME. Choose SHA256 or stronger. On supported hardware and cryptographic support levels, ARECSIGN adds an alternate quantum-safe signature. Message IFA740E means signing has stopped until the configuration is fixed: alert on it.
  • Lock SMF changes: NOAUTHSETSMF stops SETSMF changing options; PROMPT(IPLR) or NOPROMPT stops an operator editing SMF parameters at IPL beyond the IPL reason. Keep SMF exits to a documented list, since an exit sees every record.
  • Get records off the platform fast: an INMEM resource gives a real-time feed (a wrap-around buffer of 128 MB to 2 GB) that a forwarding agent can read and ship to the SIEM within seconds, rather than waiting for a nightly dump. See the SIEM Guide and CIS Control 8 Audit Log Management Guide.

Detection rules worth building

  1. Type 15 open for output on any data set in the current APF list by a user ID other than the SMP/E or approved systems programmer IDs.
  2. Type 80 success for UPDATE on CSVAPF.*, CSVDYNEX.* or CSVDYLPA.* outside an approved change window.
  3. Type 90 subtype 31 (LPA change) or subtype 29 (LNKLST activation) with no matching change record.
  4. Gaps in the SMF record stream, IFA740E, or a change to SMFPRMxx outside change control.

Metrics

  • APF hygiene: number of APF entries pointing at data sets that do not exist or are on the wrong volume (target zero).
  • Write exposure: number of user IDs with UPDATE or higher to any APF, LPA or authorised LNKLST data set, trended monthly.
  • Profile coverage: share of CSV* and BPX.FILEATTR.* resources covered by a specific, audited FACILITY profile (target 100%).
  • PPT exposure: count of PPT entries with NOPASS, NODSI or key below 8, each with a named owner and justification.

Hardening baseline

APF, LPA and LNKLST

  • Keep the list short and current: use DISPLAY PROG,APF to list entries, remove libraries for products no longer installed, and remove alias entries.
  • Prefer dynamic format with protection: the dynamic APF format allows changes without IPL, which is useful only when CSVAPF profiles are defined and audited first.
  • Restrict LNKLST authorisation: with LNKAUTH=APFTAB in IEASYSxx, LNKLST libraries are authorised only if they are also in the APF list, which keeps the authorised set explicit.

SVCs

  • Restrict sensitive user SVCs: specify APF(YES) for the SVC in IEASVCxx, or APF=YES on the SVCUPDTE macro, so an unauthorised caller gets an X'047' abend.
  • Check inside the routine: where an SVC must be callable by everyone, its code should use TESTAUTH on the sensitive paths and test only the criteria it needs (supervisor state, key 0 to 7 or APF).
  • Inventory them: every installation-defined SVC should have an owner, a product, a reason and a review date.

Exits

  • Use the dynamic exits facility: define exits with PROGxx EXIT statements so DISPLAY PROG,EXIT lists them and CSVDYNEX profiles govern changes. IBM provides the IEFEXPR REXX exec to convert older EXITxx members to PROGxx.
  • Load exits from protected libraries: IBM advises SMF exits reside in LPA, the LNKLST or the nucleus, not a PROGxx DSNAME.

Program Properties Table

  • Review with DISPLAY PPT: list every entry with NOPASS, NODSI or a key from 0 to 7.
  • Batch steps: from z/OS V2.3, and on V2.1 and V2.2 with APAR OA50215, NOPASS and NODSI are ignored for programs that run as batch job steps. NOPASS_ALLOWBATCH and NODSI_ALLOWBATCH restore the old behaviour; IBM states they are not recommended and must be used with care. Any entry using them needs a written justification.
  • Neutralise unused entries: for IBM default PPT entries whose modules are not installed or not used, add a SCHEDxx PPT entry for the program that grants no special attributes, as the DISA STIG requires, and record the product, release, review date and reason.

Rollout order

  1. Inventory (no change): capture DISPLAY PROG,APF, DISPLAY PROG,LNKLST, DISPLAY PROG,EXIT, DISPLAY PPT, the IEASVCxx members and RLIST FACILITY output for CSV* and BPX.FILEATTR.*. Store it as the baseline.
  2. Turn on visibility: add the SMF types above, set AUDIT(ALL(READ)) on the CSV* profiles and data set auditing on authorised libraries, and connect the SIEM feed.
  3. Define missing profiles in warning mode: where a CSV* profile is missing, define it first with WARNING and the intended access list, review the type 80 warning records for a cycle, then remove WARNING.
  4. Reduce write access: cut UPDATE on authorised libraries to named systems programmers and installation IDs, one product group at a time on a test LPAR first.
  5. Clean the APF list and PPT: remove dead entries on a test system, IPL it, run regression jobs, then promote. Keep the previous PROGxx and SCHEDxx members so a SET PROG=xx or SET SCH=xx back to them is the rollback, and keep a known-good IPL configuration for anything that only takes effect at IPL.
  6. Sustain: compare live configuration with the baseline monthly and reconcile differences with change records.

Small vs large estates: a single-LPAR site can run the inventory with operator commands and a scheduled unload job. A multi-sysplex estate with shared parmlibs needs automated baseline comparison, because one PROGxx change reaches every system using the member.

Common misconfigurations

  • Undefined CSV* profiles: the dynamic list resources were never defined, so any console with system authority can add an APF library.
  • Broad write access to authorised libraries: a product library added to the APF list years ago still carries UACC(UPDATE) or a permit to a whole development group. Anyone in that group can run code in an authorised state.
  • Stale APF entries: entries for removed products or missing data sets leave names that can be reallocated and become authorised.
  • Unreviewed PPT entries and ALLOWBATCH: NOPASS_ALLOWBATCH added during an upgrade to keep a batch job running, then forgotten, re-opens a path around RACF checks.
  • SMF trimmed for capacity: types 15, 17, 18 or 92 switched off, or records kept only on the mainframe until a weekly dump, so an APF library change is invisible to the SOC.

Framework mapping

MITRE ATT&CK Enterprise does not list z/OS as a platform, so the techniques below are the closest behavioural analogues for threat modelling, not mainframe-specific entries.

Control areaNIST SP 800-53 Rev 5NIST CSF 2.0ISO/IEC 27001:2022 Annex AClosest ATT&CK analogue
APF, LPA, LNKLST and SVC integritySI-7, CM-5, CM-7PR.PS-01A.8.9, A.8.18T1068 Exploitation for Privilege Escalation
Exits and PPTCM-6, CM-7, AC-6PR.PS-01, PR.AA-05A.8.9, A.8.2T1574 Hijack Execution Flow, T1543 Create or Modify System Process
Change control for parmlib and dynamic listsCM-3, CM-5PR.PS-01A.8.32T1547 Boot or Logon Autostart Execution
SMF recording, signing and forwardingAU-2, AU-9, AU-10, AU-12PR.PS-04A.8.15T1685 Disable or Modify Tools
Detection and reviewAU-6DE.CM-09A.8.16T1078 Valid Accounts

In CIS Controls v8.1 terms this is Control 4 (Secure Configuration of Enterprise Assets and Software) and Control 8 (Audit Log Management). The DISA z/OS STIGs turn several of these points into checkable findings.

Practitioner checklist

  • Capture and store a baseline of the APF list, LNKLST, LPA changes, dynamic exits, PPT and IEASVCxx members.
  • Define, audit and restrict FACILITY profiles for CSVAPF, CSVDYLPA, CSVDYNEX, CSVDYNL, CSVLLA and BPX.FILEATTR.APF; remove catch-all profiles that match them.
  • Limit UPDATE on every APF, LPA and authorised LNKLST data set and on parmlib to named systems programmers and installation IDs.
  • Remove alias, stale and wrong-volume APF entries; set LNKAUTH=APFTAB where the estate allows.
  • Restrict sensitive user SVCs with APF(YES) and keep an owner and reason for every installation SVC.
  • Review PPT entries with NOPASS, NODSI, ALLOWBATCH or a system key; neutralise unused ones in SCHEDxx.
  • Record SMF types 14, 15, 17, 18, 30, 80, 81, 83, 90 and 92, sign log stream records, and set NOAUTHSETSMF.
  • Forward SMF to the SIEM in near real time and alert on APF library writes, CSV* profile use, type 90 subtypes 29 and 31, and IFA740E.
  • Reconcile every integrity change in SMF with an approved change record each month.

Standards and references

Related NHI Mgmt Group resources: Mainframe Identity and RACF Security Guide · Mainframe Service Accounts and Batch Job Identity Guide · Mainframe and COBOL Application Security Guide · Change Management Security · SIEM Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

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.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.