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

怎样撰写企业网站建设方案黄村网站建设价格

怎样撰写企业网站建设方案,黄村网站建设价格,网站集群怎么做,专业制作网站服务公司拿DVWA的CSRF为例子 接DVWA的分析#xff0c;发现其实Impossible的PHPSESSID是设置的samesite1. 参数的意思参考Set-Cookie SameSite:控制 cookie 是否随跨站请求一起发送#xff0c;这样可以在一定程度上防范跨站请求伪造攻击#xff08;CSRF#xff09;。 下面用DVWA CS…拿DVWA的CSRF为例子 接DVWA的分析发现其实Impossible的PHPSESSID是设置的samesite1. 参数的意思参考Set-Cookie SameSite:控制 cookie 是否随跨站请求一起发送这样可以在一定程度上防范跨站请求伪造攻击CSRF。 下面用DVWA CSRF Low Level来分析下samsite的设置。 DVWA CSRF Cookie一共包含security和PHPSESSID这里讲下PHPSESSIDsession的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 cant 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 --bodyform actionhttp://192.168.20.156/DVWA/vulnerabilities/csrf/input typehidden namepassword#95;new value123 /input typehidden namepassword#95;conf value123 /input typehidden nameChange valueChange /input typesubmit valueSubmit request //formscripthistory.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.laogonggong.com/news/124210.html

相关文章:

  • 携程网站建设进度及实施过程淘宝网页版电脑版入口淘宝网
  • 西充县企业网站建设带产品列表 wordpress
  • 爱站官网网站建设优化服务行情
  • 服务器在国外未备案网站如何知道网站流量
  • 查询网站旗下域名做蛋白go分析网站
  • 高品质网站设计制作seo少女
  • php一个空间放多个网站金融行业做网站需要什么
  • 做做网站已更新网站建设项目的摘要
  • 评论回复网站怎么做做宠物店网站的素材
  • 海商网做网站价格网站建设与维护税率
  • 全国分类信息网站做app 的模板下载网站有哪些内容
  • 大兴高米店网站建设做网站开发需要什么
  • 山西做杂粮的网站佛山专业外贸网站建设
  • 网站建设项目团队组织结构图ps做游戏下载网站有哪些内容
  • 柳州哪里有网站建设网站数据统计工具
  • 成都微网站公司谁做彩票网站代理
  • 网站编程 mysql品牌网络推广方式
  • 武昌做网站报价做网站系统的销售怎么做
  • app网站推广平台做医疗护具网站
  • 高端网站设计元素图片上海企业网站建设价格
  • 网站页面链接结构经典企业网站欣赏
  • 想做个网站报价蔬菜价格怎么做seo西安
  • 中国物流网官方网站高校网站群建设方案
  • asp.net做织梦网站新闻发布平台有哪些
  • 网站后台管理系统cms网站中 点击出现登录框怎么做
  • 正规网站模板设计图广州手机网站建设价格
  • WordPress网站小程序网站首页锚文本
  • 网站上线 模板高级seo招聘
  • 网站制作器做外贸实用网站
  • 做面食专业网站杭州市建设住房保障局网站