repositories

daemon-sec-cheatsheet

The cheatsheet vault for operators: AD, enumeration, exploitation, priv-esc, web, DFIR

clonegit clone https://git.daemon-sec.xyz/daemon-sec-cheatsheet.git
ios-app-extensions.mdMarkdown63 lines4.0 KiBsource raw download

title: "iOS App Extensions" section: "Mobile" sectionSlug: "mobile-pentesting" sourcePath: "src/mobile-pentesting/ios-pentesting/ios-app-extensions.md" sourceUrl: "https://github.com/HackTricks-wiki/hacktricks/blob/188de82beb54e70956b2952367a0af91d26758b8/src/mobile-pentesting/ios-pentesting/ios-app-extensions.md" sha: "188de82beb54e70956b2952367a0af91d26758b8" isIndex: false modified: true license: "CC-BY-NC-4.0"#

iOS App Extensions#

App extensions enhance the functionality of apps by allowing them to interact with other apps or the system, providing custom features or content. These extensions include:

When a user engages with these extensions, such as sharing text from a host app, the extension processes this input within its context, leveraging the shared information to perform its task, as detailed in Apple's documentation.[1]

Security Considerations#

Key security aspects include:[1]

Static Analysis#

Identifying App Extensions#

To find app extensions in source code, search for NSExtensionPointIdentifier in Xcode or inspect the app bundle for .appex files indicating extensions. Without source code, use grep or SSH to locate these identifiers within the app bundle.[1][2]

Supported Data Types#

Check the Info.plist file of an extension for NSExtensionActivationRule to identify supported data types. This setup ensures only compatible data types trigger the extension in host apps.[1][2]

Data Sharing#

Data sharing between a containing app and its extension normally uses an App Group container. Shared preferences can use UserDefaults(suiteName:) (NSUserDefaults in Objective-C), while files and databases use the group container URL. Background URLSession transfers initiated by an extension also require a shared container configured on the session.[1][2]

Restricting Extensions#

Apps can restrict certain extension types, particularly custom keyboards, ensuring sensitive data handling aligns with security protocols.[1][2]

Dynamic Analysis#

Dynamic analysis involves:[1][2]

Tools like frida-trace can aid in understanding the underlying processes, especially for those interested in the technical details of inter-process communication.

References#