What is a restricted shell? A restricted shell is a shell that restricts some of the commands or "block" the environment variables like SHELL,PATH,USER. Some restricted shells blocks commands with / or the redirecting outputs like >, >>.
But why to create a restricted shell in first place?
- To remain secured from Hackers (bad ones :P).
- To improve system's security.
- To protect system from dangerous commands.
- To use in CTF Challenges.
- There are 4 restricted python shells I have created, with restricting ['import','eval','compile'], ['import','exec','compile'], ['import','exec','eval'] & ['import','exec','eval','compile'].
Copyright Rahul Indra