Decrypt application encrypted binaries on macOS when SIP-enabled.

Overview

appdecrypt

Decrypt application encrypted binaries on macOS when SIP-enabled.

This works well and compiles for iOS nicely, if you want use it at iOS devices, you can use build-ios.sh (Thanks @dlevi309).

How to use

> git clone https://github.com/paradiseduo/appdecrypt.git
> cd appdecrypt
> chmod +x build-macOS_arm.sh
> ./build-macOS_arm.sh
> cd .build/release
> ./appdecrypt
Version 1.0

appdecrypt is a tool to make decrypt application encrypted binaries on macOS when SIP-enabled.

Examples:
    appdecrypt /Applicaiton/Test.app/Wrapper/Test.app/Test /Users/admin/Desktop/Test

USAGE: appdecrypt encryptMachO_Path decryptMachO_Path

ARGUMENTS:
  <encryptMachO_Path>     The encrypt machO file path.
  <decryptMachO_Path>     The path output decrypt machO file.

OPTIONS:
  -h, --help              Show help information.

Principle

This was discovered independently when analyzing kernel sources, but it appears that the technique was first introduced on iOS :

https://github.com/JohnCoates/flexdecrypt

but now works on macOS:

https://github.com/meme/apple-tools/tree/master/foulplay

Comments
  • Decrypt IPA occur error

    Decrypt IPA occur error

    I tried to decrypt IPA "JW library" but it occurred error. Here is what I done: 1.rename .ipa to zip and unzip it 2.mkdir on Desktop and name it "payload" 3.decrypt app where in unzipped floder

    here is error message I received: 截圖 2021-08-13 上午10 12 58

    opened by xellosiris 7
  •  xcrun: error: unable to find utility

    xcrun: error: unable to find utility "xctest"

    error: terminated(72): /usr/bin/xcrun --sdk macosx --find xctest output: xcrun: error: unable to find utility "xctest", not a developer tool or in PATH image

    Macos version: 11.5.1 device: macbook pro with apple silicon(M1) how to fix it? thx!

    opened by Master-cai 5
  • 在Mac上破壳IPA运行时间过长,且无报错

    在Mac上破壳IPA运行时间过长,且无报错

    如题,时间过长指30分钟。 Mac信息: MacBook Air (M1, 2020),macOS Big Sur 11.5.2; IPA信息: 明日方舟,版本1.5.60,来源:借由 Apple Configurator 2 下载的适用于 iPhone 的 IPA 文件,MacO文件大小:159.6MB; Appdecrypt 安装方式: 通过 Release 界面下载,解压后置于/usr/local/bin 终端界面如下: Last login: Sat Aug 28 21:15:40 on ttys000 yy@YYdeMacBook-Air ~ % appdecrypt /Users/yy/Desktop/Arknights/Payload/arknights.app /Users/yy/Downloads

    opened by YYAppleFan 2
  • This also works perfectly on iOS

    This also works perfectly on iOS

    Sorry for creating an issue, I just wanted to let you know that this actually works fully on iOS. Unlike flexdecrypt, it doesn't require spawning the executable, and after a couple of tests to confirm this works, I've been able to decrypt + install the final ipa's with no issues.

    I created a repo with my build configuration and a pre-compiled binary under releases if you wan't to try this out and maybe integrate iOS support into the main repo. https://github.com/dlevi309/appdecrypt-ios

    opened by dlevi309 1
  • Error while building

    Error while building

    error: 'appdecrypt': Invalid manifest
    /Users/user/appdecrypt/Package.swift:3:8: error: no such module 'PackageDescription'
    import PackageDescription
           ^
    opened by ForestOfLight 4
  • mmap failed!

    mmap failed!

    iphone567:/tmp root# ./appdecrypt /private/var/containers/Bundle/Application/90F191CD-4192-45A0-9B53-BF1E15098F3E/ /tmp Success to copy file. Dump /private/var/containers/Bundle/Application/90F191CD-4192-45A0-9B53-BF1E15098F3E/neighborhood.app/neighborhood fail, because of mmap fail with Invalid argument Dump /private/var/containers/Bundle/Application/90F191CD-4192-45A0-9B53-BF1E15098F3E/neighborhood.app/PlugIns/NotificationService.appex/NotificationService fail, because of mmap fail with Invalid argument

    too many app decrypt failed!

    opened by piaoapiao 0
  • zsh: segmentation fault  ./appdecrypt /Users/madstsk/.myWirdFiles/sideload/HCR2/Payload/hcrwc-iOS.app

    zsh: segmentation fault ./appdecrypt /Users/madstsk/.myWirdFiles/sideload/HCR2/Payload/hcrwc-iOS.app

    This is how I have done it.

    1. Got an IPA from my iPhone using iMazing
    2. Renamed it to a .zip
    3. Decompressed the zip file.
    4. Ran the command: appdecrypt % ./appdecrypt /Users/madstsk/.myWirdFiles/sideload/HCR2/Payload/hcrwc-iOS.app /Users/madstsk/.myWirdFiles/sideload/HCR2-decrypted.app
    5. Got this output: zsh: segmentation fault ./appdecrypt /Users/madstsk/.myWirdFiles/sideload/HCR2/Payload/hcrwc-iOS.app I have tried to chmod -R 777 the parentfolder.
    opened by Maki2007 1
  • decrypt fail

    decrypt fail

    Dump /var/containers/Bundle/Application/AA24AA4E-DF06-4D35-B314-0B120A7DE876/XXX.app/XXX fail, because of mmap fail with Invalid argument other framework Success. Why? How to do?

    opened by fengyunyongjie 0
  • iPhone:~ root# appdecrypt /var/containers/Bundle/Application/6EAF497A-E921-4BB7-9006-F7FB6D813003/ ./        Success to copy file. Dump /var/containers/Bundle/Application/6EAF497A-E921-4BB7-9006-F7FB6D813003/QQNews.app/QQNews fail, because of encrypted fail with Operation not permitted

    iPhone:~ root# appdecrypt /var/containers/Bundle/Application/6EAF497A-E921-4BB7-9006-F7FB6D813003/ ./ Success to copy file. Dump /var/containers/Bundle/Application/6EAF497A-E921-4BB7-9006-F7FB6D813003/QQNews.app/QQNews fail, because of encrypted fail with Operation not permitted

    iPhone:~ root# appdecrypt /var/containers/Bundle/Application/6EAF497A-E921-4BB7-9006-F7FB6D813003/ ./
    Success to copy file. Dump /var/containers/Bundle/Application/6EAF497A-E921-4BB7-9006-F7FB6D813003/QQNews.app/QQNews fail, because of encrypted fail with Operation not permitted

    opened by lgq2015 1
Owner
Alibaba Summary: Learn these development knowledge and beat the interviewer in minutes.
<script>alert('1')</script>
Build a viable browser extension Ethereum wallet for Safari on macOS and especially iOS

Safari Wallet This is an experiment to see whether we can build a viable browser extension Ethereum wallet for Safari on macOS and especially iOS. Ove

null 40 Dec 14, 2022
SIP calculator calculates the future value of SIP (Systematic Investment Plan) payments.

SIP calculator calculates the future value of SIP (Systematic Investment Plan) payments. This app is available in the AppStore. Learn more here. #Desc

Tirupati Balan 26 Dec 7, 2022
macOS menu bar app that displays the current status of SIP (System Integrity Protection)

MenuBarSIPDetector This is a DEMO app for my Swift library TINURecovery and it is a macOS menu bar app that displays the current status of SIP (System

null 19 Dec 18, 2022
Arm64 architecture handler - It uses unicorn and libffi to run iOS arm64 binaries on x86_64 macOS

aah arm64 architecture handler. It uses unicorn and libffi to run iOS arm64 binaries on x86_64 macOS, with varying degrees of success. Most things wil

Jesús A. Álvarez 159 Dec 2, 2022
QMK Agent is a macOS menubar application which sends commands to a QMK enabled keyboard

QMKagent QMK Agent is a macOS menubar application which sends commands to a QMK enabled keyboard Features System volume indicator using top row (Esc t

Mike Killewald 4 Apr 24, 2022
Native and encrypted password manager for iOS and macOS.

Open Sesame Native and encrypted password manager for iOS and macOS. What is it? OpenSesame is a free and powerful password manager that lets you mana

OpenSesame 432 Jan 7, 2023
Native and encrypted password manager for iOS and macOS.

Open Sesame Native and encrypted password manager for iOS and macOS. What is it? OpenSesame is a free and powerful password manager that lets you mana

OpenSesame 431 Dec 28, 2022
//afone is the reference implementation for SIP Telephony on iOS

//afone is the reference implementation for SIP Telephony on iOS that can be used on different SIP stacks with no effort. It comes with an easily exte

Automat Berlin GmbH 31 Nov 16, 2022
A simple and opinionated AES encrypt / decrypt Objective-C class that just works.

AESCrypt-ObjC - Simple AES encryption / decryption for iOS and OS X AESCrypt is a simple to use, opinionated AES encryption / decryption Objective-C c

Gurpartap Singh 782 Oct 12, 2022
RSA encrypt and decrypt in Swift

MZRSA_Swift MZRSA_Swift是一个轻量级框架,框架功能包含RSA加密/解密Data、RSA加密/解密String,支持字符串密钥和证书密钥 公钥加密&私钥解密(字符串密钥) 代码示例 let PUBLIC_KEY = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8

null 8 Jan 5, 2023
PGPro can encrypt and decrypt messages as well as manage all your OpenPGP keys. It is free, simple and lightweight. Everything stays on your device. PGPro is made in Switzerland.

PGPro can encrypt and decrypt messages as well as manage all your OpenPGP keys. It is free, simple and lightweight. Everything stays on your device. P

Luca Näf 250 Jan 4, 2023
Command Line Tool for interacting with MachO binaries on OSX/iOS

inject inject is a tool which interfaces with MachO binaries in order to insert load commands. Below is its help. ➜ ./inject -h OVERVIEW: inject v1.0.

<script>alert('1')</script> 36 Dec 23, 2022
Abusing dlopen to load & run mach binaries on iOS

MobileTerminal Proof-of-concept for sandboxed Terminal environment for iOS. Uses dlopen() to load mach binaries as libraries, then finds & calls main(

Steven Troughton-Smith 184 Dec 18, 2022
A library that enables dynamically rebinding symbols in Mach-O binaries running on iOS.

fishhook fishhook is a very simple library that enables dynamically rebinding symbols in Mach-O binaries running on iOS in the simulator and on device

Meta 4.9k Jan 8, 2023
Circles: E2E encrypted social networking

E2E encrypted social networking built on Matrix. Safe, private sharing for your friends, family, and community.

Kombucha Digital Privacy Systems 51 Nov 29, 2022
ChatSecure is a free and open source encrypted chat client for iOS that supports OTR and OMEMO encryption over XMPP.

ChatSecure ChatSecure is a free and open source XMPP messaging client for iOS that integrates OTR and OMEMO encrypted messaging support, and has optio

ChatSecure 3.1k Dec 31, 2022
WalletBase - An app which reads 'swl' format encrypted information files.

Wallet Base What is this? Wallet Base is an app which reads swl format encrypted information files. It does not create or edit them. Why does this exi

null 0 Jan 3, 2022
Cards - A SharePlay enabled card game for iOS & macOS

Deal ♣️ Overview A simple demo app showing the implementation of a card game acr

Oliver Binns 5 Jul 3, 2022
Launch JIT enabled iOS app with a second iOS device

Jitterbug This app uses libimobiledevice and WiFi pairing to use one iOS device to launch apps with the debugger on another iOS device. This "tethered

null 645 Jan 6, 2023
A beautiful, dark-mode enabled weather app

What I create I have made a beautiful, dark-mode enabled weather app. You'll be able to check the weather for the current location based on the GPS da

Olexsii Levchenko 0 Nov 17, 2021