• Two answers to questions about MISC


    ONE  glance-50

    All I get here is a very long gif.

    Go to kali and run the following command to update and install.

    1. apt-get update
    2. apt-get install imagemagick

    Break the gif down into images.

    convert /home/kali/doing/9266eadf353d4ada94ededaeb96d0c50.gif /home/kali/doing/1/flag.png

    The following procedure is performed.

    Then I switch to the picture directory here and run the following command to stitch all the pictures together.

    cd /home/kali/doing/1/
    montage flag*.png -tile x1 -geometry +0+0 flag.png

    Finally I got the result.

    TWO  IgniteMe

    攻防世界 (xctf.org.cn)icon-default.png?t=N7T8https://adworld.xctf.org.cn/challenges/problem-set-index?id=1

    All I got here was an exe program.

    Exeinfo PE

    IDA

    Open the F5 decompile main program using IDA-32.

    Click sub_4011C0() for a deeper look.

    1. char __cdecl sub_4011C0(const char *a1)
    2. {
    3. char result; // al@2
    4. size_t v2; // eax@4
    5. size_t v3; // eax@7
    6. char v4; // [sp+Ch] [bp-F4h]@1
    7. int v5; // [sp+4Ch] [bp-B4h]@15
    8. int v6; // [sp+50h] [bp-B0h]@6
    9. char v7[32]; // [sp+54h] [bp-ACh]@6
    10. int v8; // [sp+74h] [bp-8Ch]@6
    11. int i; // [sp+78h] [bp-88h]@3
    12. unsigned int j; // [sp+7Ch] [bp-84h]@3
    13. char v11[128]; // [sp+80h] [bp-80h]@5
    14. memset(&v4, -858993460, 0xF4u);
    15. if ( strlen(a1) > 4 )
    16. {
    17. j = 4;
    18. for ( i = 0; ; ++i )
    19. {
    20. v2 = strlen(a1);
    21. if ( j >= v2 - 1 )
    22. break;
    23. v11[i] = a1[j++];
    24. }
    25. v11[i] = 0;
    26. v8 = 0;
    27. v6 = 0;
    28. memset(v7, 0, 0x20u);
    29. for ( j = 0; ; ++j )
    30. {
    31. v3 = strlen(v11);
    32. if ( j >= v3 )
    33. break;
    34. if ( v11[j] >= 97 && v11[j] <= 122 )
    35. {
    36. v11[j] -= 32;
    37. v6 = 1;
    38. }
    39. if ( !v6 && v11[j] >= 65 )
    40. {
    41. if ( v11[j] <= 90 )
    42. v11[j] += 32;
    43. }
    44. v5 = sub_4013C0(v11[j]);
    45. v7[j] = byte_4420B0[j] ^ v5;
    46. v6 = 0;
    47. }
    48. if ( strcmp("GONDPHyGjPEKruv{{pj]X@rF", v7) )
    49. result = 0;
    50. else
    51. result = 1;
    52. }
    53. else
    54. {
    55. result = 0;
    56. }
    57. return result;
    58. }

    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Just a little test before.

    Shift + F2 , Ctrl  + F , input ' flag '

    Press x cross-reference to jump to the main code.

    Then press Tab decompile to get pseudo c code.


    Enter the sub_4011C0(v6) function.

    ---------------------------------------------------------------------------------------------------------------------------------

    ---------------------------------------------------------------------------------------------------------------------------------

    Click byte_4420B0 to extract the data, select the data.

    Press Shift + E to extract data, which is extracted in decimal.

    Write a program:

    1. #include
    2. int main() {
    3. const char* str = "GONDPHyGjPEKruv{{pj]X@rF";
    4. unsigned char byte_4420B0[] = {
    5. 13, 19, 23, 17, 2, 1, 32, 29, 12, 2,
    6. 25, 47, 23, 43, 36, 31, 30, 22, 9, 15,
    7. 21, 39, 19, 38, 10, 47, 30, 26, 45, 12,
    8. 34, 4};
    9. char flag[31] = "EIS{";
    10. int index = 4;
    11. for (size_t i = 0; i < 24; i++) {
    12. flag[index] = ((str[i] ^ byte_4420B0[i]) - 72) ^ 0x55;
    13. if (flag[index] >= 97 && flag[index] <= 122) {
    14. flag[index] -= 32;
    15. } else if (flag[index] >= 65 && flag[index] <= 90) {
    16. flag[index] += 32;
    17. }
    18. index++;
    19. }
    20. printf("%s}\n", flag);
    21. return 0;
    22. }

    Get the flag:


    Attached: Some tools used:

  • 相关阅读:
    [C++ 网络协议] 异步通知I/O模型
    Unknown attribute xml文件无法自动补全且报黄色警告
    kafka简介
    Vue是什么?
    【JavaWeb】阿里的德鲁伊和c3p0
    2.Vue-从零开始搭建一个vue项目
    LeetCode-572. Subtree of Another Tree [C++][Java]
    多极神经元手绘图作业,多极运动神经元手绘图
    中国竟然也有这种级别的软件?万万没想到!
    MMKV(1)
  • 原文地址:https://blog.csdn.net/m0_72572822/article/details/133647726