Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Share the screenshots of the linux terminal for the above the question This task demonstrates the security implication of SUID bit on executable files. -

image text in transcribed

Share the screenshots of the linux terminal for the above the question

This task demonstrates the security implication of SUID bit on executable files. - Revise what SUID bit means and how to set this bit? - As root: write a C program shoufile. c that shows the content of a text file, compile it, and set its permission to 4701; create a text file secret.txt with a secret message and set its permission to 600 . Place these files in a directory accessible to student. - As user student verify that - If you attempt to display the content of secret. txt directly, via command cat for example, it will produce a permission error. - However, if you execute showf ile, you can see the content of secret.txt. - Also, try to show the content of the file /etc/shadow, which contains the hashed passwords of all users. - Now, turn the SUID bit off and verify that user student cannot view the content of secret.txt any more. Discuss its security implication. - As a slight variation, write a simple Bash script showfile. sh to display the content of a text file. Turn the setuid bit on again, and check if student can view the content of secret. txt via this script. Explain why or why not

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learn To Program Databases With Visual Basic 6

Authors: John Smiley

1st Edition

1902745035, 978-1902745039

More Books

Students also viewed these Databases questions