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.rhkb.cn/news/35297.html

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

相关文章

SpringBoot集成ElasticSearch实现支持错别字检索和关键字高亮的模糊查询

文章目录 一、背景二、环境准备1.es8集群2.Kibana3.Canal 三、集成到SpringBoot1.新增依赖2.es配置类3.建立索引4.修改查询方法 四、修改前端 一、背景 我们在开发项目的搜索引擎的时候,如果当数据量庞大、同时又需要支持全文检索模糊查询,甚至你想做到…

麒麟系统使用-安装 SQL Developer

文章目录 前言一、基础准备1.基本环境2.相关包下载 二、进行相关配置1.配置JAVA2.配置SQL Developer 总结 前言 作为我国自主研发的操作系统,麒麟系统在使用时需要考虑安装相应的app。尽管麒麟系统是基于linux开发,可由于版本的一些差异,麒麟…

PrimeTime:timing_report_unconstrained_paths变量

相关阅读 PrimeTimehttps://blog.csdn.net/weixin_45791458/category_12900271.html?spm1001.2014.3001.5482 PrimeTime自Q-2019.12版本起引入了timing_report_unconstrained_paths变量(默认值为false),该变量控制是否在使用report_timing命…

洛谷 P1115 最大子段和(前缀和详解)c++

题目链接:P1115 最大子段和 - 洛谷 1.题目分析 2.算法原理 解法:利用前缀和 思考:如何求出以a[i]为结尾的所有子区间中最大的子段和 假设 i 等于5,以 a[ i ] 为结尾的区间一共是五段(黑色线条部分)&#…

JetBrains(全家桶: IDEA、WebStorm、GoLand、PyCharm) 2024.3+ 2025 版免费体验方案

JetBrains(全家桶: IDEA、WebStorm、GoLand、PyCharm) 2024.3 2025 版免费体验方案 前言 JetBrains IDE 是许多开发者的主力工具,但从 2024.02 版本起,JetBrains 调整了试用政策,新用户不再享有默认的 30 天免费试用…

【数据分析】数据筛选与访问行列元素3

访问元素 .loc属性可以通过传入index的值访问行数据。 .loc属性允许传入两个参数,分别是index的值和columns的值,参数间用“逗号”隔开,这样便可以访问数据中的元素。 1. 访问单个元素 访问单个元素比较简单,只需要通过它的in…

C++ std::list超详细指南:基础实践(手搓list)

目录 一.核心特性 1.双向循环链表结构 2.头文件:#include 3.时间复杂度 4.内存特性 二.构造函数 三.list iterator的使用 1.学习list iterator之前我们要知道iterator的区分 ​编辑 2.begin()end() 3.rbegin()rend() 四.list关键接口 1.empty() 2. size…

【免费】2004-2017年各地级市进出口总额数据

2004-2017年各地级市进出口总额数据 1、时间:2004-2017年 2、来源:城市年鉴 3、指标:进出口贸易总额 4、范围:286个地级市 5、指标说明:进出口总额是指一个国家在特定时期内(通常为一年)所…

谈谈 undefined 和 null

*** 补充 null 和 ‘’

【第15届蓝桥杯】软件赛CB组省赛

个人主页:Guiat 归属专栏:算法竞赛真题题解 文章目录 A. 握手问题(填空题)B. 小球反弹(填空题)C. 好数D. R格式E. 宝石组合F. 数字接龙G. 爬山H. 拔河 正文 总共8道题。 A. 握手问题(填空题&…

【计算机视觉】工业表计读数(2)--表计检测

1. 简介 工业表计(如压力表、电表、气表等)在工控系统、能源管理等领域具有重要应用。然而,传统人工抄表不仅工作量大、效率低,而且容易产生数据误差。近年来,基于深度学习的目标检测方法在工业检测中展现出极大优势&…

提示词工程(Prompt Engineering)

https://www.bilibili.com/video/BV1PX9iYQEry 一、懂原理,要知道 为什么有的指令有效,有的指令无效为什么同样的指令有时有效,又是无效怎么提升指令有效的概率 大模型应用架构师想什么? 怎样能更准确?答&#xff1…

从Instagram到画廊:社交平台如何改变艺术家的展示方式

从Instagram到画廊:社交平台如何改变艺术家的展示方式 在数字时代,艺术家的展示方式正在经历一场革命。社交平台,尤其是Instagram,已经成为艺术家展示作品、与观众互动和建立品牌的重要渠道。本文将探讨社交平台如何改变艺术家的…

Typora 使用教程(标题,段落,字体,列表,区块,代码,脚注,插入图片,表格,目录)

标题 一个#是一级标题, 2个#是二级标题, 以此类推, 最多可达六级标题 示例 输入#号和标题后回车即可 注意: #和标题内容之间需要存在空格(一个或多个均可), 没有空格就会变成普通文字 标题快捷键 Ctrl数字 1-6 可以快速调成对应级别的标题 (选中文本/把光标放在标题上再按…

关于deepseek R1模型分布式推理效率分析

1、引言 DeepSeek R1 采用了混合专家(Mixture of Experts,MoE)架构,包含多个专家子网络,并通过一个门控机制动态地激活最相关的专家来处理特定的任务 。DeepSeek R1 总共有 6710 亿个参数,但在每个前向传播…

力扣hot100二刷——二叉树

第二次刷题不在idea写代码,而是直接在leetcode网站上写,“逼”自己掌握常用的函数。 标志掌握程度解释办法⭐Fully 完全掌握看到题目就有思路,编程也很流利⭐⭐Basically 基本掌握需要稍作思考,或者看到提示方法后能解答⭐⭐⭐Sl…

网络安全 --- 基于网络安全的 Linux 最敏感目录及文件利用指南

目录 基于网络安全的 Linux 最敏感目录及文件利用指南 Linux 中最敏感的目录及文件 1. /etc 2. /root 3. /var/log 4. /proc 5. /tmp 6. /home 7. /boot 8. /dev 如何利用这些敏感文件 你可能没想到的知识点 总结 Linux 中最敏感的目录及文件 1. /etc 存放内容&a…

深入浅出:Java实现斐波那契数列的七种武器与性能调优指南

​​​ 引言:当数学之美邂逅算法之力 斐波那契数列——这个诞生于13世纪的数学瑰宝,在计算机科学中焕发出新的生命力。作为递归与动态规划的经典案例,它不仅是算法入门的必修课,更是性能优化的试金石。本文将带您深入探索Java实现斐波那契数列的七种核心方法,并揭秘不同…

音视频入门基础:RTP专题(17)——音频的SDP媒体描述

一、引言 在《音视频入门基础:RTP专题(3)——SDP简介》中对SDP协议进行了简介,以H.264为例介绍了视频的SDP的媒体描述。本文对该文章进行补充,以AAC为例,讲述音频的SDP媒体描述。 二、文档下载 《RFC 364…

MyBatis-Plus防全表更新与删除插件BlockAttackInnerInterceptor

防全表更新与删除插件 BlockAttackInnerInterceptor 是 MyBatis-Plus 框架提供的一个安全插件,专门用于防止恶意的全表更新和删除操作。该插件通过拦截 update 和 delete 语句,确保这些操作不会无意中影响到整个数据表,从而保护数据的完整性…