23 ms·
Classic confusion: terminals typically run as users, but the shells in them often run as root. I could imagine an attack like this: printf 'rm -rf /\n\033[%iA
by ximm 5y ago
Classic confusion: terminals typically run as users, but the shells in them often run as root.
I could imagine an attack like this:
printf 'rm -rf /\n\033[%iAecho "Hello World!"\n'
When executed in a terminal this looks like it generates an innocent shell script. But when piped into a file and the executed it will delete all your files.
- Quekid5 5y agoI think you meant \r instead of \n immediately after the / ?