| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
SecShell is a secure shell implementation designed to provide a controlled environment for executing system commands. It incorporates various security features such as command whitelisting, input sanitization, process isolation, and job tracking. The shell is intended to be used in environments where security and control over command execution are paramount.
Command Whitelisting: Only commands from specified directories (/usr/bin/, /bin/, /opt/) are allowed to execute.
Input Sanitization: Input is sanitized to remove potentially harmful characters.
Process Isolation: Commands are executed in isolated processes to prevent interference.
Job Tracking: Background jobs are tracked and can be listed using the jobs command.
Services Manager: Start, Stop, and check the Status of your services in one convenient place. Use the services start | stop | list | status command.
Background Job Execution: Commands can be executed in the background by appending & to the command.
Piped Command Execution: Supports piping commands together (e.g., ls | grep .txt).
Input/Output Redirection: Supports input and output redirection (e.g., ls > output.txt).
Built-in Commands: Includes commands like cd, history, export, env, unset,blacklist,edit-blacklist, and more.
Admin-Control: All the blacklisted commands go in the .blacklist file. Write each command in its own line. the use bash sudo chown (root|admin|sudo) .blacklist to prevent a normal user from editing this file. You can also blacklist commands like edit-blacklist to make sure the file stays uneditable to the user. Blacklisting expands to commands such as : exit, shutdown,reboot, or any other command you do not want the user to run. If exit is blacklisted you WILL NOT be able to exit the SecShell, so use the blacklistings wisely.
KaliforniaGator has other tools you might like to use with SecShell:
Clone the repository:
git clone https://github.com/KaliforniaGator/SecShell.git
cd SecShellCompile the program:
g++ -o secshell secshell.cpp -lreadlineRun the shell:
./secshellMake sure you have DrawBox installed in your /bin/ directory as drawbox lowercase. Otherwise SecShell might show you an error anytime DrawBox is used.
After compiling SecShell as secshell mv it to your desired directory using
sudo mv secshell /DIRECTORY/Make sure to creat the .blacklist file in the directory you are installing secshell.
You can do this by typing
sudo touch DIRECTORY/.blacklistthen use your editor of choice (nano|vim|emacs) to add blacklisted commands.
###Running SecShell
Once compiled, you can run SecShell by executing the ./secshell binary. The shell will start and display a prompt where you can enter commands.
Or
Copy the secshell executable and the .blacklist file to your /bin/, /usr/bin/, or /opt/ directory. Then you will be able to run SecShell directly from anywhere.
Change directory:
cd /path/to/directoryList files in the current directory:
lsRun a command in the background:
sleep 10 &List active background jobs:
jobsPipe commands:
ls | grep .txtRedirect output to a file:
ls > output.txtManage services:
services start apache2SecShell is released under the GNU Affero General Public License (AGPL) version 3.0. This means that you are free to use, modify, and distribute the software, but any modifications or derivative works must also be licensed under the AGPL and made available to the public.
For more details, see the LICENSE file.
Contributions are welcome! Please fork the repository and submit a pull request with your changes. Ensure that your code adheres to the existing style and includes appropriate tests.
If you encounter any issues or have suggestions for improvements, please open an issue on the GitHub repository.
SecShell is provided "as is" without any warranties. The authors are not responsible for any damage or data loss caused by the use of this software. Use at your own risk.
Enjoy using SecShell! If you have any questions or need further assistance, feel free to reach out.
| Back | FazBrowse Home | New Git URL |