Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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.
Distribution: Caldera, CTOS, Debian, FreeBSD, Mac OS X, Mandrake, Minix, OpenBSD, Slackware, SuSE
Posts: 1,757
Rep:
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.