University of Moratuwa — Department of Computer Science & Engineering
This authorized security assessment of the University of Moratuwa CSE department's external attack surface identified 25 security findings across 12 distinct services and domains.
The assessment covered subdomain enumeration (582 subdomains discovered, 17 live hosts confirmed), technology fingerprinting, credential discovery via public GitHub repositories, OAuth/OIDC analysis, and targeted exploitation of discovered vulnerabilities.
Key Findings:
| ID | Severity | Title | Status | Target | Exploited |
|---|---|---|---|---|---|
F3 |
CRITICAL | Nextcloud 20.0.14 (EOL) - Document Management System | confirmed | dms.uom.lk |
✓ |
F10 |
CRITICAL | Unauthenticated Access to All User/Admin/Staff Data (89 accounts) | confirmed | backend.cse.mrt.ac.lk |
✓ |
F13 |
CRITICAL | Hardcoded Production MySQL + SendGrid + JWT Credentials in GitHub | confirmed | wireme.projects.mrt.ac.lk |
✓ |
F22 |
CRITICAL | 8 Gmail App Passwords Leaked for @cse.mrt.ac.lk Student Accounts | confirmed | cse.mrt.ac.lk |
— |
F1 |
HIGH | Missing DMARC on mrt.ac.lk - Full Email Spoofing | probable | mrt.ac.lk |
✓ |
F2 |
HIGH | Missing DMARC on cse.mrt.ac.lk - Email Spoofing | probable | cse.mrt.ac.lk |
✓ |
F4 |
HIGH | Keycloak ROPC Grant Enabled - Brute-Force via Token Endpoint | confirmed | auth.uom.ac.lk |
✓ |
F5 |
HIGH | CSE Admin Panel (C-PANEL) Accessible Without Network Restriction | confirmed | admin.cse.mrt.ac.lk |
— |
F11 |
HIGH | Password Change Without Old Password Verification | probable | backend.cse.mrt.ac.lk |
— |
F12 |
HIGH | EOL Tomcat 8.5.39 on Identity Provider - Ghostcat CVE-2020-1938 | probable | idp.itum.mrt.ac.lk |
— |
F23 |
HIGH | Multiple Database Credentials Leaked in GitHub (PostgreSQL/CouchBase/MongoDB) | confirmed | projects.mrt.ac.lk |
— |
F6 |
MEDIUM | Backend API Wildcard CORS with Full Data Access | confirmed | backend.cse.mrt.ac.lk |
— |
F8 |
MEDIUM | Shibboleth IDP SAML Metadata with X.509 Certificates Exposed | confirmed | idp.itum.mrt.ac.lk |
— |
F9 |
MEDIUM | DokuWiki Anonymous Raw Page Export - Information Disclosure | confirmed | wiki.cse.mrt.ac.lk |
✓ |
F14 |
MEDIUM | Drupal CMS Full Stack Trace Information Disclosure | confirmed | uom.lk |
✓ |
F15 |
MEDIUM | MQTT Broker Exposed on wireme.projects.mrt.ac.lk | probable | wireme.projects.mrt.ac.lk |
— |
F16 |
MEDIUM | Google App Password Leaked for CSE Student Email | confirmed | cse.mrt.ac.lk |
— |
F17 |
MEDIUM | Smart Campus Portal Session Secret Leaked in GitHub | confirmed | cse.mrt.ac.lk |
— |
F18 |
MEDIUM | Moodle Online Portal Stack Trace Disclosure | confirmed | online.uom.lk |
✓ |
F19 |
MEDIUM | DokuWiki HTTP-Only (No TLS) - Cleartext Credential Transit | confirmed | wiki.cse.mrt.ac.lk |
✓ |
F20 |
MEDIUM | Nextcloud User Enumeration via Avatar Endpoint | confirmed | dms.uom.lk |
✓ |
F21 |
MEDIUM | Keycloak Over-Permissive OAuth Configuration (9 Grant Types) | confirmed | auth.uom.ac.lk |
✓ |
F24 |
MEDIUM | Firebase Config with admin@mrt.ac.lk Credentials in Public Repo | confirmed | mrt.ac.lk |
— |
F25 |
MEDIUM | MEGA Cloud Login Credentials Leaked for Student Account | confirmed | cse.mrt.ac.lk |
— |
F7 |
LOW | Swagger API Documentation Publicly Exposed | confirmed | backend.cse.mrt.ac.lk |
✓ |
Target: dms.uom.lk
University Document Management System runs Nextcloud 20.0.14 on PHP 7.3.20 + nginx 1.14.1. All EOL. User enumeration confirmed via /avatar/{user}/64 endpoint (200=exists, 404=not). User "admin" exists. Uses LDAP/AD integration (UoM institutional credentials). Multiple unpatched CVEs: CVE-2021-32679 (SSRF), CVE-2021-32800 (2FA bypass), CVE-2021-32802 (WebDAV path traversal), CVE-2022-24741 (bruteforce bypass). Bruteforce delay=25000ms (reduced from default). Unrestricted login token generation.
curl -s https://dms.uom.lk/status.php # Returns version 20.0.14.2
Exploitation Notes: User enum confirmed (admin exists). LDAP integration means UoM credentials at risk. CVEs identified but not exploited (would require network-level access for SSRF/WebDAV).
Affected Hosts: dms.uom.lk
Target: backend.cse.mrt.ac.lk
The backend API at backend.cse.mrt.ac.lk exposes /staffs and /admins endpoints without any authentication. Returns full user records for 76 staff + 13 admin accounts including: email addresses, user IDs, role IDs, email verification status, last login timestamps, last password reset timestamps, and profile pictures. All pagination parameters work. This enables full user enumeration for targeted attacks.
curl -s "https://backend.cse.mrt.ac.lk/staffs?offset=0&limit=100" # Returns 76 staff with full user objects curl -s "https://backend.cse.mrt.ac.lk/admins?offset=0&limit=100" # Returns 13 admin users with full details
Evidence: 89 user records with emails, IDs, roles, login metadata returned without auth
Exploitation Notes: Confirmed: full pagination works, all 89 records accessible. Exposed data includes email, role, login metadata.
Affected Hosts: backend.cse.mrt.ac.lk
Target: wireme.projects.mrt.ac.lk
Public GitHub repo wathmal/wireme-dashboard contains hardcoded production credentials: MySQL (wireme:wireme321@wireme.projects.mrt.ac.lk), JWT secret (draobhsademeriw), and SendGrid API key (SG.7DvE...). Host resolves to 192.248.15.230 - credentials may still be valid.
See https://github.com/wathmal/wireme-dashboard/blob/771a390be41864d12e33623ba19d6a2830faf46e/src/server/config.js
Exploitation Notes: SendGrid key returns "authorization required" (revoked/invalid). MySQL port 3306 on wireme.projects.mrt.ac.lk filtered externally. MQTT port 1883 timed out (filtered). Credentials may work from internal network only.
Affected Hosts: wireme.projects.mrt.ac.lk
Target: cse.mrt.ac.lk
8 Google App Passwords for @cse.mrt.ac.lk student email accounts found in public GitHub repos. These provide direct SMTP/IMAP access to university Google Workspace accounts, bypassing 2FA. Affected accounts: chamika.21, trinith.22, rasula.20, nadunt.20, isurupramudith.20, thejanw.20, sahangunawardhana.21, sithika.21.
See evidence/github-secrets-deep.json for full list of repos and file paths
Affected Hosts: cse.mrt.ac.lk
Target: mrt.ac.lk
mrt.ac.lk has no DMARC record and uses SPF ~all (softfail). Any attacker can send emails as @mrt.ac.lk with no rejection.
dig +short TXT _dmarc.mrt.ac.lk # Returns empty
⚠️ DELIVERY UNCONFIRMED — DNS-only assessment
Exploitation Notes: DNS analysis confirms spoofability (SPF ~all, no valid DMARC). Wildcard TXT on *.mrt.ac.lk returns SPF content for _dmarc queries but this is NOT a valid DMARC record. Port 25 blocked - delivery unconfirmed.
Affected Hosts: mrt.ac.lk
Target: cse.mrt.ac.lk
cse.mrt.ac.lk has no DMARC record. Despite having DKIM via Google Workspace, without DMARC policy enforcement, spoofed emails will be delivered.
dig +short TXT _dmarc.cse.mrt.ac.lk # Returns empty
⚠️ DELIVERY UNCONFIRMED — DNS-only assessment
Exploitation Notes: DNS analysis confirms spoofability (SPF ~all, no valid DMARC). Wildcard TXT on *.mrt.ac.lk returns SPF content for _dmarc queries but this is NOT a valid DMARC record. Port 25 blocked - delivery unconfirmed.
Affected Hosts: cse.mrt.ac.lk
Target: auth.uom.ac.lk
University Keycloak at auth.uom.ac.lk (realm "uom") has ROPC (password grant) enabled on the public "admin-cli" client. This allows direct username/password authentication via the token endpoint without any client secret, bypassing UI-level protections (CAPTCHA, JavaScript challenges). No account lockout detected after rapid attempts. While user enumeration is not possible (generic error for all usernames), the brute-force surface is significant. 9 grant types enabled including implicit, device_code, token-exchange, and CIBA.
curl -s -X POST "https://auth.uom.ac.lk/realms/uom/protocol/openid-connect/token" -d "grant_type=password&client_id=admin-cli&username=TARGET&password=GUESS"
Evidence: admin-cli returns "Invalid user credentials" (not "Client not allowed") confirming ROPC is enabled. No lockout after 3 rapid attempts.
Exploitation Notes: ROPC confirmed on admin-cli. No user enumeration via error messages. No account lockout detected. 9 grant types enabled including dangerous ones (implicit, token-exchange, CIBA).
Affected Hosts: auth.uom.ac.lk, helpdesk.mrt.ac.lk
Target: admin.cse.mrt.ac.lk
The CSE department admin panel (Angular app titled "CSE C-PANEL") is accessible from any IP without network-level access control. While individual API endpoints require authentication, the admin interface itself exposes functionality details and login form.
curl -s https://admin.cse.mrt.ac.lk | grep "" # Returns "CSE C-PANEL"
Affected Hosts: admin.cse.mrt.ac.lk
Target: backend.cse.mrt.ac.lk
The changePassword endpoint (PUT users/resetPassword with task=UPDATE) does not require the current password - only the JWT token. If any session token is compromised (XSS, session fixation), an attacker can immediately change the password without knowing the original.
PUT https://backend.cse.mrt.ac.lk/users/resetPassword -d {email, token(JWT), password, task:UPDATE}
Affected Hosts: backend.cse.mrt.ac.lk
Target: idp.itum.mrt.ac.lk
The Shibboleth IDP runs on Tomcat 8.5.39 which is end-of-life and vulnerable to CVE-2020-1938 (Ghostcat) - AJP connector file read/include vulnerability. Exploitability depends on AJP port (8009) being accessible.
curl -sI https://idp.itum.mrt.ac.lk | grep Server # Apache/2.4.29 (Ubuntu) - Tomcat version from error pages
Affected Hosts: idp.itum.mrt.ac.lk
Target: projects.mrt.ac.lk
Additional database credentials found in public GitHub repos: PostgreSQL for dengai.projects.uom.lk (AWS EC2), CouchBase for iroads.projects.mrt.ac.lk, MongoDB Atlas connection string. Combined with the wireme MySQL creds (F13), 4 distinct database servers have exposed credentials.
See evidence/github-secrets-deep.json (GHS-003, GHS-004, GHS-013)
Affected Hosts: projects.mrt.ac.lk, dengai.projects.uom.lk, iroads.projects.mrt.ac.lk
Target: backend.cse.mrt.ac.lk
The backend Express API returns Access-Control-Allow-Origin: * for all requests. While this alone is not critical (no credentials allowed with wildcard), it means any website can read public API data including staff/news/research information.
curl -sI -H "Origin: https://evil.com" https://backend.cse.mrt.ac.lk/news | grep access-control
Affected Hosts: backend.cse.mrt.ac.lk
Target: idp.itum.mrt.ac.lk
The Shibboleth Identity Provider exposes full SAML metadata including 3 X.509 certificates (signing and encryption) at /idp/shibboleth. Running on EOL Apache 2.4.29 and Tomcat 8.5.39.
curl -s https://idp.itum.mrt.ac.lk/idp/shibboleth | grep -c X509Certificate
Affected Hosts: idp.itum.mrt.ac.lk
Target: wiki.cse.mrt.ac.lk
DokuWiki 2023-04-04a at wiki.cse.mrt.ac.lk. Anonymous raw page export works for all pages (leaked Huawei Lab server inventory - Intel Xeon Gold hardware). /doku.php?do=check publicly accessible revealing: conf dir writable, 128MB RAM, permission levels. Username "sunimal" disclosed via revision history. Backup config files exist (conf/local.php.bak, conf/users.auth.php.bak - return 403 not 404). authldap plugin confirms LDAP integration. HTTP-only (no TLS).
curl -s http://wiki.cse.mrt.ac.lk/doku.php?do=export_raw&id=staff:labs:huawei
Exploitation Notes: Enumerated accessible pages, confirmed anonymous export, discovered LDAP auth plugin, server hardware inventory leaked.
Affected Hosts: wiki.cse.mrt.ac.lk
Target: uom.lk
Drupal 9 at uom.lk exposes full PHP stack trace via /core/install.php, revealing webroot (/var/www/uom/), class names, module architecture (awe_builder), and internal file paths. Aids targeted exploitation.
curl -s https://uom.lk/core/install.php | grep placeholder
Exploitation Notes: Stack trace reveals webroot and module names but no direct exploitation path without further access
Affected Hosts: uom.lk
Target: wireme.projects.mrt.ac.lk
MQTT broker exposed on ports 1883 (TCP) and 8883 (WebSocket) at wireme.projects.mrt.ac.lk. Client code in GitHub shows credentials flow through client-side ResourceManager.
See https://github.com/wathmal/wireme-dashboard/blob/771a390be41864d12e33623ba19d6a2830faf46e/src/client/services/MQTTService.js
Affected Hosts: wireme.projects.mrt.ac.lk
Target: cse.mrt.ac.lk
Google App Password (kovv vimx qjpk xdzm) leaked in GitHub repo SahanChathura0730/Node.js_YT_Tutorial for email associated with sahangunawardhana.21@cse.mrt.ac.lk. Could enable sending phishing emails from a legitimate student account.
See https://github.com/SahanChathura0730/Node.js_YT_Tutorial/blob/.history/Video10_SendEmail/.env_20240716230857
Affected Hosts: cse.mrt.ac.lk
Target: cse.mrt.ac.lk
Session secret (JrFglAnbqZxzSVQ1bar2ZtXbMG8cRvgoi4JWBjXN7dQ) for Smart Campus Portal login service leaked in Group-1-SE/Smart-Campus-Management-backend. Service uses Google OAuth restricted to @cse.mrt.ac.lk - session forgery possible if env var not set.
See https://github.com/Group-1-SE/Smart-Campus-Management-backend/blob/155891c628eb7e43a3b45197afffa6fb59483564/app/login-service/main.py
Affected Hosts: cse.mrt.ac.lk
Target: online.uom.lk
Moodle API router (Slim Framework) at online.uom.lk exposes full PHP stack traces with internal file paths (/var/www/html/lib/...) on invalid routes. Debug error display enabled in production on Apache/2.4.62 (Rocky Linux) PHP 8.3.31.
curl -s https://online.uom.lk/r.php/invalid | grep -i trace
Exploitation Notes: Stack trace reveals internal paths but no direct exploitation without auth
Affected Hosts: online.uom.lk
Target: wiki.cse.mrt.ac.lk
DokuWiki at wiki.cse.mrt.ac.lk operates over HTTP only with no TLS available. Login credentials transit in cleartext. Combined with anonymous page export, this significantly increases risk.
curl -sI http://wiki.cse.mrt.ac.lk/doku.php?do=login | grep -i "http\|location"
Exploitation Notes: No HTTPS endpoint exists - all traffic is cleartext
Affected Hosts: wiki.cse.mrt.ac.lk
Target: dms.uom.lk
Nextcloud at dms.uom.lk allows unauthenticated user enumeration via /index.php/avatar/{username}/64. Returns 200 for existing users and 404 for non-existent. Confirmed user "admin" exists. Combined with LDAP integration and no rate limiting, enables targeted credential attacks.
curl -s -o /dev/null -w "%{http_code}" https://dms.uom.lk/index.php/avatar/admin/64 # Returns 200
Exploitation Notes: admin user confirmed to exist
Affected Hosts: dms.uom.lk
Target: auth.uom.ac.lk
Keycloak realm "uom" has 9 grant types enabled including deprecated/dangerous ones: implicit (token leakage via URL), device_code, token-exchange (impersonation), CIBA (push-based auth abuse), and client_credentials. Best practice is to enable only authorization_code with PKCE.
curl -s "https://auth.uom.ac.lk/realms/uom/.well-known/openid-configuration" | jq .grant_types_supported
Exploitation Notes: All grant types confirmed. device_code and CIBA not exploitable with "account" client but may work with other clients. Token-exchange availability increases impersonation risk.
Affected Hosts: auth.uom.ac.lk
Target: mrt.ac.lk
Hardcoded admin@mrt.ac.lk credentials alongside Firebase configuration found in a public GitHub repository. If these credentials are reused across university systems, they could provide administrative access.
See evidence/github-secrets-deep.json (GHS-015)
Affected Hosts: mrt.ac.lk
Target: cse.mrt.ac.lk
MEGA cloud storage credentials for a @cse.mrt.ac.lk student account found in public GitHub repo. Could contain university data, assignments, or personal files.
See evidence/github-secrets-deep.json (GHS-014)
Affected Hosts: cse.mrt.ac.lk
Target: backend.cse.mrt.ac.lk
Swagger UI is accessible at /api-docs/ revealing the API structure. While the spec paths are empty, the Swagger UI itself confirms the API framework and enables attackers to test endpoints directly.
curl -s https://backend.cse.mrt.ac.lk/api-docs/ | grep "Swagger UI"
Exploitation Notes: Swagger spec is empty - no additional routes discovered from it
Affected Hosts: backend.cse.mrt.ac.lk
In-scope: *.cse.mrt.ac.lk, *.mrt.ac.lk, associated GitHub repositories, email infrastructure (mrt.ac.lk, cse.mrt.ac.lk)
Discovered subdomains: 582 unique (from CT logs, DNS brute-force, SecurityTrails)
Live hosts confirmed: 17
curl, dig, nmap (port checks), Python scripting, GitHub API code search, JavaScript bundle decompilation, OAuth flow analysis, DNS security assessment