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.pswp.cn/news/898057.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/898057.shtml
英文地址,請注明出處:http://en.pswp.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…