blint 3.2.2__tar.gz → 3.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {blint-3.2.2 → blint-3.2.4}/PKG-INFO +2 -2
- {blint-3.2.2 → blint-3.2.4}/README.md +1 -1
- blint-3.2.4/blint/data/annotations/review_ios_fingerprint.yml +98 -0
- blint-3.2.4/blint/data/annotations/review_ios_masvs.yml +133 -0
- blint-3.2.4/blint/data/annotations/review_ios_privacy_access.yml +34 -0
- blint-3.2.4/blint/data/annotations/review_ios_privacy_posture.yml +76 -0
- blint-3.2.4/blint/data/annotations/review_ios_sidechannel.yml +81 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/annotations/review_symbols_macho.yml +27 -0
- {blint-3.2.2 → blint-3.2.4}/blint/db.py +18 -1
- {blint-3.2.2 → blint-3.2.4}/blint/lib/analysis.py +12 -12
- {blint-3.2.2 → blint-3.2.4}/blint/lib/binary.py +129 -1
- blint-3.2.4/blint/lib/ios.py +428 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/macho_objc.py +113 -19
- {blint-3.2.2 → blint-3.2.4}/blint/lib/runners.py +5 -1
- {blint-3.2.2 → blint-3.2.4}/blint/lib/sbom.py +270 -2
- {blint-3.2.2 → blint-3.2.4}/blint/lib/utils.py +26 -8
- {blint-3.2.2 → blint-3.2.4}/pyproject.toml +1 -1
- blint-3.2.2/blint/lib/ios.py +0 -169
- {blint-3.2.2 → blint-3.2.4}/LICENSE +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/__init__.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/cli.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/config.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/cyclonedx/README.md +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/cyclonedx/__init__.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/cyclonedx/spdx.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/cyclonedx/spec.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/__init__.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/android-services.json +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/annotations/__init__.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/annotations/review_apple_local_privesc_mie.yml +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/annotations/review_entries_generic.yml +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/annotations/review_entries_pe.yml +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/annotations/review_exe_go.yml +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/annotations/review_functions_generic.yml +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/annotations/review_imports_pe.yml +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/annotations/review_methods_android.yml +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/annotations/review_methods_generic.yml +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/annotations/review_methods_mips.yml +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/annotations/review_methods_pe.yml +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/annotations/review_monero_generic.yml +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/annotations/review_monero_go.yml +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/annotations/review_monero_rust.yml +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/annotations/review_rootkits_win.yml +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/annotations/review_rpc_win.yml +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/annotations/review_symbols_antiforensic.yml +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/annotations/review_symbols_generic.yml +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/annotations/review_symbols_hooka.yml +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/annotations/review_symbols_rust.yml +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/rules.yml +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/data/trackers.json +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/__init__.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/android.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/android_services.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/callgraph/__init__.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/callgraph/algorithms.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/callgraph/api.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/callgraph/canon.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/callgraph/command.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/callgraph/fingerprint.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/callgraph/match.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/callgraph/model.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/callgraph/rusi.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/callgraph_kpi.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/checks.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/dalvik.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/dalvik_callgraph.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/dalvik_cfg.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/dalvik_dataflow.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/dalvik_review.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/dalvik_semantics.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/disassembler.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/function_reviews.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/indicators.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/review_runner.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/lib/review_utils.py +0 -0
- {blint-3.2.2 → blint-3.2.4}/blint/logger.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: blint
|
|
3
|
-
Version: 3.2.
|
|
3
|
+
Version: 3.2.4
|
|
4
4
|
Summary: Linter and SBOM generator for binary files.
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
License-File: LICENSE
|
|
@@ -76,7 +76,7 @@ blint is a tool for reverse engineers, security analysts, and developers to quic
|
|
|
76
76
|
- Navigate to the [disassembly guide](./docs/DISASSEMBLE.md).
|
|
77
77
|
- For callgraph internals and analyst-facing interpretation, see the [callgraph guide](./docs/CALLGRAPH.md).
|
|
78
78
|
- **Android Deep Analysis:** In deep mode blint parses the dex classes, detects bundled service and tracker SDKs, and runs a Dalvik behavioural review that decodes the bytecode and flags risky behaviours such as dynamic code loading, reflection, native command execution, weak cryptography, and cleartext networking. The findings are attached to the BOM as custom properties. When disassembly is enabled, blint also writes a Dalvik callgraph sidecar next to the BOM.
|
|
79
|
-
- **iOS/macOS App Analysis:** Point blint at an `.ipa` and it unpacks the app bundle, reads the `Info.plist` context (bundle id, version, minimum OS, FairPlay encryption status), and analyzes the main executable along with every embedded framework, dylib, and app extension. For Mach-O binaries, blint recovers Objective-C metadata (classes, superclasses, methods, protocols, and referenced selectors) and demangles Swift symbols, then surfaces iOS privacy capabilities such as location, camera, microphone, contacts, photos, telephony, motion, biometrics, and device fingerprinting.
|
|
79
|
+
- **iOS/macOS App Analysis:** Point blint at an `.ipa` and it unpacks the app bundle, reads the `Info.plist` context (bundle id, version, minimum OS, FairPlay encryption status), and analyzes the main executable along with every embedded framework, dylib, and app extension. For Mach-O binaries, blint recovers Objective-C metadata (classes, superclasses, methods, protocols, and referenced selectors) and demangles Swift symbols, then surfaces iOS privacy capabilities such as location, camera, microphone, contacts, photos, telephony, motion, biometrics, and device fingerprinting. It also reports privacy and fingerprinting behaviours — passive device fingerprinting, installed-app probing, local-network scanning, cross-app tracking, and the app's `PrivacyInfo.xcprivacy` posture including undeclared "required reason" API usage.
|
|
80
80
|
- **Capability Analysis:** Identifies potentially sensitive capabilities by reviewing imported functions and symbols, such as network access, filesystem operations, or cryptographic API usage.
|
|
81
81
|
- Includes cluster-style behavioral reviews for low-level networking patterns (for example eBPF sock_ops usage, TUN interception stacks, raw packet injection primitives, and local DoH redirection indicators).
|
|
82
82
|
- **CI/CD Integration:** Can be added to build pipelines to enforce security policies, such as requiring code signing on all release artifacts.
|
|
@@ -30,7 +30,7 @@ blint is a tool for reverse engineers, security analysts, and developers to quic
|
|
|
30
30
|
- Navigate to the [disassembly guide](./docs/DISASSEMBLE.md).
|
|
31
31
|
- For callgraph internals and analyst-facing interpretation, see the [callgraph guide](./docs/CALLGRAPH.md).
|
|
32
32
|
- **Android Deep Analysis:** In deep mode blint parses the dex classes, detects bundled service and tracker SDKs, and runs a Dalvik behavioural review that decodes the bytecode and flags risky behaviours such as dynamic code loading, reflection, native command execution, weak cryptography, and cleartext networking. The findings are attached to the BOM as custom properties. When disassembly is enabled, blint also writes a Dalvik callgraph sidecar next to the BOM.
|
|
33
|
-
- **iOS/macOS App Analysis:** Point blint at an `.ipa` and it unpacks the app bundle, reads the `Info.plist` context (bundle id, version, minimum OS, FairPlay encryption status), and analyzes the main executable along with every embedded framework, dylib, and app extension. For Mach-O binaries, blint recovers Objective-C metadata (classes, superclasses, methods, protocols, and referenced selectors) and demangles Swift symbols, then surfaces iOS privacy capabilities such as location, camera, microphone, contacts, photos, telephony, motion, biometrics, and device fingerprinting.
|
|
33
|
+
- **iOS/macOS App Analysis:** Point blint at an `.ipa` and it unpacks the app bundle, reads the `Info.plist` context (bundle id, version, minimum OS, FairPlay encryption status), and analyzes the main executable along with every embedded framework, dylib, and app extension. For Mach-O binaries, blint recovers Objective-C metadata (classes, superclasses, methods, protocols, and referenced selectors) and demangles Swift symbols, then surfaces iOS privacy capabilities such as location, camera, microphone, contacts, photos, telephony, motion, biometrics, and device fingerprinting. It also reports privacy and fingerprinting behaviours — passive device fingerprinting, installed-app probing, local-network scanning, cross-app tracking, and the app's `PrivacyInfo.xcprivacy` posture including undeclared "required reason" API usage.
|
|
34
34
|
- **Capability Analysis:** Identifies potentially sensitive capabilities by reviewing imported functions and symbols, such as network access, filesystem operations, or cryptographic API usage.
|
|
35
35
|
- Includes cluster-style behavioral reviews for low-level networking patterns (for example eBPF sock_ops usage, TUN interception stacks, raw packet injection primitives, and local DoH redirection indicators).
|
|
36
36
|
- **CI/CD Integration:** Can be added to build pipelines to enforce security policies, such as requiring code signing on all release artifacts.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
text: Device fingerprinting surface review for iOS/macOS Mach-O binaries
|
|
3
|
+
group: SYMBOL_REVIEWS
|
|
4
|
+
exe_type: MachO
|
|
5
|
+
binary_type: MachO
|
|
6
|
+
rules:
|
|
7
|
+
- id: IOS_PLATFORM_IDENTIFIER
|
|
8
|
+
title: Low-level platform identifier read
|
|
9
|
+
summary: Reads a Low-Level Platform Identifier
|
|
10
|
+
category: privacy-fingerprint
|
|
11
|
+
severity: info
|
|
12
|
+
description: |
|
|
13
|
+
The binary reads low-level identifiers that stay constant across launches:
|
|
14
|
+
the IOKit platform UUID/serial number or the kernel host name. Unlike the
|
|
15
|
+
vendor identifier, these are not reset by app removal and provide durable
|
|
16
|
+
device recognition that does not require any permission.
|
|
17
|
+
patterns:
|
|
18
|
+
- IOPlatformUUID
|
|
19
|
+
- IOPlatformSerialNumber
|
|
20
|
+
- kern.hostname
|
|
21
|
+
- gethostname
|
|
22
|
+
- id: IOS_DEVICE_ATTESTATION
|
|
23
|
+
title: Device attestation / persistent device state
|
|
24
|
+
summary: Uses Device Attestation
|
|
25
|
+
category: privacy-fingerprint
|
|
26
|
+
severity: info
|
|
27
|
+
description: |
|
|
28
|
+
The binary uses DeviceCheck (DCDevice) or App Attest
|
|
29
|
+
(DCAppAttestService). DeviceCheck persists a small amount of per-device
|
|
30
|
+
state that survives app reinstalls and factory resets, which can be used
|
|
31
|
+
for fraud detection but also for durable device recognition. Its presence
|
|
32
|
+
is worth noting in a privacy review.
|
|
33
|
+
patterns:
|
|
34
|
+
- DCAppAttestService
|
|
35
|
+
- DCDevice
|
|
36
|
+
- generateAssertion
|
|
37
|
+
- attestKey
|
|
38
|
+
- id: IOS_HARDWARE_FINGERPRINT
|
|
39
|
+
title: Low-level hardware fingerprinting
|
|
40
|
+
summary: Fingerprints Device Hardware
|
|
41
|
+
category: privacy-fingerprint
|
|
42
|
+
severity: info
|
|
43
|
+
description: |
|
|
44
|
+
The binary queries low-level hardware and system attributes through sysctl
|
|
45
|
+
and the GPU/Metal stack (model identifier, CPU type, GPU name and feature
|
|
46
|
+
set). Individually innocuous, combined these attributes form a stable
|
|
47
|
+
device fingerprint that does not require any permission to read.
|
|
48
|
+
min_patterns: 2
|
|
49
|
+
patterns:
|
|
50
|
+
- sysctlbyname
|
|
51
|
+
- sysctl
|
|
52
|
+
- hw.machine
|
|
53
|
+
- hw.model
|
|
54
|
+
- MTLCreateSystemDefaultDevice
|
|
55
|
+
- recommendedMaxWorkingSetSize
|
|
56
|
+
- supportsFamily
|
|
57
|
+
- id: IOS_DISPLAY_FINGERPRINT
|
|
58
|
+
title: Display characteristics fingerprinting
|
|
59
|
+
summary: Reads Display Characteristics
|
|
60
|
+
category: privacy-fingerprint
|
|
61
|
+
severity: info
|
|
62
|
+
description: |
|
|
63
|
+
The binary reads fine-grained display characteristics (native pixel
|
|
64
|
+
bounds, native scale, refresh rate). These vary by exact device model and
|
|
65
|
+
contribute entropy to a device fingerprint.
|
|
66
|
+
min_patterns: 2
|
|
67
|
+
patterns:
|
|
68
|
+
- nativeBounds
|
|
69
|
+
- nativeScale
|
|
70
|
+
- maximumFramesPerSecond
|
|
71
|
+
- mainScreen
|
|
72
|
+
- id: IOS_NETWORK_INTERFACE_ENUM
|
|
73
|
+
title: Network interface enumeration
|
|
74
|
+
summary: Enumerates Network Interfaces
|
|
75
|
+
category: privacy-fingerprint
|
|
76
|
+
severity: info
|
|
77
|
+
description: |
|
|
78
|
+
The binary enumerates local network interfaces and addresses via
|
|
79
|
+
getifaddrs / if_nametoindex. This exposes local IP addresses and interface
|
|
80
|
+
topology that can be used to infer network environment and aid
|
|
81
|
+
fingerprinting.
|
|
82
|
+
patterns:
|
|
83
|
+
- getifaddrs
|
|
84
|
+
- if_nametoindex
|
|
85
|
+
- freeifaddrs
|
|
86
|
+
- id: IOS_FONT_ENUMERATION
|
|
87
|
+
title: Installed font enumeration
|
|
88
|
+
summary: Enumerates Installed Fonts
|
|
89
|
+
category: privacy-fingerprint
|
|
90
|
+
severity: info
|
|
91
|
+
description: |
|
|
92
|
+
The binary enumerates the installed font families. The set of installed
|
|
93
|
+
fonts is a classic fingerprinting vector that requires no permission.
|
|
94
|
+
min_patterns: 2
|
|
95
|
+
patterns:
|
|
96
|
+
- familyNames
|
|
97
|
+
- fontNamesForFamilyName
|
|
98
|
+
- UIFont
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
text: Mobile (MASVS) capability and weakness review for iOS/macOS Mach-O binaries
|
|
3
|
+
group: SYMBOL_REVIEWS
|
|
4
|
+
exe_type: MachO
|
|
5
|
+
binary_type: MachO
|
|
6
|
+
rules:
|
|
7
|
+
- id: IOS_WEAK_CRYPTO
|
|
8
|
+
title: Weak or broken cryptography in use
|
|
9
|
+
summary: Uses Weak Cryptography
|
|
10
|
+
description: |
|
|
11
|
+
The binary references cryptographic primitives that are considered weak or
|
|
12
|
+
broken: MD5/SHA-1 digests, DES/3DES/RC4 ciphers, or ECB block mode. These
|
|
13
|
+
offer no meaningful protection for confidentiality or integrity and should
|
|
14
|
+
be replaced with SHA-256+/AES-GCM. Maps to OWASP MASVS-CRYPTO-1.
|
|
15
|
+
patterns:
|
|
16
|
+
- CC_MD5
|
|
17
|
+
- CC_MD4
|
|
18
|
+
- CC_MD2
|
|
19
|
+
- CC_SHA1
|
|
20
|
+
- kCCAlgorithmDES
|
|
21
|
+
- kCCAlgorithm3DES
|
|
22
|
+
- kCCAlgorithmRC4
|
|
23
|
+
- kCCOptionECBMode
|
|
24
|
+
- CCCryptorCreateWithMode
|
|
25
|
+
- id: IOS_CERT_PINNING
|
|
26
|
+
title: TLS certificate or public-key pinning present
|
|
27
|
+
summary: Pins TLS Certificates
|
|
28
|
+
description: |
|
|
29
|
+
The binary evaluates server trust directly or uses a pinning library
|
|
30
|
+
(TrustKit, AFNetworking's AFSecurityPolicy, Alamofire ServerTrust). Pinning
|
|
31
|
+
hardens TLS against compromised or rogue certificate authorities. Its
|
|
32
|
+
presence is a positive control; its absence in an app handling sensitive
|
|
33
|
+
data is worth reviewing. Maps to OWASP MASVS-NETWORK-2.
|
|
34
|
+
patterns:
|
|
35
|
+
- SecTrustEvaluate
|
|
36
|
+
- SecPolicyCreateSSL
|
|
37
|
+
- setSSLPinningMode
|
|
38
|
+
- AFSecurityPolicy
|
|
39
|
+
- TrustKit
|
|
40
|
+
- pinnedCertificates
|
|
41
|
+
- evaluateServerTrust
|
|
42
|
+
- ServerTrustPolicy
|
|
43
|
+
- certificatePinning
|
|
44
|
+
- id: IOS_WEBVIEW_JS_BRIDGE
|
|
45
|
+
title: Web view JavaScript bridge in use
|
|
46
|
+
summary: Bridges Native and JavaScript
|
|
47
|
+
description: |
|
|
48
|
+
The binary exposes a native<->JavaScript bridge through WKWebView
|
|
49
|
+
(addScriptMessageHandler / evaluateJavaScript) or the deprecated UIWebView
|
|
50
|
+
(stringByEvaluatingJavaScriptFromString). Bridges that pass untrusted web
|
|
51
|
+
content into native handlers can lead to data exposure or code execution
|
|
52
|
+
and warrant input-validation review. Maps to OWASP MASVS-PLATFORM-2.
|
|
53
|
+
patterns:
|
|
54
|
+
- addScriptMessageHandler
|
|
55
|
+
- stringByEvaluatingJavaScriptFromString
|
|
56
|
+
- evaluateJavaScript
|
|
57
|
+
- WKUserContentController
|
|
58
|
+
- JSContext
|
|
59
|
+
- javaScriptEnabled
|
|
60
|
+
- UIWebView
|
|
61
|
+
- id: IOS_INSECURE_STORAGE
|
|
62
|
+
title: Potentially insecure local data storage
|
|
63
|
+
summary: May Store Data Insecurely
|
|
64
|
+
description: |
|
|
65
|
+
The binary writes data via APIs that do not encrypt at rest by default,
|
|
66
|
+
such as NSUserDefaults, plain file writes (writeToFile / NSData writes) or
|
|
67
|
+
NSKeyedArchiver. Storing credentials, tokens or PII through these instead
|
|
68
|
+
of the Keychain leaves it readable on a compromised or backed-up device.
|
|
69
|
+
Maps to OWASP MASVS-STORAGE-1.
|
|
70
|
+
min_patterns: 2
|
|
71
|
+
patterns:
|
|
72
|
+
- NSUserDefaults
|
|
73
|
+
- standardUserDefaults
|
|
74
|
+
- "writeToFile:atomically:"
|
|
75
|
+
- "writeToURL:atomically:"
|
|
76
|
+
- NSKeyedArchiver
|
|
77
|
+
- dataWithContentsOfFile
|
|
78
|
+
- id: IOS_PASTEBOARD_WRITE
|
|
79
|
+
title: General pasteboard (clipboard) usage
|
|
80
|
+
summary: Writes to the System Pasteboard
|
|
81
|
+
description: |
|
|
82
|
+
The binary uses the general (system-wide) UIPasteboard, which is readable
|
|
83
|
+
by any other app on the device. Copying sensitive values such as passwords
|
|
84
|
+
or tokens to it can leak them to unrelated apps. Maps to OWASP
|
|
85
|
+
MASVS-STORAGE-2.
|
|
86
|
+
patterns:
|
|
87
|
+
- generalPasteboard
|
|
88
|
+
- UIPasteboardNameGeneral
|
|
89
|
+
- pasteboardWithName
|
|
90
|
+
---
|
|
91
|
+
text: Mobile (MASVS) string and behaviour review for iOS/macOS Mach-O binaries
|
|
92
|
+
group: EXE_REVIEWS
|
|
93
|
+
exe_type: MachO
|
|
94
|
+
binary_type: MachO
|
|
95
|
+
rules:
|
|
96
|
+
- id: IOS_JAILBREAK_DETECTION
|
|
97
|
+
title: Jailbreak detection routines present
|
|
98
|
+
summary: Detects Jailbroken Devices
|
|
99
|
+
description: |
|
|
100
|
+
The binary references file system paths, URL schemes or libraries that are
|
|
101
|
+
characteristic of jailbroken devices (Cydia, MobileSubstrate, apt, an SSH
|
|
102
|
+
daemon, or shell binaries). This indicates a runtime integrity / anti-
|
|
103
|
+
tampering check. Its presence is a positive control; the checks themselves
|
|
104
|
+
are bypassable and should not be relied on alone. Maps to OWASP
|
|
105
|
+
MASVS-RESILIENCE-1.
|
|
106
|
+
include_informative_strings: true
|
|
107
|
+
patterns:
|
|
108
|
+
- /Applications/Cydia.app
|
|
109
|
+
- cydia://
|
|
110
|
+
- /Library/MobileSubstrate
|
|
111
|
+
- MobileSubstrate.dylib
|
|
112
|
+
- /bin/bash
|
|
113
|
+
- /bin/sh
|
|
114
|
+
- /usr/sbin/sshd
|
|
115
|
+
- /etc/apt
|
|
116
|
+
- /private/var/lib/apt
|
|
117
|
+
- /private/var/stash
|
|
118
|
+
- frida
|
|
119
|
+
- cynject
|
|
120
|
+
- id: IOS_INSECURE_TRANSPORT_ATS
|
|
121
|
+
title: App Transport Security weakened
|
|
122
|
+
summary: Weakens Secure Transport
|
|
123
|
+
description: |
|
|
124
|
+
The app's Info.plist weakens App Transport Security, either globally
|
|
125
|
+
(NSAllowsArbitraryLoads) or per host (NSExceptionAllowsInsecureHTTPLoads),
|
|
126
|
+
permitting cleartext HTTP or downgraded TLS connections. This exposes
|
|
127
|
+
traffic to interception and tampering. Maps to OWASP MASVS-NETWORK-1.
|
|
128
|
+
include_informative_strings: true
|
|
129
|
+
patterns:
|
|
130
|
+
- ATS_NSAllowsArbitraryLoads
|
|
131
|
+
- ATS_NSAllowsArbitraryLoadsForMedia
|
|
132
|
+
- ATS_NSAllowsArbitraryLoadsInWebContent
|
|
133
|
+
- ATS_NSExceptionAllowsInsecureHTTPLoads
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
text: Sensitive data-access capability review for iOS/macOS Mach-O binaries
|
|
3
|
+
group: SYMBOL_REVIEWS
|
|
4
|
+
exe_type: MachO
|
|
5
|
+
binary_type: MachO
|
|
6
|
+
rules:
|
|
7
|
+
- id: IOS_CALENDAR_REMINDERS_ACCESS
|
|
8
|
+
title: Calendar / reminders access
|
|
9
|
+
summary: Can Access Calendar and Reminders
|
|
10
|
+
category: privacy-access
|
|
11
|
+
severity: info
|
|
12
|
+
description: |
|
|
13
|
+
The binary references EventKit (EKEventStore) used to read calendar events
|
|
14
|
+
and reminders. These reveal the user's schedule, locations and the people
|
|
15
|
+
they meet, and are permission-gated personal data.
|
|
16
|
+
patterns:
|
|
17
|
+
- EKEventStore
|
|
18
|
+
- requestFullAccessToEvents
|
|
19
|
+
- requestFullAccessToReminders
|
|
20
|
+
- predicateForEventsWithStartDate
|
|
21
|
+
- id: IOS_USER_TRACKING_REQUEST
|
|
22
|
+
title: App Tracking Transparency request
|
|
23
|
+
summary: Requests Tracking Authorization
|
|
24
|
+
category: privacy-tracking
|
|
25
|
+
severity: medium
|
|
26
|
+
description: |
|
|
27
|
+
The binary requests tracking authorization via ATTrackingManager. This
|
|
28
|
+
indicates the app intends to track the user across apps and websites,
|
|
29
|
+
typically to access the advertising identifier (IDFA) for cross-app
|
|
30
|
+
tracking, and requires an NSUserTrackingUsageDescription consent string.
|
|
31
|
+
patterns:
|
|
32
|
+
- ATTrackingManager
|
|
33
|
+
- requestTrackingAuthorization
|
|
34
|
+
- trackingAuthorizationStatus
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
text: Privacy manifest and consent posture review for iOS/macOS app bundles
|
|
3
|
+
group: EXE_REVIEWS
|
|
4
|
+
exe_type: MachO
|
|
5
|
+
binary_type: MachO
|
|
6
|
+
rules:
|
|
7
|
+
- id: IOS_TRACKING_DECLARED
|
|
8
|
+
title: Cross-app tracking declared in privacy manifest
|
|
9
|
+
summary: Declares Cross-App Tracking
|
|
10
|
+
category: privacy-tracking
|
|
11
|
+
severity: medium
|
|
12
|
+
include_informative_strings: true
|
|
13
|
+
description: |
|
|
14
|
+
The app's privacy manifest sets NSPrivacyTracking to true and/or lists
|
|
15
|
+
NSPrivacyTrackingDomains, declaring that it (or an embedded SDK) tracks
|
|
16
|
+
users across apps and websites. Connections to the declared tracking
|
|
17
|
+
domains are blocked unless the user grants tracking permission.
|
|
18
|
+
patterns:
|
|
19
|
+
- PRIV_NSPrivacyTracking
|
|
20
|
+
- PRIV_NSPrivacyTrackingDomains
|
|
21
|
+
- id: IOS_PRIVACY_MANIFEST_MISSING
|
|
22
|
+
title: Privacy manifest absent
|
|
23
|
+
summary: Ships Without a Privacy Manifest
|
|
24
|
+
category: privacy-posture
|
|
25
|
+
severity: info
|
|
26
|
+
include_informative_strings: true
|
|
27
|
+
description: |
|
|
28
|
+
The app bundle ships without a PrivacyInfo.xcprivacy manifest. Since May
|
|
29
|
+
2024 Apple requires apps (and many SDKs) to declare data collection,
|
|
30
|
+
tracking and required-reason API usage in a privacy manifest. Its absence
|
|
31
|
+
means the app's data practices are undeclared and may trigger App Store
|
|
32
|
+
review warnings.
|
|
33
|
+
patterns:
|
|
34
|
+
- PRIV_PrivacyManifestMissing
|
|
35
|
+
- id: IOS_UNDECLARED_REQUIRED_REASON_API
|
|
36
|
+
title: Required-reason API used without declaration
|
|
37
|
+
summary: Uses Undeclared Required-Reason APIs
|
|
38
|
+
category: privacy-posture
|
|
39
|
+
severity: medium
|
|
40
|
+
include_informative_strings: true
|
|
41
|
+
description: |
|
|
42
|
+
The binary references one of Apple's "required reason" APIs (user defaults,
|
|
43
|
+
file timestamps, system boot time, disk space, or active keyboards) for a
|
|
44
|
+
category that is not declared in the privacy manifest. Apple requires an
|
|
45
|
+
approved reason to be declared for each such category in use; undeclared
|
|
46
|
+
use corresponds to App Store warning ITMS-91053.
|
|
47
|
+
patterns:
|
|
48
|
+
- PRIV_UNDECLARED_NSPrivacyAccessedAPICategoryUserDefaults
|
|
49
|
+
- PRIV_UNDECLARED_NSPrivacyAccessedAPICategoryFileTimestamp
|
|
50
|
+
- PRIV_UNDECLARED_NSPrivacyAccessedAPICategorySystemBootTime
|
|
51
|
+
- PRIV_UNDECLARED_NSPrivacyAccessedAPICategoryDiskSpace
|
|
52
|
+
- PRIV_UNDECLARED_NSPrivacyAccessedAPICategoryActiveKeyboards
|
|
53
|
+
- id: IOS_SENSITIVE_PERMISSIONS_DECLARED
|
|
54
|
+
title: Sensitive data permissions declared
|
|
55
|
+
summary: Declares Sensitive Data Permissions
|
|
56
|
+
category: privacy-access
|
|
57
|
+
severity: info
|
|
58
|
+
include_informative_strings: true
|
|
59
|
+
description: |
|
|
60
|
+
The app's Info.plist declares consent strings for high-sensitivity data
|
|
61
|
+
sources (location, contacts, camera, microphone, photos, health, motion,
|
|
62
|
+
Bluetooth, local network or tracking). The presence of a consent string
|
|
63
|
+
means the app (or a bundled SDK) is provisioned to access that data, even
|
|
64
|
+
if the corresponding API calls are obfuscated or loaded dynamically.
|
|
65
|
+
patterns:
|
|
66
|
+
- PRIV_NSLocationWhenInUseUsageDescription
|
|
67
|
+
- PRIV_NSLocationAlwaysAndWhenInUseUsageDescription
|
|
68
|
+
- PRIV_NSContactsUsageDescription
|
|
69
|
+
- PRIV_NSCameraUsageDescription
|
|
70
|
+
- PRIV_NSMicrophoneUsageDescription
|
|
71
|
+
- PRIV_NSPhotoLibraryUsageDescription
|
|
72
|
+
- PRIV_NSHealthShareUsageDescription
|
|
73
|
+
- PRIV_NSMotionUsageDescription
|
|
74
|
+
- PRIV_NSBluetoothAlwaysUsageDescription
|
|
75
|
+
- PRIV_NSLocalNetworkUsageDescription
|
|
76
|
+
- PRIV_NSUserTrackingUsageDescription
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
text: Privacy side-channel API review for iOS/macOS Mach-O binaries
|
|
3
|
+
group: SYMBOL_REVIEWS
|
|
4
|
+
exe_type: MachO
|
|
5
|
+
binary_type: MachO
|
|
6
|
+
rules:
|
|
7
|
+
- id: IOS_APP_PRESENCE_PROBE
|
|
8
|
+
title: Installed-app presence probing
|
|
9
|
+
summary: Probes for Installed Apps
|
|
10
|
+
category: privacy-sidechannel
|
|
11
|
+
severity: medium
|
|
12
|
+
description: |
|
|
13
|
+
The binary calls canOpenURL, which (combined with the schemes listed in
|
|
14
|
+
LSApplicationQueriesSchemes) lets it detect which other apps are installed
|
|
15
|
+
without any permission. Enumerating installed apps is a side channel for
|
|
16
|
+
profiling users (interests, finance, dating, messaging) and is restricted
|
|
17
|
+
by App Store policy when used for tracking.
|
|
18
|
+
patterns:
|
|
19
|
+
- canOpenURL
|
|
20
|
+
- id: IOS_LOCAL_NETWORK_SCAN
|
|
21
|
+
title: Local network / Bonjour scanning
|
|
22
|
+
summary: Scans the Local Network
|
|
23
|
+
category: privacy-sidechannel
|
|
24
|
+
severity: medium
|
|
25
|
+
description: |
|
|
26
|
+
The binary discovers services and devices on the local network using
|
|
27
|
+
NWBrowser or NSNetServiceBrowser (Bonjour). Local-network scanning reveals
|
|
28
|
+
nearby devices (speakers, TVs, IoT, computers) and is a strong signal of
|
|
29
|
+
the user's home/office environment. It requires the local-network
|
|
30
|
+
permission and should be justified.
|
|
31
|
+
patterns:
|
|
32
|
+
- NWBrowser
|
|
33
|
+
- NSNetServiceBrowser
|
|
34
|
+
- netServiceBrowser
|
|
35
|
+
- CFNetServiceBrowser
|
|
36
|
+
- id: IOS_KEYCHAIN_PERSISTENCE
|
|
37
|
+
title: Identifier persistence across reinstalls
|
|
38
|
+
summary: Persists Data Across Reinstalls
|
|
39
|
+
category: privacy-fingerprint
|
|
40
|
+
severity: medium
|
|
41
|
+
description: |
|
|
42
|
+
The binary stores Keychain items with an always-available accessibility
|
|
43
|
+
class (kSecAttrAccessibleAlways / AfterFirstUnlock). Because Keychain
|
|
44
|
+
items survive app deletion, this is frequently used to persist a device or
|
|
45
|
+
install identifier across uninstall/reinstall, defeating the privacy
|
|
46
|
+
expectation that removing an app clears its local state.
|
|
47
|
+
patterns:
|
|
48
|
+
- kSecAttrAccessibleAlways
|
|
49
|
+
- kSecAttrAccessibleAlwaysThisDeviceOnly
|
|
50
|
+
- kSecAttrAccessibleAfterFirstUnlock
|
|
51
|
+
---
|
|
52
|
+
text: Privacy side-channel posture review for iOS/macOS app bundles
|
|
53
|
+
group: EXE_REVIEWS
|
|
54
|
+
exe_type: MachO
|
|
55
|
+
binary_type: MachO
|
|
56
|
+
rules:
|
|
57
|
+
- id: IOS_MANY_QUERY_SCHEMES
|
|
58
|
+
title: Large installed-app query list declared
|
|
59
|
+
summary: Declares Many App Query Schemes
|
|
60
|
+
category: privacy-sidechannel
|
|
61
|
+
severity: medium
|
|
62
|
+
include_informative_strings: true
|
|
63
|
+
description: |
|
|
64
|
+
The app declares a large LSApplicationQueriesSchemes list, enabling it to
|
|
65
|
+
probe for many specific apps via canOpenURL. A broad query list is a
|
|
66
|
+
strong indicator of installed-app enumeration for user profiling rather
|
|
67
|
+
than legitimate single-app interoperation.
|
|
68
|
+
patterns:
|
|
69
|
+
- PRIV_ManyApplicationQueriesSchemes
|
|
70
|
+
- id: IOS_LOCAL_NETWORK_DECLARED
|
|
71
|
+
title: Local-network service discovery declared
|
|
72
|
+
summary: Declares Bonjour Service Discovery
|
|
73
|
+
category: privacy-sidechannel
|
|
74
|
+
severity: info
|
|
75
|
+
include_informative_strings: true
|
|
76
|
+
description: |
|
|
77
|
+
The app's Info.plist declares NSBonjourServices, indicating it browses for
|
|
78
|
+
services on the local network. Combined with local-network access this
|
|
79
|
+
exposes the user's nearby devices and environment.
|
|
80
|
+
patterns:
|
|
81
|
+
- PRIV_NSBonjourServices
|
|
@@ -863,3 +863,30 @@ rules:
|
|
|
863
863
|
- evaluateJavaScript
|
|
864
864
|
- WKUserScript
|
|
865
865
|
- addScriptMessageHandler
|
|
866
|
+
- id: APPLE_MACOS_XPC_SERVICE_USAGE
|
|
867
|
+
title: macOS XPC Service Usage
|
|
868
|
+
summary: Binary uses XPC APIs to communicate between processes
|
|
869
|
+
description: |
|
|
870
|
+
This Mach-O binary references symbols, classes, or selectors related to macOS XPC inter-process communication.
|
|
871
|
+
If it exposes a privileged helper service, it must validate the client's code signature to prevent
|
|
872
|
+
privilege escalation via trust cache bypass (e.g. Find My XPC / CDHash bypass).
|
|
873
|
+
patterns:
|
|
874
|
+
- xpc_connection_create_mach_service
|
|
875
|
+
- xpc_connection_create
|
|
876
|
+
- xpc_main
|
|
877
|
+
- NSXPCListener
|
|
878
|
+
- NSXPCConnection
|
|
879
|
+
- NSXPCInterface
|
|
880
|
+
- xpc_connection_get_audit_token
|
|
881
|
+
- xpc_dictionary_get_audit_token
|
|
882
|
+
- id: APPLE_MACOS_XPC_CONNECTION_HARDENING
|
|
883
|
+
title: macOS XPC Connection Hardening
|
|
884
|
+
summary: Binary uses APIs to validate XPC client identity/signature
|
|
885
|
+
description: |
|
|
886
|
+
This binary references APIs like xpc_connection_set_peer_code_signing_requirement or SecCodeCheckValidity,
|
|
887
|
+
which are used to validate the code signing requirements of peer/guest processes connecting via XPC.
|
|
888
|
+
This is a critical mitigation against connection impersonation vulnerabilities.
|
|
889
|
+
patterns:
|
|
890
|
+
- xpc_connection_set_peer_code_signing_requirement
|
|
891
|
+
- SecCodeCopyGuestWithAttributes
|
|
892
|
+
- SecCodeCheckValidity
|
|
@@ -306,9 +306,26 @@ def _merge_callgraph_rows(project_matches: dict, rows) -> None:
|
|
|
306
306
|
|
|
307
307
|
|
|
308
308
|
def _execute(connection: apsw.Connection, query: str, params: list) -> list[dict]:
|
|
309
|
+
"""Run a parameterised query and return each row as a dict.
|
|
310
|
+
|
|
311
|
+
The cursor is advanced with next() before calling getdescription() so the
|
|
312
|
+
column names are read while the statement is in the RUN state. SQLite cannot
|
|
313
|
+
report column names for a GROUP BY that produces zero rows -- the VDBE
|
|
314
|
+
program completes without ever entering the result loop -- so
|
|
315
|
+
getdescription() on a finished cursor raises ExecutionCompleteError. Pulling
|
|
316
|
+
the first row first makes the empty case a plain StopIteration instead.
|
|
317
|
+
See https://github.com/rogerbinns/apsw/issues/160.
|
|
318
|
+
"""
|
|
309
319
|
cursor = connection.execute(query, params)
|
|
320
|
+
try:
|
|
321
|
+
first = next(cursor)
|
|
322
|
+
except StopIteration:
|
|
323
|
+
LOG.debug("blintdb query returned no rows for params: %s", params)
|
|
324
|
+
return []
|
|
310
325
|
columns = [description[0] for description in cursor.getdescription()]
|
|
311
|
-
|
|
326
|
+
rows = [dict(zip(columns, first))]
|
|
327
|
+
rows.extend(dict(zip(columns, row)) for row in cursor)
|
|
328
|
+
return rows
|
|
312
329
|
|
|
313
330
|
|
|
314
331
|
def _query_project_symbol_matches(
|
|
@@ -446,25 +446,25 @@ def print_reviews_table(reviews, files):
|
|
|
446
446
|
files: A list of file names associated with the reviews.
|
|
447
447
|
|
|
448
448
|
"""
|
|
449
|
+
# Surface the rule category column only when at least one review carries one
|
|
450
|
+
# (e.g. the privacy/fingerprinting rules), so existing reports are unchanged.
|
|
451
|
+
has_category = any(r.get("category") for r in reviews)
|
|
449
452
|
table = create_findings_table(files, "BLint Capability Review")
|
|
453
|
+
if has_category:
|
|
454
|
+
table.add_column("Category")
|
|
450
455
|
table.add_column("Capabilities")
|
|
451
456
|
table.add_column("Evidence (Top 5)", overflow="fold")
|
|
452
457
|
for r in reviews:
|
|
453
458
|
evidences = [e.get("function") for e in r.get("evidence")]
|
|
454
459
|
evidences = list(islice(evidences, EVIDENCE_LIMIT))
|
|
460
|
+
row = [r.get("id")]
|
|
455
461
|
if len(files) > 1:
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
else:
|
|
463
|
-
table.add_row(
|
|
464
|
-
r.get("id"),
|
|
465
|
-
r.get("summary"),
|
|
466
|
-
"\n".join(evidences),
|
|
467
|
-
)
|
|
462
|
+
row.append(os.path.basename(r.get("exe_name")))
|
|
463
|
+
if has_category:
|
|
464
|
+
row.append(r.get("category") or "")
|
|
465
|
+
row.append(r.get("summary"))
|
|
466
|
+
row.append("\n".join(evidences))
|
|
467
|
+
table.add_row(*row)
|
|
468
468
|
console.print(table)
|
|
469
469
|
|
|
470
470
|
|