Password processing method, program product, storage medium and equipment

By intercepting and generating false passwords, the problem of illegal users obtaining user passwords through F12 tools is solved, and the effect of improving password security is achieved.

CN119475316APending Publication Date: 2025-02-18BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411558930.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In the prior art, illegal users operate HTML tags in the browser through the F12 tool, which easily obtains the user's password, resulting in weak password security.

Method used

By intercepting the original password entered by the user in the password input box of the current page, a false password is generated that is different from the original password content, and a false password is displayed in the password input box. When the user clicks the login button, the original password is passed to the server for identity authentication via HTTP request.

Benefits of technology

Effectively prevent illegal users from obtaining real passwords through F12 tools, improve password security, and ensure that the real password is never displayed on the page.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119475316A_ABST
    Figure CN119475316A_ABST
Patent Text Reader

Abstract

The invention provides a password processing method, a program product, a storage medium and equipment, and the method comprises the steps: intercepting an original password input by a user in a password input box of a current page, enabling the original password not to be displayed in the page, generating a false password with different contents from the original password according to the length of the original password, and carrying out the verification of the false password. The false password is displayed in a password input box, and when it is detected that a user clicks a login button, an original password is transmitted to a server for identity authentication through an HTTP request. Therefore, the real password is hidden, and the false password is used for replacing the real password to be displayed on the page, so that the real password is displayed on the page from nothing while the real password is transmitted to the background for login authentication, an illegal user is effectively prevented from obtaining the real password through an F12 tool, and the password safety is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network security technology, and in particular to a cryptographic processing method, program product, storage medium and device. Background Art

[0002] The password input box is a text input box that receives the password entered by the user and hides the password characters in a secure way. It is widely used in various login pages. Current browsers will automatically remember the account number and password, etc., and upload them to the browser's own password library, which makes the user's password at risk of being leaked. Through the F12 tool in the browser, illegal users can view the source code of the web page, and then operate the HTML tags to obtain the plaintext password in the password input box. Therefore, how to improve the security of user passwords is a problem that needs to be solved urgently. Summary of the invention

[0003] The purpose of this application is to provide a password processing method, program product, storage medium and device, aiming to solve the problem in the related art that illegal users can easily obtain user passwords by operating HTML tags in the browser through the F12 tool, resulting in weak password security.

[0004] In a first aspect, the present application provides a password processing method, comprising: intercepting an original password entered by a user in a password input box on a current page; generating a false password according to the length of the original password, and displaying the false password in the password input box; the false password is a character sequence different from the content of the original password; and when it is detected that the user clicks a login button, passing the original password to a server through an HTTP request for identity authentication.

[0005] In the above implementation process, the original password entered by the user in the password input box of the current page is intercepted so that it is not displayed on the page. At the same time, a false password different from the original password is generated according to the length of the original password, and the false password is displayed in the password input box. When the user clicks the login button, the original password is passed to the server through an HTTP request for identity authentication. In this way, by hiding the real password and using a false password to replace the real password on the page, the real password is never displayed on the page while the real password is passed to the background for login authentication, thereby effectively preventing illegal users from obtaining the real password through the F12 tool and improving the security of the password.

[0006] Further, in some embodiments, intercepting the original password entered by the user in the password input box of the current page includes: monitoring input events of the password input box of the current page; when monitoring the user entering password characters in the password input box, intercepting the original password entered by the user, and storing the original password in the target storage area.

[0007] In the above implementation process, the input event of the password input box is monitored. When the user enters characters in the password input box, the system will immediately capture these inputs and store the captured original password in the target storage area for use in identity authentication. In this way, the security of the user's password is effectively improved.

[0008] Furthermore, in some embodiments, the method further includes: after identity authentication succeeds or fails, clearing the original password stored in the target storage area.

[0009] In the above implementation process, after identity authentication is performed based on the original password, the temporarily stored original password is deleted in time, thereby reducing the risk of password leakage.

[0010] Furthermore, in some embodiments, generating a false password according to the length of the original password includes: when the length of the original password is one character, generating one target character as the false password; when the length of the original password is two or more characters, generating two target characters as the false password.

[0011] In the above implementation process, only the first two target characters are displayed during the password input process, which can prompt the user that the input box is already in operation, and can also interfere with the password memory of illegal users.

[0012] Furthermore, in some embodiments, the target character is a black dot.

[0013] In the above implementation process, black dots are used as masking characters to replace the real password displayed in the password input box, thereby preventing the real password from being obtained by others through screen peeping or screenshots during the password input process, thereby improving password security.

[0014] Furthermore, in some embodiments, the method further includes: when it is detected that the user presses the enter key, generating a corresponding number of random characters according to the number of characters in the original password; and displaying the generated corresponding number of random characters in the password input box.

[0015] In the above implementation process, when the password input is completed, a corresponding number of random characters are generated according to the number of characters in the real password, and they are displayed in the password input box. In this way, the user can estimate whether his or her input is incorrect by checking the number of characters displayed in the password input box, thereby improving the user experience. At this time, the password in the password input box obtained by the F12 tool is the corresponding number of random characters, thereby effectively protecting the real password.

[0016] Further, in some embodiments, before intercepting the original password entered by the user in the password input box of the current page, it includes: detecting whether the password obfuscation function of the browser is turned on; the step of intercepting the original password entered by the user in the password input box of the current page is performed if the detection result is yes.

[0017] In the above implementation process, by providing a switch for the password obfuscation function, the needs of different users can be met and the user experience can be improved.

[0018] In a second aspect, the present application provides a password processing device, comprising: an interception module, used to intercept the original password entered by the user in the password input box of the current page; a display module, used to generate a false password according to the length of the original password, and display the false password in the password input box; the false password is a character sequence different from the content of the original password; a transmission module, used to transmit the original password to the server for identity authentication through an HTTP request when it is detected that the user clicks the login button.

[0019] In a third aspect, the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in any one of the first aspects when executing the computer program.

[0020] In a fourth aspect, the present application provides a computer-readable storage medium, on which instructions are stored. When the instructions are executed on a computer, the computer executes the method as described in any one of the first aspects.

[0021] In a fifth aspect, the present application provides a computer program product, which, when running on a computer, enables the computer to execute the method as described in any one of the first aspects.

[0022] Other features and advantages disclosed in the present application will be described in the following description, or some features and advantages can be inferred or determined without doubt from the description, or can be learned by implementing the above-mentioned technology disclosed in the present application.

[0023] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0025] Figure 1 A flowchart of a password processing method provided in an embodiment of the present application;

[0026] Figure 2 A schematic diagram of an implementation process of a solution for preventing illegal acquisition of password input box information provided in an embodiment of the present application;

[0027] Figure 3 A block diagram of a password processing device provided in an embodiment of the present application;

[0028] Figure 4 A structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0030] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0031] As described in the background technology, in the related art, there is a problem that illegal users can easily obtain user passwords by operating HTML tags in the browser through the F12 tool, resulting in weak password security. Based on this, the embodiment of the present application provides a password processing solution to solve the above problem.

[0032] Next, the implementation process of the embodiment of the present application is introduced:

[0033] like Figure 1 As shown, Figure 1This is a flowchart of a password processing method provided by an embodiment of the present application. The method can be implemented as a security module, integrated into an operating system or a browser, or implemented as a security software. For the convenience of discussion, the execution subject is referred to as a system below.

[0034] The method comprises:

[0035] Step 101: intercept the original password entered by the user in the password input box of the current page;

[0036] The current page mentioned in this step may be a web login page that the user is currently visiting, which may be a login page of a social networking site, or a login page of an email box, a game page, etc. In this embodiment, when the user enters a password in the password input box of the current page using an input device such as a keyboard, the system will intercept the content entered by the user so that it is not displayed in the password input box.

[0037] In some embodiments, this step may include: monitoring the input events of the password input box of the current page; when the user is monitored to enter password characters in the password input box, intercepting the original password entered by the user, and storing the original password in the target storage area. In other words, through front-end technologies such as JavaScript, the input events of the password input box are monitored. When the user enters characters in the password input box, the system will immediately capture these inputs and store the captured original password in the target storage area for use in identity authentication. In this way, the security of the user's password is effectively improved.

[0038] Furthermore, in some embodiments, the method further comprises: after the identity authentication succeeds or fails, clearing the original password stored in the target storage area. That is, after the identity authentication is performed based on the original password, the temporarily stored original password is deleted in time, so that even if the system is attacked, the attacker cannot obtain the user's original password from the system, thereby reducing the risk of password leakage.

[0039] In step 102, a false password is generated according to the length of the original password, and the false password is displayed in the password input box; the false password is a character sequence different from the original password;

[0040] In this embodiment, there are two password information, one is the original password entered by the user, that is, the real password, which will not be displayed on the page, and the other is a false password displayed on the page, which mainly plays a role of obfuscation. In this way, by hiding the real password and using a false password to display on the page instead, the security of the password is improved. Since the real password is never displayed on the page, illegal users cannot obtain the real password by viewing the HTML structure through the F12 tool.

[0041] In some embodiments, the generation of a false password according to the length of the original password mentioned in this step may include: when the length of the original password is one character, generating a target character as the false password; when the length of the original password is two or more characters, generating two target characters as the false password. That is, when the length of the password entered by the user is one character, the real password is the one character entered, and the false password generated by the system is one target character; when the length of the password entered by the user is two characters, the real password is the two characters entered, and the false password generated by the system is two target characters; when the length of the password entered by the user is greater than two characters, the real password is the corresponding characters entered, and the false password generated by the system is still two target characters. In other words, only the first two target characters are displayed during the password input process, which can prompt the user that the input box is already in operation, and can also interfere with the password memory of illegal users.

[0042] Optionally, the target character mentioned above can be a black dot. A black dot is a character that is usually used to represent a bullet point or as a paragraph separator. In this embodiment, a black dot is used as a masking character to replace the real password and is displayed in the password input box, thereby preventing the real password from being obtained by others through screen peeping or screenshots during the password input process, thereby improving the security of the password. Of course, in other embodiments, the target character here can also be a masking character in other forms, such as an asterisk, a dot, etc.

[0043] In addition, in some embodiments, it also includes: when it is detected that the user presses the enter key, a corresponding number of random characters are generated according to the number of characters in the original password; and the generated corresponding number of random characters are displayed in the password input box. That is to say, during the password input process, when the user clicks the enter key, it indicates that the password input is completed. At this time, the system generates a corresponding number of random characters according to the number of characters in the real password, and displays them in the password input box. In this way, the user can estimate whether his or her input is incorrect by checking the number of characters displayed in the password input box, thereby improving the user experience. Moreover, when the HTML structure is checked through the F12 tool at this time, it will be found that the password in the password input box is a corresponding number of random characters, not a real password, thereby effectively protecting the real password.

[0044] In step 103, when it is detected that the user clicks the login button, the original password is transmitted to the server through an HTTP request for identity authentication.

[0045] This step means that when the user clicks the login button, the system will send an HTTP (Hypertext Transfer Protocol) request to the server and pass the original password as a request parameter to the server. After receiving the HTTP request, the server will determine whether the current user has passed the identity authentication based on the original password and feedback the authentication result. In this way, the real password is not displayed while the real password is passed to the background for login authentication, thereby improving the security performance of the system.

[0046] Also, in some embodiments, before intercepting the original password entered by the user in the password input box of the current page, it may include: detecting whether the password obfuscation function of the browser is turned on; the step of intercepting the original password entered by the user in the password input box of the current page is performed when the detection result is yes. That is to say, the scheme of this embodiment can be implemented as the password obfuscation function of the browser. When the administrator turns on the password obfuscation function, the system uses a false password to replace the real password and displays it on the page. When the administrator turns off the password obfuscation function, the system no longer uses a false password to replace the real password, but uses the original password display method. In this way, when it is necessary to protect sensitive information or perform specific operations, the function can be turned on, and during normal debugging, the function can be turned off. In this way, by providing a switch for the password obfuscation function, the needs of different users can be met and the user experience can be improved.

[0047] In the embodiment of the present application, the original password entered by the user in the password input box of the current page is intercepted so that it is not displayed on the page. At the same time, a false password different from the original password is generated according to the length of the original password, and the false password is displayed in the password input box. When the user clicks the login button, the original password is transmitted to the server through an HTTP request for identity authentication. In this way, by hiding the real password and using a false password to replace the real password to be displayed on the page, the real password is transmitted to the background for login authentication, and the real password is never displayed on the page, thereby effectively preventing illegal users from obtaining the real password through the F12 tool and improving the security of the password.

[0048] In order to explain the solution of this application in more detail, a specific embodiment is introduced below:

[0049] This embodiment provides a solution to prevent illegal acquisition of password input box information. There are two password information in this solution. One is the real password entered by the user, recorded as password 1. This password will not be displayed on the page and will be directly passed to the backend for login information authentication when logging in. The other is a fake password displayed on the page, recorded as password 2, which mainly plays a role of obfuscation. The implementation process of this solution is as follows: Figure 2 As shown, including:

[0050] S201, user inputs password;

[0051] S202, determining password 1 and password 2 according to the values ​​input by the user, wherein password 1 is a combination of the characters input by the user, and when the length of the password input by the user is 1 character, password 2 is displayed as ".", and when the length of the password input by the user is greater than or equal to 2 characters, password 2 is displayed as "..";

[0052] S203, the user completes input and clicks the Enter key;

[0053] S204, Password 1 is the input value, and Password 2 is a corresponding number of random characters generated according to the number of characters in the input password;

[0054] S205, the user clicks the login button;

[0055] S206, sending an HTTP request, passing password 1 as a parameter to the server;

[0056] S207, determine whether the authentication is passed, if yes, execute S208, otherwise return to S201;

[0057] S208, end the process.

[0058] Let's take an example to illustrate: the user's real password is "lxn1234". When the user enters the password character "l", Password 1 is "l" and Password 2 is a small black dot, namely "."; when the user continues to enter the password character "x", Password 1 is "lx" and Password 2 is two small black dots, namely ".."; when the user continues to enter the password character "n", Password 1 is "lxn" and Password 2 is still two small black dots, namely ".."; when the user presses the Enter key after entering the password, seven random characters are generated according to the character length of Password 1. At this time, when the F12 tool is used to check the HTML structure, it will be found that the password in the password input box is seven random characters, not the real password; when the user clicks the login button, an HTTP request is sent, and Password 1 "lxn1234" is passed as a parameter to the background for identity authentication.

[0059] This embodiment scheme improves the security of the password by hiding the real password and using a random password instead of the real password to display on the page, thereby preventing illegal users from obtaining the real password through the F12 tool; and, during the password input process, only the first two characters are displayed, which can confuse peepers who want to illegally obtain the password. Since they do not know how many characters the user has entered, they will not doubt the authenticity of the password, and the real password cannot be obtained even if the label is viewed through a browser, thus protecting the real password.

[0060] Corresponding to the embodiments of the aforementioned method, the present application also provides embodiments of a cryptographic processing device and a terminal using the same:

[0061] like Figure 3 As shown, Figure 3 : is a block diagram of a password processing device provided in an embodiment of the present application, the device comprising:

[0062] The interception module 31 is used to intercept the original password entered by the user in the password input box of the current page;

[0063] The display module 32 is used to generate a false password according to the length of the original password and display the false password in the password input box; the false password is a character sequence different from the original password;

[0064] The transmission module 33 is used to transmit the original password to the server for identity authentication through an HTTP request when detecting that the user clicks the login button.

[0065] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.

[0066] This application also provides an electronic device, see Figure 4 , Figure 4 A block diagram of an electronic device provided in an embodiment of the present application. The electronic device may include a processor 410, a communication interface 420, a memory 430, and at least one communication bus 440. The communication bus 440 is used to realize direct connection and communication between these components. The communication interface 420 of the electronic device in the embodiment of the present application is used to communicate signaling or data with other node devices. The processor 410 may be an integrated circuit chip with signal processing capabilities.

[0067] The processor 410 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The processor 410 may be a microprocessor, or the processor 410 may be any conventional processor, etc.

[0068] The memory 430 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electric erasable programmable read-only memory (EEPROM), etc. The memory 430 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 410, the electronic device can execute the above-mentioned Figure 1 The method embodiment involves various steps.

[0069] Optionally, the electronic device may further include a storage controller and an input / output unit.

[0070] The memory 430, storage controller, processor 410, peripheral interface, input and output unit components are directly or indirectly electrically connected to each other to achieve data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses 440. The processor 410 is used to execute executable modules stored in the memory 430, such as software function modules or computer programs included in the electronic device.

[0071] The input and output unit is used to provide users with the task creation and to create a start optional time period or preset execution time for the task to realize the interaction between the user and the server. The input and output unit can be, but is not limited to, a mouse and a keyboard.

[0072] Understandably, Figure 4 The structure shown is for illustration only, and the electronic device may also include Figure 4 More or fewer components as shown, or with Figure 4 Different configurations are shown. Figure 4 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0073] An embodiment of the present application further provides a storage medium having instructions stored thereon. When the instructions are run on a computer, the computer program is executed by a processor to implement the method described in the method embodiment. To avoid repetition, the method will not be described here.

[0074] The present application also provides a computer program product, which, when executed on a computer, enables the computer to execute the method described in the method embodiment.

[0075] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0076] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0077] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0078] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0079] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0080] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

Claims

1. A password processing method, characterized in that: include: Intercept the original password entered by the user in the password input box on the current page; Generate a false password according to the length of the original password, and display the false password in the password input box; the false password is a character sequence different from the original password; When it is detected that the user clicks the login button, the original password is transmitted to the server through an HTTP request for identity authentication.

2. The method according to claim 1, characterized in that: The interception of the original password entered by the user in the password input box of the current page includes: Listen for input events of the password input box on the current page; When it is monitored that the user inputs password characters in the password input box, the original password input by the user is intercepted and stored in the target storage area.

3. The method according to claim 2, characterized in that Also includes: After the identity authentication succeeds or fails, the original password stored in the target storage area is cleared.

4. The method according to claim 3, characterized in that The generating of a false password according to the length of the original password comprises: When the length of the original password is one character, generating a target character as a false password; When the length of the original password is two or more characters, two target characters are generated as a false password.

5. The method according to claim 4, characterized in that The target character is a black dot.

6. The method according to claim 1, characterized in that Also includes: When it is detected that the user presses the enter key, a corresponding number of random characters are generated according to the number of characters in the original password; The generated corresponding number of random characters are displayed in the password input box.

7. The method according to claim 1, characterized in that Before intercepting the original password entered by the user in the password input box of the current page, the method includes: Detect whether the password obfuscation function of the browser is turned on; the step of intercepting the original password entered by the user in the password input box of the current page is performed when the detection result is yes.

8. A computer program product, characterized in that When the computer program product is executed on a computer, the computer is enabled to perform the method according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.