Methods and commands - Part 1
Last updated
Was this helpful?
Last updated
Was this helpful?
After gaining a successful user level shell, we must look for the following methods to gain higher/ root level privilege access.
systeminfo
--> Displays detailed configuration information about a computer and its operating system, including operating system configuration, security information, product ID, and hardware properties (such as RAM, disk space, and network cards). This information can be used to find the information about the target system and search online for the available exploits.
hostname
--> Displays the host name portion of the full computer name of the computer. Quiet useful during CTF challenges.
whoami
--> Displays user, group and privileges information for the user who is currently logged on to the local system. If used without parameters, whoami displays the current domain and user name.
whoami /priv
--> To displays the security privileges of the current user and escalate the privilege accordingly.
whoami /groups
--> Displays the user groups to which the current user belongs. This might be helpful for finding whether the user belongs to any Admin group.
net users
--> The net user command is used to display the current users and their privilege, add, remove, and make changes to the user accounts on a computer, all from the Command Prompt.
net localgroup
--> Adds, displays, or modifies local groups. Used without parameters, net localgroup displays the name of the server and the names of local groups on the computer.
To add a user with Admin privilege:
Use the command net user
username password
/add
to create a new user from the command line.
To give a new user administrative rights, use net localgroup administrators
username
/add
.
Stay tuned for Part 2
🔗