How to Autorun Android Command Through Shell in Meterpreter?

Mar 12, 2017 07:10 PM

I've been at this for days to no avail, I'm having issues with automating persistence within android on connection of a meterpreter session.

I've been playing around with the information at this link https://offensiveinfosec.wordpress.com/tag/autorunscript/, quite successfully I might add. however, the issue arises when I try to drop in to a shell and run commands on that shell within android.

The target is to upload a .sh file on connection, drop to a shell and then execute this command. The automation gets as far as "shell 1 process created" then ends. It's driving me up the wall.

Here is what I have written in my command file;

cd /

cd /sdcard/download

upload /root/Desktop/AndroidAutorun/Dn30.sh

shell

cd /

cd /sdcard/Download

sh Dn30.sh

As I mentioned, it executes flawlessly until shell, then nothing happens.

I'm relatively new to linux commands and am learning as I go along, please forgive me if its unbelievably obvious. Does anybody have any idea what I'm missing?

Related Articles

637587411395252764.jpg

How to Perform Advanced Man-in-the-Middle Attacks with Xerosploit

635211718118959676.jpg

How to Get Unlimited Free Trials Using a "Real" Fake Credit Card Number

Comments

No Comments Exist

Be the first, drop a comment!