博客
关于我
web安全的常见问题分析之点击劫持
阅读量:368 次
发布时间:2019-03-05

本文共 904 字,大约阅读时间需要 3 分钟。

点击劫持与防御技术

点击劫持(Clickjacking)

点击劫持是一种针对Web应用的安全威胁,攻击者通过隐藏一个透明的iframe,诱导用户在看不见的位置点击,导致隐藏的frame执行恶意操作。这种攻击通常用于窃取用户的信息或强制用户执行不安全的操作。

点击劫持攻击流程

  • 构建有吸引力的页面:攻击者创建一个富有互动性和吸引力的页面,诱导用户点击。
  • 嵌入目标页面:将受攻击页面嵌入到当前页面的iframe中。
  • 隐藏iframe:通过样式表将iframe设置为透明,覆盖在目标页面内容上。
  • 诱导点击:用户误以为点击页面内容,实际上触发了隐藏的frame中的操作。
  • 点击劫持防御方法

  • Frame Busting

    使用HTML5的<iframe>``sandbox属性或IE的security属性限制框架内的脚本执行,防止点击劫持攻击。
    示例代码:

    if (top.location != window.location) {    top.location = window.location;}
  • X-Frame-Options

    Microsoft提出的HTTP头字段,用于限制iframe加载的来源。支持的值包括:

    • DENY:禁止所有域加载。
    • SAMEORIGIN:仅允许同源域加载。
    • ALLOW-FROM:指定允许加载的域名。
      X-Frame-Options在IE8、Firefox3.6及Chrome4及以上浏览器得到充分支持。
  • SubRequest检测

    使用工具检测是否存在隐藏的iframe加载,确保网站安全性。

  • 安全扫描工具

  • Arachni

    Ruby开源漏洞扫描框架,支持多种攻击模式,包括CSRF、SQL注入、文件包含等。适合大型网站的渗透测试。

  • Mozilla HTTP Observatory

    Mozilla提供的安全分析工具,检查网站安全配置,评估HTTP头信息,涵盖CORS、CSP、HSTS等关键技术。

  • W3af

    Python开源Web应用扫描器,识别200多种漏洞,包括跨站脚本、SQL注入、命令执行等。

  • 通过以上方法,Web应用可以有效防御点击劫持攻击,确保用户数据和操作的安全性。

    转载地址:http://ukpg.baihongyu.com/

    你可能感兴趣的文章
    Nmap渗透测试指南之指纹识别与探测、伺机而动
    查看>>
    Nmap端口扫描工具Windows安装和命令大全(非常详细)零基础入门到精通,收藏这篇就够了
    查看>>
    NMAP网络扫描工具的安装与使用
    查看>>
    NMF(非负矩阵分解)
    查看>>
    nmon_x86_64_centos7工具如何使用
    查看>>
    NN&DL4.1 Deep L-layer neural network简介
    查看>>
    NN&DL4.3 Getting your matrix dimensions right
    查看>>
    NN&DL4.7 Parameters vs Hyperparameters
    查看>>
    NN&DL4.8 What does this have to do with the brain?
    查看>>
    nnU-Net 终极指南
    查看>>
    No 'Access-Control-Allow-Origin' header is present on the requested resource.
    查看>>
    NO 157 去掉禅道访问地址中的zentao
    查看>>
    no available service ‘default‘ found, please make sure registry config corre seata
    查看>>
    No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
    查看>>
    no connection could be made because the target machine actively refused it.问题解决
    查看>>
    No Datastore Session bound to thread, and configuration does not allow creation of non-transactional
    查看>>
    No fallbackFactory instance of type class com.ruoyi---SpringCloud Alibaba_若依微服务框架改造---工作笔记005
    查看>>
    No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalanc
    查看>>
    No mapping found for HTTP request with URI [/...] in DispatcherServlet with name ...的解决方法
    查看>>
    No mapping found for HTTP request with URI [/logout.do] in DispatcherServlet with name 'springmvc'
    查看>>