Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Privilege Escalation Techniques

You're reading from   Privilege Escalation Techniques Learn the art of exploiting Windows and Linux systems

Arrow left icon
Product type Paperback
Published in Nov 2021
Publisher Packt
ISBN-13 9781801078870
Length 340 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Alexis Ahmed Alexis Ahmed
Author Profile Icon Alexis Ahmed
Alexis Ahmed
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Section 1: Gaining Access and Local Enumeration
2. Chapter 1: Introduction to Privilege Escalation FREE CHAPTER 3. Chapter 2: Setting Up Our Lab 4. Chapter 3: Gaining Access (Exploitation) 5. Chapter 4: Performing Local Enumeration 6. Section 2: Windows Privilege Escalation
7. Chapter 5: Windows Kernel Exploits 8. Chapter 6: Impersonation Attacks 9. Chapter 7: Windows Password Mining 10. Chapter 8: Exploiting Services 11. Chapter 9: Privilege Escalation through the Windows Registry 12. Section 3: Linux Privilege Escalation
13. Chapter 10: Linux Kernel Exploits 14. Chapter 11: Linux Password Mining 15. Chapter 12: Scheduled Tasks 16. Chapter 13: Exploiting SUID Binaries 17. Other Books You May Enjoy

Enumerating privileges

To perform the privilege enumeration process, you will need to ensure that you have access to your target system either through a command shell or a meterpreter session. We will be taking a look at how to use various techniques that will apply to both methods of access. To begin the privilege enumeration process, follow the outlined procedures:

  1. The first step is to identify the user account you are currently utilizing. This can be done by running the following command in meterpreter:
    getuid

    If you do not have access to the target via a meterpreter session, you can run the following command in the command shell:

    whoami

    As highlighted in the following screenshot, this will output the current user you are logged in as; in this case, we are logged in as a regular user:

    Figure 6.1 – Enumerating current user

  2. The next step involves enumerating the user privileges, this can be done by running the following command in meterpreter:
    getprivs

    Alternatively, if...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime