⭐️Web security to build a trustworthy collaboration environment

Author: Zen and the Art of Computer Programming

1 Introduction

With the popularization of Internet informatization, cloud computing and Internet of Things technology, network security has become increasingly important. Web security is an important component of information security, and it is also the most overlooked link. Under this broad theme, we want to talk about how to build a trustworthy cooperation environment and allow Web security to evolve from simple firewalls to more complex attack surface analysis and prevention methods.
  Building a trustworthy collaborative environment is critical. First, we need to figure out our goals. Our goal is not only to protect users' private information, but more importantly, to build mutual trust and trust. Based on the establishment of mutual trust and trust, a professional communication mechanism can be established to achieve information sharing and collaborative work. Secondly, we must ensure our technical capabilities and capacity scale. The technical level in the field of security research has always been very high, but at the same time there is also a lack of talent training. Therefore, building technological capabilities is an important strategic task. Third, we must also pay attention to industry risks. The security industry is in a very important position. If unexpected situations or policy changes occur, it will have a relatively large impact on our global security situation. Finally, pay attention to social responsibility. For organizations and individuals, we all need to promote public interests and moral obligations, and maintain a high level of concern and responsibility for information security.
  This article will combine industry experience and relevant knowledge to introduce the principles, methods and practices of building a trustworthy cooperation environment. I hope that this article can help everyone understand what Web security is, as well as the necessity, principles and implementation methods of building a trustworthy cooperation environment. Let us work together to keep safety first!

2. Explanation of basic concepts and terms

In order to facilitate description and expression, some basic concepts and terms involved in this article are listed below:
  Confidentiality (Confidentiality) : refers to the information content not being leaked to unrelated persons. For example, on a bank website, only those who log in to their account can access customer information.
  Integrity : refers to the fact that the data has not been tampered with or forged. For example, the contents of a document have not been deleted or modified.
  Availability : Refers to the service being able to respond to requests at any point in time. For example, network services need to continue to provide normal services.
  Authentication : refers to confirming the user's true identity by confirming credentials. For example, the user enters a username and password for authentication.
  Authorization : refers to controlling user access rights to system resources. For example, administrators in a company can only manage their own business.
  Auditing : refers to recording all activities and checking for unauthorized access or use. For example, a company's security department wants to track employee behavior.
  Encryption : refers to using a certain encryption algorithm for sensitive data so that only authorized people can interpret and use it. For example, information in emails is encrypted.
  Firewall : refers to a hardware device that protects the network from attacks. It filters out illegal data packets based on network traffic characteristics and blocks malicious connections.
  Intrusion Detection System (IDS) : It is a network intrusion detection system used to identify abnormal network activities and generate alerts to notify administrators.
  Log Review: Indicates to regularly check the server's log files to detect abnormal behavior and take appropriate measures to deal with it.
  Network Topology : refers to the relationship between different computers in the network. For example, an enterprise network structure might be a star topology.
  Vulnerability Scanning : refers to using automated tools to scan servers, applications, etc. for vulnerabilities to find system weaknesses.
  SOC (Security Operations Center) : refers to the central organization that centrally manages network security events. It is responsible for collecting, collating, analyzing and reporting cybersecurity incidents.
  # 3. Explanation of core algorithm principles, specific operating steps and mathematical formulas
  ## 3.1. SSL/TLS protocol (Secure Sockets Layer/Transport Layer Security Protocol)
  SSL (Secure Sockets Layer) and TLS (Transport Layer Security) protocols provide Internet communication End-to-end encrypted transmission. During the process of sending data, the client sends a request to the server, and then the server verifies the request. Once both parties complete the handshake process, a session key with a unique cryptographic token is generated. This key is then used to encrypt the data for transmission.
  Since the SSL/TLS protocol itself has limited security functions, it generally needs to be combined with other security measures to build a reliable security environment. For example, the HTTPS protocol is used to encrypt the entire exchange process to prevent data eavesdropping; the IPSEC protocol is used to ensure security on the communication path; the VPN protocol is used to ensure the security of transmitted data through encrypted tunnels.
  ## 3.2.IPSEC protocol (Internet Protocol Security)
  IPSEC (Internet Protocol Security) protocol is a security protocol that provides data encapsulation and authentication functions. Through this protocol, data packets can be encrypted and digitally signed, and can also be used to maintain the integrity and availability of network communications.
  The IPSEC protocol consists of two main components, namely tunnel mode and encapsulation mode. Tunnel mode ensures the integrity of network communications by encapsulating data packets. Encapsulation mode uses IP header fields to encrypt data packets to ensure data integrity and privacy.
  ## 3.3.HTTP protocol (Hypertext Transfer Protocol)
  HTTP (Hypertext Transfer Protocol), Hypertext Transfer Protocol, is the most widely used network communication protocol on the Internet. It supports the creation of World Wide Web pages and can run on the TCP/IP protocol suite.
  The HTTP protocol follows the client/server model. When the client requests data from the server, it usually sends an HTTP request command. After the server receives the request, it will generate corresponding response data and return it to the client. The HTTP protocol uses TCP as its transport layer protocol, and the default port number is 80.
  The HTTP protocol compresses data and increases network efficiency. Although the data transmitted using the HTTP protocol is relatively simple, if the data to be sent is too large, it may cause network congestion and even data loss. In order to reduce the pressure on network bandwidth, Chunked transfer encoding can be used.
  ## 3.4.HTML protocol (HyperText Markup Language)
  HTML (HyperText Markup Language) protocol is the rules of web pages written in markup language, that is, the text, pictures, videos and other elements displayed on the web page. The HTML protocol can be used to define the rules of web pages. Layout, colors, font size, etc.
  The HTML protocol is extensible. Developers can add new tags to the HTML protocol and can nest them. Therefore, the design capabilities of web pages become stronger. However, the HTML protocol has serious security vulnerabilities, such as cross-site scripting attacks, cross-site request forgery, etc. Therefore, in order to ensure the security of the website, it is also necessary to cooperate with other security measures, such as HTTPS, CSRF protection, etc.
  ## 3.5. HTTP Redirection
  HTTP redirection is a feature of the HTTP protocol. It allows the server to forward browser requests to other locations. It can also be used to pass URL parameters. For example, a login page can be redirected Jump to homepage.
  HTTP redirection can also be used to hide sensitive URLs. When a user requests a URL, redirect to another identical or similar URL to avoid exposing sensitive information.   ## 3.6. Cross Site Scripting
  Attack
Vulnerabilities, these malicious codes will be executed and steal the user's sensitive data.
  XSS attacks are typical reflection attacks. They exploit vulnerabilities in the website to submit the attacker's instructions to the user's browser, where they are interpreted and executed by the user's browser to achieve the purpose of malicious attack.
  Commonly used methods for XSS attacks include passing malicious code through URLs, passing malicious code through modifying HTTP request headers, passing malicious code through HTML comments, etc.
  ## 3.7.CSRF attack (Cross-Site Request Forgery)
  CSRF (Cross-site request forgery), cross-site request forgery, is a malicious use of the website. It performs malicious operations on the website by disguising it as a normal user request. .
  A CSRF attack is to use a website to gain legitimate access to users without making corresponding checks, stealing user information, and thus endangering the rights and interests of users.
  Commonly used methods of CSRF attacks include automatic submission through forms, impersonating trusted users, inducing others to click on links, etc.
  ## 3.8.SQL Injection Attack SQL
  (Structured Query Language) injection attack refers to hackers injecting malicious code into database query statements, cleverly constructing special query requests, and obtaining the data stored in the database.
  Common methods of SQL injection attacks include obtaining the session ID in cookies through packet capture tools, forging parameters, injecting multiple SQL statements, using space escape to bypass filtering, etc.
  ## 3.9. Directory Traversal Attack
  Directory traversal attack, also known as file traversal attack or vulnerability directory browsing, is a malicious attack method that causes file resources on the server to be accessed by accessing non-existent files or directories. be downloaded, obtain sensitive information, or execute malicious code carefully designed by the attacker.
  Directory traversal attacks are a type of attack targeting website applications. They gain permissions for website files by tampering with accessed directories, and access any files on the website system.
  Common methods of directory traversal attacks include accessing specified file paths, traversing website file directories, reading website source code or configuration files, and obtaining sensitive information.
  ## 3.10. File Upload Attack
  File upload attack, also known as file placement attack, is an attack method on website applications. It uploads malicious files to the server, overwrites the original files, and controls the contents of the server. Purpose of file permissions.
  Commonly used methods for file upload attacks include uploading through web forms, uploading phpshell, uploading jspshell, uploading Trojans, etc.
  # 4. Specific code examples and explanations
  For the research of Web security, in addition to technical principles and common attack methods, it is also necessary to observe and understand the current situation of Web security from multiple dimensions, and to deeply analyze the needs and impacts behind it. This article combines industry experience and relevant knowledge, and uses specific code examples and explanations to explain how to build a trustworthy cooperation environment and achieve Web security protection.
  
  Suppose that Company A and Company B want to cooperate, and there is a business contract between them, which stipulates that "Company A provides services to customers." Both parties hope to reach the following consensus:
  - Quality requirements for providing services: Company A's service quality cannot be lower than Company B's standards.
  - Information sharing: Information provided by Company A to Company B can only be used by Company B and cannot be disclosed to the public.
  - Fulfillment of obligations: Company B promises to fulfill its contract obligations on time as long as Company A's services meet quality requirements.
  - Permanent connection: The contract between Company A and Company B can never be terminated.
  
  Below, I will take this scenario as an example to introduce how to build a trustworthy cooperation environment.
  ## 4.1. Option 1: VPN encrypted transmission
  First, we choose VPN encrypted transmission. VPN (Virtual Private Network) refers to a network service that establishes a dedicated data link in a public network, communicates in an internal network, and achieves information security by encrypting and decrypting data packets. VPN encrypted transmission can establish a secure encrypted channel between Company A and Company B to ensure the integrity and confidentiality of information.
  
  The specific steps are as follows:
  - Install VPN software: Install VPN software between the two parties, such as FortiClient VPN, Cisco AnyConnect Secure Mobility Client, etc.
  - Configure VPN connection: Configure VPN connection, including selecting VPN type, server address, port number, user name and password, etc.
  - Set routing policy: Set routing policy, including enabling VPN encrypted transmission, disabling other routing policies, etc.
  - Browser configuration: According to the requirements of Company B, configure the proxy settings of the browser to point to Company A's VPN server.
  - Use a VPN browser plug-in: Install Company A’s VPN browser plug-in so that you can access Company B’s website as normal.
  - Taking into account both security and speed: Taking into account security and speed, try not to directly access Company B’s website, but use VPN to ensure the security and confidentiality of information.
  
  ## 4.2. Option 2: HTTPS encrypted transmission
  If VPN encrypted transmission still cannot solve the information security problem, we can try to use HTTPS encrypted transmission. HTTPS encrypted transmission is a Web communication protocol aimed at security. Compared with the HTTP protocol, HTTPS is more secure. All user data packets are encrypted during transmission, and the authenticity of the server is verified through the CA certificate.
  
  The specific steps are as follows:
  - Obtain a CA certificate: In order to ensure the authenticity of the server, you need to purchase or make your own CA certificate.
  - Configure SSL/TLS protocol: Configure SSL/TLS protocol, including protocol version, encryption algorithm, key length, etc.
  - Modify the server configuration: Modify the server configuration, including turning off the HTTP protocol, enabling the HTTPS protocol, specifying the certificate path, etc.
  - Configure browser settings: According to Company B's requirements, configure the browser's proxy settings to point to Company A's HTTPS server.
  - Browser error message: When the browser connects to Company A's HTTPS server, if the server's certificate is valid, the browser will prompt a user information security warning.
  - Taking into account both security and performance: Taking into account both security and performance, try not to access Company B’s website directly, but use HTTPS to access it to ensure the security and confidentiality of information.
  
  ## 4.3. Solution 3: Malware detection and isolation
  Due to the complexity of information security issues, it is necessary to conduct more detailed attack methods based on the actual situation of all parties to improve the company's security governance level. Malware detection and isolation is an important tool for companies to combat security threats.
  The specific methods are as follows:
  - Purchase anti-virus software: Purchase anti-virus software for the company, including Anti-virus, Antispyware, etc., and update and upgrade the software regularly.
  - Scan the system regularly: Scan the system regularly to find malicious programs and malicious files.
  - Isolate illegal software: Move malicious programs and malicious files to a safe place to prevent them from affecting the normal operation of the system.
  - Continuously improve the software defense system: Continuously improve the software defense system and add more security functions and mechanisms.
  
  ## 4.4. Option 4: Security incident response
  After a security incident occurs, Company B needs to quickly locate, respond to and resolve the security incident. Security incident response is a solution provided by engineers to customers to help them quickly detect, assess, and mitigate security incidents.
  The specific methods are as follows:
  - Establish a security incident response team: Establish a security incident response team, including specialized security engineers, incident managers, network engineers, etc.
  - Define a security incident response plan: Establish a security incident response plan in Company B, including incident response processes and work specifications.
  - Establish a key information portal: Establish a key information portal, including the company's financial, HR, network security, operations and other information.
  - Create a security knowledge base: Create a security knowledge base to summarize common security vulnerabilities, attack methods, defense methods, etc.
  - Establish a security emergency response process: Establish a security emergency response process, including pre-event preparation, in-event detection, post-event investigation, response recovery and other processes.
  - Establish a daily monitoring system: Establish a daily monitoring system, including network traffic monitoring, system log monitoring, security event monitoring, etc.
  
  ## 4.5. Option 5: Information Sharing and Collaboration Only
  after information sharing and collaboration are completed, a professional communication mechanism can be established to realize information exchange and collaboration. Information sharing and collaboration are a key link in inter-company cooperation and can provide different communication channels between Company A and Company B.
  The specific methods are as follows:
  - Establish a knowledge sharing platform: Establish a knowledge sharing platform, including document sharing, picture sharing, video uploading, knowledge Q&A, etc.
  - Establish a schedule sharing platform: Establish a schedule sharing platform so that both Company A and Company B can arrange their work schedules.
  - Establish a collaborative office platform: Establish a collaborative office platform so that both Company A and Company B can complete work together.
  
  # 5. Future Development Trends and Challenges
  The development of Web security cannot be separated from continuous learning, improvement and innovation. Next, I would like to talk about future security trends and challenges.
  ## 5.1. Cloud computing era
  With the advent of the cloud computing era, cloud data centers and infrastructure have developed rapidly. Due to the security features of cloud computing, more and more people are beginning to worry about the security issues of cloud computing platforms.
  - Data center security
  Cloud computing platform servers are usually hosted in data centers. The data center can be a public cloud platform or a private cloud platform. The security of the data center needs to be considered. Data center security issues include host security, network security, storage security, personnel security, environmental security, etc.
  - Cloud platform security
  Cloud platform service providers also need to consider security issues. The service provider of the cloud platform can be a public cloud platform or a private cloud platform, and the security issues of the cloud platform need to be considered. Security issues of cloud platforms include service and infrastructure security, authentication and authorization security, data security, intrusion detection and emergency response security, etc.
  - Internet security
  With the popularity of cloud computing platforms, cloud service providers are also actively promoting Internet security. As more and more terminal devices are connected to the Internet, network security issues are becoming more and more prominent. Internet security issues include network security, application security, border security, attacker attacks, etc.
  ## 5.2. AI era The
  AI ​​era is coming. The development of artificial intelligence and machine learning technology has given computer systems the ability to imitate, understand, expand and manipulate human society. At the same time, artificial intelligence is leading the research boom in this field, and more and more companies are beginning to invest a lot of manpower, financial and material resources to develop and deploy AI products.
  - AI Security
  Artificial Intelligence brings huge challenges. AI technology is changing many industries, including finance, medical care, social networks, video games, etc. AI security issues include model security, training security, data security, attacker attacks, etc.
  - Business Security
  With the popularization and commercialization of AI products, security issues are also changing. The application of artificial intelligence technology is becoming more and more widespread, bringing new security issues.
  ## 5.3. Edge computing era
  The edge computing era is coming, and more and more devices and data are beginning to connect to the network. With the development of the Internet of Things, autonomous driving, and smart cities, edge computing will become increasingly important.
  - Edge computing security
  The security issues of edge computing need to consider three aspects. First, device security. Edge computing devices are usually owned by individuals and security issues need to be considered. Second, network security. Edge computing devices need to be connected to the network, and network security issues need to be considered. Third, cloud computing security. Edge computing devices need to be connected to the cloud computing platform, and the security issues of the cloud platform need to be considered.
  - Service integration
  With the development of edge computing, various services need to be integrated into the cloud, and the security issues of these services also need to be considered. Security issues of service integration include service authentication, authorization, encryption and data security.

6. Appendix Frequently Asked Questions and Answers

  • Q: What is Web security?
      Web security refers to ensuring the security of Internet services or websites, preventing attackers from attacking, tampering, leaking, expropriating or other malicious behaviors on websites, web pages, mailboxes or applications, and promoting information security and privacy protection. process.
  • Q:What are the basic principles of Web security?
      The basic principle of Web security is the protection of user privacy information. Users' personal information, identity information, etc. should be properly protected, especially those behaviors that may reveal personal privacy or cause personal harm.
  • Q: How to ensure Web security?
      Currently, there are two main technical means for Web security: encryption and identity authentication. Encryption technology ensures that data is not tampered with during transmission by encrypting data, and identity authentication technology ensures data security by verifying identity information.
  • Q: What is Web encrypted transmission?
      Web encrypted transmission refers to the use of secure encryption protocols to encrypt data transmitted over the Web to ensure the security of the data transmission process. Encrypted transmission protocols include SSL (Secure Socket Layer)/TLS (Transport Layer Security), IPSec, VPN, etc.
  • Q: What is the HTTPS protocol?
      The HTTPS (Hypertext Transfer Protocol over Secure Socket Layer) protocol is a hypertext transfer protocol aimed at security. It is built on the SSL/TLS protocol. The HTTPS protocol uses Secure Sockets Layer (SSL) for communication, and uses symmetric encryption, public key encryption, certificate verification and other methods to ensure the security of the data transmission process.
  • Q: What are web browser proxy settings?
      Web browser proxy settings mean that when the browser accesses the website, it needs to access it through a proxy server instead of directly accessing it. Browser proxy settings include manual settings, automatic identification settings, script settings, etc.
  • Q: What is HTTP redirection?
      HTTP redirection is a feature of the HTTP protocol. It allows the server to forward browser requests to other locations. It can also be used to pass URL parameters. For example, a login page can be redirected to. Home page.
  • Q: What is a cross-site scripting attack (XSS attack)?
      Cross-site scripting attacks (XSS) are attackers inserting malicious JavaScript code into web pages to steal user information or destroy the structure and existence of the page. Security vulnerabilities, these malicious codes will be executed and steal the user's sensitive data.
  • Q: What is a cross-site request forgery (CSRF attack)?
      Cross-site request forgery (CSRF) is a malicious use of a website by disguising it as a normal user request to perform malicious operations on the website. .
  • Q: What is a SQL injection attack?
      A SQL injection attack is a hacker who injects malicious code into a SQL query statement to cleverly construct a special query request to obtain the data stored in the database.
  • Q: What is a directory traversal attack?
      Directory traversal attack or vulnerable directory browsing is a malicious attack method that causes file resources on the server to be downloaded and sensitive information is obtained by accessing non-existent files or directories. , or execute malicious code carefully designed by the attacker.
  • Q: What is a file upload attack?
      A file upload attack or file placement attack is a method of attacking website applications by uploading malicious files to the server, overwriting the original files, and controlling file permissions on the server. the goal of.

Guess you like

Origin blog.csdn.net/universsky2015/article/details/132126738