ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 65 - PT0-002 discussion

Report
Export

A penetration tester runs the following command on a system:

find / -user root -perm -4000 -print 2>/dev/null

Which of the following is the tester trying to accomplish?

A.
Set the SGID on all files in the / directory
Answers
A.
Set the SGID on all files in the / directory
B.
Find the /root directory on the system
Answers
B.
Find the /root directory on the system
C.
Find files with the SUID bit set
Answers
C.
Find files with the SUID bit set
D.
Find files that were created during exploitation and move them to /dev/null
Answers
D.
Find files that were created during exploitation and move them to /dev/null
Suggested answer: C

Explanation:

the 2>/dev/null is output redirection, it simply sends all the error messages to infinity and beyond preventing any error messages to appear in the terminal session.

The tester is trying to find files with the SUID bit set on the system. The SUID (set user ID) bit is a special permission that allows a file to be executed with the privileges of the file owner, regardless of who runs it. This can be used to perform privileged operations or access restricted resources. A penetration tester can use the find command with the -user and -perm options to search for files owned by a specific user (such as root) and having a specific permission (such as 4000, which indicates the SUID bit is set).

asked 02/10/2024
Babak Sadeghpour
28 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first