Authorization protection method for ASP.NET application software running under IIS
By obtaining hardware environment information in the ASP.NET application for encryption processing, combined with regular checks and request-based authorization verification, the deficiencies in authorization protection in the IIS environment are solved, achieving stronger authorization protection and higher security and reliability.
Patent Information
- Application Number
- CN202411328505.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2024-10-29
AI Technical Summary
ASP.NET applications face reverse engineering, cracking risks and insufficient authorization management in the IIS environment, especially in virtualization and cloud environments where traditional protection mechanisms fail.
Use an authorization activation tool to obtain hardware environment information for encryption processing, generate an authorization application code, verify and generate an authorization activation code through the authorization server, and combine regular inspections and request-based inspection mechanisms to ensure continuous monitoring and invalidation processing of authorization status, including applications Domain restart mechanism.
It improves the security and reliability of the system, enhances the security and timeliness of authorization protection, prevents piracy and unauthorized use, and provides stronger authorization protection and more refined management.
Smart Images

Figure CN118862024A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of point data processing, in particular to the technical field of protecting executable software, and specifically to an authorization protection method when ASP.NET application software is running under IIS. Background Art
[0002] At present, with the rapid development of Internet technology, the convenience of software distribution and use has been greatly improved, and at the same time, it has also spawned more complex and diverse software authorization management needs. In the operating environment of ASP.NET applications, especially under IIS (Internet Information Services), software authorization protection is particularly important. Software authorization management introduces online activation and verification mechanisms, which ensure the legality of software through communication with remote servers, effectively preventing piracy and unauthorized use. Authorization management technology covers multiple mechanisms such as online activation, license files, hardware binding, virtualization detection and application encryption. Combined with the latest developments in information security such as digital signatures and blockchain technology, it provides more powerful protection for software. However, in the specific operating environment of ASP.NET applications and IIS, how to more effectively implement authorization protection is still a problem.
[0003] Although the existing software authorization protection technology is relatively mature, there are still some obvious defects and shortcomings in the operating environment of ASP.NET applications and IIS: 1. ASP.NET applications are still at risk of being reverse engineered and cracked. Decompilation, debugging, memory modification and other means can be used to bypass the existing protection mechanism, thereby illegally using or tampering with the software. Especially in the case of offline authorization, due to the lack of real-time communication verification with the remote server, the security and convenience are relatively low, and it is more likely to be cracked and abused; 2. In the authorization management of ASP.NET applications, there is a lack of a clear authorization expiration processing mechanism. Once the authorization is cracked or illegally used, the software cannot respond to the authorization expiration in a timely and effective manner, resulting in damage to software rights; 3. In virtualized and cloud environments, traditional hardware binding and activation mechanisms may no longer be effective, and new solutions are needed to adapt to these dynamic environments.
[0004] Therefore, it is necessary to improve the authorization protection method of the prior art when the ASP.NET application software is running under IIS to solve the above problems. Summary of the invention
[0005] The present invention overcomes the deficiencies of the prior art and provides an authorization protection method for ASP.NET application software when running under IIS, aiming to solve the problems in the prior art that ASP.NET application software faces reverse engineering, cracking risks and insufficient authorization management when running under IIS, and that traditional protection mechanisms may fail in virtualized and cloud environments.
[0006] To achieve the above object, the technical solution adopted by the present invention is: an authorization protection method for ASP.NET application software when it is running under IIS, comprising: S1. The authorization activation tool obtains the hardware environment information of the application software, performs encryption processing, and generates an authorization application code; S2. The authorization server receives and verifies the authorization application code, generates an authorization activation code, and returns it to the ASP.NET application software client for storage; S3. The authorization activation tool verifies the authorization activation code and writes the verified authorization information into the IIS system; S4. When the ASP.NET application software is started, the time interval for authorization check is set, and regular authorization check is automatically triggered within the set time interval; S5. When the ASP.NET application receives a regular request from the user, it calls the authorization check module to send a request to the authorization server to verify the legitimacy of the current request; S6. When the authorization is found to be invalid during regular checks or checks based on regular requests, authorization failure processing is performed, the application domain is restarted and logs are recorded, and authorization failure notifications are sent to administrators and users.
[0007] In a preferred embodiment of the present invention, in step S1, the acquired hardware environment information is encrypted using an asymmetric encryption algorithm: Apply for key generation: Choose two large prime numbers , calculate the product of the two ;calculate Euler function ; Select an integer , so that and and Coprime; Calculation about The modular inverse , ; Get the application public key , apply for a private key ; Apply for a public key to encrypt data, and apply for a private key to decrypt data; Apply for a public key to be pre-embedded in the authorization activation tool, and apply for a private key to be kept confidential and stored on the authorization server; Encryption hardware environment information: Concatenate the CPU serial number, hard disk ID, and network adapter MAC address into a string, perform a hash algorithm on the string, and obtain an application integer ; Use the application public key For application integer Encryption, encrypted application ciphertext ; The encrypted application ciphertext , combined with the ASP.NET application token and timestamp, they are concatenated together to form an authorization application code.
[0008] In a preferred embodiment of the present invention, step S2, S21. After receiving the authorization application code, the authorization server verifies the legitimacy and integrity of the application code; S22. After verification, a corresponding authorization activation code is generated, and the authorization activation code includes: encrypted authorization information and hardware environment information; S23. Return the generated authorization activation code to the ASP.NET application software client, and store the authorization activation code in an encrypted file or database.
[0009] In a preferred embodiment of the present invention, in step S21, the application ciphertext is verified: Authorization server uses application private key Decrypt the application ciphertext in the authorization application code; Use the application private key Application ciphertext Decrypt to restore the requested integer , the formula for applying for decryption value is ; The expected hash value is pre-calculated based on the known hardware environment information and stored on the authorization server, and the authorization server compares the application decryption value with the expected hash value; when the application decryption value matches the expected hash value, the authorization application code is valid; otherwise, the authorization application code is invalid.
[0010] In a preferred embodiment of the present invention, in step S22, the encrypted authorization information includes: authorization validity period, authorization level; the authorization activation code is a concatenated string of the authorization information and the hardware environment information, which is encrypted and generated with the authorization application code using the same asymmetric encryption algorithm to generate a corresponding activation public key and activation private key, the activation public key is stored in the authorization server, and the activation private key is stored in the authorization activation tool.
[0011] In a preferred embodiment of the present invention, in step S4, the step of periodically checking includes: S41. When the application is started, the periodic authorization check module is initialized and the check interval is set to 1-24 hours; the periodic authorization check module is responsible for automatically triggering the authorization check at the preset time interval during the operation of the application; S42, the periodic check module is automatically triggered within a set time interval to send a periodic authorization status request to the authorization server to query the authorization status of the current application; S43, the periodic checking module receives and parses the periodic authorization status information to determine whether the authorization status is valid; When the authorization status is valid, continue to operate normally; When the authorization status is invalid, the S6 authorization invalidation process is triggered.
[0012] In a preferred embodiment of the present invention, in step S5, the step of checking based on a conventional request includes: S51, when the application receives a regular request from the user, the authorization check module is called; S52, the authorization checking module sends a user authorization status request to the authorization server to verify the legitimacy of the user authorization status request; S53. After receiving the user authorization status request, the authorization server verifies the legitimacy and generates user authorization status information according to the verification result, and returns it to the authorization check module of the ASP.NET application. S54, the authorization checking module receives and parses the user authorization status information to determine whether the authorization is valid; When the authorization status is valid, continue to process the user request; When the authorization status is invalid, the S6 authorization invalidation process is triggered.
[0013] In a preferred embodiment of the present invention, in step S6, the steps of the authorization invalidation processing flow include: S61. When the authorization is found to be invalid by the regular authorization check or the check based on the regular request, the authorization invalidation module of the application is triggered; S62, the authorization expiration module records the current expiration status and expiration log; the expiration log includes: expiration time, expiration reason and processing result, so as to facilitate subsequent analysis and troubleshooting; S63. The authorization invalidation module calls the application domain restart mechanism.
[0014] In a preferred embodiment of the present invention, in step S6, the application domain restart mechanism includes: S64, the authorization invalidation module calls the application domain restart method, uninstalls the current application domain, and cleans up all resources and memory in the current application domain; S65. Reload the new application domain. When the new application domain is started, check the authorization status. After confirming that the authorization is invalid, reject all user requests and return an authorization invalidation prompt.
[0015] The present invention provides an authorization protection system for ASP.NET application software when it is running under IIS, comprising: The hardware information collection module is used to obtain the hardware environment information of the application software, including the CPU serial number, hard disk ID and network adapter MAC address; The authorization application code generation module is used to receive the hardware environment information output by the hardware information acquisition module, perform encryption processing, and generate an authorization application code; The authorization server communication module is used to communicate with the authorization server, send the authorization application code and receive the authorization activation code; The authorization activation code verification module is used to receive the authorization activation code returned by the authorization server communication module, decrypt and verify it, and ensure the legitimacy of the authorization information and hardware environment information; The periodic authorization check module is used to respond to the events of the periodic authorization check trigger module, send a periodic authorization status request to the authorization server, query the authorization status of the current application, and receive and parse the authorization status information to determine whether the authorization status is valid; The user request authorization check module is used to send a user authorization status request to the authorization server when the application receives a regular request from the user, verify the legitimacy of the user request, and receive and parse the user authorization status information to determine whether the authorization is valid. The authorization invalidation processing module is triggered when the regular authorization check module or the user request authorization check module finds that the authorization is invalid, records the invalidation status and invalidation log, and calls the application domain restart mechanism; The application domain restart module is used to unload the current application domain and reload the new application domain.
[0016] The present invention solves the defects existing in the background technology and has the following beneficial effects: (1) The present invention provides a software authorization protection method for ASP.NET applications running in the IIS environment. By combining periodic authorization checks with checks based on regular requests, the application domain restart mechanism is used to handle authorization failures, ensuring that the application can immediately take effect and stop running when authorization fails, thereby improving the security and reliability of the system. At the same time, the maintainability and user experience of the system are improved through user notification and logging mechanisms.
[0017] (2) In step S1 of the present invention, the authorization activation tool obtains the hardware environment information of the application software, performs encryption processing, and generates an authorization application code, thereby ensuring the authenticity and confidentiality of the hardware information and providing a reliable basis for subsequent authorization verification. Compared with the prior art, this encryption processing enhances the security of the authorization application, making reverse engineering and cracking more difficult; in step S2, the authorization server receives and verifies the legitimacy and integrity of the authorization application code, and then generates an authorization activation code containing the encrypted authorization information and hardware environment information. This process not only ensures the authenticity of the authorization application, but also protects the confidentiality of the authorization information through encryption processing. Compared with the prior art, the dual verification and encryption mechanism combining the authorization application code and the authorization activation code greatly improves the security of the authorization process, effectively prevents piracy and unauthorized use, and provides more powerful authorization protection for ASP.NET application software when running under IIS.
[0018] (3) In step S4, the present invention sets the authorization check time interval when the ASP.NET application is started, and automatically triggers the periodic authorization check within the set time interval, thereby ensuring that the application can continuously monitor the authorization status during operation and promptly discover and handle the authorization failure. Compared with the prior art, this periodic check mechanism improves the timeliness and accuracy of authorization management; (4) In step S5 of the present invention, when the ASP.NET application receives a regular request from a user, it calls the authorization check module to send a request to the authorization server to verify the legitimacy of the current request, thereby ensuring that each user request is authorized and verified, and effectively preventing unauthorized access and operation. Compared with the prior art, this regular request-based check mechanism enhances the security of the application and makes authorization management more refined and dynamic.
[0019] (5) The authorization invalidation processing mechanism in step S6 of the present invention ensures timely response and processing when the authorization is invalid, preventing the authorization from being cracked or illegally used; the combination of steps S4, S5 and S6 forms a closed-loop authorization management mechanism. From regular inspection, request-based inspection to authorization invalidation processing, each link is closely linked and supports each other. The comprehensive authorization management method not only improves the efficiency of authorization management, but also improves the overall effect of authorization management, providing more comprehensive and reliable authorization protection for ASP.NET applications.
[0020] (6) When the present invention detects that authorization has failed, it can ensure that all running code instances stop executing by restarting the application domain, which effectively prevents unauthorized code from continuing to run, thereby improving the security of the system. During the restart process, all resources and memory in the current application domain will be cleaned up to ensure that there are no unreleased resources or potential security risks, which helps to maintain the stability and performance of the system. Combined with regular authorization checks and checks based on regular requests, regular checks and request-based checks ensure continuous monitoring of the authorization status, and the restart mechanism serves as the last line of defense to ensure that immediate action can be taken even if authorization fails during the check process. This multi-level protection system improves overall security and reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. Figure 1 is a flow chart of a preferred embodiment of the present invention; Figure 2 It is a working diagram of a preferred embodiment of the present invention; Figure 3 This is the authorization application process of the preferred embodiment of the present invention; Figure 4 This is the authorization activation process of the preferred embodiment of the present invention; Figure 5 is a flow chart of periodic inspection of a preferred embodiment of the present invention; Figure 6 Detailed description of the invention The following is a flowchart of a routine request-based inspection according to a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0023] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0024] like Figure 1 , 2 As shown, an authorization protection method for ASP.NET application software when running under IIS includes the following steps: S1. The authorization activation tool obtains the hardware environment information of the application software, performs encryption processing, and generates an authorization application code; S2. The authorization server receives and verifies the authorization application code, generates an authorization activation code, and returns it to the ASP.NET application software client for storage; S3. The authorization activation tool verifies the authorization activation code and writes the verified authorization information into the IIS system; S4. When the ASP.NET application software is started, the time interval for authorization check is set, and regular authorization check is automatically triggered within the set time interval; S5. When the ASP.NET application receives a regular request from the user, it calls the authorization check module to send a request to the authorization server to verify the legitimacy of the current request; S6. When the authorization is found to be invalid during regular checks or checks based on regular requests, authorization failure processing is performed, the application domain is restarted and logs are recorded, and authorization failure notifications are sent to administrators and users.
[0025] like Figure 3 As shown, in step S1, the hardware environment information includes: CPU serial number, hard disk ID and network adapter MAC address; the obtained hardware environment information is encrypted, using a method of symmetric encryption and asymmetric encryption algorithm, preferably, an asymmetric encryption algorithm; Apply for key generation: Choose two large prime numbers , calculate the product of the two ;calculate Euler function ; Select an integer , so that and and Coprime; Calculation about The modular inverse , ; Get the application public key , apply for a private key ; Apply for a public key to encrypt data, and apply for a private key to decrypt data; Apply for a public key to be pre-embedded in the authorization activation tool, and apply for a private key to be kept confidential and stored on the authorization server; Encryption hardware environment information: Concatenate the CPU serial number, hard disk ID, and network adapter MAC address into a string, perform a hash algorithm on the string, and obtain an application integer ; Use the application public key For application integer Encryption, encrypted application ciphertext ; The encrypted application ciphertext , combined with the ASP.NET application token and timestamp, they are stitched together to form the final authorization application code.
[0026] Step S2, S21. After receiving the authorization application code, the authorization server verifies the legitimacy and integrity of the application code; S22. After verification, a corresponding authorization activation code is generated, and the authorization activation code includes: encrypted authorization information and hardware environment information; S23. Return the generated authorization activation code to the ASP.NET application software client, and store the authorization activation code in an encrypted file or database.
[0027] In step S21, the authorization server receives the authorization application code from the ASP.NET application software client through an HTTPS request; the authorization server parses the received authorization application code to extract the application ciphertext, the ASP.NET application token and the timestamp; In step S21, the application ciphertext, ASP.NET application token and timestamp are verified: S211, Authorization server uses application private key Decrypt the application ciphertext in the authorization application code; Use the application private key Application ciphertext Decrypt to restore the requested integer , the formula for applying for decryption value is .
[0028] The authorization server compares the application decryption value with the expected hash value, which is pre-calculated based on known hardware environment information and stored on the authorization server; when the application decryption value matches the expected hash value, the authorization application code is valid; S212. The authorization server checks the timestamp in the authorization application code to ensure that the application code is generated within a reasonable time range. If the timestamp range is less than 0-3 minutes from the current time, the timestamp verification is successful. Otherwise, the timestamp verification fails. The authorization server rejects the authorization application code and returns a corresponding error message. S213, the authorization server checks the ASP.NET application token in the authorization application code to ensure that the parsed ASP.NET application token is valid and matches the ASP.NET application token that is allowed to be authorized and pre-recorded in the authorization server; like Figure 4 As shown, in step S22, the encrypted authorization information includes: authorization validity period, authorization level; the authorization activation code is a concatenated string of the authorization information and the hardware environment information, and is encrypted and generated in the same steps as the authorization application code to generate a corresponding activation public key and activation private key, the activation public key is stored in the authorization server, and the activation private key is stored in the authorization activation tool; In step S3, S31, the authorization activation tool imports the authorization activation code; S32. The authorization activation tool decrypts the authorization activation code by using the activation private key, extracts the authorization information and hardware environment information, and verifies the legitimacy and integrity; Check whether the decrypted hardware environment information matches the hardware information of the current operating environment. If it does not match, the activation process stops, logs are recorded, and notifications are sent to administrators and users. Check whether the authorization validity period has expired. If the authorization validity period has expired, return to step S1 to re-apply for authorization, record the log and send a notification to the administrator and user; Check whether the authorization level meets the requirements of the current application. If the authorization level is lower than the requirement, return to step S1 to re-apply for authorization to increase the authorization level, record the log and send a notification to the administrator and the user; S33. Write the authorization information into the IIS system. The ASP.NET application reads and verifies the authorization status at runtime to complete the authorization activation process. Modify the IIS configuration file to add or update the configuration nodes related to authorization.
[0029] like Figure 5 As shown, in step S4, the step of regular inspection includes: S41. When the application is started, the periodic authorization check module is initialized and the check interval is set to 1-24 hours; the periodic authorization check module is responsible for automatically triggering the authorization check at the preset time interval during the operation of the application; S42, the periodic check module is automatically triggered within a set time interval to send a periodic authorization status request to the authorization server to query the authorization status of the current application; S43, the periodic checking module receives and parses the periodic authorization status information to determine whether the authorization status is valid; When the authorization status is valid, continue to operate normally; When the authorization status is invalid, the S6 authorization invalidation process is triggered; like Figure 6 As shown, in step S5, the steps of checking based on the conventional request include: S51. When the application receives a regular request from the user, the authorization check module is called; the regular request includes: page access and API call; S52, the authorization checking module sends a user authorization status request to the authorization server to verify the legitimacy of the user authorization status request; the user authorization status request includes: user identity ID, request type; S53. After receiving the user authorization status request, the authorization server verifies the legitimacy and generates user authorization status information according to the verification result, and returns it to the authorization check module of the ASP.NET application. The authorization server stores the legal user ID and request type, which are compared with the user authorization status request. If they are consistent, it is legal, otherwise it is illegal. S54, the authorization checking module receives and parses the user authorization status information to determine whether the authorization is valid; When the authorization status is valid, continue to process the user request; When the authorization status is invalid, the S6 authorization invalidation process is triggered; In step S6, the authorization invalidation processing flow includes: S61. When the authorization is found to be invalid by the regular authorization check or the check based on the regular request, the authorization invalidation module of the application is triggered; S62, the authorization expiration module records the current expiration status and expiration log; the expiration log includes: expiration time, expiration reason and processing result, so as to facilitate subsequent analysis and troubleshooting; S63. The authorization invalidation module calls the application domain restart mechanism.
[0030] In step S6, the application domain restart mechanism includes: S64, the authorization invalidation module calls the application domain restart method, uninstalls the current application domain, cleans up all resources and memory in the current application domain, and ensures that there are no unreleased resources or potential security risks; S65. Reload the new application domain. When the new application domain is started, check the authorization status. After confirming that the authorization is invalid, reject all user requests and return an authorization invalidation prompt to ensure that all unauthorized codes cannot continue to execute.
[0031] An authorization protection system for ASP.NET application software when running under IIS, comprising: The hardware information collection module is used to obtain the hardware environment information of the application software, including the CPU serial number, hard disk ID and network adapter MAC address; The authorization application code generation module is used to receive the hardware environment information output by the hardware information acquisition module, perform encryption processing, and generate an authorization application code; The authorization server communication module is used to communicate with the authorization server, send the authorization application code and receive the authorization activation code; The authorization activation code verification module is used to receive the authorization activation code returned by the authorization server communication module, decrypt and verify it, and ensure the legitimacy of the authorization information and hardware environment information; The periodic authorization check module is used to respond to the events of the periodic authorization check trigger module, send a periodic authorization status request to the authorization server, query the authorization status of the current application, and receive and parse the authorization status information to determine whether the authorization status is valid; The user request authorization check module is used to send a user authorization status request to the authorization server when the application receives a regular request from the user, verify the legitimacy of the user request, and receive and parse the user authorization status information to determine whether the authorization is valid. The authorization invalidation processing module is triggered when the regular authorization check module or the user request authorization check module finds that the authorization is invalid, records the invalidation status and invalidation log, and calls the application domain restart mechanism; The application domain restart module is used to unload the current application domain and reload the new application domain.
[0032] The above is based on the ideal embodiment of the present invention. Through the above description, relevant personnel can make various changes and modifications without departing from the technical concept of the present invention. The technical scope of the present invention is not limited to the content in the specification, and the technical scope must be determined according to the scope of the claims.
Claims
1. An authorization protection method for ASP.NET application software when running under IIS, characterized in that: Includes steps: S1. The authorization activation tool obtains the hardware environment information of the application software, performs encryption processing, and generates an authorization application code; S2. The authorization server receives and verifies the authorization application code, generates an authorization activation code, and returns it to the ASP.NET application software client for storage; S3. The authorization activation tool verifies the authorization activation code and writes the verified authorization information into the IIS system; S4. When the ASP.NET application software is started, the time interval for authorization check is set, and regular authorization check is automatically triggered within the set time interval; S5. When the ASP.NET application receives a regular request from the user, it calls the authorization check module to send a request to the authorization server to verify the legitimacy of the current request; S6. When the authorization is found to be invalid during regular checks or checks based on regular requests, authorization failure processing is performed, the application domain is restarted and logs are recorded, and authorization failure notifications are sent to administrators and users.
2. The authorization protection method for ASP.NET application software when running under IIS according to claim 1, characterized in that: In step S1, the acquired hardware environment information is encrypted using an asymmetric encryption algorithm: Apply for key generation: Choose two large prime numbers , calculate the product of the two ;calculate Euler function ; Select an integer , so that and and Coprime; Calculation about The modular inverse , ; Get the application public key , apply for a private key ; Apply for a public key to encrypt data, and apply for a private key to decrypt data; Apply for a public key to be pre-embedded in the authorization activation tool, and apply for a private key to be kept confidential and stored on the authorization server; Encryption hardware environment information: Concatenate the CPU serial number, hard disk ID, and network adapter MAC address into a string, perform a hash algorithm on the string, and obtain an application integer ; Use the application public key For application integer Encryption, encrypted application ciphertext ; The encrypted application ciphertext , combined with the ASP.NET application token and timestamp, they are concatenated together to form an authorization application code.
3. The authorization protection method for ASP.NET application software when running under IIS according to claim 1, characterized in that: Step S2, S21. After receiving the authorization application code, the authorization server verifies the legitimacy and integrity of the application code; S22. After verification, a corresponding authorization activation code is generated, and the authorization activation code includes: encrypted authorization information and hardware environment information; S23. Return the generated authorization activation code to the ASP.NET application software client, and store the authorization activation code in an encrypted file or database.
4. The authorization protection method for ASP.NET application software when running under IIS according to claim 3, characterized in that: In step S21, the application ciphertext is verified: Authorization server uses application private key Decrypt the application ciphertext in the authorization application code; Use the application private key Application ciphertext Decrypt to restore the requested integer , the formula for applying for decryption value is ; The expected hash value is pre-calculated based on the known hardware environment information and stored on the authorization server, and the authorization server compares the application decryption value with the expected hash value; when the application decryption value matches the expected hash value, the authorization application code is valid; otherwise, the authorization application code is invalid.
5. The authorization protection method for ASP.NET application software when running under IIS according to claim 3, characterized in that: In step S22, the encrypted authorization information includes: authorization validity period, authorization level; the authorization activation code is a concatenated string of the authorization information and the hardware environment information, which is encrypted and generated with the authorization application code using the same asymmetric encryption algorithm to generate the corresponding activation public key and activation private key. The activation public key is stored in the authorization server, and the activation private key is stored in the authorization activation tool.
6. The authorization protection method for ASP.NET application software when running under IIS according to claim 1, characterized in that: In step S4, the step of regular inspection includes: S41. When the application is started, the periodic authorization check module is initialized and the check interval is set to 1-24 hours; the periodic authorization check module is responsible for automatically triggering the authorization check at the preset time interval during the operation of the application; S42, the periodic check module is automatically triggered within a set time interval to send a periodic authorization status request to the authorization server to query the authorization status of the current application; S43, the periodic checking module receives and parses the periodic authorization status information to determine whether the authorization status is valid; When the authorization status is valid, continue to operate normally; When the authorization status is invalid, the S6 authorization invalidation process is triggered.
7. The authorization protection method for ASP.NET application software when running under IIS according to claim 1, characterized in that: In step S5, the steps of checking based on the conventional request include: S51, when the application receives a regular request from the user, the authorization check module is called; S52, the authorization checking module sends a user authorization status request to the authorization server to verify the legitimacy of the user authorization status request; S53. After receiving the user authorization status request, the authorization server verifies the legitimacy and generates user authorization status information according to the verification result, and returns it to the authorization check module of the ASP.NET application. S54, the authorization checking module receives and parses the user authorization status information to determine whether the authorization is valid; When the authorization status is valid, continue to process the user request; When the authorization status is invalid, the S6 authorization invalidation process is triggered.
8. The authorization protection method for ASP.NET application software when running under IIS according to claim 1, characterized in that: In step S6, the authorization invalidation processing flow includes: S61. When the authorization is found to be invalid by the regular authorization check or the check based on the regular request, the authorization invalidation module of the application is triggered; S62, the authorization expiration module records the current expiration status and expiration log; the expiration log includes: expiration time, expiration reason and processing result, so as to facilitate subsequent analysis and troubleshooting; S63. The authorization invalidation module calls the application domain restart mechanism.
9. The authorization protection method for ASP.NET application software when running under IIS according to claim 8, characterized in that: In step S6, the application domain restart mechanism includes: S64, the authorization invalidation module calls the application domain restart method, uninstalls the current application domain, and cleans up all resources and memory in the current application domain; S65. Reload the new application domain. When the new application domain is started, check the authorization status. After confirming that the authorization is invalid, reject all user requests and return an authorization invalidation prompt.
10. An authorization protection system for ASP.NET application software when it is running under IIS, based on an authorization protection method for ASP.NET application software when it is running under IIS according to any one of claims 1 to 9, comprising: The hardware information collection module is used to obtain the hardware environment information of the application software, including the CPU serial number, hard disk ID and network adapter MAC address; The authorization application code generation module is used to receive the hardware environment information output by the hardware information acquisition module, perform encryption processing, and generate an authorization application code; The authorization server communication module is used to communicate with the authorization server, send the authorization application code and receive the authorization activation code; The authorization activation code verification module is used to receive the authorization activation code returned by the authorization server communication module, decrypt and verify it, and ensure the legitimacy of the authorization information and hardware environment information; The periodic authorization check module is used to respond to the events of the periodic authorization check trigger module, send a periodic authorization status request to the authorization server, query the authorization status of the current application, and receive and parse the authorization status information to determine whether the authorization status is valid; The user request authorization check module is used to send a user authorization status request to the authorization server when the application receives a regular request from the user, verify the legitimacy of the user request, and receive and parse the user authorization status information to determine whether the authorization is valid. The authorization invalidation processing module is triggered when the regular authorization check module or the user request authorization check module finds that the authorization is invalid, records the invalidation status and invalidation log, and calls the application domain restart mechanism; The application domain restart module is used to unload the current application domain and reload the new application domain.
Citation Information
Patent Citations
Software authorization activation code generation method and system based on hardware features
CN112016055A
Software authorization method
CN113961884A
Software offline authorization method and system, computer equipment and storage medium
CN116244666A
Software authorization method, system and equipment and storage medium
CN116502189A
Authorization authentication method and system
CN116846599A
