A Guide to Securing Modern Web Applications
Michal Zalewski

#Web
#Web_Applications
#browser
#security
#URL
#HTML
#HTTP
🧠 «پوشش عمیق و جامع از یکی از برجستهترین متخصصهای امنیت مرورگر.»
— تِیویس اورماندی، گوگل (Google Inc.)
⚙️ این کتاب نوشتهی میشال زالفسکی یکی از برجستهترین متخصصهای امنیت مرورگره و از دید یکی از منتقدها، «یکی از منابع کلاسیک و مرجع در امنیت وب اپلیکیشنها» محسوب میشه. تمرکز اصلی کتاب روی اینه که نشون بده مرورگرها چطور کار میکنن و چرا ذاتاً مدل امنیتی پیچیده و در بعضی بخشها آسیبپذیری دارن.
⚙️ ایده اصلی کتاب اینه که وب مدرن از یک ترکیب پیچیده از تکنولوژیها ساخته شده؛ از HTTP گرفته تا JavaScript و HTML و CSS. هر کدوم از این لایهها رفتار امنیتی خاص خودش رو داره و وقتی کنار هم قرار میگیرن، یک مدل امنیتی پیچیده و گاهی شکننده ایجاد میکنن.
🔍 برخلاف کتابهایی که فقط لیست آسیبپذیریها رو میدن، این کتاب میاد کل مدل امنیتی مرورگر رو تحلیل میکنه و توضیح میده چرا این مدلها شکل گرفتن و کجاها دچار ضعف میشن. هدفش اینه که دید عمیقتری نسبت به امنیت وب بهت بده، نه صرفاً حفظ کردن باگها.
🧰 در طول کتاب یاد میگیری:
🔗 چطور کارهای ظاهراً ساده ولی پیچیده مثل URL parsing و HTML sanitization انجام میشن
🛡️ استفاده از مکانیزمهای امنیتی مدرن مثل Strict Transport Security، Content Security Policy (CSP) و CORS
🔐 نحوه استفاده از سیاست Same-Origin Policy برای ایزولهسازی بخشهای مختلف یک اپلیکیشن
🧩 ساخت mashupها و gadgetها بدون شکستن مدل امنیتی frame navigation
📦 مدیریت محتوای user-supplied بدون درگیر شدن با مشکلات content sniffing
📚 در انتهای هر فصل هم یک سری Security Engineering Cheat Sheet وجود داره که راهحلهای سریع برای مسائل رایج امنیتی ارائه میده.
📚 فهرست مطالب
بخش اول: ساختار وب
1. امنیت در دنیای وب اپلیکیشنها
2. شروع از URL
3. پروتکل انتقال ابرمتن (HTTP)
4. زبان نشانهگذاری ابرمتن (HTML)
5. CSS
6. اسکریپتهای سمت مرورگر
7. انواع اسناد غیر HTML
8. رندر محتوا با پلاگینهای مرورگر
بخش دوم: قابلیتهای امنیتی مرورگر
9. منطق ایزولهسازی محتوا
10. وراثت Origin
11. خارج از قوانین Same-Origin
12. مرزهای امنیتی دیگر
13. مکانیزمهای تشخیص محتوا
14. مدیریت اسکریپتهای مخرب
15. امتیازات خاص سایتها
بخش سوم: نگاهی به آینده
16. قابلیتهای امنیتی جدید و در حال توسعه
17. سایر مکانیزمهای مهم مرورگر
18. آسیبپذیریهای رایج وب
👨💻 درباره نویسنده
میشال زالفسکی یک متخصص امنیت اطلاعات در سطح بینالمللی است که سابقه طولانی در کشف آسیبپذیریهای مهم دارد. او صدها vulnerability شناختهشده را کشف کرده و از چهرههای تأثیرگذار در حوزه امنیت محسوب میشه. از آثار مهم او میشه به Silence on the Wire و Browser Security Handbook اشاره کرد و همچنین تحقیقات متعددی در حوزه امنیت مرورگر منتشر کرده است.
"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:
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.
Table of Contents
Part I: Anatomy of the Web
Chapter 1: Security in the World of Web Applications
Chapter 2: It Starts with a URL
Chapter 3: Hypertext Transfer Protocol
Chapter 4: Hypertext Markup Language
Chapter 5: Cascading Style Sheets
Chapter 6: Browser-Side Scripts
Chapter 7: Non-HTML Document Types
Chapter 8: Content Rendering with Browser Plug-ins
Part II: Browser Security Features
Chapter 9: Content Isolation Logic
Chapter 10: Origin Inheritance
Chapter 11: Life Outside Same-Origin Rules
Chapter 12: Other Security Boundaries
Chapter 13: Content Recognition Mechanisms
Chapter 14: Dealing with Rogue Scripts
Chapter 15: Extrinsic Site Privileges
Part III: A Glimpse of Things to Come
Chapter 16: New and Upcoming Security Features
Chapter 17: Other Browser Mechanisms of Note
Chapter 18: Common Web Vulnerabilities
Review
"A classic – arguably canon – as far as security training books go, and especially when it comes to web application security."
—Britt Kemp, Bishop Fox Labs
About the Author
Michal Zalewski is an internationally recognized information security expert with a long track record of delivering cutting-edge research. He is credited with discovering hundreds of notable security vulnerabilities and frequently appears on lists of the most influential security experts. He is the author of Silence on the Wire (No Starch Press), Google's "Browser Security Handbook," and numerous important research papers.









