LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   iftop security issue ? (https://www.linuxquestions.org/questions/linux-security-4/iftop-security-issue-783000/)

ALInux 01-18-2010 10:36 AM

iftop security issue ?
 
Hi All
As you all know a non root user can not run iftop. So the most obvious workaround is to use sudo. Now if you give a regular user sudo access he will execute.

sudo iftop

Once he is inside iftop. He can execute ! he will get the following promtp

command >

At this point a user can execute su, and he will get a root shell. He can also execute any command in privileged mode. The idea of using sudo initially was giving the user iftop access. However the user ends up with total root access.

Please comment.

Regards

unSpawn 01-18-2010 04:33 PM

'man noexec' (if available), 'man sudo': "There is no easy way to prevent a user from gaining a root shell if that user is allowed to run arbitrary commands via sudo. Also, many programs (such as editors) allow the user to run commands via shell escapes, thus avoiding sudo’s checks. However, on most systems it is possible to prevent shell escapes with sudo’s noexec functionality.", 'man sudoers'?

ALInux 01-18-2010 04:53 PM

unSpawn you save the day. Thanks for that hint, just what I needed.


All times are GMT -5. The time now is 10:43 PM.