How to do it...

Let's perform the following steps:

  1. Once we have Meterpreter on the system, Metasploit has a built-in module that we can use. We can use three different methods to get administrator access.
  2. First, we will see the infamous getsystem of Metasploit to view the system help. Use the following command:
getsystem -h

The output of running the preceding command is shown in the following screenshot:

  1. To try and get the admin, type the following command:
getsystem

The output of running the preceding command is shown in the following screenshot:

  1. We can see we are now NT AUTHORITY\SYSTEM.
  2. Sometimes, this technique may not work, so we ...

Get Kali Linux - An Ethical Hacker's Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.