逆向只有一道题

先每3个值读取Input,赋值给pbInput,比如fla,lag,ag{... ,然后对pbInput进行sha256加密
2024-08-19T09:06:05.png
将加密值和最初的3个字符循环异或
2024-08-19T09:06:21.png
最后和unk_7FF685AC90C0进行比较,比较前1280 ,sha256加密结果是32字节,1280/32=40,所以flag字符串长度为40
2024-08-19T09:06:39.png
写脚本解密爆破:

import hashlib

arr = [
    235, 116, 70, 79, 121, 36, 197, 98, 16, 203,
    255, 197, 162, 57, 190, 3, 153, 237, 44, 143,
    185, 84, 43, 167, 197, 138, 126, 86, 15, 53,
    44, 160, 62, 229, 224, 10, 110, 169, 56, 207,
    133, 248, 130, 199, 153, 215, 139, 198, 130, 34,
    84, 40, 244, 229, 86, 208, 71, 241, 94, 87,
    102, 133, 92, 4, 102, 13, 199, 33, 129, 149,
    76, 249, 151, 110, 87, 5, 203, 170, 72, 61,
    42, 171, 90, 105, 40, 61, 104, 228, 247, 76,
    35, 207, 168, 194, 38, 208, 249, 65, 231, 244,
    255, 153, 96, 241, 218, 103, 126, 157, 191, 152,
    20, 181, 179, 226, 215, 153, 7, 74, 192, 18,
    15, 33, 47, 58, 82, 195, 127, 227, 53, 213,
    109, 180, 189, 33, 70, 0, 4, 159, 127, 149,
    12, 1, 250, 189, 134, 37, 6, 86, 7, 48,
    79, 23, 174, 243, 192, 240, 23, 127, 155, 62,
    189, 229, 102, 51, 70, 96, 108, 179, 7, 241,
    100, 95, 0, 109, 176, 136, 243, 79, 125, 68,
    190, 149, 67, 161, 57, 59, 41, 80, 109, 29,
    49, 129, 68, 96, 254, 123, 172, 72, 189, 187,
    142, 53, 65, 40, 231, 83, 92, 231, 59, 22,
    24, 197, 148, 217, 209, 185, 191, 113, 72, 167,
    215, 112, 119, 233, 167, 255, 160, 190, 28, 250,
    152, 0, 254, 51, 100, 249, 231, 48, 69, 87,
    151, 64, 69, 224, 201, 80, 184, 243, 68, 68,
    50, 193, 106, 183, 221, 238, 55, 31, 96, 38,
    250, 45, 111, 193, 67, 89, 138, 158, 233, 225,
    39, 54, 234, 189, 81, 91, 174, 36, 187, 3,
    228, 192, 98, 221, 194, 99, 244, 161, 140, 62,
    92, 16, 164, 204, 136, 225, 155, 4, 89, 43,
    134, 74, 200, 131, 216, 185, 148, 238, 178, 196,
    100, 150, 179, 65, 107, 0, 12, 154, 52, 74,
    79, 60, 242, 195, 13, 166, 221, 87, 183, 211,
    112, 28, 220, 185, 65, 142, 174, 138, 4, 112,
    194, 173, 38, 104, 236, 240, 227, 174, 107, 106,
    41, 246, 174, 60, 35, 227, 15, 66, 87, 29,
    252, 80, 113, 113, 209, 115, 249, 40, 113, 142,
    42, 93, 24, 196, 63, 122, 91, 32, 225, 37,
    166, 66, 30, 251, 239, 165, 3, 75, 244, 75,
    94, 102, 239, 144, 18, 78, 226, 207, 253, 154,
    172, 231, 196, 147, 86, 166, 74, 223, 251, 160,
    212, 77, 41, 177, 37, 171, 142, 152, 56, 110,
    217, 17, 41, 176, 25, 122, 233, 166, 66, 193,
    115, 87, 142, 253, 71, 132, 209, 238, 8, 124,
    231, 101, 167, 20, 100, 15, 154, 168, 103, 164,
    173, 135, 146, 41, 241, 113, 32, 55, 213, 34,
    181, 34, 107, 45, 199, 68, 14, 252, 183, 83,
    236, 138, 82, 194, 156, 241, 251, 155, 216, 95,
    166, 95, 218, 112, 177, 38, 30, 20, 63, 148,
    6, 208, 13, 144, 170, 15, 85, 49, 6, 82,
    243, 249, 8, 215, 193, 229, 168, 65, 247, 126,
    189, 48, 20, 252, 162, 60, 178, 35, 248, 145,
    93, 119, 48, 175, 199, 39, 111, 28, 15, 199,
    234, 51, 163, 8, 53, 83, 210, 104, 77, 150,
    78, 199, 228, 169, 32, 93, 238, 111, 207, 234,
    218, 139, 88, 156, 244, 131, 38, 175, 45, 235,
    245, 109, 180, 42, 77, 253, 247, 75, 249, 203,
    10, 52, 191, 217, 123, 144, 184, 62, 23, 227,
    31, 224, 164, 139, 84, 201, 74, 196, 23, 91,
    70, 48, 45, 94, 139, 56, 215, 203, 66, 230,
    24, 174, 201, 25, 125, 67, 177, 179, 104, 145,
    161, 140, 220, 92, 165, 127, 32, 40, 65, 135,
    254, 105, 136, 216, 96, 237, 70, 7, 111, 119,
    155, 8, 141, 47, 167, 138, 121, 138, 85, 220,
    198, 230, 87, 232, 177, 1, 162, 59, 159, 138,
    222, 2, 246, 150, 217, 5, 246, 60, 98, 108,
    62, 7, 253, 6, 0, 43, 32, 48, 178, 15,
    175, 240, 38, 37, 217, 184, 117, 164, 183, 77,
    212, 33, 204, 181, 65, 28, 195, 9, 235, 231,
    204, 117, 190, 212, 8, 249, 244, 134, 230, 207,
    255, 79, 20, 172, 54, 223, 251, 100, 60, 39,
    33, 163, 173, 76, 169, 84, 21, 213, 156, 243,
    195, 238, 133, 255, 117, 242, 188, 111, 253, 31,
    192, 148, 153, 84, 75, 114, 24, 245, 147, 126,
    139, 115, 199, 118, 77, 235, 200, 64, 38, 107,
    20, 243, 208, 73, 174, 149, 17, 171, 19, 92,
    199, 100, 197, 198, 241, 12, 135, 192, 135, 188,
    141, 49, 129, 215, 71, 6, 48, 212, 169, 131,
    254, 64, 31, 70, 201, 159, 74, 82, 216, 30,
    141, 65, 70, 33, 27, 250, 40, 174, 82, 201,
    208, 227, 151, 74, 251, 45, 131, 15, 68, 49,
    54, 244, 70, 77, 223, 239, 163, 6, 136, 190,
    39, 168, 160, 21, 138, 133, 184, 4, 12, 44,
    4, 89, 143, 33, 17, 117, 29, 41, 111, 134,
    47, 254, 188, 47, 181, 13, 101, 48, 254, 108,
    9, 215, 15, 84, 102, 78, 210, 242, 196, 67,
    101, 214, 71, 179, 230, 213, 187, 69, 112, 124,
    139, 24, 200, 162, 72, 177, 83, 48, 150, 5,
    179, 78, 217, 206, 244, 33, 114, 17, 79, 82,
    174, 71, 232, 6, 49, 49, 239, 178, 241, 173,
    85, 134, 141, 100, 135, 34, 17, 27, 0, 207,
    226, 19, 36, 99, 249, 101, 154, 161, 248, 41,
    142, 210, 251, 209, 35, 144, 113, 220, 58, 207,
    99, 102, 28, 119, 165, 172, 187, 84, 65, 15,
    243, 247, 207, 161, 112, 16, 64, 189, 45, 44,
    143, 114, 26, 55, 227, 16, 168, 70, 5, 132,
    94, 114, 2, 219, 2, 27, 35, 70, 161, 187,
    146, 10, 232, 13, 208, 6, 111, 5, 160, 82,
    75, 200, 3, 57, 237, 153, 50, 84, 40, 131,
    71, 63, 239, 202, 24, 193, 200, 184, 201, 176,
    227, 27, 113, 105, 186, 193, 241, 185, 105, 123,
    39, 153, 189, 184, 105, 0, 108, 22, 196, 155,
    119, 82, 90, 183, 84, 111, 227, 52, 94, 95,
    1, 165, 226, 72, 251, 150, 107, 117, 146, 210,
    160, 218, 11, 237, 62, 39, 246, 199, 137, 100,
    127, 222, 115, 245, 146, 88, 255, 198, 166, 56,
    117, 134, 97, 18, 111, 192, 61, 36, 34, 109,
    167, 41, 94, 189, 245, 12, 82, 217, 102, 49,
    181, 128, 77, 2, 205, 242, 220, 137, 250, 96,
    99, 202, 45, 0, 149, 50, 0, 190, 212, 191,
    115, 76, 237, 186, 12, 86, 161, 133, 196, 108,
    182, 10, 188, 221, 140, 97, 30, 66, 3, 180,
    224, 242, 23, 250, 20, 56, 159, 177, 164, 156,
    3, 24, 12, 198, 22, 199, 48, 250, 72, 177,
    185, 110, 177, 125, 123, 59, 223, 217, 182, 167,
    214, 70, 165, 124, 151, 109, 213, 146, 163, 240,
    34, 161, 83, 153, 161, 195, 113, 64, 225, 137,
    123, 35, 25, 24, 220, 47, 34, 87, 221, 44,
    195, 63, 173, 239, 153, 147, 156, 233, 235, 103,
    102, 116, 69, 142, 212, 135, 152, 78, 159, 141,
    44, 125, 242, 61, 128, 147, 148, 15, 234, 181,
    134, 208, 230, 116, 182, 178, 65, 97, 37, 222,
    217, 194, 56, 106, 36, 127, 29, 135, 186, 209,
    202, 182, 64, 87, 158, 174, 48, 80, 255, 208,
    168, 174, 223, 82, 37, 74, 165, 233, 24, 111,
    6, 12, 151, 21, 14, 194, 102, 38, 204, 132,
    81, 196, 117, 105, 118, 75, 40, 22, 103, 165,
    68, 40, 224, 150, 162, 10, 93, 129, 235, 77
]
table = "abcdefghijklmnopqrstuvwxyzABCDEDFHIJKLMNOPQRSTUVWXYZ1234567890-{}_"
brr_hash = []
for m in range(20):
    for i in table:
        for j in table:
            for k in table:
                data = []
                brr = i + j + k
                brr_hash = hashlib.sha256(brr.encode('utf-8')).digest()#从table中随机取3个值,进行sha256加密
                for l in range(len(brr_hash)):
                    data.append(brr_hash[l] ^ ord(brr[l % 3]))#异或
                for o in range(len(data)):
                    if data[o] != arr[m * 64 + o]:#比较
                        break
                else:
                    print(brr)

2024-08-19T09:07:09.png
最后拼凑一下结果
flag{194a39a4-7937-48fb-bfea-80bd17729f8a}