bat obfuscation with set ***=****

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
EN3Kz
Posts: 1
Joined: 04 Nov 2019 08:20

bat obfuscation with set ***=****

#1 Post by EN3Kz » 04 Nov 2019 10:22

SET **.=S
%**.%ET .**=E
%**.%%.**%T *.*=T
%**.%%.**%%*.*% ***==
%**.%%.**%%*.*% .F.U.C.K.E.D.%***%%**.%
%.F.U.C.K.E.D.%%.**%%*.*% ..FU.C.K.E.D.%***%%.**%
%.F.U.C.K.E.D.%%..FU.C.K.E.D.%%*.*% ...FUC.K.E.D.%***%%*.*%

just an example you can mix it up with goto`s and %*%
Remember both %**.% & %.F.U.C.K.E.D.% will be read as "S"
So with two variables you can mix it up and help throw off script kitties :lol:

bakemonogatari
Posts: 11
Joined: 08 Jul 2019 05:22

Re: bat obfuscation with set ***=****

#2 Post by bakemonogatari » 06 Nov 2019 15:46

in a bat file, do i need an escape character ?

ex:
SET **.=S
echo **. var %**.%
PAUSE

the %**.% only show *. not S

aGerman
Expert
Posts: 3753
Joined: 22 Jan 2010 18:01
Location: Germany

Re: bat obfuscation with set ***=****

#3 Post by aGerman » 14 Nov 2019 11:49

Still no feedback from the OP?

@bakemonogatari No escape character will help here. You simply have to use alpha characters rather than asterisks. Why? That's why:
%**.%
As soon as the cmd sees sequence %* it will try to expand it to the passed arguments. If no arguments have been passed to your script, this sequence expands to nothing. *.% is printed as *. because a standing alone percent sign is automatically removed.

Steffen

Post Reply