Hacker News new | past | comments | ask | show | jobs | submit login

> Most current distros prevent you from making setuid bash scripts

_any_ shebang script really... except perl scripts, because perl has taint mode turned on automatically when uid != euid

https://perldoc.perl.org/perlsec#Taint-mode

Note that there may be a fundamental race condition on some systems:

https://perldoc.perl.org/perlsec#Shebang-Race-Condition

Also see the noted use of `sudo -T`:

https://perldoc.perl.org/perlsec#Using-Sudo

I lament the recent removal of taint mode from Ruby :( as tainting is a powerful mechanism that could go way beyond scripts: imagine Rack / Rails #html_safe but via tainting so it could have worked more thoroughly (e.g concatenate/interpolate/format a tainted user string into a SQL snippet would blow up, preventing a whole class of SQL injections by design)

Some folks used to use taint for CGI/mod_perl to such great effect. It's not a magic bullet by any means (security is hard!) but it's a really effective tool still.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: