浏览器Fuzz技术

漏洞挖掘

  • 白盒挖掘

    代码审计
    自动化代码分析

  • 黑盒挖掘

    Fuzzing


两种Fuzzing技术

静态Fuzzing
  • 基于变异的

    • 文件、文档
    • 多媒体
    • bf3
  • 基于生成的

    • 浏览器
  • 重点是测试用例的生成

动态Fuzzing
  • Fuzzing框架

    • Grinder
  • Fuzzing工具

    • CrossFuzz
    • ndujaFuzz
    • NodeFuzz
    • X-Fuzzer
    • jsFunFuzz
  • 重点是测试用例的重建、Crash样本的捕获


怎么动手写Fuzzing工具

  • 1.搜集POC

  • 2.规范文档
    • W3C
    • MDN
    • MSDN
  • 3.目标
    • javascript
    • HTML
    • CSS

策略

数据VS关系
数据类型朝向VS逻辑朝向

代码路径覆盖率->浏览器状态覆盖率

  • DOM Tree状态
  • 渲染森林状态
  • 布局状态
  • 事件句柄状态
  • 多页面状态

规范标准

  • W3C
  • MDN
  • MSDN

最终的指导

  • HTML
  • CSS


逻辑元素->各个字典(见下)->规范标准和指导

  • 基础字典
  • property字典
  • 函数字典
  • Style字典

目标

UAF漏洞
构造->Fuzz->Free->Use
释放的节点->无引用


Traverse Node 横穿节点??

1.保存引用(id[idex])
2.DOM实现(document.all[index])

节点引用

1.caching
2.clearing tree node
3.递归清除子树


Get Property

1.动态获取

  • ProperTies
  • FuncTions
  • Events

2.缓存Caching

3.for...in

4.typeof

Fuzz Property

1.smart values->specification
2.random values->no dictionary

Fuzz Function

Functional programming + eval()


DOM Tree构造

  • Base DOM Tree
  • random nodes
  • 随机树生成算法
  • for loop
  • document.createElement
  • node.appendChild
  • Smarter structure
  • Form
  • Table
  • Map
  • List
  • Audio
  • Video
  • Svg

  • Network
  • XMLHttpRequest
  • WebSocket


Prelude

  • TextNode
  • Special nodes
    • Window
    • Document
    • Attribute
    • NamedNodeMap
  • Group
  • Range
  • Selection
  • NodeIterator
  • TreeWalker

  • Multiple Pages
  • Iframe
  • Window.open
  • Recursively nested iframes
  • Renderer process <=> Instance

  • Web Worker & SharedWorker
  • MulTple threads

  • Event handler
  • “ATM”

  • CSS
  • PseudoMclasses & pseudoMelements
  • Render forest

  • Initial properties
  • Start states


Fuzzing

  • DOM Node
  • ProperTes
  • Functions
  • Styles

  • Return value -> Fuzzing list

  • Fuzzing Values
  • Normal
  • Dirty
  • Random
  • Return

  • Force Layout
  • Node.offsetParent

  • Clear DOM SubTree
  • innerHTML
  • outerHTML
  • innerText
  • outerText

  • Clear whole DOM Tree
  • write
  • writeln
  • open
  • documentElement.innerHTML

  • DOM Tree Modify
  • appendChild
  • insertBefore
  • insertAdjacentElement
  • insertAdjacentHTML
  • insertAdjacentText
  • removeChild
  • replaceChild
  • cloneNode

  • Special node manipulate

  • Group manipulate
  • execCommand

  • Multiple pages
  • Mutual manipulate
  • Mutual clear

  • setTimeout
  • Disrupt the Tme sequence

  • Garbage Collect
  • Force IE Memory Protector to reclaim


####Finale

  • GC
  • Reuse all elements
  • Properties
  • Functions
  • Styles
  • Reuse group
  • Reuse special nodes
  • Reuse funcTon return values

Ditionary

通过准确性和完整性来判断字典的好坏。
字典->规范

  • 规范
  • Scripts(or grep + sed)
  • Manual

扩展性

  • 新东西
  • 地理位置
  • 客户端数据库
  • Canvas
  • Blobs
  • 语音合成

规范+智能的值=字典


评估一种Fuzz方法的好坏要看它的结果。

  • 漏洞
  • UAF
  • Double Free
  • OOB

  • Bug
  • 空指针引用
  • 栈上溢


Event Handle

  • Idea
  • Fuzzing:rendering engine ->some state
  • Set event handler: fuzzing and clear
  • Fuzzing: fire event
  • Kind of race condiTon

  • StateFuzzer
  • CFlatMarkupPointer UAF
  • CInput UAF
  • CFrameSetSite CTreeNode UAF (CVE-2014-1769)
  • CCaret Tracker UAF
  • CClipStack OOB Access (CVE-2014-1773)


Summary

Fuzzing = Programming + Specification reading + Vulnerabilities’ characteristic collecting + Ideas

Smashing The Browser:From Vulnerability Discovery To Exploit学习记录的更多相关文章

  1. elasticsearch Discovery 发现模块学习

    发现模块和集群的形成 目标 发现节点 Master选举 组成集群,在Master信息发生变化时及时更新. 故障检测 细分为几个子模块 Discovery发现模块 Discover是在集群Master节 ...

  2. (转)zookeeper学习记录--附browser

    转自:http://agapple.iteye.com/blog/1111377 背景 前段时间看了S4流计算引擎,里面使用到了zookeeper进行集群管理,所以也就花了点时间研究了下zookeep ...

  3. 一个浏览器Fuzzing框架的学习

    一个浏览器Fuzzing框架的学习 关于框架 之前是LCatro师傅在小密圈分享的他写的这个Fuzzing框架(不过我以前翻github时好像就看到过),但是之前一直没啥时间搞这方面,这两天研究学习了 ...

  4. Android linux kernel privilege escalation vulnerability and exploit (CVE-2014-4322)

    In this blog post we'll go over a Linux kernel privilege escalation vulnerability I discovered which ...

  5. Kingsoft Office Writer 2012 8.1.0.3385 - (.wps) Buffer Overflow Exploit (SEH)

    #!/usr/bin/python # Exploit Title: Kingsoft Office Writer v2012 8.1.0.3385 .wps Buffer Overflow Expl ...

  6. An iOS zero-click radio proximity exploit odyssey

    NOTE: This specific issue was fixed before the launch of Privacy-Preserving Contact Tracing in iOS 1 ...

  7. 自学Zabbix9.1 Network Discovery 网络发现原理

    点击返回:自学Zabbix之路 点击返回:自学Zabbix4.0之路 点击返回:自学zabbix集锦 自学Zabbix9.1 Network Discovery 网络发现原理 1. 网络发现简介 网络 ...

  8. (60)zabbix网络发现介绍Network Discovery

    网络发现简介 网络发现有什么用?网络发现怎么配置? 我们带着这两个问题开始我们的网络发现之旅. 比如小明有100台服务器,不想一台台主机去添加,能不能让zabbix自动添加主机呢,当然可以,网络发现便 ...

  9. Web Application Penetration Testing Local File Inclusion (LFI) Testing Techniques

    Web Application Penetration Testing Local File Inclusion (LFI) Testing Techniques Jan 04, 2017, Vers ...

随机推荐

  1. 2019 front-end web trending

    2019 front-end web trending https://github.com/kamranahmedse/developer-roadmap https://raw.githubuse ...

  2. requestMapping设置客户端访问地址

  3. contentInsetAdjustmentBehavior各个值之间的区别

    iOS11也出了不少时候了网上说适配的文章一大堆.关于contentInsetAdjustmentBehavior这个参数之间的区别,好像没什么人能说明.往下看的前提是你已经知道什么是安全区域,没看明 ...

  4. 【刷题】BZOJ 2194 快速傅立叶之二

    Description 请计算C[k]=sigma(a[i]*b[i-k]) 其中 k < = i < n ,并且有 n < = 10 ^ 5. a,b中的元素均为小于等于100的非 ...

  5. 界面编程之QT的基本介绍与使用20180722

    /*******************************************************************************************/ 一.qt介绍 ...

  6. REDIS 缓存的穿透,雪崩和热点key

    穿透 穿透:频繁查询一个不存在的数据,由于缓存不命中,每次都要查询持久层.从而失去缓存的意义. 解决办法:①用一个bitmap和n个hash函数做布隆过滤器过滤没有在缓存的键.   ②持久层查询不到就 ...

  7. kubernetes配置secret拉取私仓镜像

    2017.05.10 19:48* 字数 390 阅读 5216评论 0喜欢 8 对于公司内部的项目, 我们不可能使用公有开放的镜像仓库, 一般情况可能会花钱买docker私仓服务, 或者说自己在服务 ...

  8. linux命令总结free命令

    free 命令是什么 free 命令是一个显示系统中空闲和已用内存大小的工具.free 命令的输出和 top 命令相似.大多数Linux发行版已经含有 free 命令. 如何运行 free 想要运行, ...

  9. decimal, float 和double

    阿里的 Java 手册里写着: 6. [强制] 小数类型为 decimal,禁止使用 float 和 double. 说明:float 和 double 在存储的时候,存在精度损失的问题,很可能在值的 ...

  10. bzoj千题计划238:bzoj3668: [Noi2014]起床困难综合症

    http://www.lydsy.com/JudgeOnline/problem.php?id=3668 这..一位一位的来就好了呀 #include<cstdio> #include&l ...