Skip to content

Unknnownnn/ABXY

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

ABXY

Forensics/Batch CTF

CTF Made for Code and Conquer '24

$${\color{red}Overview:}$$

We are given a .bat file called “ABXY.bat”. We need get the answer in hacker{XXXX}.

$${\color{red}Theory:}$$

.bat files work on language called batch, which is used for DOS application. It can perform various functions such as copying, deleting, creating new files, reading file data or writing to files. Rem command is used to comment out lines in batch.

$${\color{red}Important:}$$

• The given .bat file is self-duplicating and self-destructing. Please use a copy of the given file before continuing the challenge. • The .bat file works only for windows/DOS based systems. Running .bat files under Linux or Windows emulators such as WINE may not work as intended.

$${\color{red}Solution:}$$

  1. Run the .bat file in an isolated folder.
  2. This creates multiple folders at the file location

image

  1. The .bat file self-destructs.
  2. The file copies itself to \New Folder(6)\CR\22.

image

  1. Running the file repeats this again to \New Folder(6)\CR.

image

  1. Running the file again displays the message “Not here. Try Again.”
  2. The .bat file self-destructs.
  3. Within the users Documents folder, a file called dblank.txt is created.

image

  1. The password is found within it.

image

  1. Opening the .bat file with a text editor reveals a lot of commented code making the more time consuming to find the password within. image

$${\color{red}Flag:}$$

$${\color{lightgreen}hacker(21qw14aabfgh3refl4gbt3)}$$