Files
aleshell2/README.md
2025-09-23 22:57:23 +02:00

8.0 KiB

🚀 AleShell - Modern PHP Web Shell

AleShell is a powerful, secure, and modern web shell built with PHP. It's a complete rewrite and modernization of the b374k project, featuring a beautiful responsive interface, enhanced security, and modern development practices.

Features

🔐 Security

  • Advanced Authentication with password hashing and session management
  • CSRF Protection for all state-changing operations
  • Rate Limiting to prevent brute force attacks
  • IP Whitelisting/Blacklisting for access control
  • Path Traversal Protection to prevent unauthorized file access
  • Command Filtering to block dangerous system commands
  • Session Security with secure cookies and session regeneration

🎨 Modern Interface

  • Responsive Design that works on desktop, tablet, and mobile
  • Dark/Light Theme toggle with system preference detection
  • Keyboard Shortcuts for power users
  • Real-time Updates for system information
  • Smooth Animations and transitions
  • Modular Architecture with lazy-loaded components

📁 File Manager

  • Complete File Operations (create, read, update, delete, copy, move)
  • Drag & Drop Upload with progress indicators
  • Syntax Highlighting for code files
  • File Permissions management
  • Archive Support (zip, tar, tar.gz)
  • Large File Handling with streaming
  • File Search and filtering capabilities

💻 Terminal

  • Interactive Terminal with command history
  • Built-in Commands (cd, pwd, help, etc.)
  • Command Auto-completion
  • Output Streaming for long-running commands
  • Multiple Terminal Tabs
  • Configurable Timeout for command execution

📝 Code Editor

  • Syntax Highlighting for multiple languages
  • Line Numbers and code folding
  • Find & Replace functionality
  • Auto-indentation and code formatting
  • Multiple Editor Themes
  • File Type Detection

System Monitoring

  • Real-time System Stats (CPU, Memory, Disk, Network)
  • Process Manager with kill capabilities
  • Network Tools (ping, traceroute, port scan)
  • System Information display
  • Load Average monitoring

🗄️ Database Tools

  • Multi-Database Support (MySQL, PostgreSQL, SQLite)
  • SQL Query Execution with result formatting
  • Database Browser with table structure
  • Export/Import capabilities
  • Connection Management

🚀 Installation

Requirements

  • PHP 7.4 or higher
  • Web server (Apache, Nginx, etc.)
  • PHP extensions: json, mbstring, openssl

Quick Install

  1. Download the latest release
  2. Extract to your web directory
  3. Access via web browser
  4. Default password: aleshell

From Source

git clone https://github.com/yourusername/aleshell.git
cd aleshell
# Upload to your web server

For easy deployment, use the AleShell Packer to generate a single encrypted PHP file:

Web Interface

  1. Access pack.php in your browser
  2. Configure options (password, modules, compression)
  3. Click "Generate AleShell Packed"
  4. Upload the generated file to any PHP server

Command Line

# Basic packed version
php pack.php -o shell.php -p your_password --encrypt

# Advanced packed version
php pack.php -o advanced.php -p secure_pass --encrypt --minify --obfuscate

Benefits of Packed Version:

  • Single file deployment
  • Encrypted and compressed
  • No external dependencies
  • Customizable features
  • Built-in security options

⚙️ Configuration

AleShell can be configured by creating a src/config/config.php file:

<?php
return [
    'security' => [
        'password' => password_hash('your_secure_password', PASSWORD_DEFAULT),
        'session_timeout' => 3600, // 1 hour
        'allowed_ips' => [], // Empty = allow all
        'max_attempts' => 5,
        'lockout_time' => 300 // 5 minutes
    ],
    'features' => [
        'file_manager' => true,
        'terminal' => true,
        'code_editor' => true,
        'process_manager' => true,
        'network_tools' => true,
        'database_tools' => true
    ],
    'ui' => [
        'theme' => 'dark', // 'dark' or 'light'
        'language' => 'en',
        'items_per_page' => 50
    ],
    'limits' => [
        'max_file_size' => 50 * 1024 * 1024, // 50MB
        'max_upload_size' => 100 * 1024 * 1024, // 100MB
        'command_timeout' => 30
    ]
];

🔒 Security Considerations

AleShell is designed with security in mind, but you should still follow best practices:

  1. Change the default password immediately after installation
  2. Use HTTPS in production environments
  3. Restrict access using IP whitelisting when possible
  4. Monitor access logs for suspicious activity
  5. Keep PHP updated to the latest stable version
  6. Remove from production when not needed

🌐 Browser Support

AleShell supports all modern browsers:

  • Chrome 60+
  • Firefox 55+
  • Safari 12+
  • Edge 79+
  • Opera 47+

📱 Mobile Support

The interface is fully responsive and optimized for mobile devices with:

  • Touch-friendly controls
  • Responsive navigation
  • Optimized layouts
  • Gesture support

🎯 Keyboard Shortcuts

  • Ctrl+1 - Dashboard
  • Ctrl+2 - File Manager
  • Ctrl+3 - Terminal
  • Ctrl+4 - Code Editor
  • Ctrl+L - Clear terminal
  • Ctrl+S - Save file (in editor)

🔧 Development

Architecture

AleShell follows modern PHP development practices:

  • PSR-4 Autoloading for clean class organization
  • MVC Pattern with controllers and views
  • Modular Design for easy extensibility
  • RESTful API for all operations
  • Security-first approach

File Structure

aleshell/
├── index.php              # Entry point
├── src/                   # Source code
│   ├── core/             # Core framework classes
│   ├── controllers/      # Request handlers
│   ├── security/         # Security components
│   ├── modules/          # Feature modules
│   ├── themes/           # UI themes
│   ├── config/           # Configuration
│   └── utils/            # Utility classes
├── uploads/              # File uploads (create if needed)
├── logs/                 # Application logs
└── README.md

Adding Modules

Create a new module by:

  1. Creating a directory in src/modules/
  2. Adding a module.json configuration file
  3. Implementing the module class
  4. Registering routes if needed

Example module structure:

src/modules/mymodule/
├── module.json
├── MyModule.php
├── assets/
│   ├── style.css
│   └── script.js
└── templates/
    └── index.html

🐛 Troubleshooting

Common Issues

  1. Permission Errors

    • Ensure PHP has read/write permissions
    • Check file ownership and permissions
  2. Session Issues

    • Verify session directory is writable
    • Check PHP session configuration
  3. Command Execution Fails

    • Verify exec functions are enabled
    • Check system PATH configuration

Debugging

Enable debug mode in configuration:

'app' => [
    'debug' => true
]

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

🙏 Acknowledgments

  • Based on the original b374k project
  • Inspired by modern web development practices
  • Thanks to all contributors and testers

⚠️ Disclaimer

This tool is intended for legitimate system administration purposes only. Users are responsible for ensuring compliance with applicable laws and regulations. The authors are not responsible for any misuse of this software.


AleShell v2.0.0 - Built with ❤️ for system administrators