当前位置: 首页 > news >正文

dedecms 获取网站地址seo网站自动推广

dedecms 获取网站地址,seo网站自动推广,辽宁同鑫建设有限公司网站,疫情防控新闻发布会拿DVWA的CSRF为例子 接DVWA的分析,发现其实Impossible的PHPSESSID是设置的samesite1. 参数的意思参考Set-Cookie SameSite:控制 cookie 是否随跨站请求一起发送,这样可以在一定程度上防范跨站请求伪造攻击(CSRF)。 下面用DVWA CS…

拿DVWA的CSRF为例子
接DVWA的分析,发现其实Impossible的PHPSESSID是设置的samesite=1.
参数的意思参考Set-Cookie

SameSite:控制 cookie 是否随跨站请求一起发送,这样可以在一定程度上防范跨站请求伪造攻击(CSRF)。
下面用DVWA CSRF Low Level来分析下samsite的设置。

DVWA CSRF

Cookie一共包含security和PHPSESSID,这里讲下PHPSESSID(session的cookie)。
在dvwaPage.inc.php中,dvwa_start_session()函数先通过dvwaSecurityLevelGet()函数获得security_level。
之后如果security_level为impossible,则samesite设置为Strict。否则为None(跨站携带cookie)。不同设置的详细解释在Cookie 的 SameSite 属性
最后通过session_set_cookie_params设置session 的cookie。

function dvwa_start_session() {// This will setup the session cookie based on// the security level.$security_level = dvwaSecurityLevelGet();if ($security_level == 'impossible') {$httponly = true;$samesite = "Strict";}else {$httponly = false;$samesite = "";}$maxlifetime = 86400;$secure = false;$domain = parse_url($_SERVER['HTTP_HOST'], PHP_URL_HOST);/** Need to do this as you can't update the settings of a session* while it is open. So check if one is open, close it if needed* then update the values and start it again.*/if (session_id()) {session_write_close();}session_set_cookie_params(['lifetime' => $maxlifetime,'path' => '/','domain' => $domain,'secure' => $secure,'httponly' => $httponly,'samesite' => $samesite]);session_start();// This is the call that will force a new Set-Cookie header with the right flagssession_regenerate_id();
}
function dvwaSecurityLevelGet() {global $_DVWA;// If there is a security cookie, that takes priority.if (isset($_COOKIE['security'])) {return $_COOKIE[ 'security' ];}// If not, check to see if authentication is disabled, if it is, use// the default security level.if (in_array("disable_authentication", $_DVWA) && $_DVWA['disable_authentication']) {return $_DVWA[ 'default_security_level' ];}// Worse case, set the level to impossible.return 'impossible';
}

与之前在DVWA SCRF的利用不同,因为samesite是跨站设置。所以先用burp抓个包,生成csrf的html,放在kali中。
kali中用python开启简单http服务,在用浏览器去请求kali网站的html,模拟跨站攻击。

<html><!-- CSRF PoC - generated by Burp Suite Professional --><body><form action="http://192.168.20.156/DVWA/vulnerabilities/csrf/"><input type="hidden" name="password&#95;new" value="123" /><input type="hidden" name="password&#95;conf" value="123" /><input type="hidden" name="Change" value="Change" /><input type="submit" value="Submit request" /></form><script>history.pushState('', '', '/');document.forms[0].submit();</script></body>
</html>

现在这个源码,可以在CSRF Low Level界面,产生漏洞,修改密码。
此时浏览器Cookie中PHPSESSID的samestie为None。
在这里插入图片描述
之后将红框位置改为Lax
在这里插入图片描述
看下Lax的解释,我们的表单是Get方式提交的,所以设置了Lax,应该还是可以实现CSRF攻击的
在这里插入图片描述
验证CSRF漏洞,发现PHPSESSID的samesite为Lax,并且漏洞还是存在的。
在这里插入图片描述
最后我们把samesite设置为Strict,再次进行验证,发现无法修改密码。
在这里插入图片描述
用burp抓包分析发现,请求修改密码包Cookie中并没有PHPSESSID
在这里插入图片描述
PHPSESSID中samesite设置为Strict。
在这里插入图片描述

http://www.hkea.cn/news/640514/

相关文章:

  • 比汉斯设计网站素材图片搜索识图入口
  • php网站架设教程英雄联盟韩国
  • 做毕设好的网站百度客服电话24小时
  • 上海手机网站建设电话咨询seo综合查询系统
  • wordpress 4.6 中文版沈阳seo
  • 文件管理软件天津搜索引擎优化
  • 九亭网站建设全国疫情高峰时间表最新
  • 青岛网站建设公司武汉seo收费
  • mvc网站建设的实验报告怎么做优化
  • 有官网建手机网站千锋教育培训多少钱费用
  • b2c交易模式的网站有哪些百度营销客户端
  • flash 学习网站重庆网站seo多少钱
  • 年终总结ppt模板免费下载网站小红书seo排名规则
  • 自己架设网站口碑营销的产品有哪些
  • 湖北省网站备案最快几天天津百度推广排名优化
  • app在线开发制作平台seo网络优化前景怎么样
  • 商务网站的基本情况网站建设工作总结
  • 山西建设厅网站网络销售怎么聊客户
  • 软装素材网站有哪些seo网络排名优化哪家好
  • 邯郸市做网站建设网络口碑营销案例分析
  • 罗湖网站建设联系电话西安核心关键词排名
  • 如何编写网站电脑清理软件十大排名
  • 怎么给企业制作网站seo关键词排名优化哪好
  • 高仿服装网站建设西安百度关键词推广
  • 网站单页面怎么做的百度seo站长工具
  • 网站建设谢辞企业营销型网站有哪些
  • 免费网站制作申请行业关键词一览表
  • 网站建设费关键词排名提高方法
  • 搭建淘宝客网站源码最近发生的新闻事件
  • 网站模版网网站关键词排名优化价格