有没有一种方法可以从批处理文件中生成混淆的批处理文件?

时间:2020-09-20 16:33:28

标签: batch-file

是否有一种方法可以从批处理文件中生成混淆的批处理文件? 这是一个混淆器代码,文件名为 obfu.cmd

@echo off
if "%~1"=="" exit /b
if /i "%~x1" neq ".bat" if /i "%~x1" neq ".cmd" exit /b
for /f %%i in ("certutil.exe") do if not exist "%%~$path:i" (
  echo CertUtil.exe not found.
  pause
  exit /b
)
>"temp.~b64" echo(//4mY2xzDQo=
certutil.exe -f -decode "temp.~b64" "%~n1o%~x1"
del "temp.~b64"
copy "%~n1o%~x1" /b + "%~1" /b

但是问题是,每次需要混淆时,都需要拖放该批处理文件。 我需要 wincheck 代码:

@echo off
setlocal
for /f "tokens=4-5 delims=. " %%i in ('ver') do set VERSION=%%i.%%j
if "%version%" == "" echo f
if "%version%" == "" echo f
if "%version%" == "" echo f
if "%version%" == "" echo f
if "%version%" == "" echo f
goto check
endlocal
:: 6.3 Windows 8.1
:: 6.2 Windows 8
:: 6.1 Windows 7
:: 6.0 Windows Vista
:: 10.0 Windows 10
:check
if %version% == 6.3 goto win8.1
if %version% == 6.2 goto win8
if %version% == 6.1 goto win7
if %version% == 6.0 goto winv
if %version% == 10.0 goto win10
exit
:win10
cls
echo You are running windows 10!
pause
exit
:win8.1
cls
echo You are running windows 8.1!
pause
exit
:win8
cls
echo You are running windows 8!
pause
exit
:win7
cls
echo You are running windows 7!
pause
exit
:winv
cls
echo You are running windows vista!
pause
exit

要通过名为 obfu.cmd 的文件转换为 test.bat 模糊化

因此,总结 wincheck 批处理代码位于 obfu.cmd 中,当我运行 obfu.cmd 时,它将创建一个名为的文件> test.bat 混淆

1 个答案:

答案 0 :(得分:0)

我迟到了,但是是的。 创建一个名为 ofdata 的文件夹。 在其中创建一个名为 ofv.bat 的文件。 输入:

    n = int(input())
    arr = list(map(int, input().split()))
    arr.sort()
    max1=arr[-1]
    arr.sort(reverse=True)
    for x in arr:
        if x!=max1:
            result = x
            print(result)
            break

假设您想启动 google 但不想让您的代码可见。 现在在您的原始脚本中,您可以输入:

@echo off
set rxcxa=a

它会起作用。 您必须在要混淆的每个文件中都有 call 命令。 你甚至可以走极端,尝试这样的事情:

call ofdata\ofv.bat

st%rxcxa%rt https://www.google.com 

然后 输入调用语句(call ofdata\ofv.bat) 和

set rrcr=s
set rrac=t
set cazz=a
set rcct=r
set site=https://www.google.com

您甚至可以使用字母表创建变量! 最后,打开cmd并输入cd yourdirectory 然后输入 cd ofdata 然后 attrib +h ofv.bat /s /h 相信我