当前位置:网站首页>Web security -- core defense mechanism
Web security -- core defense mechanism
2022-07-02 08:28:00 【Defeat of Fujiwara Qianhua】
Core defense mechanism
Preface
Web Basic security issues for applications ( All user input is not trusted ) A large number of security mechanisms need to be used to attack regions , These mechanisms are composed of the following core factors :
- Access control
- Filter / Limit input
- monitor ( Normal indicators )
- Safety products (WAF)
The vast majority of the attack surface of a typical application is also composed of these mechanisms , That is, attackers exploit vulnerabilities by taking advantage of the defects of these mechanisms . Now let's learn about the security mechanism .
One 、 Access control
majority Web Applications use three layers of interrelated security mechanisms to handle user access :
- Authentication
- session management
- Access control ( Realization )
Authentication
Authentication mechanism is the most basic mechanism for applications to handle user access . Verifying users refers to determining the true identity of users . today , most Web Applications use traditional authentication models , That is, users are required to submit user names and passwords , Then the application verifies it , Confirm its legitimacy
session management
After successfully logging in to the application , Users will access various pages and functions , Send some columns from the browser HTTP request . meanwhile , The server will also receive countless requests from various users . To implement effective access control , The application needs to identify and process various requests submitted by each user .
To meet the above needs , Almost all Web The application establishes a session for each user , And issue a token to the user to identify the session . The session itself is a set of data structures stored on the server , Used to track the interaction status between users and Applications . The token is a unique string , The application maps it to the session ( Such as cookie). When the user receives a token , The browser will follow HTTP Return it to the server in the request , Help the application associate the request with the user .
Access control
Two 、 Processing user input
Basic safety issues : All user input is not trusted . A lot is directed at Web Different attacks on applications are related to submitting incorrect input . Enter confirmation (input validation) Is a necessary means to defend against these attacks .
Input processing method
- Reject known bad input —— The blacklist
- Accept known normal inputs —— White list
- purify —— Input handler 、 code 、 escape
- Secure data processing —— Safe programming method ( The database access process uses correct parameterized queries , Avoid unsafe application function design )
- Syntax check —— authentication
Boundary confirmation
Each individual component or functional unit of the server-side application treats its input as input from a potentially malicious source . Except for the external boundary between the client and the server , The application performs data validation on each of the above trust boundaries .
(1) The application receives the login information of the user . The form handler confirms that each input contains only legal characters , Meet special length restrictions , And does not contain known attack signatures .
(2) The application executes a SQL Query and verify user certificate . To prevent SQL Inject , Before executing the query , The application program escapes all characters contained in the user input that can be used to attack the database .
(3) If the user logs in successfully , The reference program then transmits some data in the user data to SOAP service , Further information about user accounts . To prevent SOAP Injection attack , You need to XML Properly encode metacharacters .
(4) The application displays the user's account information in the user's browser . To prevent cross site scripting attacks , The application executes on any user submitted data implanted in the return page HTML code .
source
《 The classic of hacker attack and Defense Technology Web Actual combat 》
边栏推荐
- 用数字 5,5,5,1 ,进行四则运算,每个数字当且仅当用一次,要求运算结果值为 24
- Use of opencv3 6.2 low pass filter
- Use the kaggle training model and download your own training model
- Global and Chinese market of electric cheese grinder 2022-2028: Research Report on technology, participants, trends, market size and share
- web安全--逻辑越权
- Carsim-路面3D形状文件参数介绍
- Don't know mock test yet? An article to familiarize you with mock
- What is SQL injection
- How to apply for a secondary domain name?
- Opencv's experience of confusing X and Y coordinates
猜你喜欢

旋转链表(图解说明)

How to back up the configuration before the idea when reinstalling the idea

Static library and dynamic library

Linked list classic interview questions (reverse the linked list, middle node, penultimate node, merge and split the linked list, and delete duplicate nodes)

【无标题】

sqli-labs第12关

What is SQL injection

When a custom exception encounters reflection

Sqlyog remote connection to MySQL database under centos7 system

c语言将字符串中的空格替换成%20
随机推荐
Array and string processing, common status codes, differences between PHP and JS (JS)
Principes fondamentaux de la théorie musicale (brève introduction)
Global and Chinese market of recovery equipment 2022-2028: Research Report on technology, participants, trends, market size and share
力扣每日一题刷题总结:字符串篇(持续更新)
Wang extracurricular words
Web安全--核心防御机制
How to uninstall SQL Server cleanly
Jumping | Blue Bridge Cup
Implementation of bidirectional linked list (simple difference, connection and implementation between bidirectional linked list and unidirectional linked list)
Global and Chinese market of snow sweepers 2022-2028: Research Report on technology, participants, trends, market size and share
What is SQL injection
Comparable,Comparator,Clonable 接口使用剖析
力扣每日一题刷题总结:二叉树篇(持续更新)
Animation synchronization of CarSim real-time simulation
文件上传-upload-labs
Carla-ue4editor import Roadrunner map file (nanny level tutorial)
STM32 new project (refer to punctual atom)
sqli-labs第8关(布尔盲注)
When a custom exception encounters reflection
使用Matplotlib绘制图表初步