How to do it...

The first step of rooting any box would be to check whether there are any publically available local root exploits:

  1. We can use scripts such as Linux Exploit Suggester. It is a script built in Perl where we can specify the kernel version and it will show us the possible publicly-available exploits we can use to gain root privileges. The script can be downloaded from https://github.com/PenturaLabs/Linux_Exploit_Suggester:
      git clone https://github.com/PenturaLabs/Linux_Exploit_Suggester.git
  1. Now we go to the directory using the cd command:
      cd Linux_Exploit_Suggester/
  1. It is simple to use, and we can find the kernel version ...

Get Kali Linux - An Ethical Hacker's Cookbook 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.