其他分享
首页 > 其他分享> > 红帽杯2019-XX

红帽杯2019-XX

作者:互联网

输入
取输入的前四个字符
进行XXTEA加密
通过置换box进行置换
3个为一组做循环异或
和明文比较

  key = (__int128 *)operator new(5ui64);
  v6 = *(_QWORD *)&Code;
  key1 = key;
  v8 = 0;
  v9 = key;
  do
  {
    v10 = *((_BYTE *)v9 + (char *)input - (char *)key);
    v11 = 0;
    *(_BYTE *)v9 = v10;                         // key第i位替换成输入值的i位
    v12 = 0i64;
    v13 = -1i64;
    do
...
  enc_tea = xxtea((__int64)input, v3, (unsigned __int8 *)&key1, &Size);

输入值应该是flag{xxxxxxxxxxx}那么xxtea的key应该是flag

标签:__,key1,char,XX,2019,key,v9,红帽,输入
来源: https://www.cnblogs.com/wgf4242/p/15786767.html