HTB 学习笔记 【中/英】《前端 vs. 后端》P3

📌 这篇文章讲了什么?

  • 介绍了 前端(客户端)后端(服务器端) 的区别。
  • 解释了 全栈开发(Full Stack Development),即前端+后端开发。
  • 介绍了 前端和后端常用的技术
  • 讨论了 常见的安全风险 以及 OWASP Top 10 漏洞。
  • 列举了 开发人员常犯的 20 个安全错误,导致 Web 应用存在漏洞。

💡 需要记住的重点

1. 前端(客户端)开发

  • 前端是用户可见、可交互的部分,包括界面、按钮、文本、动画等。
  • 主要使用 HTML(结构)、CSS(样式)、JavaScript(功能) 进行开发。
  • 代码在 浏览器中执行,需适配不同设备、浏览器和屏幕尺寸。
  • 前端优化不佳会导致网页卡顿、加载慢,影响用户体验。

📌 关键点:前端负责 用户体验(UI/UX),但前端代码也可能被攻击者利用进行漏洞利用(如 XSS)。


2. 后端(服务器端)开发

  • 负责 处理业务逻辑、数据存储、用户身份验证、API 调用 等核心功能。
  • 代码运行在 服务器上,用户无法直接访问后端代码。
  • 后端的 4 个核心组件:
组件描述
后端服务器托管 Web 应用的硬件和操作系统(如 Linux、Windows)。
Web 服务器处理 HTTP 请求(如 Apache、Nginx、IIS)。
数据库存储和检索数据(如 MySQL、PostgreSQL、MongoDB)。
开发框架开发 Web 应用的工具(如 Laravel、Django、Express.js)。

📌 关键点:后端是 Web 应用的大脑,管理所有数据、权限和核心逻辑,但如果未正确保护,则容易成为攻击目标。


3. Web 安全风险与攻击方式

尽管后端代码不可见,但攻击者仍然可以通过漏洞进行攻击。常见的 Web 安全漏洞包括:

攻击类型描述
SQL 注入(SQLi)通过注入恶意 SQL 代码来访问或修改数据库数据。
命令注入利用输入验证漏洞执行服务器端操作系统命令。
本地文件包含(LFI)读取服务器上的敏感文件。
跨站脚本攻击(XSS)在网页中插入恶意 JavaScript 代码,窃取用户数据。
访问控制破坏(Broken Access Control)越权访问其他用户数据或管理功能。

📌 关键点:即使攻击者无法直接访问后端代码,他们仍可以通过 输入漏洞、权限错误、配置问题 等进行攻击。


4. 常见的 Web 开发安全错误

许多漏洞的根本原因是 开发人员的错误,以下是最常见的 20 个安全错误:

错误描述
存储明文密码不加密存储密码,容易被黑客盗取。
允许无效数据进入数据库可能导致 SQL 注入攻击。
过度依赖客户端验证攻击者可以篡改前端数据绕过安全限制。
使用弱加密方法易被破解,导致数据泄露。
硬编码敏感数据在代码中写死密码、API Key 等,增加被盗风险。
配置错误 Web 防火墙(WAF)允许未授权的请求绕过安全检查。

📌 关键点:大多数安全问题源于 开发人员的失误,而非代码本身的 bug。


5. OWASP Top 10 Web 安全漏洞

OWASP(开放 Web 应用安全项目)列出了 Web 应用最常见的 10 大安全漏洞

排名漏洞影响
1访问控制破坏攻击者可访问未经授权的数据或功能。
2加密失败不安全的数据存储或传输导致数据泄露。
3注入攻击SQL/命令注入可导致服务器被入侵。
4不安全的设计设计缺陷导致安全风险。
5错误的安全配置默认密码、开放端口等问题使得攻击更容易。
6使用过时或漏洞组件旧版本软件存在已知安全漏洞。
7身份验证失败弱密码或认证逻辑错误导致账户被盗。
8软件和数据完整性失败未验证软件更新或篡改数据导致恶意代码执行。
9日志记录和监控失败监控不足,使攻击无法被检测到。
10服务器端请求伪造(SSRF)服务器被攻击者利用去访问内部网络资源。

📌 关键点OWASP Top 10 是渗透测试和 Web 安全测试的基础,必须掌握!


🚫 不需要重点关注的内容

前端和后端编程语言的详细语法(我们关注安全,而不是开发)。
所有开发框架的具体使用方式(了解它们的作用即可)。
Web 服务器(如 Apache、Nginx)的详细配置(除非你专注于 Web 服务器安全)。


✅ 未来行动计划

理解前端和后端的区别,以及它们的安全风险。
熟悉常见 Web 漏洞及其攻击方式(如 SQLi、XSS)。
深入学习 OWASP Top 10,并掌握如何利用和修复这些漏洞。
在 Hack The Box、TryHackMe 或 DVWA 上进行实际渗透测试练习。

掌握 Web 应用安全 是成为 高级渗透测试员 的关键技能。如果你能发现、利用并修复 Web 漏洞,你将在网络安全行业占据极大优势!🔥🚀


Summary and Notes on "Front End vs. Back End"


📌 What Is This About?

  • Explains the difference between Front End (Client-Side) and Back End (Server-Side) development.
  • Discusses Full Stack Development, which includes both front-end and back-end.
  • Covers common technologies used in front-end and back-end development.
  • Introduces common security risks and the OWASP Top 10 vulnerabilities related to web applications.
  • Highlights 20 common web developer mistakes that lead to security issues.

💡 Key Points to Memorize

1. Front End (Client-Side) Development
  • Everything users see and interact with in a web application.
  • Built with HTML (structure), CSS (design), JavaScript (functionality).
  • Runs in the browser and must be optimized for different devices, browsers, and screen sizes.
  • Poorly optimized front-end code can cause slow and unresponsive web applications.
  • Other front-end tasks:
    • UI Design: Creating visual elements.
    • UX Design: Ensuring a good user experience.

📌 Key Takeaway: The front end is the visible and interactive part of a web application, responsible for user experience.


2. Back End (Server-Side) Development
  • Handles the core functionalities of a web application.
  • Runs on a server, processes requests, and interacts with databases.
  • Users do not directly see or interact with back-end components.
ComponentDescription
Back-End ServerThe hardware and OS (Linux, Windows) that hosts the web app.
Web ServerHandles HTTP requests (e.g., Apache, NGINX, IIS).
DatabaseStores and retrieves data (e.g., MySQL, PostgreSQL, MongoDB).
Development FrameworksTools to build back-end applications (e.g., Laravel, Django, Express.js).
  • Back-end security is crucial since poorly secured servers and databases can lead to major breaches.
  • Common back-end tasks:
    • Implementing business logic.
    • Managing databases and storing data securely.
    • Developing APIs for front-end communication.
    • Securing user authentication and access control.

📌 Key Takeaway: The back end is the invisible but essential part of a web application, handling data, logic, and security.


3. Common Security Risks in Web Development

Even if users cannot see the back-end code, it can still be vulnerable to attacks. Common web security flaws include:

Attack TypeDescription
SQL InjectionInjecting malicious SQL queries to access or modify the database.
Command InjectionExploiting poorly validated input to execute system commands.
Local File Inclusion (LFI)Exploiting file inclusion vulnerabilities to access sensitive files.
Cross-Site Scripting (XSS)Injecting malicious scripts into web pages to steal user data.
Broken Access ControlExploiting access control flaws to gain unauthorized privileges.

📌 Key Takeaway: Even if we don’t see the back-end code, it can still be exploited through injections, misconfigurations, and poor validation.


4. Common Web Developer Mistakes That Lead to Security Issues

Many vulnerabilities arise because of bad coding practices. Common mistakes include:

MistakeDescription
Storing passwords in plaintextNo encryption makes it easy for attackers to steal credentials.
Allowing invalid data in databasesPoor validation can lead to SQL injection.
Relying too much on client-side securityAttackers can bypass front-end protections using browser tools.
Using weak cryptographic methodsPoor encryption can be easily cracked.
Hardcoding sensitive dataStoring credentials in source code increases risk.
Misconfiguring Web Application Firewalls (WAF)Leaving firewalls poorly configured allows attacks to bypass security.

📌 Key Takeaway: Many security issues are caused by bad development practices, not just bugs.


5. The OWASP Top 10 Web Application Vulnerabilities

These are the most critical security risks in web applications:

No.VulnerabilityImpact
1Broken Access ControlAttackers can access unauthorized resources.
2Cryptographic FailuresPoor encryption leads to data leaks.
3Injection AttacksSQL/Command injection can allow full system compromise.
4Insecure DesignFlaws in architecture make the app inherently weak.
5Security MisconfigurationDefault credentials, open ports, or weak settings make attacks easier.
6Vulnerable and Outdated ComponentsUsing old libraries or software introduces known security holes.
7Authentication FailuresWeak login security leads to account takeovers.
8Software and Data Integrity FailuresUnverified software updates or modifications allow malicious code execution.
9Security Logging and Monitoring FailuresLack of monitoring allows attacks to go unnoticed.
10Server-Side Request Forgery (SSRF)Attackers force the server to make requests on their behalf.

📌 Key Takeaway: The OWASP Top 10 is a must-know for penetration testers. These vulnerabilities appear in most real-world applications.


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

Learning how to code front-end/back-end from scratch (this is about security, not development).
Memorizing all development frameworks (just understand the general role of frameworks).
Overly detailed server configurations (you’ll learn security configurations when needed).


✅ Next Steps & Action Plan

Understand the key differences between front-end and back-end development.
Familiarize yourself with common security risks and vulnerabilities.
Start practicing web penetration testing techniques (e.g., SQL injection, XSS).
Learn the OWASP Top 10 vulnerabilities and how to exploit/mitigate them.
Perform hands-on practice on platforms like Hack The Box, TryHackMe, or DVWA.

Understanding the fundamentals of front-end and back-end security is crucial for becoming a skilled penetration tester. Mastering these concepts will help you identify, exploit, and secure web applications like a pro! 🚀

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/898057.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

golang中的结构体

1.简介 go也支持面向对象编程(OOP),但是和传统的面向对象编程有区别,并不是纯粹的面向对象语言。所以说go支持面向对象编程特性是比较准确的。go没有类(class),go语言的结构体(struct)和其它编程语言的类(class)有同等的地位,你可…

Day 64 卡玛笔记

这是基于代码随想录的每日打卡 参加科学大会(第六期模拟笔试) 题目描述 ​ 小明是一位科学家,他需要参加一场重要的国际科学大会,以展示自己的最新研究成果。 ​ 小明的起点是第一个车站,终点是最后一个车站。然…

《C语言中\0:字符串的神秘“终结者”》

🚀个人主页:BabyZZの秘密日记 📖收入专栏:C语言 🌍文章目入 引言一、字符串的定义与存储二、\0:字符串的终结标志三、\0在字符串操作中的作用四、\0的陷阱与注意事项五、\0与字符串的动态分配六、总结 引言…

九、Prometheus 监控windows(外部)主机

一、监控 Windows 主机的方法 方式 1:使用 Windows Exporter Windows Exporter(wmi_exporter) 是 Prometheus 官方推荐的 Windows 监控工具,它可以采集 CPU、内存、磁盘、网络、进程、服务状态等 指标。 方式 2:使用 Node Exporter for Windows node_exporter 主要用于…

TCP/IP协议中三次握手(Three-way Handshake)与四次挥手(Four-way Wave)

TCP/IP协议中三次握手(Three-way Handshake)与四次挥手(Four-way Wave) 一、TCP三次握手(Three-way Handshake)二、TCP四次挥手(Four-way Wave)三、常见问题解答总结为什么三次握手不…

Java集成WebSocket实现消息推送,详细步骤以及出现的问题如何解决

Java集成WebSocket实现消息推送 WebSocket是一种在单个TCP连接上进行全双工通信的协议,非常适合实现实时消息推送功能。与传统的HTTP请求-响应模式不同,WebSocket建立连接后可以保持长连接状态,服务器可以主动向客户端推送数据,这使得它成为实现聊天应用、通知系统和实时数…

如何在Linux中切换用户?

Linux切换用户 在Linux系统中,切换用户可以通过使用su命令和sudo命令实现 1、su命令 su是switch user的缩写,用于切换到另一个用户。su命令的语法如下: su [选项] [用户名]以下是一些示例: # 切换到root用户 su - # 切换到指定…

网页制作16-Javascipt时间特效の设置D-DAY倒计时

01、效果图 02、应用 new Date()//返回今天日期 new Date("April 1,2025")//返回目标日期 document.write()//文档显示 getTime()返回当日毫秒数 Math.floor(amadays / (1000 * 60 * 60 * 24)//把毫秒换算天 03、代码 <!doctype html> <html> &…

c#Winform也可以跨平台了GTK框架GTKSystem.Windows.Forms

一、简介 >> 新版下载&#xff0c;问题求助 QQ群&#xff1a;1011147488 1032313876 236066073&#xff08;满&#xff09; Visual Studio原生开发&#xff0c;无需学习&#xff0c;一次编译&#xff0c;跨平台运行. C#桌面应用程序跨平台&#xff08;windows、linux、…

`lower_bound`、`upper_bound` 和 `last_less_equal`

lower_bound、upper_bound 和 last_less_equal。它们的作用是在 有序数组 中查找目标值的位置。下面是对每个函数的详细解释&#xff1a; 1. lower_bound 函数 功能&#xff1a; 在有序数组 a 中查找第一个 大于或等于 target 的元素的位置。 参数&#xff1a; a[]&#xf…

网络安全常识科普(百问百答)

汪乙己一到店&#xff0c;所有喝酒的人便都看着他笑&#xff0c;有的叫道&#xff0c;“汪乙己&#xff0c;你又监控员工隐私了&#xff01;”他不回答&#xff0c;对柜里说&#xff0c;“来两个fofa。”便排出三个比特币。他们又故意的高声嚷道&#xff0c;“你一定又在电报群…

JSON 序列化 反序列化

序列化&#xff0c;反序列化 其实就是转换数据格式的过程。 序列化 (Serialization) 是将【对象的状态信息】转换为【可以存储或传输的形式】的过程。即&#xff1a;把C#中的类 转换成 JSON格式的字符串&#xff0c;就是序列化。其中【对象的状态信息】就是类的各种属性。 …

如何优化AI模型的Prompt:深度指南

随着人工智能&#xff08;AI&#xff09;技术的快速发展&#xff0c;AI模型在文本生成、翻译、问答等领域的应用越来越广泛。在使用这些模型时&#xff0c;**Prompt&#xff08;提示&#xff09;**的质量直接影响输出结果的好坏。优化Prompt不仅能提升生成文本的准确性&#xf…

五大基础算法——模拟算法

模拟算法 是一种通过直接模拟问题描述的过程或规则来解决问题的算法思想。它通常用于解决那些问题描述清晰、步骤明确、可以直接按照规则逐步实现的问题。以下是模拟算法的核心概念、适用场景、实现方法及经典例题&#xff1a; 一、核心概念 问题描述清晰 问题的规则和步骤明确…

【DeepSeek应用】DeepSeek模型本地化部署方案及Python实现

DeepSeek实在是太火了,虽然经过扩容和调整,但反应依旧不稳定,甚至小圆圈转半天最后却提示“服务器繁忙,请稍后再试。” 故此,本文通过讲解在本地部署 DeepSeek并配合python代码实现,让你零成本搭建自己的AI助理,无惧任务提交失败的压力。 一、环境准备 1. 安装依赖库 …

过滤空格(信息学奥赛一本通-2047)

【题目描述】 过滤多余的空格。一个句子中也许有多个连续空格&#xff0c;过滤掉多余的空格&#xff0c;只留下一个空格。 【输入】 一行&#xff0c;一个字符串&#xff08;长度不超过200&#xff09;&#xff0c;句子的头和尾都没有空格。 【输出】 过滤之后的句子。 【输入样…

一周学会Flask3 Python Web开发-SQLAlchemy更新数据操作-班级模块

锋哥原创的Flask3 Python Web开发 Flask3视频教程&#xff1a; 2025版 Flask3 Python web开发 视频教程(无废话版) 玩命更新中~_哔哩哔哩_bilibili list.html页面&#xff0c;加一个更新操作超链接&#xff1a; <!DOCTYPE html> <html lang"en"> <…

.NET Framework华为云流水线发布

文章目录 前言一、新建代码检查二、新建编译构建三、新建部署三、新建流水线 前言 华为云流水线发布&#xff1a;自动检查代码&#xff0c;打包发布到服务器 一、新建代码检查 检查代码是否存在报错 设置规则集 二、新建编译构建 三、新建部署 模板选择空模板或者自己去创建…

ngx_event_conf_t

ngx_event_conf_t 定义在 src\event\ngx_event.h typedef struct {ngx_uint_t connections;ngx_uint_t use;ngx_flag_t multi_accept;ngx_flag_t accept_mutex;ngx_msec_t accept_mutex_delay;u_char *name;#if (NGX_DEBUG)ngx_array_t debug_conne…

React19源码系列之createRoot的执行流程是怎么的?

2024年12月5日&#xff0c;react发布了react19版本。后面一段时间都将学习它的源码&#xff0c;并着手记录。 react官网&#xff1a;react19新特性 https://react.dev/blog/2024/12/05/react-19 在用vite创建react项目的使用&#xff0c;main.tsx主文件都会有以下代码。 //i…