# Day 5

Learning Objectives

* Experience how to navigate an unfamiliar legacy system.
* Learn about DOS and its connection to its contemporary, the Windows Command Prompt.
* Discover the significance of file signatures and magic bytes in data recovery and file system analysis.

The room is vrey straight foward like the previous ones and the commands are given to us.&#x20;

```
How large (in bytes) is the AC2023.BAK file?
Just type dir and enter.
```

<figure><img src="/files/WcCbgUCVlJW9z3aZC8FJ" alt=""><figcaption></figcaption></figure>

This will give us the size of the file AC2023.BAK.

{% code overflow="wrap" %}

```
What is the name of the backup program?
If you go to C:\TOOLS\BACKUP and open the README.TXT it will give you the name of the backup program
```

{% endcode %}

{% code overflow="wrap" %}

```
What should the correct bytes be in the backup's file signature to restore the backup properly?
If you open AC2023.BAK with EDIT AC2023.BAK you will find it's magic number is different than the one specified in bakup program's troubleshooting section. 
```

{% endcode %}

{% code overflow="wrap" %}

```
What is the flag after restoring the backup successfully?
The magic number is in hexadecimal format which needs to be converted to ASCII representation. Once this has been fixed and AC2023.BAK is edited we can run it and it will give us the flag.
```

{% endcode %}

<figure><img src="/files/sw8beH7uwDmHjJIhHflq" alt=""><figcaption></figcaption></figure>

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bunring.gitbook.io/ctf-writeups/try-hack-me/advent-of-cyber-2023/day-5.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
