BUUCTF CrackRTF

  1. 先用IDA打开分析一下
    1

  2. 哈希值的加密方式可以根据这个

  3. 先用脚本爆破password1

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    import hashlib

    # 目标哈希值
    target_hash = '6E32D0943418C2C33385BC35A1470250DD8923A9'

    # 固定字符串部分
    fixed_str = '@DBApp'

    # 数字范围
    start_num = 99999
    end_num = 1000000

    # 暴力搜索
    for num in range(start_num, end_num):
    # 将数字转换为字符串并与固定字符串拼接,然后计算其SHA-256哈希值
    test_str = str(num) + fixed_str
    hash_object = hashlib.sha1(test_str.encode())
    if hash_object.hexdigest().upper() == target_hash:
    print(f"找到匹配的字符串: {test_str}")
    break
    else:
    print("未找到匹配的字符串")
    1
    找到匹配的字符串: 123321@DBApp
  4. 因为第二个恰好是MD5加密有在线网站

    2

  5. 再运行exe
    3

​ 由此可知会产生一个dbapp.rtf文件,打开

4

1
Flag{N0_M0re_Free_Bugs}