WpShellUploader is a WPF (Windows Presentation Foundation) desktop application developed in C# (.NET 6) designed for automated web shell uploading to WordPress sites. The tool first validates credentials, then attempts to upload a PHP shell using 9 different upload methods, and finally verifies that the shell is accessible.
The project follows the MVVM (Model-View-ViewModel) design pattern:
WpShellUploader/
├── Models/ → Data models (WpTarget)
├── Views/ → XAML UI (MainWindow)
├── ViewModels/ → UI Logic (MainViewModel, DynamicSemaphore)
├── Services/ → Business services (ShellUploadService, AdaptiveThreadManager, FileService)
├── Converters/ → Value converters for XAML bindings
├── Themes/ → Dark visual theme (DarkTheme.xaml)
├── Files/ → Payload files (index.php, plugin.zip, theme.zip)
├── App.xaml → Global app configuration
└── WpShellUploader.csproj → .NET 6 project file
The tool attempts to upload the shell using 9 different methods in order of reliability:
| # | Method | Description |
|---|---|---|
| M1 | Plugin Upload | Uploads a malicious plugin ZIP via /wp-admin/update.php?action=upload-plugin |
| M2 | Theme Upload | Uploads a malicious theme ZIP via /wp-admin/update.php?action=upload-theme |
| M3 | Theme Editor | Injects code into the theme editor (/wp-admin/theme-editor.php) |
| M4 | Plugin Editor | Injects code into the plugin editor (/wp-admin/plugin-editor.php) |
| M5 | Media REST | Uploads file via WordPress REST API (/wp-json/wp/v2/media) |
| M6 | File Manager | Uses file manager plugins if installed |
| M7 | Ajax Upload | Uploads via WordPress AJAX endpoint (admin-ajax.php) |
| M8 | XML-RPC | Uploads file via XML-RPC wp.uploadFile method |
| M9 | Direct Write | Attempts to write directly to the server |
Each method includes post-upload verification to confirm the shell is accessible.
The AdaptiveThreadManager uses a strategy similar to TCP congestion control:
-
AIMD (Additive Increase, Multiplicative Decrease):
- Additive increase: Gradually increases threads when the network responds well
- Multiplicative decrease: Drastically reduces when problems are detected
-
Initial auto-detection:
- Analyzes system CPU cores
- For I/O tasks (HTTP), optimal concurrency is much higher than CPU core count
- Base formula:
cores × 10for minimum,cores × 30for maximum
-
Real-time dynamic adjustment:
- Monitors network success/failure rates
- Differentiates between login errors (not network errors) and real timeouts
- Adjusts at each interval based on performance metrics
-
Manual mode: A fixed thread count can be specified (0 = auto-detect)
Custom semaphore implementation that can be resized at runtime:
- Increase: Releases additional permits immediately
- Decrease: Permits are consumed naturally as workers complete
- Thread-safe: Protected with
lockfor resize operations
Before attempting upload, validates credentials using:
wp.getUsersBlogs— Login verificationwp.getProfile— Role and capability extraction- Role detection (Administrator, Editor, Author, etc.)
After each upload method:
- Constructs the expected shell URL
- Makes a GET request to the shell
- Searches for a specific marker in the response
- Confirms the shell is operational
Accepts credentials in the same formats as WpSiteChecker:
| Format | Example |
|---|---|
Hash (# + @) |
https://example.com#user@password |
Pipe (|) |
https://example.com|user|password |
Em-dash (–) |
https://example.com–user–password |
ULP/Colon (:) |
example.com/wp-login.php:user:password |
The project includes payload files in the Files/ directory:
| File | Description |
|---|---|
index.php |
Obfuscated PHP shell (main payload) |
plugin.zip |
WordPress plugin packaged with the shell |
theme.zip |
WordPress theme packaged with the shell |
plugin/ |
Decompressed plugin directory |
theme/ |
Decompressed theme directory |
The interface displays:
- Total targets in file
- Processed / Login OK / Shell OK
- Login Failed / Upload Failed / Timeouts
- Administrators / Editors / Authors
- Active threads / Optimal threads
- Success rate (% shells over processed)
- Login rate (% logins over processed)
- Speed (sites/second)
- Progress (percentage bar)
- Elapsed time (HH:MM:SS format)
- Thread mode (Auto/Manual)
Results are saved to Results/Results_YYYY-MM-DD_HH-mm-ss/:
| File | Content |
|---|---|
login_ok.txt |
Successful logins |
shells.txt |
Uploaded shell URLs |
shells_full.txt |
Shells with method and full credentials |
login_failed.txt |
Failed logins with error details |
upload_failed.txt |
Login OK but upload failed |
administrators.txt |
Administrator accounts |
editors.txt |
Editor accounts |
authors.txt |
Author accounts |
method_*.txt |
Results by upload method |
Successfully_logged_WordPress.txt |
Successful login in hash format |
- Import file — Select credentials file
- Start/Stop processing
- Copy shells to clipboard (all shell URLs)
- Open results folder in file explorer
- Filter by role (All, Administrator, Editor, Author)
- Auto Threads toggle — Enable/disable adaptive threading
- Configure timeout (5-120 seconds)
- Configure threads (0=auto up to 500)
- Activity log with timestamps (max 500 entries, reverse order)
The system correctly differentiates between error types:
| Error Type | Network error? | Threading effect |
|---|---|---|
| Wrong credentials | No — server responded | Does not penalize threads |
| Timeout | Yes — server did not respond | Reduces threads |
| Connection refused | Yes — could not connect | Reduces threads |
| Host not found | Yes — DNS failed | Reduces threads |
- Asynchronous line-by-line file reading
- Does not load entire file into memory
- Producer-consumer pattern with
DynamicSemaphore
- Permissive SSL/TLS: Accepts self-signed certificates
- Rotating User-Agent: Emulates real browsers
- Nonce extraction: Extracts WordPress security tokens for each operation
- Automatic decompression: GZip and Deflate
- Redirect and cookie handling
- Safe cancellation: Full
CancellationTokensupport
- Framework: .NET 6 (Windows)
- Application type: WPF (Windows Presentation Foundation)
- Dependencies:
System.Text.Jsonv8.0.5 - Operating system: Windows 10/11
- Requirement:
Files/folder withindex.php(PHP shell)
1. Application loads shell from Files/index.php
2. Import credentials file (.txt)
3. Configure threads (0=auto, 1-500) and timeout (5-120s)
4. Start processing:
a. Initialize AdaptiveThreadManager
b. For each target (streaming):
i. Parse credentials (multi-format)
ii. Validate login via XML-RPC
iii. If login OK: detect role
iv. Try 9 upload methods in sequence
v. Verify shell is accessible
vi. Save organized result
c. Adjust threads dynamically (AIMD)
5. Display real-time statistics
6. On completion: final summary with speed and rates