https://github.com/wildzarek/42piscinecyber
Exercises solved from the Piscine Discovery Ciberseguridad at 42 Málaga, done in January 2025.
https://github.com/wildzarek/42piscinecyber
42malaga 42school cybersecurity discovery peer-to-peer peer2peer piscine42
Last synced: 11 months ago
JSON representation
Exercises solved from the Piscine Discovery Ciberseguridad at 42 Málaga, done in January 2025.
- Host: GitHub
- URL: https://github.com/wildzarek/42piscinecyber
- Owner: WildZarek
- Created: 2025-01-20T10:04:04.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-30T20:06:02.000Z (over 1 year ago)
- Last Synced: 2025-03-27T02:16:05.726Z (about 1 year ago)
- Topics: 42malaga, 42school, cybersecurity, discovery, peer-to-peer, peer2peer, piscine42
- Language: Python
- Homepage:
- Size: 5.83 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Piscine Discovery Cybersecurity
## Celulle00
This project is aimed to introduce us into the fascinating world of **Open Source Intelligence** (OSINT).
### Procedure
#### ex00
First, we are provided with this screenshot of a packet trace from `Wireshack` sniffer:

We need to found the social media used by that user, so let's do a basic search online.
For usernames, I like to use the following website: [IDCrawl](https://www.idcrawl.com)
But, if you have Kali Linux or any Linux distribution focused to Cybersecurity,
you could use a tool named `sherlock`. Choose what you prefer.
[[Search Results]](https://www.idcrawl.com/u/ihatetetris42)

###### Example with Sherlock

#### ex01
Now, we are asked to found the real user account because this appears to be a fake profile.
Easiest way is to check what accounts this user is following, which is only one. Let's take a look.

After checking that profile, we found the real user behind the fake account.

#### ex02
Continuing our investigation, we need to find geolocation of that user.
First, we can search for any other social media accounts related to him (**liam_up2u**).

[[Search Results]](https://www.idcrawl.com/u/liam_up2u)

[[IG's liam]](https://www.instagram.com/liam_up2u/)
And if we go to this Instagram's profile, we can see just one photo uploaded.
So, we can download that image and search by images at Google Images.

> [!TIP]
> This technique is also know as **Imagery intelligence** ([IMINT](https://en.wikipedia.org/wiki/Imagery_intelligence)).
Finally, we got results pointing to **Argañín**, province of Zamora, at Castile and León (Spain).
[Result 1](https://es.wikipedia.org/wiki/Arga%C3%B1%C3%ADn) | [Result 2](https://pueblosdesayago.com/2020/10/25/la-iglesia-de-la-natividad-de-la-virgen-de-arganin/)
#### ex03
Our investigation is ending, but last, we are asked to find the phone model which that photo was taken.
Time to explore through metadata! :mag_right:
For that pourpouse, you can use CLI tools like `Exiftool`, but I had prefer to use [fotoforensics.com](https://fotoforensics.com)
This website provide us with some useful data about an image, of course, metadata too.

## Celulle01
This project is aimed to introduce us into the fascinating world of **Web Exploitation** through common vulnerabilities.
### Procedure
#### ex00
We are provided with the following URL: [http://cybersec.42malaga.com:3317/](http://cybersec.42malaga.com:3317/)

If we take a look at the link "HINT", we can see that are pointing to a file inside another folder.
Let's try if we can see more files inside that folder just removing the `hint.html` file from the URL.

As we can see, the web is vulnerable to Directory Listing due to a bad configuration of the HTTP server.
So entering the folder **flag/** we discover the `flag.txt` file with the solution to this exercise.
> [!TIP]
> In a real scenario, you could use a technique called **Fuzzing** to discover directories, files,
> subdomains and many more. We will see more about this in the next exercise.
###### Example of Fuzzing with wfuzz

#### ex01
Next exercise seems solved in a similar manner, but this time we do not have any hint.
The URL is: [http://cybersec.42malaga.com:3318/](http://cybersec.42malaga.com:3318/)

Let's apply what we learned in previous exercise, we can think about the same vulnerability,
so using the same technique we will use `wfuzz` tool to enumerate hidden directories.

Go to the URL of that resource and check its content:

#### ex02
We are provided with another URL: [http://cybersec.42malaga.com:3319/](http://cybersec.42malaga.com:3319/)
This time, we see a little form where we can input the filename which we are looking for.
You could try to put `flag.txt` but in this case, we get this message:

Maybe the flag is in another directory, so we can think first in **Path Traversal Vulnerability**.

#### ex03
Finally, we have another URL: [http://cybersec.42malaga.com:3320/](http://cybersec.42malaga.com:3320/)
We can see a login form without any additional info. So first thing you can try is **SQL Injection Vulnerability**.

## Celulle02
This project is aimed to introduce us into the fascinating world of **Cryptography**.
### Procedure
#### ex00
In this first exercise we need to discover what algorithm was applied to the flag
and we are hinted about using `Cyberchef` tool (is a website).

#### ex01
Similar exercise, but now we will learn about deciphering multiple algorithms and again,
we are hinted about using `Cyberchef` tool.

#### ex02
In this case, we will learn about hashes and how to decrypt them. We are hinted about using `hashcat`.
> [!WARNING]
> We do not have hashcat installed on the campus machines.
> But that is not a problem because there is another way to solve this.
[CrackStation](https://crackstation.net/) is a website where you can try to crack most of the common hashes used.
So let's try if we have luck!

#### ex03
Last one. Now we have a little dictionary with words that could be part of the password.
We have the hash but we can't crack it without knowing the correct password to do that. Or maybe yes?
As seen in the subject of the exercise, we NEED to use `John The Ripper`.
Again, in my campus we don't have this tool, I could try to install it from Github
or use some Linux distro focused on Cybersecurity, like Kali Linux.
First of all, I solved this because some other students gave me the hint about a website called [hashes.com](https://hashes.com/en/decrypt/hash)

But to be honest, that is not the best way to solve this exercise
because we SHOULD use the correct tool (as explained in the subject).
So I installed Kali Linux as a VM and here is the result:

# Happy Hacking! ☠