Research Article
Efficient and Transparent Method for Large-Scale TLS Traffic Analysis of Browsers and Analogous Programs
Algorithm 1
Generation algorithm of path similarity.
| Input: The set of CFGs in target binary program, CFG_SET. The set of path templates, PT | | Output: The set of path similarity values, SV_SET | | 1: function PathSimGenerator(CFG_SET, PT) | | 2: for graph in CFG_SET | | 3: Initialize an array variable, stack | | 4: Append first node of graph to stack | | 5: while stack is not empty | | 6: Pop the top item n from stack | | 7: Load instruction sequence of n | | 8: Get current path path_c and its label sequence label_c from stack | | 9: if the length of stack is equal with length of path_c and p in PT has the same label with path_c then | | 10: s_value = PATH_SIM(p, path_c) | | 11: Insert s_value into SV_SET | | 12: Remove n from stack | | 13: else | | 14: Load neighbors of n into n_nbs | | 15: if b in n_nbs is not visited then | | 16: if b is not in stack then | | 17: Append b to stack | | 18: Mark b as visited | | 19: end if | | 20: else | | 21: Remove n from stack | | 22: Mark all items in n_nbs as not visited | | 23: end if | | 24: end if | | 25: end while | | 26: end for | | 27: return SV_SET | | 28: end function |
|