concept privilege in category security
appears as: privilege, privileges, privilege

This is an excerpt from Manning's book The Art of Network Penetration Testing.
Listing 6.2 Checking if xp_cmdshell is enabled on the MSSQL server
msf5 auxiliary(scanner/mssql/mssql_login) > use auxiliary/admin/mssql/mssql_enum msf5 auxiliary(admin/mssql/mssql_enum) > set rhosts 10.0.10.201 rhosts => 10.0.10.201 msf5 auxiliary(admin/mssql/mssql_enum) > set username sa username => sa msf5 auxiliary(admin/mssql/mssql_enum) > set password Password1 password => Password1 msf5 auxiliary(admin/mssql/mssql_enum) > run [*] Running module against 10.0.10.201 [*] 10.0.10.201:1433 - Running MS SQL Server Enumeration... [*] 10.0.10.201:1433 - Version: [*] Microsoft SQL Server 2014 (SP3) (KB4022619) - 12.0.6024.0 (X64) [*] Sep 7 2018 01:37:51 [*] Copyright (c) Microsoft Corporation [*] Enterprise Evaluation Edition (64-bit) on Windows NT 6.3 <X64> (Build 14393: ) (Hypervisor) [*] 10.0.10.201:1433 - Configuration Parameters: [*] 10.0.10.201:1433 - C2 Audit Mode is Not Enabled [*] 10.0.10.201:1433 - xp_cmdshell is Not Enabled #A [*] 10.0.10.201:1433 - remote access is Enabled [*] 10.0.10.201:1433 - allow updates is Not Enabled [*] 10.0.10.201:1433 - Database Mail XPs is Not Enabled [*] 10.0.10.201:1433 - Ole Automation Procedures are Not Enabled [*] 10.0.10.201:1433 - Databases on the server: [*] 10.0.10.201:1433 - Database name:master [*] 10.0.10.201:1433 - Database Files for master: [*] 10.0.10.201:1433 - C:\Program Files\Microsoft SQL [*] 10.0.10.201:1433 - C:\Program Files\Microsoft SQL [*] 10.0.10.201:1433 - sp_replincrementlsn [*] 10.0.10.201:1433 - Instances found on this server: [*] 10.0.10.201:1433 - MSSQLSERVER [*] 10.0.10.201:1433 - Default Server Instance SQL Server Service is running under the privilege of: [*] 10.0.10.201:1433 - NT Service\MSSQLSERVER [*] Auxiliary module execution completed msf5 auxiliary(admin/mssql/mssql_enum) >
Unfortunately, it’s just as likely that you don’t have root permissions immediately after compromising a Linux or UNIX target and will need to escalate somehow. There are numerous paths to explore more than would be productive to cover in a single chapter. I’m not going to go over them all. The one I want to show you, simply because it’s one of my personal favorites, is identifying and leveraging SUID binary executables to escalate privileges.