当前位置:网站首页>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 》
边栏推荐
- Global and Chinese markets for magnetic resonance imaging (MRI) transmission 2022-2028: Research Report on technology, participants, trends, market size and share
- On November 24, we celebrate the "full moon"
- Matlab other
- Global and Chinese market of wire loop, 2022-2028: Research Report on technology, participants, trends, market size and share
- Use C language to receive JSON strings
- HCIA—应用层
- Simple implementation scheme of transcoding and streaming (I)
- Wang extracurricular words
- Animation synchronization of CarSim real-time simulation
- Static library and dynamic library
猜你喜欢

web安全--逻辑越权

Carsim-实时仿真的动画同步问题

HCIA—应用层

链表经典面试题(反转链表,中间节点,倒数第k个节点,合并分割链表,删除重复节点)

Use of OpenCV 6.4 median filter

W10 is upgraded to W11 system, but the screen is black, but the mouse and desktop shortcuts can be used. How to solve it

Valin cable: BI application promotes enterprise digital transformation

C language implements XML generation and parsing library (XML extension)

HCIA—應用層

Generate database documents with one click, which can be called swagger in the database industry
随机推荐
樂理基礎(簡述)
Smart agriculture solutions smart agriculture system development
The source code of the live app. When the verification method is mailbox verification, the verification code is automatically sent to the entered mailbox
程序猿学英语-Learning C
web安全--逻辑越权
实现双向链表(带傀儡节点)
How to build the alliance chain? How much is the development of the alliance chain
Opencv3 6.3 reduced pixel sampling with filters
STM32 new project (refer to punctual atom)
Matlab-其它
OpenCV 6.4 中值滤波器的使用
When a custom exception encounters reflection
SQL operation database syntax
乐理基础(简述)
16: 00 interview, came out at 16:08, the question is really too
HCIA—應用層
Matlab - autres
Fundamentals of music theory (brief introduction)
Matlab other
c语言自定义类型枚举,联合(枚举的巧妙使用,联合体大小的计算)