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

HTB 学习笔记 【中/英】《Web 应用 - 布局》P2


📌 这篇文章讲了什么?

  • 介绍了 Web 应用的架构和布局,包括不同的基础设施、组件、架构模式等。
  • 讲解了 常见的 Web 应用部署方式(单服务器、多服务器等),并分析了它们的安全性。
  • 介绍了 微服务架构(Microservices)无服务器架构(Serverless) 的概念及其优势。
  • 强调了 架构安全性 在 Web 渗透测试中的重要性,并举例说明常见的架构设计缺陷。

💡 需要记住的重点

1. Web 应用的三大主要部分
类别描述
Web 应用基础设施服务器、数据库、应用所需的核心组件
Web 应用组件前端(UI/UX)、客户端(浏览器)、服务器端(逻辑处理)
Web 应用架构不同组件之间的关系,如前端与后端的交互方式

2. 常见的 Web 应用架构
架构特点优缺点
客户端-服务器架构服务器处理请求,客户端(浏览器)交互常见架构,易部署
单服务器架构所有应用组件(包括数据库)都托管在一个服务器上简单但风险极高,一旦被攻击,全部数据都可能泄露
多服务器 - 单数据库多个 Web 服务器共享同一个数据库提高性能和冗余度,但数据库仍是单点故障
多服务器 - 多数据库每个应用有自己的独立数据库,或者使用多个数据库共享数据安全性和容错能力强,但管理复杂

📌 记住:单服务器架构风险最大,多服务器多数据库架构最安全但成本最高。


3. Web 应用的核心组件
  • 客户端 (Client):用户访问 Web 应用的方式(如浏览器)。
  • 服务器 (Server):负责处理请求并返回响应。
  • Web 服务器 (Web Server):例如 Apache、Nginx,负责处理 HTTP 请求。
  • Web 应用逻辑 (Application Logic):应用的核心功能,如登录、数据处理等。
  • 数据库 (Database):存储用户和应用数据。
  • 第三方集成 (3rd Party Integrations):如支付接口、API 等。
  • 微服务 (Microservices):独立的模块化组件,如支付、搜索、用户管理等。
  • 无服务器架构 (Serverless):如 AWS Lambda、GCP Functions,省去服务器管理,直接运行代码。

4. 微服务架构(Microservices)
  • 概念:将 Web 应用拆分为多个独立的微服务,每个微服务完成特定任务(如注册、支付、搜索等)。
  • 特点
    • 无状态通信(每次请求都是独立的)。
    • 不同微服务可以用不同语言开发
    • 扩展性强,开发速度快
  • 优点
    • 更灵活的部署和扩展
    • 易于维护和更新
    • 更快的产品迭代

5. 无服务器架构(Serverless)
  • 概念:无需管理服务器,代码在云端(如 AWS、Azure、GCP)自动执行。
  • 优点
    • 无需服务器维护,降低运营成本。
    • 自动扩展,根据需求动态分配资源。
    • 快速部署,适用于轻量级应用。

📌 记住:微服务架构适用于大型 Web 应用,无服务器架构适用于云端轻量级应用。


6. Web 应用架构安全性
  • 安全架构是渗透测试的重要部分,一个不安全的架构可能会导致严重的数据泄露风险。
  • 常见的架构安全漏洞
    • 访问控制错误 (RBAC, Role-Based Access Control)
      • 例如,普通用户可以访问管理员功能。
    • 数据库暴露
      • 服务器被攻破后,如果数据库和应用在同一台服务器上,攻击者可能获取所有数据。
    • 微服务安全
      • 微服务之间的通信需要认证,否则可能被滥用。

📌 记住:架构漏洞可能比代码漏洞更难修复,必须从设计阶段就考虑安全性。


🚫 不需要花太多时间看的部分

不同架构的详细技术实现(只需要理解它们的安全性差异)。
复杂的微服务和无服务器架构设计(了解概念即可,具体实现可以以后学习)。
Web 服务器的具体配置(Apache、Nginx 等)(如果不是安全方向,暂时不需要深入研究)。


✅ 接下来的行动建议

理解不同 Web 应用架构的安全性差异(特别是单服务器 vs. 多服务器架构)。
学习微服务架构和无服务器架构的安全性挑战
开始研究 Web 渗透测试,重点关注架构安全漏洞
掌握 Web 安全基础,逐步学习 OWASP Top 10 和实际漏洞利用

Web 安全不仅仅是代码漏洞,还涉及 架构设计、数据库防护、访问控制 等。掌握 Web 应用架构安全,将让你在网络安全领域更具竞争力!

Summary and Notes on "Web Application Layout"


📌 What Is This About?

  • Introduces web application architecture and layout, covering different infrastructure models, components, and architectures.
  • Explains common web application deployment methods (single server, multiple servers, etc.) and their security implications.
  • Discusses Microservices and Serverless architectures, highlighting their advantages.
  • Emphasizes architecture security in penetration testing and provides examples of common design flaws.

💡 Key Points to Memorize

1. Three Main Aspects of Web Application Architecture
CategoryDescription
Web Application InfrastructureDefines the structure of required components such as databases and servers.
Web Application ComponentsIncludes front-end (UI/UX), client-side processing, and server-side logic.
Web Application ArchitectureDescribes how different components interact and form the overall structure.

2. Common Web Application Architecture Models
ArchitectureCharacteristicsPros & Cons
Client-ServerServer hosts the app, clients access via browsers.Standard model, easy to implement.
Single ServerEntire app and database hosted on one server.Simple but highly insecure—if compromised, everything is exposed.
Multiple Servers - Single DatabaseMultiple web servers share a single database.Improves redundancy but still has a database as a single point of failure.
Multiple Servers - Multiple DatabasesEach web application has its own database, or multiple databases are used.High security and fault tolerance but complex management.

📌 Key Takeaway: Single-server models are the riskiest, while multi-server multi-database models offer better security at a higher cost.


3. Core Web Application Components
  • Client (Browser): The interface users interact with.
  • Server: Processes requests and returns responses.
  • Web Server: Software handling HTTP requests (e.g., Apache, Nginx).
  • Application Logic: Handles the core functionality (authentication, data processing, etc.).
  • Database: Stores application and user data.
  • Third-Party Integrations: External services like payment processors or APIs.
  • Microservices: Independent modules for tasks like authentication, payments, and search.
  • Serverless Functions: Code executed in the cloud without managing servers (e.g., AWS Lambda, GCP Functions).

4. Microservices Architecture
  • Concept: Decomposes a web application into independent services, each performing a specific function.
  • Example: An online store with separate services for registration, payments, search, and reviews.
  • Characteristics:
    • Stateless communication (each request is independent).
    • Services can be built using different programming languages.
    • Highly scalable and modular.
  • Benefits:
    • Faster development and deployment.
    • More flexible and scalable than monolithic applications.
    • Encourages innovation and faster delivery of new features.

5. Serverless Architecture
  • Concept: Applications run in the cloud without managing servers manually.
  • Benefits:
    • No server maintenance—fully managed by cloud providers (AWS, Azure, GCP).
    • Automatic scaling based on demand.
    • Lower operational costs for lightweight applications.

📌 Key Takeaway: Microservices are ideal for complex applications, while serverless architecture suits lightweight, cloud-based applications.


6. Web Application Architecture Security
  • Architecture security is critical in penetration testing, as design flaws can lead to major security risks.
  • Common Architecture Security Issues:
    • Access Control Flaws (RBAC, Role-Based Access Control)
      • Example: Regular users accessing admin functionalities.
    • Database Exposure
      • If a server is compromised, a poorly segmented architecture may expose the entire database.
    • Microservices Security
      • Each service should require authentication to prevent unauthorized access.

📌 Key Takeaway: Architecture-level vulnerabilities are harder to fix than coding errors, so security should be considered from the design phase.


🚫 What You Don’t Need to Focus On Too Much

Detailed implementation of different architectures (just understand security implications).
In-depth configurations of web servers (Apache, Nginx, etc.) (not essential for penetration testing at this stage).
Technical specifics of microservices and serverless models (focus on the concepts and security aspects).


✅ Next Steps & Action Plan

Understand the security differences between different web application architectures.
Learn the challenges of Microservices and Serverless security.
Begin studying Web Penetration Testing, focusing on architecture vulnerabilities.
Master Web Security Basics and gradually dive into OWASP Top 10 and real-world exploitations.

Web security is not just about code vulnerabilities—it also involves architecture design, database security, and access control. Mastering web application architecture security will set you apart in cybersecurity! 🚀

相关文章:

  • JavaCV
  • java集合框架的List 接口提供了两种主要的访问元素的方式:迭代器(Iterator)和索引访问,优缺点对比
  • 《C++:无可替代的编程传奇》:此文为AI自动生成
  • elementui table 自动滚动 纯js实现
  • 【fNIRS可视化学习1】基于NIRS-SPM进行光极可视化并计算通道坐标
  • ubuntu系统下添加pycharm到快捷启动栏方法
  • 【漫话机器学习系列】134.基于半径的最近邻分类器(Radius-Based Nearest Neighbor Classifier)
  • TCP 三次握手四次挥手过程详解
  • 【C++重要!!!】赋值与初始化的区别
  • Flutter三棵树是什么,为什么这么设计
  • 【5*】坐标规则类动态规划学习笔记
  • MindGYM:一个用于增强视觉-语言模型推理能力的合成数据集框架,通过生成自挑战问题来提升模型的多跳推理能力。
  • 【SpringMVC】常用注解:@PathVariable
  • vue2自定义指令实现 el-input 输入数字,小数点两位 最高10位,不满足则截取符合规则的值作为新值
  • 【Pytorch实战教程】拆解PyTorch中的多头注意力:原来Transformer的核心组件可以这样玩
  • 关于WPS的Excel点击单元格打开别的文档的两种方法的探究【为单元格添加超链接】
  • 【VS小知识】VS如何保存UTF8
  • Flutter Dart 面向对象编程全面解析
  • Day 2:基础知识巩固(HTML、CSS、JavaScript)
  • matlab 自适应模糊PID在反应釜温度控制中的应用
  • 多条跨境铁路加速推进,谁是下一个“超级枢纽”?
  • 第十届影像上海博览会落幕后,留给中国摄影收藏的三个问题
  • 视频丨美国两名男童持枪与警察对峙,一人还试图扣动扳机
  • 中国女足将于5月17日至6月2日赴美国集训并参加邀请赛
  • 外交部:正确认识和对待历史是检验日本能否恪守和平发展承诺的重要标准
  • 权益类基金发行回暖,这些老将挂帅新基,谁值得买?