{"id":24874801,"url":"https://github.com/wildzarek/42piscinecyber","last_synced_at":"2025-07-08T23:33:35.472Z","repository":{"id":275039761,"uuid":"919392758","full_name":"WildZarek/42PiscineCyber","owner":"WildZarek","description":"Exercises solved from the Piscine Discovery Ciberseguridad at 42 Málaga, done in January 2025.","archived":false,"fork":false,"pushed_at":"2025-01-30T20:06:02.000Z","size":6110,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T02:16:05.726Z","etag":null,"topics":["42malaga","42school","cybersecurity","discovery","peer-to-peer","peer2peer","piscine42"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WildZarek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-20T10:04:04.000Z","updated_at":"2025-01-30T20:06:06.000Z","dependencies_parsed_at":"2025-01-30T21:29:33.955Z","dependency_job_id":null,"html_url":"https://github.com/WildZarek/42PiscineCyber","commit_stats":null,"previous_names":["wildzarek/42piscinecyber"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/WildZarek/42PiscineCyber","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WildZarek%2F42PiscineCyber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WildZarek%2F42PiscineCyber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WildZarek%2F42PiscineCyber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WildZarek%2F42PiscineCyber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WildZarek","download_url":"https://codeload.github.com/WildZarek/42PiscineCyber/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WildZarek%2F42PiscineCyber/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264366228,"owners_count":23596994,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["42malaga","42school","cybersecurity","discovery","peer-to-peer","peer2peer","piscine42"],"created_at":"2025-02-01T07:28:44.628Z","updated_at":"2025-07-08T23:33:35.426Z","avatar_url":"https://github.com/WildZarek.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Piscine Discovery Cybersecurity\n\n## Celulle00\n\nThis project is aimed to introduce us into the fascinating world of **Open Source Intelligence** (OSINT).\n\n### Procedure\n\n#### ex00\n\nFirst, we are provided with this screenshot of a packet trace from `Wireshack` sniffer:\n\n![Packet Trace from Wireshack](/.assets/img/packet_trace.png)\n\nWe need to found the social media used by that user, so let's do a basic search online.\u003cbr\u003e\nFor usernames, I like to use the following website: [IDCrawl](https://www.idcrawl.com)\n\nBut, if you have Kali Linux or any Linux distribution focused to Cybersecurity,\u003cbr\u003e\nyou could use a tool named `sherlock`. Choose what you prefer.\n\u003cbr\u003e\n\n[[Search Results]](https://www.idcrawl.com/u/ihatetetris42)\n\n![X Account of ihatetetris42](/.assets/img/x_ihatetetris42.png)\n\n###### Example with Sherlock\n\n![Sherlock Usage](/.assets/img/tyto00_sherlock.png)\n\n#### ex01\n\nNow, we are asked to found the real user account because this appears to be a fake profile.\u003cbr\u003e\nEasiest way is to check what accounts this user is following, which is only one. Let's take a look.\n\n![Sherlock Usage](/.assets/img/ihatetetris42_follows.png)\n\nAfter checking that profile, we found the real user behind the fake account.\n\n![X Account of liam_up2u](/.assets/img/x_liam_up2u.png)\n\n#### ex02\n\nContinuing our investigation, we need to find geolocation of that user.\u003cbr\u003e\nFirst, we can search for any other social media accounts related to him (**liam_up2u**).\n\u003cbr\u003e\n![IDCrawl for Liam](/.assets/img/liam_idcrawl.png)\n[[Search Results]](https://www.idcrawl.com/u/liam_up2u)\n\u003cbr\u003e\n![Liam's Instagram Profile](/.assets/img/liam_ig.png)\n[[IG's liam]](https://www.instagram.com/liam_up2u/)\n\nAnd if we go to this Instagram's profile, we can see just one photo uploaded.\u003cbr\u003e\nSo, we can download that image and search by images at Google Images.\n\n![Liam's Location](/.assets/img/liam_location.png)\n\n\u003e [!TIP]\n\u003e This technique is also know as **Imagery intelligence** ([IMINT](https://en.wikipedia.org/wiki/Imagery_intelligence)).\n\nFinally, we got results pointing to **Argañín**, province of Zamora, at Castile and León (Spain).\n\u003cbr\u003e\n[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/)\n\n#### ex03\n\nOur investigation is ending, but last, we are asked to find the phone model which that photo was taken.\u003cbr\u003e\nTime to explore through metadata! :mag_right:\n\nFor that pourpouse, you can use CLI tools like `Exiftool`, but I had prefer to use [fotoforensics.com](https://fotoforensics.com)\n\u003cbr\u003e\nThis website provide us with some useful data about an image, of course, metadata too.\n\n![Image Metadata](/.assets/img/fotoforensics_tool.png)\n\n## Celulle01\n\nThis project is aimed to introduce us into the fascinating world of **Web Exploitation** through common vulnerabilities.\n\n### Procedure\n\n#### ex00\n\nWe are provided with the following URL: [http://cybersec.42malaga.com:3317/](http://cybersec.42malaga.com:3317/)\n\n![Web Exercise 00](/.assets/img/weasel00_web.png)\n\nIf we take a look at the link \"HINT\", we can see that are pointing to a file inside another folder.\u003cbr\u003e\nLet's try if we can see more files inside that folder just removing the `hint.html` file from the URL.\n\n![Web Exercise 00 Vulnerability](/.assets/img/weasel00_vuln.png)\n\nAs we can see, the web is vulnerable to Directory Listing due to a bad configuration of the HTTP server.\u003cbr\u003e\nSo entering the folder **flag/** we discover the `flag.txt` file with the solution to this exercise.\n\n\u003e [!TIP]\n\u003e In a real scenario, you could use a technique called **Fuzzing** to discover directories, files,\u003cbr\u003e\n\u003e subdomains and many more. We will see more about this in the next exercise.\n\n###### Example of Fuzzing with wfuzz\n\n![Fuzzing](/.assets/img/weasel00_result.png)\n\n#### ex01\n\nNext exercise seems solved in a similar manner, but this time we do not have any hint.\n\nThe URL is: [http://cybersec.42malaga.com:3318/](http://cybersec.42malaga.com:3318/)\n\n![Web Exercise 01](/.assets/img/weasel01_web.png)\n\nLet's apply what we learned in previous exercise, we can think about the same vulnerability,\u003cbr\u003e\nso using the same technique we will use `wfuzz` tool to enumerate hidden directories.\n\n![Fuzzing](/.assets/img/weasel01_result.png)\n\nGo to the URL of that resource and check its content:\n\n![Web Exercise 01 Vulnerability](/.assets/img/weasel01_vuln.png)\n\n#### ex02\n\nWe are provided with another URL: [http://cybersec.42malaga.com:3319/](http://cybersec.42malaga.com:3319/)\n\nThis time, we see a little form where we can input the filename which we are looking for.\u003cbr\u003e\nYou could try to put `flag.txt` but in this case, we get this message:\n\n![Web Exercise 02](/.assets/img/weasel02_msg.png)\n\nMaybe the flag is in another directory, so we can think first in **Path Traversal Vulnerability**.\n\n![Web Exercise 02 Vulnerability](/.assets/img/weasel02_vuln.png)\n\n#### ex03\n\nFinally, we have another URL: [http://cybersec.42malaga.com:3320/](http://cybersec.42malaga.com:3320/)\n\nWe can see a login form without any additional info. So first thing you can try is **SQL Injection Vulnerability**.\n\n![Web Exercise 03 Vulnerability](/.assets/img/weasel03_vuln.png)\n\n## Celulle02\n\nThis project is aimed to introduce us into the fascinating world of **Cryptography**.\n\n### Procedure\n\n#### ex00\n\nIn this first exercise we need to discover what algorithm was applied to the flag\u003cbr\u003e\nand we are hinted about using `Cyberchef` tool (is a website).\n\n![Cryptography Exercise 00](/.assets/img/gecko00.png)\n\n#### ex01\n\nSimilar exercise, but now we will learn about deciphering multiple algorithms and again,\u003cbr\u003e\nwe are hinted about using `Cyberchef` tool.\n\n![Cryptography Exercise 01](/.assets/img/gecko01.png)\n\n#### ex02\n\nIn this case, we will learn about hashes and how to decrypt them. We are hinted about using `hashcat`.\n\n\u003e [!WARNING]  \n\u003e We do not have hashcat installed on the campus machines.\u003cbr\u003e\n\u003e But that is not a problem because there is another way to solve this.\n\n[CrackStation](https://crackstation.net/) is a website where you can try to crack most of the common hashes used.\n\nSo let's try if we have luck!\n\n![Cryptography Exercise 02](/.assets/img/gecko02.png)\n\n#### ex03\n\nLast one. Now we have a little dictionary with words that could be part of the password.\u003cbr\u003e\nWe have the hash but we can't crack it without knowing the correct password to do that. Or maybe yes?\u003cbr\u003e\nAs seen in the subject of the exercise, we NEED to use `John The Ripper`.\n\nAgain, in my campus we don't have this tool, I could try to install it from Github\u003cbr\u003e\nor use some Linux distro focused on Cybersecurity, like Kali Linux.\n\nFirst 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)\n\n![Cryptography Exercise 03](/.assets/img/gecko03_result.png)\n\nBut to be honest, that is not the best way to solve this exercise\u003cbr\u003e\nbecause we SHOULD use the correct tool (as explained in the subject).\n\nSo I installed Kali Linux as a VM and here is the result:\n\n![Cryptography Exercise 03](/.assets/img/gecko03_john.png)\n\n# Happy Hacking! ☠","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwildzarek%2F42piscinecyber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwildzarek%2F42piscinecyber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwildzarek%2F42piscinecyber/lists"}