dpnishant / appmon

Documentation:
http://dpnishant.github.io/appmon
Apache License 2.0
1.54k stars 275 forks source link

Searching .smali #75

Open alexauvray opened 6 years ago

alexauvray commented 6 years ago

Hello,

When I try with Twitter APK, I get this :

[I] Preparing work directory...
[I] Expanding APK...
[I] Searching .smali
Traceback (most recent call last):
  File "apk_builder.py", line 124, in <module>
    with codecs.open(launchable_activity_path, 'r', 'utf-8') as f:
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.py", line 884, in open
    file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 2] No such file or directory: '/tmp/appmon_apk/com.twitter.android/smali/com/twitter/android/StartActivity.smali'

And when I try Twitter IPA, I get this :

[+] Unpacking IPA...
[+] Injecting DYLIB...
[+] Code-signing...
/tmp/appmon_ipa/TwitterPlus_v7/Payload/Twitter.app/FridaGadget.dylib: replacing existing signature
/tmp/appmon_ipa/TwitterPlus_v7/Payload/Twitter.app: replacing existing signature
(node:37510) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[+] Installing IPA...
Password:
2018-06-19 09:00:38.511 ios-deploy[37757:1858944] [ !! ] Error 0xe8000067: There was an internal API error. AMDeviceSecureInstallApplication(0, device, url, options, install_callback, 0)
Traceback (most recent call last):
  File "ipa_installer.py", line 190, in <module>
    subprocess.check_output(["sudo", "ios-deploy", "-v", "--no-wifi", "-i", uuid, "-b", "%s/Payload/%s" % (extracted_resigned_path, app_name)])
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 573, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['sudo', 'ios-deploy', '-v', '--no-wifi', '-i', 'a654b8d1323ba7c53537a1dc3abb3ea4b3a8e3ea', '-b', '/Users/Stan/Documents/Script/appmon/ipa_installer/apps/TwitterPlus_v7-injected-resigned/Payload/Twitter.app']' returned non-zero exit status 253
dpnishant commented 5 years ago

@alexsonnay ios-deploy is either not installed in your system or it is available in any directories listed in the PATH environment variable.

jakebrand24 commented 4 years ago

hello, i has error: iPhone Developer: ambiguous (matches "iPhone Developer: khanh191.pharma@gmail.com (QGF27AX9MM)" and "iPhone Developer: thienthanhoang34-777@yahoo.com (GCAZQ34ZH8)" in /Users/a0919090321/Library/Keychains/login.keychain-db) Traceback (most recent call last): File "ipa_installer.py", line 180, in subprocess.check_output(["codesign", "-fs", 'iPhone Developer', injected_dylib_path]) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 223, in check_output raise CalledProcessError(retcode, cmd, output=output) subprocess.CalledProcessError: Command '['codesign', '-fs', 'iPhone Developer', '/tmp/appmon_ipa/Facebook 268/Payload/Facebook.app/FridaGadget.dylib']' returned non-zero exit status 1

what happen? pls help me, i had installed all dependent

dpnishant commented 4 years ago

@jakebrand24 The command codesign -fs "iPhone Developer" /tmp/appmon_ipa/Facebook 268/Payload/Facebook.app/FridaGadget.dylib didn't execute successfully on your system. This can be due to multiple reasons. Exact command output may be helpful to debug the root cause.

jakebrand24 commented 4 years ago

@dpnishant I'm glad you answered, I thank you for that, I solved this error by deleting invalid keychain keys in MacOS!! Unfortunately, the error shortly afterwards led me to headaches, maybe you could consider it help me. I'm running for non-jailbreak devices, you just need to notice error: IPA is encrypted I have learned on Frida and they have said that IPA should be encoded somehow and the device must jailbreak. If you worked with modern apps like Facebook on non-jailbreak iOS, tell me, here's the whole error code:

+] Code-signing...

/tmp/appmon_ipa/Facebook 268/Payload/Facebook. App/FridaGadget. Dylib: Try existing signature

/tmp/appmon_ipa/Facebook 268/Payload/Facebook. App: Try existing signature

Error: IPA is encrypted

At ApplesignSession. signAppDirectory (/Users/a0919090321/Documents/MSF Driver/Appmon/complite/ipa_installer/node-applesign/session.js: 120:21)

At/Users/a0919090321/Documents/MSF Driver/Appmon/complite/ipa_installer/node-applesign/session.js: 79:12

At/Users/a0919090321/Documents/MSF Driver/Appmon/complite/ipa_installer/node-applesign/session.js: 366:11

At ChildProcess. Exithandler (child_process. JS: 294:7)

At ChildProcess. Emit (events. JS: 321:20)

At maybeClose (internal/child_process. JS: 1026:16)

At Socket. <anonymous> (Internal/child_process. JS: 441:11)

At Socket. Emit (events. JS: 321:20)

At Pipe. <anonymous> (net. JS: 668:12)

Traceback (most recent call last):

File "ipa_installer. Py", line 186, in

subprocess. check_output (["Node", iparesign_path, "--without-Watchapp", "--identity", dev_identity, "--mobileprovision", mobileprovision_path, injected_ipa_filename])

File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 223, in check_output

Raise CalledProcessError (Retcode, cmd, output = output)

Subprocess. CalledProcessError: Command ' [' node ', ' node-applesign/bin/IPA-resign. js ', '--without-watchapp ', '--identity ', ' 2A6B3C12501206F283715A75FD9D9778087DEA88 ', '--mobileprovision ', '/Users/a0919090321/Library/Developer/Xcode/DerivedData/XXTouchApp-akjgdhycgveifhbiffqzosfbjpcg/Build/Intermediates.noindex/ArchiveIntermediates/XXTouchApp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/XXTouch.app/embedded.mobileprovision ', ' Facebook 268 injected. IPA '] ' returned non-zero exit status 1