Skip to content

Instantly share code, notes, and snippets.

@interference-security
Created September 30, 2020 20:08

Revisions

  1. interference-security revised this gist Sep 30, 2020. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions run-external-executable-ios.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    iDevice:~ root#ldid -e \`which bash\` > ent.xml

    iDevice:~ root# cat ent.xml
    ```<?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    @@ -13,6 +14,9 @@ iDevice:~ root# cat ent.xml
    </dict>
    </plist>
    ```

    iDevice:~ root#ldid -Sent.xml YOUR_BINARY_FILE

    iDevice:~ root#chmod 755 YOUR_BINARY_FILE

    iDevice:~ root#inject ./YOUR_BINARY_FILE
  2. interference-security created this gist Sep 30, 2020.
    18 changes: 18 additions & 0 deletions run-external-executable-ios.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    iDevice:~ root#ldid -e \`which bash\` > ent.xml
    iDevice:~ root# cat ent.xml
    ```<?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>platform-application</key>
    <true/>
    <key>com.apple.private.security.no-container</key>
    <true/>
    <key>com.apple.private.skip-library-validation</key>
    <true/>
    </dict>
    </plist>
    ```
    iDevice:~ root#ldid -Sent.xml YOUR_BINARY_FILE
    iDevice:~ root#chmod 755 YOUR_BINARY_FILE
    iDevice:~ root#inject ./YOUR_BINARY_FILE