killerzeno 发表于 2025-2-18 11:41

写个练习大家玩~

写个CrackMe,大家娱乐一下~

adld 发表于 2025-2-18 12:26

密码:Killerzeno@52Pojie.~

adld 发表于 2025-2-18 12:17

@shift /0
@echo off
setlocal enabledelayedexpansion

set "encrypted_password=4012,5441,5748,5698,5546,5853,6568,5141,5856,5959,3563,2646,2545,4433,6015,5608,5303,5406,2653,6683|6,4,7,6,10,3,9,2,7,8,8,1,2,9,9,6,1,7,8,7"

:input_loop

echo 请输入密码:
set /p input_password=


for /f "delims=| tokens=1,2" %%a in ("%encrypted_password%") do (
    set "encrypted_chars=%%a"
    set "random_offsets=%%b"
)

set "encrypted_input="
set "offset_index=0"
for /l %%i in (0,1,999) do (
    set "char=!input_password:~%%i,1!"
    if "!char!"=="" goto compare
    for /f "tokens=1* delims=," %%a in ("!random_offsets!") do (
      set "offset=%%a"
      set "random_offsets=%%b"
    )
    for /f "delims=" %%a in ('powershell -command "'!char!'"') do (
      set "ascii=%%a"
    )
    set /a "ascii=ascii + offset"
    set /a "ascii=(ascii * 3 - 7) * 17 + offset_index"
    if "!encrypted_input!"=="" (
      set "encrypted_input=!ascii!"
    ) else (
      set "encrypted_input=!encrypted_input!,!ascii!"
    )
    set /a "offset_index+=1"
)

:compare

if "%encrypted_input%"=="%encrypted_chars%" (
    echo 密码正确,恭喜你破解成功!
    pause
    goto end
) else (
    echo 密码错误,请重试。
    goto input_loop
)

:end
endlocal

搞到了临时文件的批处理文件中。。
批处理都能拉出来,这密码就不折腾了。

geesehoward 发表于 2025-2-19 09:38

smallPlanet 发表于 2025-2-18 21:05
数组里的值是怎么来的啊,怎么破解的呀

先查壳,无壳,拖入dbgx64,随便输一个密码,看错误信息,所有模块搜索字符串,发现没有错误内容,会以外发现一个随机的bat名字,全路径的,去打开bat,内容很多人都贴了。
里面主要的逻辑就是把encrypt_password用‘|’作为分隔符,分成2个数组,前面的是密码计算后的目标值,后面的是偏移量,就是我代码里的2个数组。
后面就是循环对输入的代码按字节计算,先取ascii,再加上偏移量数组里对应位置的值,这个值v再计算
(v*3-7) * 17 + i的值(i是循环体)。
最后根据这个计算过程,写个逆运算就行了。

sktao 发表于 2025-2-18 11:51

wujunbaby 发表于 2025-2-18 11:51

Eapoul 发表于 2025-2-18 12:12

897fdafew 发表于 2025-2-18 13:22

adld 发表于 2025-2-18 12:26
密码:Killerzeno@52Pojie.~

牛逼 这么快就被破解了

killerzeno 发表于 2025-2-18 13:44

adld 发表于 2025-2-18 12:17
@shift /0
@echo off
setlocal enabledelayedexpansion


闲来无事,看看批处理的Crackme能啥样~哈哈

zunmx 发表于 2025-2-18 15:37



bat文件内容已经有人回帖了,就不重复发了。

py解密:Killerzeno@52Pojie.~


```python
encrypted_chars = "4012,5441,5748,5698,5546,5853,6568,5141,5856,5959,3563,2646,2545,4433,6015,5608,5303,5406,2653,6683"
random_offsets = "6,4,7,6,10,3,9,2,7,8,8,1,2,9,9,6,1,7,8,7"

encrypted_list =
offset_list =

password = ""
for i in range(len(encrypted_list)):
    encrypted = encrypted_list
    offset = offset_list
    ascii_code = ((encrypted - i) // 17 + 7) // 3 - offset
    password += chr(ascii_code)

print(password)
```

geesehoward 发表于 2025-2-18 17:22

本帖最后由 geesehoward 于 2025-2-18 17:28 编辑


来个C语言版的
int encrypted_password[] = { 4012,5441,5748,5698,5546,5853,6568,5141,5856,5959,3563,2646,2545,4433,6015,5608,5303,5406,2653,6683 };
    int offset[] = { 6,4,7,6,10,3,9,2,7,8,8,1,2,9,9,6,1,7,8,7 };
    char password = { 0 };
    for (int i = 0; i < 20; i++)
    {
      password = ((encrypted_password - i) / 17 + 7) / 3 - offset;
    }
    printf("password:%s\n", password);

页: [1] 2
查看完整版本: 写个练习大家玩~