MASTG-DEMO-0109: ATS TLS Policy Exceptions in Info.plist
Download MASTG-DEMO-0109 IPA Open MASTG-DEMO-0109 Folder Build MASTG-DEMO-0109 IPA
Sample¶
The code below shows an insecure ATS configuration in an Info.plist file. NSAllowsArbitraryLoads is explicitly set to false to keep the focus on the two per-domain TLS policy exceptions:
tls-v1-0.badssl.com: lowers the minimum TLS version to TLS 1.0 viaNSExceptionMinimumTLSVersion, applying to all subdomains viaNSIncludesSubdomains.static-rsa.badssl.com: disables the forward secrecy requirement viaNSExceptionRequiresForwardSecrecy = false, allowing cipher suites without ephemeral key exchange (such as RSA key exchange).
Note that if NSAllowsArbitraryLoads were set to true, ATS would be disabled for all domains not explicitly listed in NSExceptionDomains, allowing all connections to those domains regardless of TLS version or cipher suite. Domains listed in NSExceptionDomains would still have their per-domain settings applied.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | |
Steps¶
- Extract the app ( Exploring the App Package) and locate the
Info.plistfile inside the app bundle (which we'll nameInfo_reversed.plist). - Convert the
Info.plistto pretty-printed JSON ( Convert Plist Files to JSON). - Extract
NSAllowsArbitraryLoadsand anyNSExceptionMinimumTLSVersion,NSTemporaryExceptionMinimumTLSVersion, orNSExceptionRequiresForwardSecrecykeys from theNSAppTransportSecurityconfiguration. In this case we usegronto transform the JSON into a greppable format andegrepto search for those keys.
| run.sh | |
|---|---|
1 2 3 4 5 6 7 8 9 10 | |
Observation¶
The output shows the NSAllowsArbitraryLoads setting and the TLS policy exceptions found in Info_reversed.plist:
| output.txt | |
|---|---|
1 2 3 4 | |
Evaluation¶
The test case fails because two per-domain TLS policy exceptions are configured:
NSExceptionMinimumTLSVersion = "TLSv1.0"fortls-v1-0.badssl.comallows connections using the deprecated TLS 1.0 protocol. BecauseNSIncludesSubdomains = true, the exception also applies to all subdomains oftls-v1-0.badssl.com.NSExceptionRequiresForwardSecrecy = falseforstatic-rsa.badssl.comdisables the ATS requirement for Perfect Forward Secrecy (PFS), allowing cipher suites such as RSA key exchange that don't provide forward secrecy. Past sessions can be decrypted if the server's private key is later compromised. Note thatNSAllowsArbitraryLoadsis set tofalse, so we don't consider it as a failure condition here. If it weretrue, the test would fail on that basis alone, because ATS would be disabled for all connections to domains not listed inNSExceptionDomains. Domains listed inNSExceptionDomainswould still have their per-domain settings applied even in that case.