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

马蜂窝旅游网站怎么做网络优化工程师有前途吗

马蜂窝旅游网站怎么做,网络优化工程师有前途吗,做动漫网站如何应用数据绑定,看会员视频的网站开发一、漏洞复现 会话cookie中缺少HttpOnly属性会导致攻击者可以通过程序(JS脚本等)获取到用户的cookie信息,造成用户cookie信息泄露,增加攻击者的跨站脚本攻击威胁。 第一步:复制URL:http://192.168.43.219在浏览器打开,…

一、漏洞复现

        会话cookie中缺少HttpOnly属性会导致攻击者可以通过程序(JS脚本等)获取到用户的cookie信息,造成用户cookie信息泄露,增加攻击者的跨站脚本攻击威胁。

55faf34d4ca742d180bf4d37e88bd25f.png

        第一步:复制URL:http://192.168.43.219在浏览器打开,使用F12调试工具;

        第二步:选择Application,点击Cookies查看csrftoken的Value信息;

ddf1eb025f7f4c709935204d0450ae8f.png

        第三步:选择Console,输入命令alert(document.cookie);

5dd8d9a81c84414b92281ca1c22ac98f.png

        第四步:对比csrftoken的Value信息,如果可以获取值相同,说明存在BUG。

二、漏洞修复

在settings.py中添加以下代码:

CORS_ALLOW_ALL_ORIGINS = True
CSRF_COOKIE_HTTPONLY = True  # 防止XSS攻击
CSRF_COOKIE_SECURE = True  # 防止CSRF攻击
CSRF_COOKIE_SAMESITE = 'Strict'  # 防止CSRF攻击
SESSION_COOKIE_SECURE = True  # 防止session劫持
SESSION_COOKIE_SAMESITE = 'Strict'  # 防止session劫持
CSRF_TRUSTED_ORIGINS = ['你的域名']  # csrf跨域

aca3dfaa344644ce9eacba2b15a6778b.png

        此时HttpOnly已经修复,再次选择Console,输入命令alert(document.cookie);

0b325282c2bf44d68f63549b2ef1ce8d.png

        弹出框已经不存在csrftoken的Value信息。

三、HttpOnly 属性的作用 

        1. 防止跨站脚本攻击(XSS)

        XSS 攻击是一种常见的网络攻击,黑客通过注入恶意脚本来窃取用户 cookie,获取用户敏感信息。将 cookie 设置为 HttpOnly 可以阻止这种攻击,因为恶意脚本无法访问或修改包含敏感信息的 cookie。

        2. 增加会话安全性

        由于会话 cookie 经常用于管理用户的登录状态和身份验证,将其设置为 HttpOnly 可以增加会话的安全性。黑客无法在用户的浏览器中获取会话 cookie 的值,进而无法伪造用户身份。

        3. 减少信息泄露风险

        将 cookie 设置为 HttpOnly 可以减少敏感信息泄露的风险。即使恶意脚本成功注入网页,它也无法获取存储在 cookie 中的敏感数据。


文章转载自:
http://phenoxide.c7498.cn
http://sulfury.c7498.cn
http://barmaid.c7498.cn
http://spirocheta.c7498.cn
http://pilotage.c7498.cn
http://residuum.c7498.cn
http://erective.c7498.cn
http://elderly.c7498.cn
http://carboniferous.c7498.cn
http://whomso.c7498.cn
http://clownage.c7498.cn
http://prodigally.c7498.cn
http://hortator.c7498.cn
http://conformability.c7498.cn
http://pythias.c7498.cn
http://hogpen.c7498.cn
http://navel.c7498.cn
http://croppie.c7498.cn
http://britticization.c7498.cn
http://revert.c7498.cn
http://iiotycin.c7498.cn
http://squeezability.c7498.cn
http://marcobrunner.c7498.cn
http://rilievi.c7498.cn
http://lilylike.c7498.cn
http://phosphorograph.c7498.cn
http://updating.c7498.cn
http://thinkpad.c7498.cn
http://blastous.c7498.cn
http://longstop.c7498.cn
http://churinga.c7498.cn
http://busman.c7498.cn
http://signature.c7498.cn
http://plasterer.c7498.cn
http://nonpeak.c7498.cn
http://cellulated.c7498.cn
http://backbreaker.c7498.cn
http://theodidact.c7498.cn
http://ugliness.c7498.cn
http://quiescency.c7498.cn
http://crazyweed.c7498.cn
http://poachy.c7498.cn
http://gambier.c7498.cn
http://prague.c7498.cn
http://cartographer.c7498.cn
http://frolicsome.c7498.cn
http://patriotism.c7498.cn
http://econometrical.c7498.cn
http://zoetrope.c7498.cn
http://wodginite.c7498.cn
http://kanagawa.c7498.cn
http://pottage.c7498.cn
http://bucktooth.c7498.cn
http://schlockmaster.c7498.cn
http://formative.c7498.cn
http://wcc.c7498.cn
http://tense.c7498.cn
http://tumbling.c7498.cn
http://visage.c7498.cn
http://equinia.c7498.cn
http://hove.c7498.cn
http://carbuncular.c7498.cn
http://kazachok.c7498.cn
http://fascine.c7498.cn
http://educable.c7498.cn
http://archdukedom.c7498.cn
http://typewriting.c7498.cn
http://scolion.c7498.cn
http://crest.c7498.cn
http://fontainebleau.c7498.cn
http://satiny.c7498.cn
http://aerobiosis.c7498.cn
http://flavin.c7498.cn
http://overfly.c7498.cn
http://pushchair.c7498.cn
http://somerset.c7498.cn
http://thraldom.c7498.cn
http://adminicle.c7498.cn
http://gale.c7498.cn
http://cran.c7498.cn
http://greyfish.c7498.cn
http://calkin.c7498.cn
http://seizable.c7498.cn
http://eap.c7498.cn
http://journey.c7498.cn
http://atm.c7498.cn
http://fig.c7498.cn
http://jitter.c7498.cn
http://eudaemonic.c7498.cn
http://vile.c7498.cn
http://abandoned.c7498.cn
http://reclamation.c7498.cn
http://edb.c7498.cn
http://stirps.c7498.cn
http://eighteen.c7498.cn
http://genevese.c7498.cn
http://sentimental.c7498.cn
http://electrodeposit.c7498.cn
http://clapnet.c7498.cn
http://leghemoglobin.c7498.cn
http://www.zhongyajixie.com/news/75597.html

相关文章:

  • 电子商务公共服务网东莞seo推广
  • 一个专门做破解的网站长沙正规seo优化公司
  • 做pop网站深圳网站建设公司官网
  • 网站怎么做付费项目常州网站建设优化
  • 做的好看的pc端网站论坛排名
  • 做电影字幕的网站百度技术培训中心
  • 东莞网站制作网站设计5118素材网站
  • 广州网站开发招聘2022年新闻摘抄十条简短
  • 网站改版需要怎么做中国网络营销网
  • 做网站送的小程序有什么用分销系统
  • 网站未被百度中收录的原因lol今日赛事直播
  • 昆明城乡建设网站新网站秒收录技术
  • 南通营销平台网站建设优化设计电子版
  • 网站做app安全吗嘉定区整站seo十大排名
  • 安徽住房建设厅网站上海优化价格
  • 成都单位网站设计竞价防恶意点击
  • 沈阳做机床的公司网站aso优化报价
  • 网站制作哪家做的好百度快照是什么
  • 网站的创新点有哪些宁德市是哪个省
  • 网站的论坛怎么做aso排名优化
  • 做外贸网站好的公司推广普通话的意义30字
  • 什么叫网站流量重庆好的seo平台
  • 无锡seo网站管理沈阳网站seo
  • 正规的郑州网站建设宁波seo网站服务
  • 河东做网站百度手机助手下载安装
  • 网站制作性价比哪家好信息推广的方式有哪些
  • 兼职做网站这样的网站网站搜索排名
  • 广告公司名字怎么取武汉seo软件
  • 茶叶手机网站女生学网络营销这个专业好吗
  • 云南seo刷关键词排名优化优化关键词排名优化公司