吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 2064|回复: 12
收起左侧

[KeyGenMe] C++无壳CrackMe or KeyGenMe

  [复制链接]
一只小凡凡 发表于 2024-2-4 22:00
CM是什么?Crackme是什么?这是什么东西?楼主发的什么?
他们都是一些公开给别人尝试破解的小程序,制作 Crackme 的人可能是程序员,想测试一下自己的软件保护技术,也可能是一位 Cracker,想挑战一下其它 Cracker 的破解实力,也可能是一些正在学习破解的人,自己编一些小程序给自己破解,KeyGenMe是要求别人做出它的 keygen (序号产生器), ReverseMe 要求别人把它的算法做出逆向分析, UnpackMe 是要求别人把它成功脱壳,本版块禁止回复非技术无关水贴。

本帖最后由 一只小凡凡 于 2024-2-5 13:27 编辑



https://xiaofans.lanzouq.com/ijUpU1ncs9mb


补充:
难度中等偏下,无壳、有反调试、激活码生成算法
你需要逆向算法尝试复原算法的C++或其他语言代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册[Register]

x

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

solly 发表于 2024-3-4 13:00
本帖最后由 solly 于 2024-3-4 13:49 编辑

那个 mod 计算有点小坑,编译器优化后不明显了:

[C] 纯文本查看 复制代码
#include <iostream>
#include <time.h>
//#include <ctime>
//#include <chrono>

size_t calculateOffset();

char mappingTable[] = "!)+LA0K>\"}*|Z=$G\\?#VBM6:4X9P,'254LCJ";
int getFlag(size_t offset, char * flag);

int main(int argc, char** argv) {
    char flag[10];
    size_t offset = calculateOffset();
  
    ///// get current flag with minutes of hour
    printf("Minutes of hour = %d\n", offset);
    getFlag(offset, flag);
    printf("Current flag = %s\n\n", flag);

    ///// get all flags
        printf("All flags:\n");
    for(int i=0; i<60; i++) {
        getFlag(i, flag);
        printf("  Minute = %02d, flag = %s\n", i, flag);
    }
        
    return 0;
}

size_t calculateOffset()
{
    /*
    /// c++ lib
    auto now = std::chrono::system_clock::now();
    auto nanoseconds = std::chrono::duration_cast<std::chrono::nanoseconds>(now.time_since_epoch());
    auto minutes = std::chrono::duration_cast<std::chrono::minutes>(std::chrono::duration_cast<std::chrono::seconds>(nanoseconds));

    //printf("time = 0x%I64X\n", minutes);

    return (minutes.count() % 60);
    */
    /// c lib
    time_t rawtime;
    struct tm *currTM;
 
    time(&rawtime);
    currTM = gmtime(&rawtime);
   
    return currTM->tm_min;
}

#define LENGTH 8

int getFlag(size_t offset, char * flag) {
  char idx_base[] = "52pojie\0";
  
  for(int i=0; i<LENGTH; i++) {
    int idx0 = (idx_base[i] - 0x30 + offset);
    //unsigned int idx1 = ((unsigned)idx0) % 36;
    unsigned int idx1 = (idx0>=0) ? ((unsigned)idx0 % 36) : ((unsigned)(0x34+idx0) % 36);
    //printf("idx%d = 0x%08X ==> 0x%08X\n", i, idx0, idx1);
    flag[i] = mappingTable[idx1];
  }
  flag[LENGTH] = '\0';

  return 0;
}


按分钟计算的码,0~59共60个码:
[Shell] 纯文本查看 复制代码
  Minute = 00, flag = 0+,P6M?A
  Minute = 01, flag = KL',:6#0
  Minute = 02, flag = >A2'4:VK
  Minute = 03, flag = "052X4B>
  Minute = 04, flag = }K459XM"
  Minute = 05, flag = *>L4P96}
  Minute = 06, flag = |"CL,P:*
  Minute = 07, flag = Z}JC',4|
  Minute = 08, flag = =*!J2'XZ
  Minute = 09, flag = $|)!529=
  Minute = 10, flag = GZ+)45P$
  Minute = 11, flag = \=L+L4,G
  Minute = 12, flag = ?$ALCL'\
  Minute = 13, flag = #G0AJC2?
  Minute = 14, flag = V\K0!J5#
  Minute = 15, flag = B?>K)!4V
  Minute = 16, flag = M#">+)LB
  Minute = 17, flag = 6V}"L+CM
  Minute = 18, flag = :B*}ALJ6
  Minute = 19, flag = 4M|*0A!:
  Minute = 20, flag = X6Z|K0)4
  Minute = 21, flag = 9:=Z>K+X
  Minute = 22, flag = P4$=">L9
  Minute = 23, flag = ,XG$}"AP
  Minute = 24, flag = '9\G*}0,
  Minute = 25, flag = 2P?\|*K'
  Minute = 26, flag = 5,#?Z|>2
  Minute = 27, flag = 4'V#=Z"5
  Minute = 28, flag = L2BV$=}4
  Minute = 29, flag = C5MBG$*L
  Minute = 30, flag = J46M\G|C
  Minute = 31, flag = !L:6?\ZJ
  Minute = 32, flag = )C4:#?=!
  Minute = 33, flag = +JX4V#$)
  Minute = 34, flag = L!9XBVG+
  Minute = 35, flag = A)P9MB\L
  Minute = 36, flag = 0+,P6M?A
  Minute = 37, flag = KL',:6#0
  Minute = 38, flag = >A2'4:VK
  Minute = 39, flag = "052X4B>
  Minute = 40, flag = }K459XM"
  Minute = 41, flag = *>L4P96}
  Minute = 42, flag = |"CL,P:*
  Minute = 43, flag = Z}JC',4|
  Minute = 44, flag = =*!J2'XZ
  Minute = 45, flag = $|)!529=
  Minute = 46, flag = GZ+)45P$
  Minute = 47, flag = \=L+L4,G
  Minute = 48, flag = ?$ALCL'!
  Minute = 49, flag = #G0AJC2)
  Minute = 50, flag = V\K0!J5+
  Minute = 51, flag = B?>K)!4L
  Minute = 52, flag = M#">+)LA
  Minute = 53, flag = 6V}"L+C0
  Minute = 54, flag = :B*}ALJK
  Minute = 55, flag = 4M|*0A!>
  Minute = 56, flag = X6Z|K0)"
  Minute = 57, flag = 9:=Z>K+}
  Minute = 58, flag = P4$=">L*
  Minute = 59, flag = ,XG$}"A|

免费评分

参与人数 2吾爱币 +2 热心值 +2 收起 理由
爱飞的猫 + 1 solly 老师强
一只小凡凡 + 2 + 1 欢迎分析讨论交流,吾爱破解论坛有你更精彩!

查看全部评分

solly 发表于 2024-3-5 09:11
更正一下mod,应该是 64 位无符号整数的 mod ,前面用的32位,所以需要加0x34修正,改成64位即可:
[C] 纯文本查看 复制代码
int getFlag(size_t offset, char * flag) {
  char idx_base[] = "52pojie\0";
  
  for(int i=0; i<LENGTH; i++) {
    //int idx0 = (idx_base[i] - 0x30 + offset);
    //int idx1 = (idx0>=0) ? ((idx0) % 36) : ((idx0+0x34) % 36);
    //printf("idx%d = 0x%08X ==> 0x%08X\n", i, idx0, idx1);
    long long idx0 = (long long)((signed int)idx_base[i] - 0x30) + offset;
    unsigned long long idx1 = ((unsigned long long)idx0) % 36;
    //printf("idx%d = 0x%I64X ==> 0x%I64X\n", i, idx0, idx1);
    flag[i] = mappingTable[idx1];
  }
  flag[LENGTH] = '\0';

  return 0;
}
你好,再见 发表于 2024-2-5 04:14
qq465881818 发表于 2024-2-5 09:44

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册[Register]

x
darksied 发表于 2024-2-4 22:40
[C++] 纯文本查看 复制代码
bool __cdecl is52pojie(const std::string *input)
{
  char *v1; // rax
  bool v2; // bl
  std::string currentString; // [rsp+20h] [rbp-50h] BYREF
  char ch_0; // [rsp+4Fh] [rbp-21h]
  const char *__for_end; // [rsp+50h] [rbp-20h]
  const char (*__for_range)[8]; // [rsp+58h] [rbp-18h]
  size_t offset; // [rsp+60h] [rbp-10h]
  const char *__for_begin; // [rsp+68h] [rbp-8h]

  offset = calculateOffset();
  std::string::basic_string(¤tString);
  __for_range = (const char (*)[8])"52pojie";
  __for_begin = "52pojie";
  __for_end = "title CrackMe 52pojie";
  while ( __for_begin != __for_end )
  {
    ch_0 = *__for_begin;
    v1 = (char *)std::string::operator[](&mappingTable[(ch_0 - 48 + offset) % 0x24], 0i64);
    std::string::operator+=(¤tString, (unsigned int)*v1);
    ++__for_begin;
  }
  v2 = std::operator==<char>(input, ¤tString);
  std::string::~string(¤tString);
  return v2;
}
LXGZJ237 发表于 2024-2-5 18:45
看了半天有个mappingTable变量看不懂
吾爱破解1111 发表于 2024-2-6 10:48
有符号,难度为0
5151diy 发表于 2024-2-9 22:43
用这个c32asm v0.8.8 进行操作,就退出
Jar36 发表于 2024-2-10 09:53
这是用mingw写的吧 COFF符号表都在里面
Jar36 发表于 2024-2-10 09:54
Jar36 发表于 2024-2-10 09:53
这是用mingw写的吧 COFF符号表都在里面

以后写crackme记得strip
n5012346 发表于 2024-2-23 14:35
适合我这样的新手

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册[Register]

x
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-11-24 12:09

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表