The last method is one I encoutered in Peppo from Proving Grounds. By enumerating the $PATH environment variable we could see where the binaries are run from.
Based on the $PATH directory we can list the binaries that the user can run.
Now based on those binaries that we can run, these could be used to break out of restricte environments.