Phantom-Evasion icon indicating copy to clipboard operation
Phantom-Evasion copied to clipboard

error in android module

Open usama7628674 opened this issue 7 years ago • 8 comments

@oddcod3 I got the following while generating android payload

image

While obfuscating smali code then is an exception

image

Payload that I use: android/meterpreter/reverse_tcp

usama7628674 avatar Jun 20 '18 03:06 usama7628674

@usama7628674 yes you are right Android and osx modules will be reworked in the next release

oddcod3 avatar Jun 20 '18 18:06 oddcod3

2.0.1 release also doesn't work

cashbea avatar Dec 05 '18 01:12 cashbea

@cashbea use sudo update-alternatives --config java then choose /usr/lib/jvm/java-10-openjdk-amd64/bin/java and try again.

usama7628674 avatar Dec 05 '18 01:12 usama7628674

@usama7628674 thanks for your advice. but

Selection Path Priority Status

  • 0 /usr/lib/jvm/java-10-openjdk-amd64/bin/java 1101 auto mode 1 /usr/lib/jvm/java-10-openjdk-amd64/bin/java 1101 manual mode 2 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode

Press to keep the current choice[*], or type selection number:

it aleady was chosen.

cashbea avatar Dec 06 '18 07:12 cashbea

@cashbea Select option 2 then try again

usama7628674 avatar Dec 06 '18 08:12 usama7628674

@cashbea Could you post the screenshot here of error message?

usama7628674 avatar Dec 06 '18 11:12 usama7628674

Exception in thread "main" java.lang.NoSuchMethodError: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer; at org.jf.dexlib2.writer.DexWriter.writeAnnotationDirectories(DexWriter.java:698) at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:267) at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:246) at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:61) at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:36) at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:419) at brut.androlib.Androlib.buildSources(Androlib.java:350) at brut.androlib.Androlib.build(Androlib.java:302) at brut.androlib.Androlib.build(Androlib.java:269) at brut.apktool.Main.cmdBuild(Main.java:238) at brut.apktool.Main.main(Main.java:76) [+] Infected file /root/Desktop/TheFatRat/temp/app_backdoored.apk ready.

\e[1;31m [x] There was an error in the creation of your RAT APK file , the possible reasons are :

  • The architecture of the file is not for android
  • The original APK is protected
  • It was not possible to inject the payload in the hook you selected (in this case select a different hook point)

cashbea avatar Dec 06 '18 16:12 cashbea

when option 0 was chosen, there was no error. but output.apk didn't work. my device's android version is 7

cashbea avatar Dec 06 '18 17:12 cashbea