Privilege Escalation Flashcards
What is the process for enumerating users on a Windows machine?
- whoami
- net user
- - gains additional information about the user you are logged in with - net users
- - discover other user accounts on the system
What is the process for enumerating users on a Linux machine?
- whoami
- id
- cat /etc/passwd
- - enumerates other users on the system
How do you enumerate the Operating System Version and Architecture on a Windows machine?
c:> systeminfo | findstr /B /C:”OS Name” /C:”OS Version” /C:”System Type”
How do you enumerate the Operating System Version and Architecture on a Linux machine?
- cat /etc/issue
- cat /etc/*-release
- uname -a
How do you list running processes on a Windows machine?
tasklist /SVC
How do you list running processes on a Linux machine?
ps axu
How do you enumerate all TCP/IP network configurations on a Windows machine?
ipconfig /all
How do you enumerate all TCP/IP network configurations on a Linux machine?
route print
How do you list active network connections on a Windows machine?
netstat -ano
How do you list active network connections on a Linux machine?
- ifconfig
- ip a
- /sbin/route
- ss -anp
How do you enumerate firewall settings on a Windows system?
- netsh advfirewall show currentprofile
- - netsh advfirewall firewall show rull name=all
How do we enumerate Scheduled Tasks on a Windows system?
– schtasks /query /fo LIST /v
How do we enumerate Scheduled Tasks on a Linux system?
- ls -lah /etc/cron*
- - cat /etc/crontab
How do we enumerate Installed Applications on a Windows machine?
– wmic product get name, version, vendor
How do we enumerate Patch Levels and Patch Levels on a Windows machine?
– wmic qfe get Caption, Description, HotFixID, InstalledOn
How do we enumerate Installed Applications on a Windows machine?
dpkg -l
On a Windows machine, how would you search for any file or directory in the Program Files directory that allows the ‘Everyone’ group ‘write’ permissions?
– accesschk.exe -uws “Everyone” “C:\Program Files”
What PowerShell cmdlet retrieves all permissions for a given file or directory?
Get-Acl
What additional cmdlet needs to be used with Get-Acl to run recursively?
Get-ChildItem
How would we use Get-Acl and Get-ChildItem cmdlets to get every file and directory under the Program Files directory that allows the ‘Everyone’ group to modify?
Get-ChildItem “C:\Program Files” -Recurse | Get-ACL | ?{$_.AccessToString -match “Everyone\sAllow\s\sModify”}
In Linux, how do you find every directory writable by the current user on the target system?
find / -writable -type d 2>/dev/null
How do you enumerate Unmounted Disks on a Windows machine?
- mountvol
How do we enumerate Unmounted Disks on a Linux machine?
- cat /etc/fstab
- mount
- /bin/lsblk
What are Device Drivers?
-A ‘driver’ is a software component that lets the operating system and a device communicate with each other.