一、查看文件类型ELF64 无壳kali中运行二、IDA静态分析1.查看main函数逻辑分析:(1)将输入存入v8,然后经过sub_96A函数处理后通过v9返回(2)再调用四次__gmpz_init_set_str函数,猜测此函数作用为将参数2字符串的值赋给参数1的变量,参数3为指定的进制。(3)调用__gmpz_powm函数,对三个字符串和经过sub_96A处理过后的输入,进行处理,最后判断v6和v7是否相等经过 Google 之后查询__gmpz_init_set_str函数和__gmpz_powm函数后,得知这其实是一个 GNU 高精度算法库(GNU Multiple Precision Arithmetic Library)。官方文档入口通过查阅官方文档, __gmpz_init_set_str 其实就是 mpz_init_set_strint mpz_init_set_str (mpz_t rop, const char *str, int base) [Function] Initialize rop and set its value like mpz_set_str
一、简单加解密原理(1)加密图中的E是公钥(E和 φ(N)互为质数),N是公共模数(质数 P 、Q相乘得到N),MOD就是模运算(2)解密图中的D是私钥(私钥由这个公式计算得出E * D % φ(N) = 1),N是公共模数(质数 P 、Q相乘得到N),MOD就是模运算,φ(N)是欧拉函数(由这个公式计算得出φ(N) = (P-1)(Q-1))。二、例题及解题脚本--RE49-signin此题中:密文:ad939ff59f6e70bcbfad406f2494993757eee98b91bc244184a377520d06fc35大整数N:103461035900816914121390101299049044413950405173712170434161686539878160984549公钥E:655371.先通过N算出P和Q:方法一、通过大素数分解网站http://factordb.com/index.php方法二、用离线暴力破解工具yafu(使用教程见工具目录下README)进入文件目录后打开cmd,输入yafu-x64 factor(),括号内填要分解的大素数得到P=282
Norman1z