echo 0 > foo //wont work with sudo ..
sudo echo 0 > foo //will fail ...
sudo sh -c 'echo 0 > file' //If you want echo with sudo
Does anyone know how common stack protector is in the wild?
The protection only protects under some circumstances not all. So this demo still seems valid. Also the protection comes at a cost of extra code (and extra execution time).
This means to me that any IoT device probably does not have stack protection.
The stack protector acts as a guard against overwriting that value without knowing a key that is stored elsewhere in memory. You'd need some memory disclosure issue to get the key or brute force the key.