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-uiactivity-sharing.mdMarkdown68 lines3.5 KiBsource raw download

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

iOS UIActivity Sharing#

UIActivity Sharing Simplified#

Since iOS 6, applications can present a system activity view to share text, URLs, images, and other items with services such as AirDrop or compatible app extensions.[2]

Apple's UIActivity.ActivityType documentation enumerates built-in activity identifiers. Developers can set excludedActivityTypes, but the security review must also inspect the actual items and any custom activities.[3]

How to Share Data#

Attention should be directed towards:[1]

Sharing is facilitated through the instantiation of a UIActivityViewController, to which the items intended for sharing are passed. This is achieved by calling:

$ rabin2 -zq Telegram\ X.app/Telegram\ X | grep -i activityItems
0x1000df034 45 44 initWithActivityItems:applicationActivities:

Review the items and custom activities passed to UIActivityViewController, along with any configured excludedActivityTypes.

How to Receive Data#

The following aspects are crucial when receiving data:[1]

Without source, inspect Info.plist for UTExportedTypeDeclarations, UTImportedTypeDeclarations, and CFBundleDocumentTypes. These legacy UTI keys still appear in deployed apps; newer source commonly uses the Uniform Type Identifiers framework and UTType APIs.[4]

Exported declarations define types owned by the app, imported declarations describe types owned elsewhere, and document types associate those identifiers with the app's open/import behavior.[4]

Dynamic Testing Approach#

To test sending activities, one could:[1]

For receiving items, it involves:[1]

References#