一、查看文件类型ELF64 无壳二、IDA静态分析1.main程序逻辑比较简单,只有两个调用函数2.sub_400D00read()读取目标文件内容,fflush(stdoout)清除输出缓冲区。sub_400D00是个读取输入的函数。3.sub_400700(关键函数)逆序分析程序逻辑:(1)第112-118行将s与拼接后的字符串“D9cS9N9iHjMLTdA8YSMRMp”对比,相等则输出提示“correct!”由此可知密文为:D9cS9N9iHjMLTdA8YSMRMp(2)s来自v11,跟进第107行中对v11进行处理的循环中的数组发现为base58编码表,下一行的数组为base64编码表(3)继续往上读计算中出现关键数字58确认为base58加密三、解题密文为:D9cS9N9iHjMLTdA8YSMRMp(1)python脚本def b58encode(tmp: str) -> str: tmp = list(map(ord, tmp)) temp = tmp[0] base58 = "123456789ABCDEFGHJ
base家族编码包含多种编码方式,每种都有不同的特点,本篇文章从初学的角度学习一下base家族编码。base家族编码是较为基础的加密算法,需要掌握;一、base16编码base16编码也称为十六进制编码或Hex编码,是一种将二进制数据表示为十六进制数字和字符的方法。它使用16个字符(0-9和A-F)来表示4位二进制数的每个组合。(1)编码原理:由于4bit就可以表示2^4 = 16个字符。所以用4bit可以表示所有的十六进制数。1byte=8bit 所以1byte = 俩个十六进制数据。这里就涉及一个字节序的问题:是用大端模式还是小端模式?Base16编码明确表明是用小端模式存储。(2)编码过程:1.将二进制数据分割为4个一组2.映射,将每四位二进制数据映射到对应的base16字符。如下:0000 -> 0 0001 -> 1 0010 -> 2 0011 -> 3 0100 -> 4 0101 -> 5 0110 -> 6 0111 -> 7 1000 -> 8 1001 -> 9 1010 -> A 1011 -&g
base64一、什么是Base64Base64是一种基于64个可打印字符来表示二进制数据的表示方法。由于2^6=64,所以每6个比特为一个单元,对应某个可打印字符。3个字节有24个比特,对应于4个Base64单元,即3个字节可由4个可打印字符来表示。在Base64中的可打印字符包括字母A-Z、a-z、数字0-9,这样共有62个字符,此外两个可打印符号在不同的系统中而不同。二、python中的base64模块base64模块实际上调用的是binascii模块Base64模块真正用得上的方法只有8个,分别是:encode, decode为一组, 专门用来编码和解码文件的, 也可以对StringIO里的数据做编解码;encodestring, decodestring为一组,专门用来编码和解码字符串b64encode, b64decode为一组, 用来编码和解码字符串,并且有一个替换符号字符的功能因为Base64编码后的字符除了英文字母和数字外还有三个字符’ + / =‘,其中’=‘只是为了补全编码后的字符数为4的整数,而’+‘和’/‘在一些情况下需要被替换的,b64encode和b64de
Norman1z