搜索
人大经济论坛 附件下载

附件下载

所在主题:
文件名:  Michal Zalewski-The Tangled Web_ A Guide to Securing Modern Web Applications -N.pdf
资料下载链接地址: https://bbs.pinggu.org/a-1781793.html
附件大小:
The Tangled Web: A Guide to Securing Modern Web Applications
《Web之困:现代Web应用安全指南》


Thorough and comprehensive coverage from one of the foremost experts in browser security. --Tavis Ormandy, Google Inc.Modern web applications are built on a tangle of technologies that have been developed over time and then haphazardly pieced together. Every piece of the web application stack, from HTTP requests to browser-side scripts, comes with important yet subtle security consequences. To keep users safe, it is essential for developers to confidently navigate this landscape.In The Tangled Web, Michal Zalewski, one of the world's top browser security experts, offers a compelling narrative that explains exactly how browsers work and why they're fundamentally insecure. Rather than dispense simplistic advice on vulnerabilities, Zalewski examines the entire browser security model, revealing weak points and providing crucial information for shoring up web application security. You'll learn how to: Perform common but surprisingly complex tasks such as URL parsing and HTML sanitization Use modern security features like Strict Transport Security, Content Security Policy, and Cross-Origin Resource Sharing Leverage many variants of the same-origin policy to safely compartmentalize complex web applications and protect user credentials in case of XSS bugs Build mashups and embed gadgets without getting stung by the tricky frame navigation policy Embed or host user-supplied content without running into the trap of content sniffing For quick reference, "Security Engineering Cheat Sheets" at the end of each chapter offer ready solutions to problems you're most likely to encounter. With coverage extending as far as planned HTML5 features, The Tangled Web will help you create secure web applications that stand the test of time.
《Web之困:现代Web应用安全指南》在Web安全领域有“圣经”的美誉,在世界范围内被安全工作者和Web从业人员广为称道,由来自Google Chrome浏览器团队的世界顶级黑客、国际一流安全专家撰写,是目前唯一深度探索现代Web浏览器安全技术的专著。本书从浏览器设计的角度切入,以探讨浏览器的各主要特性和由此衍生出来的各种安全相关问题为主线,深入剖析了现代Web浏览器的技术原理、安全机制和设计上的安全缺陷,为Web安全工作者和开发工程师们应对各种基于浏览器的安全隐患提供了应对措施。《Web之困:现代Web应用安全指南》开篇回顾了Web的发展历程和安全风险的演化;第一部分解剖了现代浏览器的工作原理,包括URL、HTTP协议、HTML语言、CSS、文档格式、浏览器插件等内容;第二部分从浏览器的设计角度深入分析了各种现代Web浏览器(Firefox、Chrome、IE等)所引入的重点安全机制,例如同源策略、源的继承、窗口和框架的交互、安全边界、内容识别、应对恶意脚本、外围的网站特权等,并分析了这些机制存在的安全缺陷,同时为Web应用开发者提供了如何避免攻击和隐私泄露的应对措施;第三部分对浏览器安全机制的未来趋势进行了展望,包括新的浏览器特性与安全展望、其他值得注意的浏览器、常见的Web安全漏洞等。
英文全本,中文样章试读
[hide]


[/hide]

Table of contents :
Preface......Page 19
Acknowledgments......Page 21
Information Security in a Nutshell......Page 23
Flirting with Formal Solutions......Page 24
Enter Risk Management......Page 26
Enlightenment Through Taxonomy......Page 28
Toward Practical Approaches......Page 29
Tales of the Stone Age: 1945 to 1994......Page 30
The First Browser Wars: 1995 to 1999......Page 32
The Boring Period: 2000 to 2003......Page 33
Web 2.0 and the Second Browser Wars: 2004 and Beyond......Page 34
The User as a Security Flaw......Page 36
Nonconvergence of Visions......Page 37
Cross-Browser Interactions: Synergy in Failure......Page 38
The Breakdown of the Client-Server Divide......Page 39
Global browser market share, May 2011......Page 41
PART I: Anatomy of the Web ......Page 43
2: It Starts with a URL ......Page 45
Scheme Name......Page 46
Indicator of a Hierarchical URL......Page 47
Server Address......Page 48
Hierarchical File Path......Page 49
Fragment ID......Page 50
Putting It All Together Again......Page 51
Reserved Characters and Percent Encoding......Page 53
Handling of Non-US-ASCII Text......Page 54
Protocols Claimed by Third-Party Applications and Plug-ins......Page 58
Encapsulating Pseudo-Protocols......Page 59
Resolution of Relative URLs......Page 60
When Decoding Parameters Received Through URLs......Page 62
3: Hypertext Transfer Protocol ......Page 63
Basic Syntax of HTTP Traffic......Page 64
The Consequences of Supporting HTTP/0.9......Page 66
Newline Handling Quirks......Page 67
Proxy Requests......Page 68
Resolution of Duplicate or Conflicting Headers......Page 69
Semicolon-Delimited Header Values......Page 70
Header Character Set and Encoding Schemes......Page 71
Referer Header Behavior......Page 73
POST......Page 74
TRACE......Page 75
200-299: Success......Page 76
400-499: Client-Side Error......Page 77
Keepalive Sessions......Page 78
Chunked Data Transfers......Page 79
Caching Behavior......Page 80
HTTP Cookie Semantics......Page 82
HTTP Authentication......Page 84
Protocol-Level Encryption and Client Certificates......Page 86
Error-Handling Rules......Page 87
When Constructing Other Types of User-Controlled Requests or Responses......Page 89
4: Hypertext Markup Language ......Page 91
Basic Concepts Behind HTML Documents......Page 92
Document Parsing Modes......Page 93
The Battle over Semantics......Page 94
Understanding HTML Parser Behavior......Page 95
Interactions Between Multiple Tags......Page 96
Explicit and Implicit Conditionals......Page 97
Entity Encoding......Page 98
HTTP/HTML Integration Semantics......Page 100
Plain Links......Page 101
Forms and Form-Triggered Requests......Page 102
Type-Specific Content Inclusion......Page 104
A Note on Cross-Site Request Forgery......Page 106
When Converting HTML to Plaintext......Page 107
When Writing a Markup Filter for User Content......Page 108
5: Cascading Style Sheets ......Page 109
Basic CSS Syntax......Page 110
@ Directives and XBL Bindings......Page 111
Parser Resynchronization Risks......Page 112
Character Encoding......Page 113
When Allowing User-Specified Class Values on HTML Markup......Page 115
6: Browser-Side Scripts ......Page 117
Basic Characteristics of JavaScript......Page 118
Script Processing Model......Page 119
Execution Ordering Control......Page 122
Code and Object Inspection Capabilities......Page 123
Modifying the Runtime Environment......Page 124
JavaScript Object Notation and Other Data Serializations......Page 126
E4X and Other Syntax Extensions......Page 128
Standard Object Hierarchy......Page 129
The Document Object Model......Page 131
Access to Other Documents......Page 133
Script Character Encoding......Page 134
Code Inclusion Modes and Nesting Risks......Page 135
The Living Dead: Visual Basic......Page 136
When Interacting with Browser Objects on the Client Side......Page 137
If You Want to Allow User-Controlled Scripts on Your Page......Page 138
Plaintext Files......Page 139
Bitmap Images......Page 140
XML-Based Documents......Page 141
Generic XML View......Page 142
Scalable Vector Graphics......Page 143
XML User Interface Language......Page 144
RSS and Atom Feeds......Page 145
A Note on Nonrenderable File Types......Page 146
On All Non-HTML Document Types......Page 147
8: Content Rendering with Browser Plug-ins ......Page 149
Invoking a Plug-in......Page 150
The Perils of Plug-in Content-Type Handling......Page 151
Document Rendering Helpers......Page 152
Plug-in-Based Application Frameworks......Page 153
Adobe Flash......Page 154
Sun Java......Page 156
XML Browser Applications (XBAP)......Page 157
ActiveX Controls......Page 158
Living with Other Plug-ins......Page 159
If You Want to Write a New Browser Plug-in or ActiveX Component......Page 160
PART II: Browser Security Features ......Page 161
9: Content Isolation Logic ......Page 163
Same-Origin Policy for the Document Object Model......Page 164
document.domain......Page 165
postMessage(...)......Page 166
Interactions with Browser Credentials......Page 167
Same-Origin Policy for XMLHttpRequest......Page 168
Same-Origin Policy for Web Storage......Page 170
Security Policy for Cookies......Page 171
Impact of Cookies on the Same-Origin Policy......Page 172
Problems with Domain Restrictions......Page 173
The Unusual Danger of “localhost”......Page 174
Plug-in Security Rules......Page 175
Adobe Flash......Page 176
Java......Page 179
IP Addresses......Page 180
Local Files......Page 181
Other Uses of Origins......Page 183
When Embedding Plug-in-Handled Active Content from Third Parties......Page 184
When Writing Browser Extensions......Page 185
10: Origin Inheritance ......Page 187
Origin Inheritance for about:blank......Page 188
Inheritance for data: URLs......Page 189
Inheritance for javascript: and vbscript: URLs......Page 191
A Note on Restricted Pseudo-URLs......Page 192
Security Engineering Cheat Sheet......Page 194
11: Life Outside Same-Origin Rules ......Page 195
Changing the Location of Existing Documents......Page 196
Unsolicited Framing......Page 200
Cross-Domain Content Inclusion......Page 203
A Note on Cross-Origin Subresources......Page 205
Privacy-Related Side Channels......Page 206
Other SOP Loopholes and Their Uses......Page 207
When Arranging Cross-Domain Communications in JavaScript......Page 208
12: Other Security Boundaries ......Page 209
Navigation to Sensitive Schemes......Page 210
Access to Internal Networks......Page 211
Prohibited Ports......Page 212
Limitations on Third-Party Cookies......Page 214
When Using Third-Party Cookies for Gadgets or Sandboxed Content......Page 217
13: Content Recognition Mechanisms ......Page 219
Document Type Detection Logic......Page 220
Malformed MIME Types......Page 221
Special Content-Type Values......Page 222
Unrecognized Content Type......Page 224
Defensive Uses of Content-Disposition......Page 225
Content Directives on Subresources......Page 226
Downloaded Files and Other Non-HTTP Content......Page 227
Character Set Handling......Page 228
Byte Order Marks......Page 230
Markup-Controlled Charset on Subresources......Page 231
Detection for Non-HTTP Files......Page 232
When Hosting User-Generated Files......Page 234
14: Dealing with Rogue Scripts......Page 235
Denial-of-Service Attacks......Page 236
Execution Time and Memory Use Restrictions......Page 237
Connection Limits......Page 238
Pop-Up Filtering......Page 239
Dialog Use Restrictions......Page 240
Window-Positioning and Appearance Problems......Page 241
Timing Attacks on User Interfaces......Page 244
When Building Security-Sensitive UIs......Page 246
15: Extrinsic Site Privileges ......Page 247
Browser- and Plug-in-Managed Site Permissions......Page 248
Form-Based Password Managers......Page 249
Internet Explorer’s Zone Model......Page 251
Mark of the Web and Zone.Identifier......Page 253
When Writing Plug-ins or Extensions That Recognize Privileged Origins......Page 254
PART III: A Glimpse of Things to Come ......Page 255
16: New and Upcoming Security Features ......Page 257
Cross-Domain Requests......Page 258
XDomainRequest......Page 261
Other Uses of the Origin Header......Page 262
Security Model Restriction Frameworks......Page 263
Content Security Policy......Page 264
Sandboxed Frames......Page 267
Strict Transport Security......Page 270
Private Browsing Modes......Page 271
In-Browser HTML Sanitizers......Page 272
XSS Filtering......Page 273
Security Engineering Cheat Sheet......Page 275
17: Other Browser Mechanisms of Note ......Page 277
URL- and Protocol-Level Proposals......Page 278
Content-Level Features......Page 280
I/O Interfaces......Page 281
18: Common Web Vulnerabilities ......Page 283
Vulnerabilities Specific to Web Applications......Page 284
Problems to Keep in Mind in Web Application Design......Page 285
Common Problems Unique to Server-Side Code......Page 287
Epilogue......Page 289
Notes ......Page 291
Index ......Page 305


本书目录:
译者序
前言
第1章Web应用安全
1.1信息安全速览
1.1.1正统之道的尴尬
1.1.2进入风险管理
1.1.3分类学的启发
1.1.4实际的解决之道
1.2Web的简明历史
1.2.1史前时期的故事: 1945~1994年
1.2.2第一次浏览器大战:1995~1999年
1.2.3平淡期:2000~2003年
1.2.4Web 2.0 和第二次浏览器大战:2004年之后
1.3风险的演化
1.3.1用户作为安全风险的一个环节
1.3.2难以隔离的Web运行环境
1.3.3缺乏统一的格局
1.3.4跨浏览器交互:失败的协同
1.3.5客户端和服务器端界限的日益模糊
第一部分对Web的解剖分析
第2章一切从URL开始
2.1URL的结构
2.1.1协议名称
2.1.2层级URL的标记符号
2.1.3访问资源的身份验证
2.1.4服务器地址
2.1.5服务器端口
2.1.6层级的文件路径
2.1.7查询字符串
2.1.8片段ID
2.1.9把所有的东西整合起来
2.2保留字符和百分号编码
2.3常见的 URL协议及功能
2.3.1浏览器本身支持、与获取文档相关的协议
2.3.2由第三方应用和插件支持的协议
2.3.3未封装的伪协议
2.3.4封装过的伪协议
2.3.5关于协议检测部分的结语
2.4相对URL的解析
2.5安全工程速查表
第3章HTTP协议
3.1HTTP 基本语法
3.1.1支持HTTP0.9的恶果
3.1.2换行处理带来的各种混乱
3.1.3经过代理的HTTP请求
3.1.4对重复或有冲突的头域的解析
3.1.5以分号作分隔符的头域值
3.1.6头域里的字符集和编码策略
3.1.7Referer头域的表现
3.2HTTP 请求类型
3.2.1GET
3.2.2POST
3.2.3HEAD
3.2.4OPTIONS
3.2.5PUT
3.2.6DELETE
3.2.7TRACE
3.2.8CONNECT
3.2.9其他 HTTP 方法
3.3服务器响应代码
3.4持续会话
3.5分段数据传输
3.6缓存机制
3.7HTTP Cookie 语义
3.8HTTP 认证
3.9协议级别的加密和客户端证书
3.9.1扩展验证型证书
3.9.2出错处理的规则
3.10安全工程速查表
第4章HTML语言
4.1HTML文档背后的基本概念
4.1.1文档解析模式
4.1.2语义之争
4.2理解HTML解析器的行为
4.2.1多重标签之间的交互
4.2.2显式和隐式的条件判断
4.2.3HTML解析的生存建议
4.3HTML实体编码
4.4HTTPHTML 交互语义
4.5超链接和内容包含
4.5.1单纯的链接
4.5.2表单和表单触发的请求
4.5.3框架
4.5.4特定类型的内容包含
4.5.5关于跨站请求伪造
4.6安全工程速查表
第5章层叠样式表
5.1CSS基本语法
5.1.1属性定义
5.1.2@ 指令和XBL绑定
5.1.3与HTML的交互
5.2重新同步的风险
5.3字符编码
5.4安全工程速查表
第6章浏览器端脚本
6.1JavaScript的基本特点
6.1.1脚本处理模型
6.1.2执行顺序的控制
6.1.3代码和对象检视功能
6.1.4修改运行环境
6.1.5JavaScript 对象表示法(JSON)和其他数据序列化
6.1.6E4X和其他语法扩展
6.2标准对象层级
6.2.1文档对象模型
6.2.2对其他文档的访问
6.3脚本字符编码
6.4代码包含模式和嵌入风险
6.5活死人:Visual Basic
6.6安全工程速查表
第7章非HTML类型文档
7.1纯文本文件
7.2位图图片
7.3音频与视频
7.4各种XML文件
7.4.1常规XML视图效果
7.4.2可缩放向量图片
7.4.3数学标记语言
7.4.4XML用户界面语言
7.4.5无线标记语言
7.4.6RSS 和 Atom订阅源
7.5关于不可显示的文件类型
7.6安全工程速查表
第8章浏览器插件产生的内容
8.1对插件的调用
8.2文档显示帮助程序
8.3插件的各种应用框架
8.3.1Adobe Flash
8.3.2Microsoft Silverlight
8.3.3Sun Java
8.3.4XML Browser Applications
8.4ActiveX Controls
8.5其他插件的情况
8.6安全工程速查表
第二部分浏览器安全特性
第9章内容隔离逻辑
9.1DOM的同源策略
9.1.1document.domain
9.1.2postMessage(...)
9.1.3与浏览器身份验证的交互
9.2XMLHttpRequest的同源策略
9.3Web Storage 的同源策略
9.4Cookies 的安全策略
9.4.1Cookie对同源策略的影响
9.4.2域名限制带来的问题
9.4.3localhost带来的非一般风险
9.4.4Cookie与"合法"DNS劫持
9.5插件的安全规则
9.5.1Adobe Flash
9.5.2Microsoft Silverlight
9.5.3Java
9.6如何处理格式含糊或意想不到的源信息
9.6.1IP 地址
9.6.2主机名里有额外的点号
9.6.3不完整的主机名
9.6.4本地文件
9.6.5伪URL
9.6.6浏览器扩展和用户界面
9.7源的其他应用
9.8安全工程速查表
第10章源的继承
10.1about:blank页面的源继承
10.2data: URL的继承
10.3javascript:和vbscript: URL对源的继承
10.4关于受限伪URL的一些补充
10.5安全工程速查表
第11章同源策略之外的世界
11.1窗口和框架的交互
11.1.1改变现有页面的地址
11.1.2不请自来的框架
11.2跨域内容包含
11.3与隐私相关的副作用
11.4其他的同源漏洞和应用
11.5安全工程速查表
第12章其他的安全边界
12.1跳转到敏感协议
12.2访问内部网络
12.3禁用的端口
12.4对第三方Cookie的限制
12.5安全工程速查表
第13章内容识别机制
13.1文档类型检测的逻辑
13.1.1格式错误的MIME Type写法
13.1.2特殊的 Content-Type 值
13.1.3无法识别的Content Type类型
13.1.4防御性使用Content-Disposition
13.1.5子资源的内容设置
13.1.6文件下载和其他非HTTP内容
13.2字符集处理
13.2.1字节顺序标记
13.2.2字符集继承和覆盖
13.2.3通过HTML代码设置子资源字符集
13.2.4非HTTP 文件的编码检测
13.3安全工程速查表
第14章应对恶意脚本
14.1拒绝服务攻击
14.1.1执行时间和内存使用的限制
14.1.2连接限制
14.1.3过滤弹出窗口
14.1.4对话框的使用限制
14.2窗口定位和外观问题
14.3用户界面的时差攻击
14.4安全工程速查表
第15章外围的网站特权
15.1浏览器和托管插件的站点权限
15.2表单密码管理
15.3IE浏览器的区域模型
15.4安全工程速查表
第三部分浏览器安全机制的未来趋势
第16章新的浏览器安全特性与未来展望
16.1安全模型扩展框架
16.1.1跨域请求
16.1.2XDomainRequest
16.1.3Origin 请求头的其他应用
16.2安全模型限制框架
16.2.1内容安全策略
16.2.2沙盒框架
16.2.3严格传输安全
16.2.4隐私浏览模式
16.3其他的一些进展
16.3.1浏览器内置的 HTML净化器
16.3.2XSS 过滤
16.4安全工程速查表
第17章其他值得注意的浏览器机制
17.1URL级别和协议级别的提议
17.2内容相关的特性
17.3IO接口
第18章常见的Web安全漏洞
18.1与Web应用相关的漏洞
18.2Web应用设计时应谨记的问题
18.3服务器端的常见问题
后记
注释




    熟悉论坛请点击新手指南
下载说明
1、论坛支持迅雷和网际快车等p2p多线程软件下载,请在上面选择下载通道单击右健下载即可。
2、论坛会定期自动批量更新下载地址,所以请不要浪费时间盗链论坛资源,盗链地址会很快失效。
3、本站为非盈利性质的学术交流网站,鼓励和保护原创作品,拒绝未经版权人许可的上传行为。本站如接到版权人发出的合格侵权通知,将积极的采取必要措施;同时,本站也将在技术手段和能力范围内,履行版权保护的注意义务。
(如有侵权,欢迎举报)
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

GMT+8, 2025-12-30 13:06