strs dd offset a9447ThisIsAFla .data:080499C0 ; DATA XREF: main+4D↑r .data:080499C0 ; "9447{This_is_a_flag}" .data:080499C4 dd offset aCongratsYouHac ; "Congrats, you hacked me!\n$ " .data:080499C8 dd offset aRmRfPermission ; "rm -rf / : Permission denied" .data:080499CC dd offset aDefineYouMassi ; "#define YOU \"massive failure\"" .data:080499D0 dd offset aIfYouRePretend ; "If you're pretending to suck, you just "... .data:080499D4 dd offset aThereArenTEnou ; "There aren't enough bits in my memory t"... .data:080499D8 dd offset aYourAbilityToH ; "Your ability to hack is about as good a"... .data:080499DC dd offset aHaveYouConside ; "Have you considered becoming a vacuum c"... .data:080499E0 dd offset aIVeGotAGoodFee ; "I've got a good feeling about this one."... .data:080499E4 dd offset aKnockKnockWhoS ; "Knock knock..\nWho's there?\nUDP.\nUDP "...
python-trade
附件是个pyc文件就是py编译的文件,百度在线python反编译,把附件载入之后
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
import base64#这句是导入库,就像#include <stdio.h>
defencode(message):#定义encode函数 s = '' for i in message: x = ord(i) ^ 32#ord以一个字符作为参数,返回这个字符的ascll x = x + 16 s += chr(x)#chr以一个0~255的整数作参数,返回一个对应的字符 return base64.b64encode(s)#最后将这个字符串base64加密
correct = 'XlNkVmtUI1MgXWBZXCFeKY+AaXNt' flag = '' print'Input flag:' flag = raw_input()#输入到flag if encode(flag) == correct:#如果flag解密与correct相等就正确 print'correct' else: print'wrong'
.data:00000000006010E0 t db 'S' ; DATA XREF: main+65↑w .data:00000000006010E0 ; main+C9↑o ... .data:00000000006010E1 aHarifctf db 'harifCTF{b70c59275fcfa8aebf2d5911223c6589}',0
re1
这个题目直接明文,不过ida里面搜不到呢…
ida里面按R转换一下字符串也可以看见不过要自己倒过来,挺麻烦的
no-strings-attached
直接盗取他的革命成果…
不过还是来分析一波decrypt
1 2 3 4
for ( i = 0; i < 5 && v4 < v6; ++i ) dest[v4++] -= a2[i]; //a2=0x1401,0x1402,0x1403,0x1404,0x1405 //dest=0x143A,0x1436,0x1437,0x143B,0x1480,0x147A,0x1471,0x1478,0x1463,0x1466,0x1473,0x1467,0x1462,0x1465,0x1473,0x1460,0x146B,0x1471,0x1478,0x146A,0x1473,0x1470,0x1464,0x1478,0x146E,0x1470,0x1470,0x1464,0x1470,0x1464,0x146E,0x147B,0x1476,0x1478,0x146A,0x1473,0x147B,0x1480,0x0