I was reading the man of find on the -exec command {} switch section, it states that the {} should be quoted to protect from interpretation by shells.
I'm trying to reproduce such a behaviour locally without any success and wondering in what context does that interpretation apply.
Here is what i am doing trying to get that interpretation to work:
echo "Hi" > f1
touch -- \$\(ls\ \-la\) -n
find ./ -type f -exec cat {} +
Just basically trying to get either a switch or a command to be interpreted as it's parsing the malicious file names, but it doesn't get interpreted as suggested in the man.
What am i missing ?
Alternatively is there a way to exploit such a line code with cat as a command and not any other ?