LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Question about LINK security. (https://www.linuxquestions.org/questions/linux-security-4/question-about-link-security-549981/)

Nuvious 04-29-2007 04:33 PM

Question about LINK security.
 
Hey,

I'm doing a presentation on Linux security and I was wondering if it was possible to change a link to point to a different file without destroying the link.

My question stems from the idea that a user could find a binary that is globally writable and modify it to do his dirty work as root user. For this presentation, I'm setting up my own Linux box to hack it to pieces. What I plan to do is add a group-writable path to the global path and then demonstrate how this can be exploited.

I was also wondering if links were secure if they're pointing to a file that is not group-writable. I've noticed on our school's system that all the links available in the path are globally 'rwx' though the files they point to are not. I'm guessing that means the files are still secure, but I would just like clarification, explanation and or a good reference to back up this claim.

Thanks in advance for any reply!

bsdunix 04-29-2007 06:04 PM

Quote:

... I was wondering if it was possible to change a link to point to a different file without destroying the link.
If you change a link to point to a different file, then yes the existing link is destroyed. On the other hand, you can have several links that point to the same file. An alias of a command is probably what your thinking about, but the correct file permissions are needed to create the alias.

http://en.wikipedia.org/wiki/Alias_(Unix_shell)
Quote:

My question stems from the idea that a user could find a binary that is globally writable and modify it to do his dirty work as root user.
Security is relative: Physical access, easy/no passwords, system patches not up-to-date, misconfigured system settings/permissions, and probably the worst is social engineering.

http://www.unixtools.com/security.html
Quote:

... all the links available in the path are globally 'rwx' though the files they point to are not. ...
That is correct. The real permissions are on the target file.

http://en.wikipedia.org/wiki/Symbolic_link


All times are GMT -5. The time now is 07:15 PM.