(
第一次写攻防世界,写的题目比较简单)
Reversing-x64Elf-100
通过shift f12找到主函数
很明显sub_4006FD(s)是关键解密函数
一个简单的指针数组加密然后比较
EXP
#include <stdio.h>
int main(){
char *v3[3];
char a1[12];
v3[0] = "Dufhbmf";
v3[1] = "pG`imos";
v3[2] = "ewUglpt";
for (int i = 0; i <= 11; ++i )
{
a1[i] = *(v3[i % 3] + 2 * (i / 3)) - 1 ;
}
printf("%s",a1);
}
flag
Code_Talkers
666
加密
解密的时候要注意^和+的优先级。+大于^
EXP
#include <stdio.h>
int main(){
char a2[]={0x69,0x7a,0x77,0x68,0x72,0x6f,0x7a,0x22,0x22,0x77,0x22,0x76,0x2e,0x4b,0x22,0x2e,0x4e,0x69};
char a1[18];
a1[17] = '\0';
int key =18;
for ( int i = 0; i < key; i += 3 ) // 18
{ // 0 3 6
a1[i] =( a2[i] ^ key )-6 ;
a1[i + 1] = ( a2[i+1] ^ key )+ 6;
a1[i + 2] = (a2[i+2] ^ 18 )^ 6;
//unctf{b66_6b6_66b}izwhroz""w"v.K".Ni
}
puts(a1);
//int i;
//char a[] ={0x69,0x7a,0x77,0x68,0x72,0x6f,0x7a,0x22,0x22,0x77,0x22,0x76,0x2e,0x4b,0x22,0x2e,0x4e,0x69};
//for(i=0 ; i<18; i+=3)
//{
// a[i]=(a[i]^18)-6;
// a[i+1]= (a[i+1]^18)+6;
// a[i+2]= (a[i+2]^18)^6;
// }
// puts(a);
//unctf{b66_6b6_66b}
}
其实这里我自己写的exp输出总是会多一部分,感觉是数组的结尾'/0'的问题,但是加了也没用。
easyRE1
你说这个会不会是flag。交一下,欸不是。那是不是有加密啥的,都不是。flag{}打包一下就好了==
lucknum
不写了,有点过于简单。