解密/解码加密/编码数据

时间:2016-12-27 00:03:49

标签: encryption character-encoding cryptography reverse-engineering

我试图提高某些数据库软件的互操作性。数据库可以编写和读取存储的SQL查询"。我想弄清楚这些SQL查询的格式,以便我可以在应用程序之外构建它们。

我开始收集一些数据:

"A"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 3a c2 15 02 79 20 11 38 1f c6 60 04 32 00 99 3a 0f f7
"B"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 3a c1 15 02 79 20 11 38 1f c6 60 04 32 00 99 60 0f f8
"C"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 3a c3 15 02 79 20 11 38 1f c6 60 04 32 00 99 86 0f f9
"D"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 ba c0 15 02 79 20 11 38 1f c6 60 04 32 00 99 ac 0f fa
"E"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 ba c2 15 02 79 20 11 38 1f c6 60 04 32 00 99 d2 0f fb
"F"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 ba c1 15 02 79 20 11 38 1f c6 60 04 32 00 99 f8 0f fc
"G"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 ba c3 15 02 79 20 11 38 1f c6 60 04 32 00 9a 1e 0f fd
"H"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 7a c0 15 02 79 20 11 38 1f c6 60 04 32 00 9a 44 0f fe
"I"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 7a c2 15 02 79 20 11 38 1f c6 60 04 32 00 9a 6a 0f ff
"J"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 7a c1 15 02 79 20 11 38 1f c6 60 04 32 00 9a 90 10 00
"K"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 7a c3 15 02 79 20 11 38 1f c6 60 04 32 00 9a b6 10 01
"L"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 fa c0 15 02 79 20 11 38 1f c6 60 04 32 00 9a dc 10 02
"M"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 fa c2 15 02 79 20 11 38 1f c6 60 04 32 00 9b 02 10 03
"N"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 fa c1 15 02 79 20 11 38 1f c6 60 04 32 00 9b 28 10 04
"O"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 fa c3 15 02 79 20 11 38 1f c6 60 04 32 00 9b 4e 10 05
"P"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 06 c0 15 02 79 20 11 38 1f c6 60 04 32 00 9b 74 10 06
"Q"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 06 c2 15 02 79 20 11 38 1f c6 60 04 32 00 9b 9a 10 07
"R"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 06 c1 15 02 79 20 11 38 1f c6 60 04 32 00 9b c0 10 08
"S"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 06 c3 15 02 79 20 11 38 1f c6 60 04 32 00 9b e6 10 09
"T"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 86 c0 15 02 79 20 11 38 1f c6 60 04 32 00 9c 0c 10 0a
"U"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 86 c2 15 02 79 20 11 38 1f c6 60 04 32 00 9c 32 10 0b
"V"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 86 c1 15 02 79 20 11 38 1f c6 60 04 32 00 9c 58 10 0c
"W"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 86 c3 15 02 79 20 11 38 1f c6 60 04 32 00 9c 7e 10 0d
"X"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 46 c0 15 02 79 20 11 38 1f c6 60 04 32 00 9c a4 10 0e
"Y"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 46 c2 15 02 79 20 11 38 1f c6 60 04 32 00 9c ca 10 0f
"Z"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 46 c1 15 02 79 20 11 38 1f c6 60 04 32 00 9c f0 10 10
"a"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 26 c2 15 02 79 20 11 38 1f c6 60 04 32 00 9d fa 10 17
"b"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 26 c1 15 02 79 20 11 38 1f c6 60 04 32 00 9e 20 10 18
"c"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 26 c3 15 02 79 20 11 38 1f c6 60 04 32 00 9e 46 10 19
"d"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 a6 c0 15 02 79 20 11 38 1f c6 60 04 32 00 9e 6c 10 1a
"e"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 a6 c2 15 02 79 20 11 38 1f c6 60 04 32 00 9e 92 10 1b
"f"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 a6 c1 15 02 79 20 11 38 1f c6 60 04 32 00 9e b8 10 1c
"g"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 a6 c3 15 02 79 20 11 38 1f c6 60 04 32 00 9e de 10 1d
"h"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 66 c0 15 02 79 20 11 38 1f c6 60 04 32 00 9f 04 10 1e
"i"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 66 c2 15 02 79 20 11 38 1f c6 60 04 32 00 9f 2a 10 1f
"j"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 66 c1 15 02 79 20 11 38 1f c6 60 04 32 00 9f 50 10 20
"k"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 66 c3 15 02 79 20 11 38 1f c6 60 04 32 00 9f 76 10 21
"l"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 e6 c0 15 02 79 20 11 38 1f c6 60 04 32 00 9f 9c 10 22
"m"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 e6 c2 15 02 79 20 11 38 1f c6 60 04 32 00 9f c2 10 23
"n"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 e6 c1 15 02 79 20 11 38 1f c6 60 04 32 00 9f e8 10 24
"o"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 e6 c3 15 02 79 20 11 38 1f c6 60 04 32 00 a0 0e 10 25
"p"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 16 c0 15 02 79 20 11 38 1f c6 60 04 32 00 a0 34 10 26
"q"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 16 c2 15 02 79 20 11 38 1f c6 60 04 32 00 a0 5a 10 27
"r"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 16 c1 15 02 79 20 11 38 1f c6 60 04 32 00 a0 80 10 28
"s"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 16 c3 15 02 79 20 11 38 1f c6 60 04 32 00 a0 a6 10 29
"t"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 96 c0 15 02 79 20 11 38 1f c6 60 04 32 00 a0 cc 10 2a
"u"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 96 c2 15 02 79 20 11 38 1f c6 60 04 32 00 a0 f2 10 2b
"v"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 96 c1 15 02 79 20 11 38 1f c6 60 04 32 00 a1 18 10 2c
"w"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 96 c3 15 02 79 20 11 38 1f c6 60 04 32 00 a1 3e 10 2d
"x"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 56 c0 15 02 79 20 11 38 1f c6 60 04 32 00 a1 64 10 2e
"y"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 56 c2 15 02 79 20 11 38 1f c6 60 04 32 00 a1 8a 10 2f
"z"      ff aa 01 01 50 00 00 00 78 01 63 64 40 05 ff ff fd e7 4c 64 c8 01 c2 78 20 ce 64 c8 63 c8 66 28 66 00 8a 32 56 c1 15 02 79 20 11 38 1f c6 60 04 32 00 a1 b0 10 30

上面我们有存储查询的引用内容(左)和BLOB数据转换为十六进制(右)。

大多数内容都没有改变,所以让我们首先将字符串修剪为严格改变的字节:

"A"     ...   3a c2   ...   99 3a 0f f7
"B"     ...   3a c1   ...   99 60 0f f8
"C"     ...   3a c3   ...   99 86 0f f9
"D"     ...   ba c0   ...   99 ac 0f fa
"E"     ...   ba c2   ...   99 d2 0f fb
"F"     ...   ba c1   ...   99 f8 0f fc
"G"     ...   ba c3   ...   9a 1e 0f fd
"H"     ...   7a c0   ...   9a 44 0f fe
"I"     ...   7a c2   ...   9a 6a 0f ff
"J"     ...   7a c1   ...   9a 90 10 00
"K"     ...   7a c3   ...   9a b6 10 01
"L"     ...   fa c0   ...   9a dc 10 02
"M"     ...   fa c2   ...   9b 02 10 03
"N"     ...   fa c1   ...   9b 28 10 04
"O"     ...   fa c3   ...   9b 4e 10 05
"P"     ...   06 c0   ...   9b 74 10 06
"Q"     ...   06 c2   ...   9b 9a 10 07
"R"     ...   06 c1   ...   9b c0 10 08
"S"     ...   06 c3   ...   9b e6 10 09
"T"     ...   86 c0   ...   9c 0c 10 0a
"U"     ...   86 c2   ...   9c 32 10 0b
"V"     ...   86 c1   ...   9c 58 10 0c
"W"     ...   86 c3   ...   9c 7e 10 0d
"X"     ...   46 c0   ...   9c a4 10 0e
"Y"     ...   46 c2   ...   9c ca 10 0f
"Z"     ...   46 c1   ...   9c f0 10 10
"a"     ...   26 c2   ...   9d fa 10 17
"b"     ...   26 c1   ...   9e 20 10 18
"c"     ...   26 c3   ...   9e 46 10 19
"d"     ...   a6 c0   ...   9e 6c 10 1a
"e"     ...   a6 c2   ...   9e 92 10 1b
"f"     ...   a6 c1   ...   9e b8 10 1c
"g"     ...   a6 c3   ...   9e de 10 1d
"h"     ...   66 c0   ...   9f 04 10 1e
"i"     ...   66 c2   ...   9f 2a 10 1f
"j"     ...   66 c1   ...   9f 50 10 20
"k"     ...   66 c3   ...   9f 76 10 21
"l"     ...   e6 c0   ...   9f 9c 10 22
"m"     ...   e6 c2   ...   9f c2 10 23
"n"     ...   e6 c1   ...   9f e8 10 24
"o"     ...   e6 c3   ...   a0 0e 10 25
"p"     ...   16 c0   ...   a0 34 10 26
"q"     ...   16 c2   ...   a0 5a 10 27
"r"     ...   16 c1   ...   a0 80 10 28
"s"     ...   16 c3   ...   a0 a6 10 29
"t"     ...   96 c0   ...   a0 cc 10 2a
"u"     ...   96 c2   ...   a0 f2 10 2b
"v"     ...   96 c1   ...   a1 18 10 2c
"w"     ...   96 c3   ...   a1 3e 10 2d
"x"     ...   56 c0   ...   a1 64 10 2e
"y"     ...   56 c2   ...   a1 8a 10 2f
"z"     ...   56 c1   ...   a1 b0 10 30

即使这是一个相当大的字符样本(当然不是所有256个ASCII字符),我也无法真正看到任何行之间的模式。

查看数据的另一种方法:

"A"     ...   3a c2   ...   99 3a 0f f7    |    "a"     ...   26 c2   ...   9d fa 10 17
"B"     ...   3a c1   ...   99 60 0f f8    |    "b"     ...   26 c1   ...   9e 20 10 18
"C"     ...   3a c3   ...   99 86 0f f9    |    "c"     ...   26 c3   ...   9e 46 10 19
"D"     ...   ba c0   ...   99 ac 0f fa    |    "d"     ...   a6 c0   ...   9e 6c 10 1a
"E"     ...   ba c2   ...   99 d2 0f fb    |    "e"     ...   a6 c2   ...   9e 92 10 1b
"F"     ...   ba c1   ...   99 f8 0f fc    |    "f"     ...   a6 c1   ...   9e b8 10 1c
"G"     ...   ba c3   ...   9a 1e 0f fd    |    "g"     ...   a6 c3   ...   9e de 10 1d
"H"     ...   7a c0   ...   9a 44 0f fe    |    "h"     ...   66 c0   ...   9f 04 10 1e
"I"     ...   7a c2   ...   9a 6a 0f ff    |    "i"     ...   66 c2   ...   9f 2a 10 1f
"J"     ...   7a c1   ...   9a 90 10 00    |    "j"     ...   66 c1   ...   9f 50 10 20
"K"     ...   7a c3   ...   9a b6 10 01    |    "k"     ...   66 c3   ...   9f 76 10 21
"L"     ...   fa c0   ...   9a dc 10 02    |    "l"     ...   e6 c0   ...   9f 9c 10 22
"M"     ...   fa c2   ...   9b 02 10 03    |    "m"     ...   e6 c2   ...   9f c2 10 23
"N"     ...   fa c1   ...   9b 28 10 04    |    "n"     ...   e6 c1   ...   9f e8 10 24   
"O"     ...   fa c3   ...   9b 4e 10 05    |    "o"     ...   e6 c3   ...   a0 0e 10 25
"P"     ...   06 c0   ...   9b 74 10 06    |    "p"     ...   16 c0   ...   a0 34 10 26
"Q"     ...   06 c2   ...   9b 9a 10 07    |    "q"     ...   16 c2   ...   a0 5a 10 27
"R"     ...   06 c1   ...   9b c0 10 08    |    "r"     ...   16 c1   ...   a0 80 10 28
"S"     ...   06 c3   ...   9b e6 10 09    |    "s"     ...   16 c3   ...   a0 a6 10 29
"T"     ...   86 c0   ...   9c 0c 10 0a    |    "t"     ...   96 c0   ...   a0 cc 10 2a
"U"     ...   86 c2   ...   9c 32 10 0b    |    "u"     ...   96 c2   ...   a0 f2 10 2b
"V"     ...   86 c1   ...   9c 58 10 0c    |    "v"     ...   96 c1   ...   a1 18 10 2c
"W"     ...   86 c3   ...   9c 7e 10 0d    |    "w"     ...   96 c3   ...   a1 3e 10 2d
"X"     ...   46 c0   ...   9c a4 10 0e    |    "x"     ...   56 c0   ...   a1 64 10 2e
"Y"     ...   46 c2   ...   9c ca 10 0f    |    "y"     ...   56 c2   ...   a1 8a 10 2f
"Z"     ...   46 c1   ...   9c f0 10 10    |    "z"     ...   56 c1   ...   a1 b0 10 30

有趣的是,第一个改变部分的第二个字节似乎在所有A-Z和a-z中是一致的。然而,第一个字节仅通过P-Z和p-z共享一个中等模式。

最后的改变部分看起来几乎完全是任意字符。也许一部分是密钥而另一部分是编码/加密字符?

我还简要介绍了以下内容:

"a"     ...   26 c2 15 02 79 20 11         ...   9d fa 10 17
"aa"    ...   25 32 24 c2 95 02 f9 20 31   ...   c0 c5 10 79

那是我停止研究的地方......我还没有发现将所有这些数据联系在一起的模式。我无法帮助,但觉得有一种更简单的方法来解决这个谜团,但我目前只缺乏获得答案的知识。

  1. 任何人都可以建议更好的破解此代码的方法吗?
  2. 破解代码需要哪些数据?幸运的是,我可以批量生产这些数据......

0 个答案:

没有答案