linux privilege Escalation Flashcards

(13 cards)

1
Q

You have user shell. sudo -l shows you can run /usr/bin/vim as root. Best next step?

A

Use allowed sudo command to obtain root (e.g., via vim shell escape) and then capture proof.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

You find a root cron job running /opt/backup.sh, and the script is writable by your user. What do you do?

A

Edit the script to execute a safe root proof action/shell, then wait for cron and capture proof.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

No sudo rights. You find SUID binary find owned by root. What does this imply?

A

Potential privesc if the binary can execute commands with elevated privileges; validate safely.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

getcap -r / shows a binary with dangerous capability. Next step?

A

Research capability impact and test safe escalation technique; document steps and evidence.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

You find creds in .bash_history for another user. Best next step?

A

Try switching user (su/ssh) and re-run enumeration for that user’s privileges.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

You find /etc/passwd writable but /etc/shadow is not. What does that mean?

A

Limited usefulness; focus on writable root-run scripts/configs and sudo/SUID instead.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

A service runs as root and reads config from /etc/service.conf which is writable by you. What do you do?

A

Modify config to execute benign root action or load attacker-controlled path (if applicable) and restart only if allowed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Kernel version is old and public exploit exists. What’s the safe decision rule?

A

Use kernel exploit only if simpler paths fail and you’ve validated version/patch compatibility and risk.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

You see a writable directory early in PATH used by a root script. What’s the privesc angle?

A

PATH hijacking: place a malicious binary with the same name as a called command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

You can read /var/www/html/config.php and it has DB creds. How can this help privesc?

A

DB creds may reuse system creds or grant access to admin panels/files; pivot and re-enumerate.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

You’re in a Docker container with mounted host paths. What’s the key question?

A

Whether host filesystem/socket is exposed (e.g., docker.sock) enabling host-level actions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

You found SSH key file readable. Best next step?

A

Check permissions, whether it’s passphrase protected, and attempt authorized use to pivot.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

A cron job runs every minute but you need proof quickly. What’s best?

A

Use the cron window to trigger your change; keep actions minimal and immediately capture proof.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly