A script used to inject executables into OSX .app files.
Keep in mind that some applications are write restricted and will therefore require escalated privileges for this script to work.
Not fully finsihed, more functions will be added in the future
For this script to work it needs a minimum of two arguments. One specifying what app to target and one specifying what payload to use.
An exeample of this minimum viable call would be the following:./AppPayloadInjector.sh -t=/tmp/Someapp.app -p="/path with/space/payload.sh"
This option chooses what app to target.
Example: ./AppPayloadInjector.sh -t="$HOME/Desktop/myapp.app"
This option chooses what payload to use.
Example: ./AppPayloadInjector.sh -t="$HOME/Desktop/myapp.app" -p="/tmp/payload.sh"
Disables trace hiding. This script attempts to remove any trace that some file(s) has been modified before finishing.
Example: ./AppPayloadInjector.sh -t="$HOME/Desktop/myapp.app" -p="/tmp/payload.sh" -nohide
Attempts to bypass any obstacles if found.
Example: ./AppPayloadInjector.sh -t="$HOME/Desktop/myapp.app" -p="/tmp/payload.sh" -f
Sets the name of the dropped payload. If not set, generates a random name.
Example: ./AppPayloadInjector.sh -t="$HOME/Desktop/myapp.app" -p="/tmp/payload.sh" -pn="Payload"
Sets the permission of the payload once dropped. If not set, uses same permission as original executable.
Example: ./AppPayloadInjector.sh -t="$HOME/Desktop/myapp.app" -p="/tmp/payload.sh" -pp="u-r"
Enables dual execution causing both the specified payload and the app to launch on application init.
Example: ./AppPayloadInjector.sh -t="$HOME/Desktop/myapp.app" -p="/tmp/payload.sh" -de
Sets the name of the dropped launcher allowing for dual execution.
Example: ./AppPayloadInjector.sh -t="$HOME/Desktop/myapp.app" -p="/tmp/payload.sh" -den="launcher"
Injecting a shell script.
./AppPayloadInjector.sh -t="/Applications/App.app" -p="~/Desktop/Shell.sh"
Injecting a shell script and naming payload to "Example".
./AppPayloadInjector.sh -t="/Applications/App.app" -p"~/Desktop/Shell.sh" -pn="Example"
Force injecting a shell script, enabling dual execution and naming dual execution launcher to "launcher".
./AppPayloadInjector.sh -t="/Applications/App.app" -p"~/Desktop/Shell.sh" -f -de -den="laucnher"