zoukankan      html  css  js  c++  java
  • 【实验吧】转瞬即逝write up

    ---恢复内容开始---

    虽然这是很简单的一道题,但这是我第一次拿着题有很清晰的思路,并且脚本也有思路写,拿到文件用ida打开,分析main函数:

    int __cdecl main(int argc, const char **argv, const char **envp)
    {
      size_t v3; // rax@1
      int result; // eax@4
      __int64 v5; // rsi@4
      unsigned __int8 i; // [sp+7h] [bp-39h]@1
      _BYTE *ptr; // [sp+8h] [bp-38h]@1
      char s[8]; // [sp+10h] [bp-30h]@1
      __int64 v9; // [sp+28h] [bp-18h]@1
    
      v9 = *MK_FP(__FS__, 40LL);
      strcpy(s, "tikp[luX|aoTjaoh");
      v3 = strlen(s);
      ptr = malloc(v3);
      puts("Welcome!");
      puts("This is a x64 REV,find out the flag.");
      for ( i = 0; i < strlen(s); ++i )
      {
        ptr[i] = s[i] ^ i;
        ptr[i] = 0;
      }
      printf("CTF{%s}
    ", ptr);
      free(ptr);
      result = 0;
      v5 = *MK_FP(__FS__, 40LL) ^ v9;
      return result;
    }

    字符串tikp[luX|aoTjaoh第一个字符分别与对应数组次序异或,脚本如下:

    s = "tikp[luX|aoTjaoh"
    num=len(s)
    ptr=[]
    for x in range(0,num):
        ptr.append(x)
    for i in range(0,num):
        ptr[i]=ord(s[i])^i
    
    flag=''
    for i in ptr:
        flag+=chr(i)
    print(flag)

    得出结果:

    ---恢复内容结束---

  • 相关阅读:
    GlusterFS安装部署
    glusterfs peer失败
    GlusterFs 启动报错
    利用idea反编译jar包
    hive 错误记录 之moveing 失败
    节点不可用,显示noReady
    kafka 配置认证与授权
    flink (2) 读取kafka数据
    Flink (1) 安装部署
    redis the cluster is down
  • 原文地址:https://www.cnblogs.com/liuyimin/p/7492034.html
Copyright © 2011-2022 走看看