TExcelTAD
Home › Wireless, IoT & Mobile Security › MDM and Device Policy

MDM and Device Policy

Several fixes in this course end with "push it from device management": the Wi-Fi profile that validates the RADIUS certificate, the EAP-TLS client certificate, the WPA3-only setting, the ban on USB debugging and user-installed CAs. For an organisation's phones and tablets, mobile device management (MDM, today usually part of a "unified endpoint management" product) is how security settings become facts on every device instead of instructions in a wiki. It is also a high-value target: whoever controls the MDM console controls every enrolled device. This lesson covers the management models of both platforms, the policies that matter, compliance checks with conditional access, and how to protect the MDM itself.

Management models

Model Android Enterprise Apple
company-owned, full control fully managed device supervised device, enrolled through Automated Device Enrollment
company-owned, single purpose (kiosk, scanner) dedicated device supervised + single-app mode
company-owned, personal use allowed fully managed with a work profile supervised, with managed apps and data separation
personal device (BYOD) work profile on a personal device: the company manages only the profile User Enrollment: a separate managed volume and Apple Account; the company can't see personal data

The BYOD models matter for privacy and trust: the organisation manages its apps and data in a separate container and can wipe that container, but can't read personal apps, photos or location, and can't wipe the whole phone. Employees accept management much more readily when that boundary is clear.

Apple's newer Declarative Device Management lets devices apply and report policy state on their own instead of being polled; Android's management API is the Android Management API or a vendor's device-policy controller. The concepts are the same.

Policies that carry this course's fixes

Area Policy Lesson
Wi-Fi managed Wi-Fi profiles: WPA3/Enterprise, EAP-TLS with a device certificate (issued through SCEP or ACME), trusted RADIUS CA and server name, no user prompts Evil twins, 802.1X
certificates no user-installed CAs on managed profiles, or only the organisation's pinning
device integrity minimum OS and patch level, encryption, passcode, attestation (Play Integrity, Apple's Managed Device Attestation) security models
developer settings USB debugging and developer options off on managed devices testing
apps allow-list or managed app store, managed app configuration (no secrets in it), app-level VPN code flaws
radios Bluetooth restrictions where needed (e.g. no file transfer), no personal hotspot on kiosk devices Bluetooth attacks
data managed open-in restrictions, copy/paste between work and personal apps, screen-capture blocking for sensitive apps MASVS-STORAGE-2
loss remote lock and wipe (whole device or work profile), lost mode incident response

Compliance and conditional access

Policies on the device are half the job. The other half is the identity provider asking the MDM, at every sign-in, whether the device is compliant, and refusing access to email, files and internal apps when it isn't. The MDM inventory below is synthetic; the evaluation is the kind of rule set a compliance policy expresses:

python · try it yourself
POLICY = {"min_patch": {"android": "2026-08", "ios": "26.0"}, "passcode": True, "encrypted": True,
          "integrity": True, "wifi": "eap-tls", "usb_debugging": False, "user_cas": 0}
devices = [  # MDM inventory (synthetic)
    {"id": "and-0007", "os": "android", "patch": "2026-10", "passcode": True, "encrypted": True, "integrity": True,
     "wifi": "eap-tls", "usb_debugging": False, "user_cas": 0},
    {"id": "and-0013", "os": "android", "patch": "2025-12", "passcode": True, "encrypted": True, "integrity": True,
     "wifi": "peap-no-validation", "usb_debugging": True, "user_cas": 1},
    {"id": "ios-0101", "os": "ios", "patch": "26.1", "passcode": True, "encrypted": True, "integrity": True,
     "wifi": "eap-tls", "usb_debugging": False, "user_cas": 0},
    {"id": "ios-0144", "os": "ios", "patch": "18.6", "passcode": False, "encrypted": True, "integrity": False,
     "wifi": "eap-tls", "usb_debugging": False, "user_cas": 0},
]
def version_key(v): return tuple(int(x) for x in v.replace("-", ".").split("."))
def evaluate(d):
    issues = []
    if version_key(d["patch"]) < version_key(POLICY["min_patch"][d["os"]]): issues.append(f"OS/patch {d['patch']} too old")
    if not d["passcode"]: issues.append("no passcode (Data Protection keys are not tied to a secret)")
    if not d["encrypted"]: issues.append("storage not encrypted")
    if not d["integrity"]: issues.append("integrity/attestation check failed (rooted, jailbroken or tampered?)")
    if d["wifi"] != POLICY["wifi"]: issues.append(f"Wi-Fi profile {d['wifi']}: evil-twin risk")
    if d["usb_debugging"]: issues.append("USB debugging on")
    if d["user_cas"] > POLICY["user_cas"]: issues.append(f"{d['user_cas']} user-installed CA(s)")
    return issues
for d in devices:
    issues = evaluate(d)
    action = "compliant: access granted" if not issues else ("BLOCK corporate access, notify user" if len(issues) > 1 else "grace period 3 days")
    print(f"{d['id']}  {action}")
    for i in issues:
        print(f"    - {i}")
and-0007  compliant: access granted
and-0013  BLOCK corporate access, notify user
    - OS/patch 2025-12 too old
    - Wi-Fi profile peap-no-validation: evil-twin risk
    - USB debugging on
    - 1 user-installed CA(s)
ios-0101  compliant: access granted
ios-0144  BLOCK corporate access, notify user
    - OS/patch 18.6 too old
    - no passcode (Data Protection keys are not tied to a secret)
    - integrity/attestation check failed (rooted, jailbroken or tampered?)

and-0013 combines every Wi-Fi and network weakness from this course: an old patch level, a PEAP profile without server validation, USB debugging and a user-installed CA. ios-0144 has no passcode, which on iOS also means Data Protection keys aren't tied to a secret, and fails attestation. Both are blocked from corporate resources until fixed; a single issue gets a grace period so a delayed update doesn't stop someone working.

Protecting the MDM itself

The MDM can install apps, profiles and certificates on every device and wipe them all. Attacks on MDM consoles and their admin accounts have been used to push malicious apps and to mass-wipe devices. Treat it like a domain controller:

  • phishing-resistant MFA for every admin, with privileged-access workstations (passkeys);
  • role-based access: helpdesk can lock and reset, few people can push profiles or wipe;
  • approval for high-impact actions (mass wipe, new root CA, new app for all devices), where the product supports it;
  • audit logs to the SIEM with alerts on unusual actions;
  • protected enrolment: devices enrol only through company channels (zero-touch, Automated Device Enrollment), so attackers can't enrol their own device to obtain certificates and Wi-Fi access.

How weaknesses are detected

  • Compliance reports: share of devices out of policy, by reason; devices that haven't checked in.
  • Profile audits: Wi-Fi profiles without server validation, VPN profiles with shared secrets, certificates near expiry.
  • Identity-provider logs: sign-ins from unmanaged or non-compliant devices that were allowed anyway (policy gaps).
  • MDM audit logs: admin actions outside change windows, new admins, bulk actions.

How it is fixed

  • Enrol every company-owned device through zero-touch or Automated Device Enrollment; offer work profiles or User Enrollment for BYOD.
  • Push Wi-Fi, VPN and certificates as profiles; never let users configure corporate Wi-Fi by hand.
  • Tie access to compliance through conditional access; give grace periods for small issues.
  • Protect the MDM console like the most privileged system you have.

Pitfalls

  • Managing devices but not linking compliance to access: non-compliant devices keep working, so nobody fixes them.
  • BYOD policies that try to control the whole personal phone: users avoid enrolment.
  • Putting API keys or passwords into "managed app configuration", where every managed device (and anyone who extracts it) can read them.

Practice

1. Change and-0013 so that it is compliant. Which settings change, and which ones does the MDM change by itself?

Patch level at least 2026-08, Wi-Fi profile eap-tls, USB debugging off, no user CAs. The MDM replaces the Wi-Fi profile and can disable USB debugging and remove CAs on a fully managed device or work profile; the OS update needs the user (or a managed update policy) to install it.

2. Why does an organisation with EAP-TLS Wi-Fi need protected enrolment?

Enrolment is what gives a device its client certificate. If anyone can enrol a device, an attacker can enrol their own and receive a valid certificate, which grants Wi-Fi and possibly VPN access.

3. An employee refuses MDM on their personal phone. What can you offer?

A work profile (Android) or User Enrollment (Apple): the company manages only a separate container with work apps and data, can wipe only that, and can't see personal apps, photos or location.

Test yourself

What does conditional access add to MDM policies?

  1. Encryption
  2. Access to corporate resources depends on the device being compliant at sign-in
  3. GPS tracking
  4. Faster updates

Which Android model fits a personal phone that also accesses work email?

  1. Fully managed device
  2. Dedicated device
  3. Work profile
  4. No management

Which device in the program had a Wi-Fi profile vulnerable to evil twins?

  1. and-0007
  2. and-0013
  3. ios-0101
  4. ios-0144

Why must the MDM console be protected like a domain controller?

  1. It stores email
  2. Its admins can push apps, profiles and certificates to every device and wipe them
  3. It runs the Wi-Fi
  4. It has no logs