Directional password guessing method and system based on differential transformation guidance
The directional password guessing method guided by differential transformation utilizes encoders and decoders to perform differential transformation vector clustering on password pairs, generating interpretable password modification rules. This solves the problems of insufficient accuracy and interpretability in existing technologies, and improves the accuracy and stability of password guessing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NAT UNIV OF DEFENSE TECH
- Filing Date
- 2026-01-26
- Publication Date
- 2026-05-08
AI Technical Summary
Existing targeted password guessing methods are insufficient in terms of accuracy and interpretability, making it difficult to effectively capture user password modification behavior and affecting the stability and accuracy of security assessments.
A directional password guessing method based on differential transform is adopted. By performing differential transform vector clustering on password pairs through pre-trained encoder and decoder, typical modification patterns are captured, and a beam search algorithm is used to generate a target password set, providing interpretable password modification rules.
It improves the accuracy and stability of targeted password guessing, can automatically extract user password modification behavior, reduces model overhead and improves targeting, and enhances the interpretability of security assessment.
Smart Images

Figure CN121580376B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of password security technology, specifically relating to a method and system for directional password guessing based on differential transformation guidance. Background Technology
[0002] Due to its simplicity, ease of modification, and cost-effectiveness, text passwords are expected to remain the primary method of user authentication for the foreseeable future, with other alternative authentication technologies unable to compete. Recent research indicates that the average user has 80-107 different online accounts. Identity authentication is a crucial line of defense for cybersecurity, and text passwords, with their simplicity and ease of deployment, have long been an indispensable and irreplaceable method of user authentication in our daily lives. However, for ease of memorization and management, users often choose relatively simple strings as passwords, such as keyboard layouts, and reuse existing passwords, significantly increasing the risk of security vulnerabilities. Furthermore, users tend to include characters related to personal information (such as email address, name, etc.) in their passwords. In addition, users frequently reuse passwords on different websites or modify them through simple editing operations (e.g., inserting, deleting, or replacing characters) instead of generating entirely new passwords.
[0003] Currently, targeted password guessing methods are mainly divided into four categories based on their technical approaches: rule-based traditional methods, statistical methods, machine learning-based methods (especially deep learning), and hybrid password guessing schemes. Rule-based methods primarily rely on the application of fixed rules to users' historical passwords, while statistical methods can utilize template-based methods (such as PCFG) to model the correlation between users' personal information or historical passwords and other passwords. Researchers have continuously optimized these methods, achieving good results in specific scenarios. However, these traditional methods suffer from insufficient targeting and poor generalization. Given their limitations, with the significant progress and development of deep learning technology, existing technologies propose deep learning-based solutions to automatically capture patterns in user password modifications and settings, providing more accurate solutions for targeted password guessing.
[0004] Currently, deep learning-based targeted password guessing methods mainly follow two modeling paradigms. The first paradigm models the task as a sequence of edit operations prediction, learning the minimum edit path (such as a sequence of operations like insertion, deletion, and character replacement) from the source password to the target password. While this approach offers strong interpretability, its performance heavily relies on a pre-defined set of edit operations, introducing significant inductive bias and potentially failing to fully cover complex user modification behaviors. Furthermore, this method is prone to generating numerous duplicate guesses during the generation process, and its cracking efficiency is limited for password pairs with low character-level similarity. The second paradigm employs an end-to-end character sequence generation model, directly generating the target password's character sequence from the source password. This data-driven approach reduces reliance on prior knowledge but suffers from significant shortcomings in interpretability. Its black-box nature makes it difficult for researchers to trace and analyze the specific modification rules learned by the model, hindering a deeper understanding of users' password modification habits and patterns, and limiting its value for in-depth application in security analysis. Summary of the Invention
[0005] The technical problem to be solved by this invention is to provide a method and system for directional password guessing based on differential transformation, which addresses the above-mentioned problems in the prior art. This invention aims to improve the ability to capture password modification behavior, make up for the shortcomings of the current password modification behavior evaluation, and improve the stability and accuracy of password security evaluation.
[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:
[0007] A targeted password guessing method based on differential transform includes the following steps:
[0008] S101, based on known password pairs containing multiple typical modification paradigms, the source password and target password in the password pair are encoded into hidden layer representations by a pre-trained encoder, and the difference transformation vector between the hidden layer representations is calculated. The difference transformation vectors of all password pairs are clustered to obtain the difference password vectors of multiple typical modification paradigms. The typical modification paradigm is the typical modification rule of modifying the source password to obtain the target password.
[0009] S102, input the source password and the differential password vectors of various typical modification paradigms into the pre-trained decoder to obtain the probability distribution of each character in the target password in turn, and finally obtain the target password set under the corresponding typical modification paradigm.
[0010] S103, summarize the target password sets under various typical modification paradigms to obtain the target password guessing result of the source password.
[0011] Optionally, the functional expression of the difference transform vector is:
[0012] ;
[0013] in, The difference transform vector, For pooling functions, For encoder, The target password, For the source password, Target password The hidden layer representation. For source password The hidden layer representation.
[0014] Optionally, in step S101, when clustering the differential transform vectors of all password pairs, this includes the set of differential password vectors formed from the differential transform vectors of all password pairs. Among them, the objective function shown in the following formula is minimized, and the specified clustering algorithm is used to perform clustering to obtain the clusters containing... A typical modified paradigm of differential password vector clusters:
[0015] ;
[0016] in, Let be the objective function. The number of differential password vector clusters. Let k be the set of difference transform vectors in the k-th difference password vector cluster. The difference transform vector, The center vector of the k-th differential password vector cluster is the center vector of the k-th typical modification paradigm.
[0017] Optionally, in step S102, when the source password and the differential password vectors of various typical modification paradigms are input into the pre-trained decoder to obtain the probability distribution of each character in the target password, the beam search algorithm is used to obtain the top k most likely characters for each character in the target password, and finally the target password set under the corresponding typical modification paradigm is obtained.
[0018] Optionally, step S101 includes a step of training the encoder and decoder:
[0019] S201, Construct a training dataset whose training samples consist of source passwords and their associated target passwords;
[0020] S202, Extract the current batch of training samples from the training dataset;
[0021] S203, For the current batch of training samples, the source password and its associated target password of each training sample are encoded using an encoder, and the difference transform vector between the encoding results of the source password and its associated target password is calculated.
[0022] S204: For the current batch of training samples, decode each training sample and its corresponding differential transformation vector using the decoder to obtain the probability distribution of the target password, combine the preset loss function to calculate the loss and gradient, and optimize and update the network parameters of the encoder and decoder based on the gradient of the loss.
[0023] S205, determine whether the loss function has converged or whether the training batch has reached the maximum batch size. If not, jump to step S202 to continue training; otherwise, the encoder and decoder training is complete.
[0024] Optionally, the preset loss function is the cross-entropy loss function.
[0025] Optionally, the training of the encoder and decoder is followed by generation and fine-tuning of the encoder and decoder:
[0026] S301, Construct a test dataset, whose test samples consist of source passwords and their associated target passwords;
[0027] S302, use the encoder and decoder to obtain the target password guessing results of the test samples in the test dataset, compare the target password guessing results of the test samples with the real target password, and divide the test dataset into a subset of test data with correct guesses and a subset of test data with incorrect guesses;
[0028] S303, determine whether further fine-tuning is needed. If no further fine-tuning is needed, determine that the encoder and decoder fine-tuning is complete; otherwise, proceed to the next step.
[0029] S304, fine-tune the encoder and decoder using the correctly guessed subset of test data; use the fine-tuned encoder and decoder to obtain the target password guessing result of the test sample using the incorrectly guessed subset of test data, compare the target password guessing result of the test sample with the real target password, divide the test dataset into a new correctly guessed subset of test data and an incorrectly guessed subset of test data, and jump to step S303 to continue iterating.
[0030] The present invention also provides a targeted password guessing system based on differential transformation guidance, comprising a microprocessor and a memory interconnected thereto, wherein the microprocessor is programmed or configured to execute the targeted password guessing method based on differential transformation guidance.
[0031] Compared with existing technologies, this invention mainly achieves the following beneficial effects: To improve the fitting scheme of existing deep learning models for targeted password guessing tasks and to automatically extract interpretable password modification rules, firstly, this invention proposes a new targeted password guessing scheme, modeling the targeted password guessing task based on the differential representation of password modification behavior. Secondly, it characterizes the mainstream password modification behaviors for automatic extraction and uses a clustering scheme to automatically extract and summarize them. Furthermore, this invention proposes a dynamic guessing fine-tuning scheme based on the above guessing method that does not require retraining, reducing overhead while improving the targeting of guesses. This invention has significant advantages in both improving the targeting of neural network models for targeted password guessing and automatically extracting and representing password modification behaviors, improving the model's guessing performance and the method's robustness, and enhancing the stability and accuracy of user password security assessment. Attached Figure Description
[0032] Figure 1 This is a schematic diagram of the basic process of the method in an embodiment of the present invention.
[0033] Figure 2 This is a schematic diagram illustrating the process of training the encoder and decoder in an embodiment of the present invention.
[0034] Figure 3 This is a schematic diagram illustrating the generation and fine-tuning process of the encoder and decoder in an embodiment of the present invention.
[0035] Figure 4 This is a schematic diagram of the visual processing flow in an embodiment of the present invention. Detailed Implementation
[0036] To enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions of the present invention will be further described in detail below with reference to the accompanying drawings in the embodiments of the present invention.
[0037] like Figure 1 As shown, the targeted password guessing method based on differential transformation in this embodiment includes the following steps:
[0038] S101, based on known password pairs containing multiple typical modification paradigms, the source password and target password in the password pair are encoded into hidden layer representations by a pre-trained encoder, and the difference transformation vector between the hidden layer representations is calculated. The difference transformation vectors of all password pairs are clustered to obtain the difference password vectors of multiple typical modification paradigms. The typical modification paradigm is the typical modification rule of modifying the source password to obtain the target password.
[0039] S102, input the source password and the differential password vectors of various typical modification paradigms into the pre-trained decoder to obtain the probability distribution of each character in the target password in turn, and finally obtain the target password set under the corresponding typical modification paradigm.
[0040] S103, summarize the target password sets under various typical modification paradigms to obtain the target password guessing result of the source password.
[0041] This embodiment of the differential transform-guided targeted password guessing method employs an encoder and a decoder, both of which can utilize the standard Transformer model. The encoder is used to embed (map) the source or target password through a linear layer to obtain d. model A 128-dimensional (e.g., 128-dimensional) vector is used, and the initial representation is obtained by adding it to the positional encoding; then the initial representation is sequentially processed through n... layers The system uses three identical encoding layers, each employing multi-head self-attention to capture global dependencies. Residual connections and layer normalization are used to stabilize gradients, and finally, a feedforward network (FFN) enhances non-linearity, resulting in a hidden layer representation incorporating contextual information. The decoder takes the fused (concatenated) information of the differential password vector and the source password as input. It repeats a similar linear layer embedding and positional encoding process, then passes through n layers of identical decoding layers. Each decoding layer introduces an additional attention sublayer to dynamically focus on source information during generation, and a lower triangular mask ensures autoregressive properties. Finally, the decoded output is linearly projected onto the vocabulary dimension and probability normalized to obtain the predicted character distribution for each step. Autoregression reconstructs the character sequence of the target password. This modeling approach, combining encoder and decoder, offers significant advantages: firstly, it avoids the dependence of traditional editing operation models on discrete symbol sets, enabling more flexible learning of complex modification patterns; secondly, by explicitly modeling transformation vectors, this scheme provides a more interpretable path than traditional character generation models while generating data end-to-end—analyzing transformation vectors helps understand the macro-semantic direction of password modification, providing a new analytical dimension for studying user security behavior habits. For the trained encoder and decoder, the differences between the hidden layer representations of the source and target passwords are clustered to capture the mainstream modification behaviors of users in this scenario. After training, the clustering results and the source password are used to guess cross-site target passwords. Subsequently, the differences in the hidden layer representations of successfully guessed cross-site passwords are extracted by the encoder of the model and re-clustered. The new clustering results are then input into the decoder for guessing. Furthermore, the difference clustering results generated by the model (encoder) are analyzed to capture interpretable user password modification behaviors.
[0042] The differential transform vector is a directed vector in a high-dimensional semantic space that quantifies and represents password modification behavior. It captures the abstract and continuous semantic changes behind user modification behavior, rather than discrete and superficial character editing operations. The context-dependent vector sequence obtained after encoding different password strings by the encoder is used to construct the differential transform vector representing the password semantic modification behavior through pooling and other methods. This vector contains information such as the direction of modification (e.g., semantically tending towards adding a year or replacing characters) and magnitude (the severity of the modification). In this embodiment, when using a pre-trained encoder to encode the hidden layer representation and calculating the differential transform vector between the hidden layer representations, the functional expression of the differential transform vector is:
[0043] ;
[0044] in, The difference transform vector, For pooling functions, For encoder, The target password, For the source password, Target password The hidden layer representation. For source password The hidden layer representation. The pooling function is used to aggregate a sequence of vectors into a single vector that represents the entire password semantics. The specific pooling function can be used as needed, such as mean pooling. Or max pooling, etc.
[0045] Step S101 in this embodiment is used to obtain the differential transformation vector clusters required for model inference. Specifically, the differential transformation set obtained during model training is clustered to extract a limited number of common mainstream modification paradigms from the massive and noisy individual transformation vectors. Considering that users' modification habits are not completely random, but tend to follow a series of limited and reproducible patterns, this embodiment introduces cluster analysis (K-Means) to complete the abstraction and induction process of this pattern in order to extract common, high-level mainstream modification paradigms from these massive and noisy individual behaviors. By mapping all extracted differential password vectors to a high-dimensional semantic space, the K-Means algorithm can automatically group these vectors according to their geometric proximity in space. Each formed differential password vector cluster represents a set of password modification behaviors that are highly similar in semantics.
[0046] To improve the stability and efficiency of clustering, this embodiment determines an optimal number of clusters K under data-driven conditions. This K value represents the number of the most representative pattern types in password modification behavior. After determining the optimal K value, the K-Means algorithm is officially launched. By mapping all transformation vectors to a high-dimensional semantic space, the algorithm automatically and iteratively assigns these vectors to K different groups based on their geometric proximity in the space. Specifically, in step S101 of this embodiment, when clustering the differential transformation vectors of all password pairs, this includes the differential password vector set composed of the differential transformation vectors of all password pairs. In the process, the objective function shown in the following formula is minimized, and a specified clustering algorithm (such as K-Means) is used to perform clustering to obtain the clusters containing... A typical modified paradigm of differential password vector clusters:
[0047] ;
[0048] in, Let be the objective function. The number of differential password vector clusters. Let k be the set of difference transform vectors in the k-th difference password vector cluster. The difference transform vector, The center vector of the k-th differential password vector cluster is the center vector of the k-th typical modification paradigm. Let represent the Euclidean norm. Minimize using an optimization algorithm. Ultimately, this results in K clusters and K differential password vector clusters. Each resulting differential password vector cluster logically corresponds to a set of password modification behaviors that are highly similar at the semantic level. The mathematical centroid of this cluster is extracted in this embodiment as the final paradigm expression of this behavior pattern, namely, the mainstream transformation paradigm vector. Thus, this embodiment successfully transforms the discrete differential password vectors into a structured knowledge base composed of K core transformation rules. When performing target password guessing based on transformation paradigm guidance and bundle search, this embodiment no longer relies on the model's original generation behavior, which may have domain bias, but actively guides the process. Specifically, this embodiment uses each mainstream transformation paradigm vector discovered in the second step... This, along with the original password, serves as input to the decoder. The decoder then receives this bootstrapping initial state and the original source password. After obtaining the encoding context, the sequence generation of each character in the target password begins.
[0049] In step S102 of this embodiment, when the differential password vectors of the source password and various typical modification paradigms are input into the pre-trained decoder to sequentially obtain the probability distribution of each character in the target password, this includes using a beam search algorithm to obtain the k most probable characters for each character in the target password, ultimately obtaining the target password set under the corresponding typical modification paradigm. To further improve the generation quality, this embodiment does not use a simple greedy method, but rather a beam search scheme. The beam search retains the probability distribution of each character in the decoding process. This method identifies the most likely candidate sequences, thereby exploring a broader search space and avoiding missing the global optimal solution due to early suboptimal choices. Finally, by applying K mainstream transformation paradigms one by one and combining them with beam search, this embodiment generates a target password guessing list containing multiple high-quality candidates for each source password, and uses this list to perform a matching attack on the target. Specifically, this embodiment includes using a beam search algorithm to obtain the k most likely characters for each character in the target password, including: Step 1: Initialize the candidate sequence set, setting the preset start sequence symbol " <start>"As the initial candidate sequence, it is added to the candidate sequence set; where the initial score of the initial candidate sequence is zero, and the capacity of the candidate sequence set is determined by a predefined threshold beam_hold. Step 2: Iterative expansion of candidate sequences. For each time step in the sequence generation process, the following sub-steps are performed: ①, Probability prediction: Input each candidate sequence (source password and differential transform vector) in the candidate sequence set into the decoder to obtain the probability distribution of the next character corresponding to each candidate sequence (target password). ②, Generating temporary candidate sequences: For each candidate sequence, select the k next characters with the highest probability values from the probability distribution, and append the next characters to the end of the candidate sequence to form multiple..." Temporary candidate sequences. ③ Calculate sequence score: Based on the probability distribution, calculate the cumulative score of each temporary candidate sequence; wherein, the cumulative score is calculated by logarithmic probability summation, specifically: the cumulative score of the new sequence is equal to the cumulative score of its parent sequence plus the logarithmic probability value of the next character appended. ④ Sorting and pruning: Sort all generated temporary candidate sequences according to their cumulative scores from high to low, and select the top beam_hold temporary candidate sequences with the highest cumulative scores to update the candidate sequence set. Step 3: Termination condition judgment and processing. After iterative expansion at each time step, perform the following judgment: check whether the last character of each candidate sequence in the updated candidate sequence set is an end symbol. <end>If the last character of a candidate sequence is the end symbol. <end>If the candidate sequence is not found, it is removed from the candidate sequence set and added to the candidate password set. The iterative expansion process continues until any of the following termination conditions are met: ① the total number of current time steps equals the preset maximum sequence generation length; ② the candidate sequence set is empty; Step 4: Output the target password. When the termination condition is met, the start symbol of the password in the candidate password set is removed. <start>With end symbol <end>The candidate password set is output as the final target password list.
[0050] In actual attacks, not all discovered transformation paradigms are equally important. To enable the model to adaptively select the optimal rule based on the specific attack target, this embodiment abandons the method of manually setting priorities. In the guided inference framework of this embodiment, for a given source password... The system applies all K typical modification paradigms in parallel and generates several candidate target passwords for each paradigm. The final attack list will naturally include the results generated by different paradigms. Through subsequent success rate statistics, this embodiment can dynamically evaluate and adjust the effectiveness of different paradigms in different scenarios, thereby achieving a more intelligent and responsive attack method. This allows the model to autonomously determine which rules are more likely to be successfully exploited based on actual attack needs, rather than relying on static, manually defined rules. Specifically, when summarizing the target password sets under various typical modification paradigms to obtain the target password guessing results of the source password in step S103, it includes sorting the target passwords in the target password guessing results according to the weights of the K typical modification paradigms. The weights are configured according to the actual application scenario.
[0051] like Figure 2 As shown, this embodiment includes a step of training the encoder and decoder before step S101:
[0052] S201, Construct a training dataset whose training samples consist of source passwords and their associated target passwords;
[0053] S202, Extract the current batch of training samples from the training dataset;
[0054] S203, For the current batch of training samples, the source password and its associated target password of each training sample are encoded using an encoder, and the difference transform vector between the encoding results of the source password and its associated target password is calculated.
[0055] S204: For the current batch of training samples, decode each training sample and its corresponding differential transformation vector using the decoder to obtain the probability distribution of the target password, combine the preset loss function to calculate the loss and gradient, and optimize and update the network parameters of the encoder and decoder based on the gradient of the loss.
[0056] In step S205, determine whether the loss function has converged or whether the training batch has reached its maximum. If not, proceed to step S202 to continue training; otherwise, the encoder and decoder are trained. Provide the transform vector and source password to the decoder to predict the distribution of the target password, perform loss calculation and gradient feedback operations, and repeat the above process until it is verified that the model loss no longer significantly decreases or the maximum training epoch is reached. As an optional implementation, the preset loss function in this embodiment is the cross-entropy loss function. The cross-entropy loss function is a well-known loss function, so its specific function expression will not be detailed here.
[0057] Furthermore, simply training on the password-changing behavior of users on existing websites or services may not yield satisfactory guessing results in cross-site scenarios, necessitating generation and fine-tuning tailored to the target scenario. Specifically, by re-inputting the original password and the target password successfully cracked during the model inference phase into the model, differential transformation vectors are extracted and clustered to obtain a new differential transformation vector cluster specific to the target scenario. This cluster, along with the original password, is then used for model inference, generating new candidate passwords through beam search, producing new cracking results. Based on this, the encoder and decoder are fine-tuned using a subset of correctly guessed test data. Figure 3 As shown, the training of the encoder and decoder is followed by generation and fine-tuning of the encoder and decoder:
[0058] S301, Construct a test dataset, whose test samples consist of source passwords and their associated target passwords;
[0059] S302, use the encoder and decoder to obtain the target password guessing results of the test samples in the test dataset, compare the target password guessing results of the test samples with the real target password, and divide the test dataset into a subset of test data with correct guesses and a subset of test data with incorrect guesses;
[0060] S303, determine whether further fine-tuning is needed. If no further fine-tuning is needed, determine that the encoder and decoder fine-tuning is complete; otherwise, proceed to the next step.
[0061] S304, fine-tune the encoder and decoder using the correctly guessed subset of test data; use the fine-tuned encoder and decoder to obtain the target password guessing result of the test sample using the incorrectly guessed subset of test data, compare the target password guessing result of the test sample with the real target password, divide the test dataset into a new correctly guessed subset of test data and an incorrectly guessed subset of test data, and jump to step S303 to continue iterating.
[0062] Furthermore, this embodiment also includes analyzing the password transformation vector cluster. Semantic features of the password transformation vector cluster are extracted through methods such as setting probe passwords to observe the impact of transformation vectors on the password, and calculating the similarity between the password transformation vector cluster and the password vector. Here, the probe password refers to a set of passwords with diverse structures and containing various character semantic features, such as... Figure 4 As shown, in this embodiment, the effect of the differential transformation vector on these passwords is observed through the following visualization processing of automated extraction and summarization of password modification rules, thereby observing the modification behavior of the transformation vector:
[0063] S401, obtain the differential password vector cluster.
[0064] S402, Design Probe Passwords. Specifically, design an algorithm to manually select representative passwords with various characteristics (length, character type, semantics).
[0065] S403, Construct the password vector space. Specifically, by inputting a large number of passwords into the encoder to obtain the hidden representation of the passwords, the password vector space is constructed.
[0066] S404, Probe-based Differential Analysis. The differential password vector cluster obtained in step S401 and the probe password obtained in step S402 are input into the trained model decoder to explore the impact of the differential password vector cluster on the decoding operation of each probe password. By analyzing the differences between the generated candidate passwords and the original probe passwords, the modification rules corresponding to the differential password vector cluster are analyzed.
[0067] S405, Nearest Neighbor-Based Association Analysis. Similarity is calculated between the differential password vector cluster obtained in step S401 and each vector in the password vector space obtained in step S403. This yields a set of password vectors that are similar to the variable vector cluster. The common features of their original character representations are analyzed to obtain the semantic features of the differential password vector cluster.
[0068] S406. Based on the schemes in steps S404 and S405, the features and semantics of the differential password vector clusters are analyzed and summarized to obtain visualized analysis results.
[0069] In the visualization processing of automatic extraction and induction of password modification rules, in order to translate these abstract, high-dimensional transformation paradigm vectors into understandable modification rules, two complementary interpretive analysis methods can be used: probe-based differential analysis and nearest-neighbor-based association analysis, to capture the functional and semantic interpretation of differential transformation vector clusters and extract the mainstream rule set. (1) Probe-based differential analysis: This method aims to infer the function by observing the effect of transformation paradigm on specific instances. This scheme designs two types of experiments: First, a set of probe passwords with diverse structures (such as "password123", "iloveyou2022", etc.) are set, and each paradigm vector is applied to the initial decoding state of these probes. By comparing the difference between the guided generation result and the original probe string, the specific operation of the paradigm (e.g., year increment or first letter capitalization) is summarized. Secondly, in order to explore the purest semantic connotation of the paradigm vector, it is applied to a neutral vector representing the average password (such as the mean of all password representations or an empty password), and the result is directly decoded to observe whether it can generate fragments with specific patterns (such as the pure symbol pattern "!@#" or the pure number pattern "2024" etc.). (2) Neighbor-based association analysis: This method aims to find the real password patterns most related to the abstract paradigm from a data-driven perspective. For example, firstly, a high-dimensional vector library containing all password representations in the dataset is constructed. Then, for each mainstream paradigm vector, the similarity is calculated in the library (optionally, cosine similarity is used) to retrieve the set of password representations closest to it. By statistically analyzing the common features of these neighboring passwords at the string level (such as all containing keyboard sequences, all ending with special symbols, etc.), the semantic concept encapsulated by the paradigm vector can be inferred in reverse.
[0070] This embodiment also provides a differential transform-guided targeted password guessing system, including a microprocessor and a memory interconnected, wherein the microprocessor is programmed or configured to execute the differential transform-guided targeted password guessing method. This embodiment also provides a computer-readable storage medium storing a computer program or instructions programmed or configured to execute the differential transform-guided targeted password guessing method via a processor. This embodiment also provides a computer program product, including a computer program or instructions programmed or configured to execute the differential transform-guided targeted password guessing method via a processor.
[0071] Those skilled in the art will understand that the technical solutions provided by this invention may take the form of a method, system, or computer program product. Therefore, this invention may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this invention may take the form of a computer program product embodied on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, produce an implementation of the flowchart... Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0072] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.< / end> < / start> < / end> < / end> < / start>
Claims
1. A directional password guessing method based on differential transform, characterized in that, Includes the following steps: S101, based on known password pairs containing multiple typical modification paradigms, the source password and target password in the password pair are encoded into hidden layer representations by a pre-trained encoder, and the difference transformation vector between the hidden layer representations is calculated. The difference transformation vectors of all password pairs are clustered to obtain the difference password vectors of multiple typical modification paradigms. The typical modification paradigm is the typical modification rule of modifying the source password to obtain the target password. S102, input the source password and the differential password vectors of various typical modification paradigms into the pre-trained decoder to obtain the probability distribution of each character in the target password in turn, and finally obtain the target password set under the corresponding typical modification paradigm. S103, summarize the target password sets under various typical modification paradigms to obtain the target password guessing results of the source password; The functional expression of the difference transform vector is: ; in, The difference transform vector, For pooling functions, For encoder, The target password, For the source password, Target password The hidden layer representation. For source password Hidden layer representation; In step S101, when clustering the differential transform vectors of all password pairs, this includes the set of differential password vectors formed from the differential transform vectors of all password pairs. Among them, the objective function shown in the following formula is minimized, and the specified clustering algorithm is used to perform clustering to obtain the clusters containing... A typical modified paradigm of differential password vector clusters: ; in, Let be the objective function. The number of differential password vector clusters. Let k be the set of difference transform vectors in the k-th difference password vector cluster. The difference transform vector, The center vector of the k-th differential password vector cluster is the center vector of the k-th typical modification paradigm.
2. The directional password guessing method based on differential transformation as described in claim 1, characterized in that, In step S102, when the source password and the differential password vectors of various typical modification paradigms are input into the pre-trained decoder to obtain the probability distribution of each character in the target password, the beam search algorithm is used to obtain the top k most likely characters for each character in the target password, and finally the target password set under the corresponding typical modification paradigm is obtained.
3. The directional password guessing method based on differential transformation as described in claim 1, characterized in that, Step S101 precedes the steps of training the encoder and decoder: S201, Construct a training dataset whose training samples consist of source passwords and their associated target passwords; S202, Extract the current batch of training samples from the training dataset; S203, For the current batch of training samples, the source password and its associated target password of each training sample are encoded using an encoder, and the difference transform vector between the encoding results of the source password and its associated target password is calculated. S204: For the current batch of training samples, decode each training sample and its corresponding differential transformation vector using the decoder to obtain the probability distribution of the target password, combine the preset loss function to calculate the loss and gradient, and optimize and update the network parameters of the encoder and decoder based on the gradient of the loss. S205, determine whether the loss function has converged or whether the training batch has reached the maximum batch size. If not, jump to step S202 to continue training; otherwise, the encoder and decoder training is complete.
4. The directional password guessing method based on differential transformation as described in claim 3, characterized in that, The preset loss function is the cross-entropy loss function.
5. The directional password guessing method based on differential transformation as described in claim 3, characterized in that, The training of the encoder and decoder is followed by generation and fine-tuning of the encoder and decoder: S301, Construct a test dataset, whose test samples consist of source passwords and their associated target passwords; S302, use the encoder and decoder to obtain the target password guessing results of the test samples in the test dataset, compare the target password guessing results of the test samples with the real target password, and divide the test dataset into a subset of test data with correct guesses and a subset of test data with incorrect guesses; S303, determine whether further fine-tuning is needed; if no further fine-tuning is needed, determine that the fine-tuning of the encoder and decoder is complete. Otherwise, proceed to the next step; S304, fine-tunes the encoder and decoder using a subset of correctly guessed test data; The incorrectly guessed subset of test data is used to obtain the target password guessing result of the test sample using the fine-tuned encoder and decoder. The target password guessing result of the test sample is compared with the real target password. The test dataset is divided into a new subset of correctly guessed test data and a subset of incorrectly guessed test data. Then, the process jumps to step S303 to continue iterating.
6. A directional password guessing system based on differential transform guidance, comprising a microprocessor and a memory interconnected, characterized in that, The microprocessor is programmed or configured to execute the differential transform-guided directional password guessing method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Password guessing method of parameterized hybrid model
CN112861113A
Lightweight password guessing dictionary generation method and device based on variational auto-encoder
CN113051873A