Hack Forums
[Shell] [BATCH] BatCrytp (Obfuscate your batch code and execute it) - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Shell] [BATCH] BatCrytp (Obfuscate your batch code and execute it) (/showthread.php?tid=6020396)



[BATCH] BatCrytp (Obfuscate your batch code and execute it) - fisica638 - Oct 29, 2019

It is a Comand line tool I hope it works for you.

LINK :   github.com/salsoft2111995/Batch-Code-Ofuzcation-Proyects



It should be noted that this tool has a single bug. you should not obfuscate the variables within the % sign.



How is it used?

you create a batch with the following line:

PHP Code

<?php 
BatchCript
.bat -e (name of your batch to obfuscate) or use -d (I never finished it :v) 



Example :

PHP Code

<?php 
@echo off
echo hola mundo
pause 

PHP Code

<?php 
@echo off 
set 
var="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"  
@%var:~31,1%%var:~29,1%%var:~34,1%%var:~41,1% %var:~41,1%%var:~32,1%%var:~32,1%
%var:~
31,1%%var:~29,1%%var:~34,1%%var:~41,1% %var:~34,1%%var:~41,1%%var:~38,1%%var:~27,1% %var:~39,1%%var:~47,1%%var:~40,1%%var:~30,1%%var:~41,1%
%var:~
42,1%%var:~27,1%%var:~47,1%%var:~45,1%%var:~31,1%
REM By Aincrad 

AND THE DEPARTURE IS ALWAYS THE SAME.  👍



Now the bug I commented a while ago, I will give you an example:

If they obfuscate the %m% part, the code will not run:

PHP Code

<?php 
@echo off
set m
=hola mundo
echo %m%
pause 

PHP Code

<?php 
@echo off 
set 
var="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"  
@%var:~31,1%%var:~29,1%%var:~34,1%%var:~41,1% %var:~41,1%%var:~32,1%%var:~32,1%
%var:~
45,1%%var:~31,1%%var:~46,1% %var:~39,1%=%var:~34,1%%var:~41,1%%var:~38,1%%var:~27,1% %var:~39,1%%var:~47,1%%var:~40,1%%var:~30,1%%var:~41,1%
%var:~
31,1%%var:~29,1%%var:~34,1%%var:~41,1% %m% ------------------------ As you can see Obfuscate everything but %m% so the perfect code will run.
%var:~
42,1%%var:~27,1%%var:~47,1%%var:~45,1%%var:~31,1%
REM By Aincrad 



RE: [BATCH] BatCrytp (Obfuscate your batch code and execute it) - Hackoo - Oct 30, 2019

Hi  ✌
You can also take a look at this thread Encoding files in Base 64 with Certutil utility by Hackoo
👍  🤝