Final Flashcards
(39 cards)
What are the 4 main ways to do Privilege Escalation?
- Known Exploits
- Direct Method
- Indirect Method
- Credential Theft
What command shows you what you can run as sudo?
sudo -l
What are setUID programs?
Executables that, when run, will take on the privileges of the owner
What command shows all setUID programs on the system?
find / -perm -4000 2>/dev/null
What are capabilities?
Executables that, when run, have special abilities that the user might not have themselves
What command shows all capabilities on the system?
getcap -r / 2>/dev/null
What is UAC on Windows?
Similar to sudo
How can you view the crontab?
cat /etc/crontab
How can you find public config files?
find /etc -type f -perm -2
How can you find scheduled tasks on windows?
schtasks
How can you find windows services?
sc
What is LOLBAS?
GTFOBins for Windows
Explain how Windows paths can be exploited
Unquoted paths can be exploited if there are spaces in directory names
Whats the difference between /etc/shadow and /etd/passwd
/etc/passwd has users etc/shadow
has password hashes
What is in band SQLi?
uses the same communication channel to execute the attack and retrieve the results
Whats the best way to defend against SQLi?
Prepared statements/sanitize inputs
What is Cross Site Request Forgery (CSRF)?
An attack that forces an end user to execute unwanted actions on a web application in which they’re currently authenticated
What is Stored CSRF?
When the CSRF payload is stored on the webpage itself
What actions can you perform with a CSRF attack?
POST
GET
PUT
DELETE
What does the Same Origin Policy (SOP) protect against?
CSRF due to a script making an HTTP PUT to another origin
Whats the best way to defend against CSRF?
CSRF Token
What is Cross Site Scripting (XSS)?
A type of injection, in which malicious scripts are injected into otherwise benign and trusted websites
What is the TCP handshake?
SYN, SYN+ACK, ACK
What is SYN Flooding?
An attacker floods the TCP server with half-open TCP connections which then causes the TCP server to not receive any more connections