Morsmalleo / AhMyth

Cross-Platform Android Remote Administration Tool | Official maintained repository for the AhMyth R.A.T Project | A dedicated revival of the original repository at https://GitHub.com/AhMyth/AhMyth-Android-RAT
GNU General Public License v3.0
713 stars 177 forks source link

Code Editor 0.7.3^ | Binding Failed #139

Open Morsmalleo opened 1 year ago

Morsmalleo commented 1 year ago

This is an issue with

APK Name & Origin

APK Name: Code Editor v0.7.3 APK Origin: APK Pure || Code Editor

To Reproduce

Steps to reproduce the behaviour:

  1. Open APK Builder
  2. Type in server IP and Port
  3. Without permissions
  4. Browse for the APK
  5. Bind with original APK
  6. Building Failed

Logs

_Error: Command failed: java -jar "/root/AhMyth/AhMyth-Server/app/app/Factory/apktool.jar" b "/root/apk/editor" -o "/root/AhMyth/Output/Ahmyth.apk"
Exception in thread "main" org.jf.util.ExceptionWithContext: Exception occurred while writing code_item for method La03;->get()Ljava/lang/Object;
  at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:1047)
  at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:346)
  at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:301)
  at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:58)
  at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:37)
  at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:430)
  at brut.androlib.Androlib.buildSources(Androlib.java:361)
  at brut.androlib.Androlib.build(Androlib.java:313)
  at brut.androlib.Androlib.build(Androlib.java:280)
  at brut.apktool.Main.cmdBuild(Main.java:255)
  at brut.apktool.Main.main(Main.java:82)
Caused by: org.jf.util.ExceptionWithContext: Error while writing instruction at code offset 0x2
  at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1320)
  at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:1043)
  ... 10 more
Caused by: org.jf.util.ExceptionWithContext: Unsigned short value out of range: 68771
  at org.jf.dexlib2.writer.DexDataWriter.writeUshort(DexDataWriter.java:116)
  at org.jf.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:356)
  at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1280)
  ... 11 more_

OS Info

please complete the following information:

Morsmalleo commented 1 year ago

Unfortunately the upgrades in the new release of AhMyth Android R.A.T (v1.0-beta.4) require the payload files to be thrown into a new smali_classes** folder as they can not be injected into the same smali_classes** folder containing the path to the Launcher Activity file because AhMyth's Apktool will throw an Unsigned Short Value Error if they are injected into the same folder containing the path to the Launcher Activity file.

According to iBotPeaches developer of Apktool, the only way around this error is the work around explained above.

Fortunately though this work around explained by iBotPeaches has been tested manually with th AhMyth payload and it works with almost every APK you do it with, so the next release of AhMyth (which will be titled v1.0-beta.5) will contain the fix for APK's throwing Unsigned Short Value errors.

Morsmalleo commented 1 year ago

Unfortunately the upgrades in the new release of AhMyth Android R.A.T (v1.0-beta.4) require the payload files to be thrown into a new smali_classes** folder as they can not be injected into the same smali_classes** folder containing the path to the Launcher Activity file because AhMyth's Apktool will throw an Unsigned Short Value Error if they are injected into the same folder containing the path to the Launcher Activity file.

According to iBotPeaches developer of Apktool, the only way around this error is the work around explained above.

Fortunately though this work around explained by iBotPeaches has been tested manually with th AhMyth payload and it works with almost every APK you do it with, so the next release of AhMyth (which will be titled v1.0-beta.5) will contain the fix for APK's throwing Unsigned Short Value errors.

Function for this will be done soon

SubUrban23 commented 1 year ago

The same error in all the apks that I have tried. Something new?

Morsmalleo commented 1 year ago

The same error in all the apks that I have tried. Something new?

I have a function for handling this error, unfortunately the new function, it doesn't work on all APK files that throw this unsigned short value error, like this one for example, but it does with some others, so I'll have to explore more ways of bypassing this error

Morsmalleo commented 1 year ago

Looking at multidex for the AhMyth payload to bypass the 64bit dalvik method, which is where these unsigned short value out of range errors come from

Morsmalleo commented 1 year ago

Binding problems with this APK have been Fixed in the new release coming soon.

afaan13 commented 1 year ago

Binding problems with this APK have been Fixed in the new release coming soon.

Oh Noice . Any Date or Day Please, Cox i am waiting from Long time and that apk binding problem literally killed me. <3

Morsmalleo commented 1 year ago

Binding problems with this APK have been Fixed in the new release coming soon.

Oh Noice . Any Date or Day Please, Cox i am waiting from Long time and that apk binding problem literally killed me. <3

Yeah should be released Early October Hopefully

Morsmalleo commented 11 months ago

reopened due to major binding bug

Morsmalleo commented 11 months ago

Unfortunately newer updates for the revision of 1.0-beta.5 don't solve the binding problems for this APK, I'm so sorry for any inconvenience.

I will work on solving thing binding problems with this APK as much as possible