Post Exploitationweb shellphp backdoorpost exploitationstealthtelnet

Weevely

Weevely is a stealth PHP web shell that simulates a telnet-like connection for web application post-exploitation. It serves as a backdoor or management tool for legitimate web accounts.

Description

Weevely is an essential tool for web application post-exploitation, providing a stealthy PHP web shell that simulates telnet-like connections. It can be deployed as a hidden backdoor or used to manage legitimate web accounts, including free hosted ones. The tool generates PHP agents protected by passwords, enabling secure remote access to compromised web servers.

Key use cases include filesystem browsing, command execution, and module utilization on target systems after initial exploitation. Once connected, users can interact with the target environment as if using a terminal session. Weevely maintains session persistence through saved session files for resuming connections.

The tool's stealth design makes it particularly valuable for maintaining long-term access to compromised web applications without detection.

How It Works

Weevely operates by generating obfuscated PHP backdoor files protected with user-specified passwords. When accessed via HTTP/HTTPS, the backdoor authenticates incoming connections using the password and establishes an encrypted, stealth communication channel that simulates telnet functionality. Sessions are persisted locally in a sessions directory, allowing reconnection without regenerating the agent. The PHP agent handles filesystem operations, command execution, and module loading while evading detection through code obfuscation and minimal footprint.

Installation

bash
sudo apt install weevely

Flags

-h, --helpshow this help message and exit

Examples

Generate a PHP backdoor protected with the given password 's3cr3t'. Creates backdoor file 'weevely.php'.
weevely generate s3cr3t
Connect to the generated backdoor at the specified URL using password 's3cr3t'. Establishes interactive stealth web shell session.
weevely http://192.168.1.202/weevely.php s3cr3t
Run terminal or command on the target (subcommand shown in usage).
weevely terminal
Recover an existing session (subcommand shown in usage).
weevely session
Generate new agent (subcommand shown in usage).
weevely generate
Display help message showing available subcommands: terminal, session, generate.
weevely -h
Within an active session, browse filesystem, execute commands, or list available modules.
:help
Updated 2026-04-16kali.org ↗