{"id":17383390,"url":"https://github.com/thisisnotgcsar/odc_23-24-ctfs","last_synced_at":"2026-02-04T11:07:33.617Z","repository":{"id":228886542,"uuid":"706220675","full_name":"thisisnotgcsar/ODC_23-24-CTFs","owner":"thisisnotgcsar","description":"All CTFs solved in Offensive and Defensive Cyber Security course of Polytechnic of Milan 23/24 edition","archived":false,"fork":false,"pushed_at":"2024-10-13T18:39:39.000Z","size":12669,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T20:48:58.874Z","etag":null,"topics":["buffer-overflow","cybersecurity","heap-exploitation","malware-analysis","mitigations","race-conditions","return-oriented-programming","reverse-engineering","serialization","shellcode","stack-smashing","symbolic-execution","webapp-security","xss"],"latest_commit_sha":null,"homepage":"https://training.offdef.it/challenges","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thisisnotgcsar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-10-17T14:28:26.000Z","updated_at":"2025-02-17T22:14:44.000Z","dependencies_parsed_at":"2024-12-06T19:21:07.375Z","dependency_job_id":null,"html_url":"https://github.com/thisisnotgcsar/ODC_23-24-CTFs","commit_stats":null,"previous_names":["thisisnotcsarg/odc_23-24-ctfs","thisisnotgcsar/odc_23-24-ctfs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisisnotgcsar%2FODC_23-24-CTFs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisisnotgcsar%2FODC_23-24-CTFs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisisnotgcsar%2FODC_23-24-CTFs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisisnotgcsar%2FODC_23-24-CTFs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thisisnotgcsar","download_url":"https://codeload.github.com/thisisnotgcsar/ODC_23-24-CTFs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248837287,"owners_count":21169374,"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":["buffer-overflow","cybersecurity","heap-exploitation","malware-analysis","mitigations","race-conditions","return-oriented-programming","reverse-engineering","serialization","shellcode","stack-smashing","symbolic-execution","webapp-security","xss"],"created_at":"2024-10-16T07:41:29.019Z","updated_at":"2026-02-04T11:07:33.579Z","avatar_url":"https://github.com/thisisnotgcsar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ODC_23-24-CTFs \u003c!-- omit in toc --\u003e\n\n\u003e POLIMI Offensive and Defensive Cybersecurity (ODC) 23/24 course's CTFs solved\n\n- [1. About](#1-about)\n  - [1.1. What is a CTF?](#11-what-is-a-ctf)\n  - [1.2. What is a \"flag\"?](#12-what-is-a-flag)\n  - [1.3. What are the macro-topics?](#13-what-are-the-macro-topics)\n  - [1.4. 23/24 ODC CTFs](#14-2324-odc-ctfs)\n- [2. File structure and convetions](#2-file-structure-and-convetions)\n- [3. Usage](#3-usage)\n- [4. Contibutions](#4-contibutions)\n  - [4.1. Enhancement](#41-enhancement)\n  - [4.2. New exploit](#42-new-exploit)\n- [5. Meta](#5-meta)\n\n# 1. About\n\n## 1.1. What is a CTF?\nCapture The Flag (CTF) is a cybersecurity challenge that involves participants finding a designated flag. The flag is acquired when a participant successfully gains control of the organizer's publicly vulnerable machine. Typically, CTFs are organized into macro-topics within a jeopardy-style competition, allowing individuals or teams to participate through the central organizer's online platform. Additionally, other cybersecurity competitions, such as \"Attack/Defense\" or \"King of the Hill,\" also exist.\n\n## 1.2. What is a \"flag\"?\nA flag typically consists of a unique and non-trivial string of characters and symbols stored in a file named \"flag\". This file is configured to be readable exclusively by the organizers, accessible only through the \"root\" account (also known as \"superuser\" or \"admin\") on the machine. The term \"taking control\" refers to the successful attainment of root privileges on the machine. Reading the flag and subsequently reporting it to the organizers serves as a harmless proof of accomplishment.\n\n## 1.3. What are the macro-topics?\nCompetitions may encompass one or more macro-topics, which can include areas such as cryptography, reverse engineering, binary exploitation, web application security, steganography/forensics, mobile security, and other related domains.\n\n## 1.4. 23/24 ODC CTFs\nPOLITECNICO DI MILANO (POLIMI) offers an advanced technical course on Cybersecurity: \"Offensive and Defensive Cybersecurity\". \nAll along the course, students are being presented with CTFs comprising these topics in macro-topics:\n - shellcode (binary exploitation)\n - reversing (reverse engineering)\n - mitigations (mitigations bypass, binary exploitation)\n - ROP (Return Oriented Programming, binary exploitation)\n - HEAP (HEAP exploitation, binary exploitation)\n - symbolic (symbolic execution, binary exploitation)\n - race (race conditions, web app exploitation)\n - serialization (serialization, web app exploitation)\n - XSS (cross-site scripting, web exploitation)\n - malware (packing, binary analysis)\n\nto solve by applying what has been learned in class.\nFinal exam consists in an actual free-for-all live CTF competition of 7 hours long.\n\n# 2. File structure and convetions\nCTFs are organized in subdirectories, grouped inside parent directories reflecting each topic. \n\nInside each CTF directory, you can usually find (depending on the macro-topic):\n - `notes.txt`: a text file within all my notes taken live.\n - The executable file: the binary to be exploited. It has no file extension. Usually, source code is not given.\n - `*.mod`: modified versions of the executable\n - `script.py`: the Python exploiting script. The main entry point file of every CTF directory. Usually, you should run it once and get  to output the flag.\n - `payload`: optional file with malicious content. It is used by `script.py`. \n - `libc*.so` and `ld*.so`: sometimes, it is also given the standard C library and loader, supposed to run with the executable.\n - `src/` or `html` or `htdocs`: folder containing the source code. Usually given for web app exploitation.\n - `explanation.md`: text markdown file in which it is clearly detailed the exploit in steps.\n - An optional child directory named after a *contributor* with a different exploit inside.\n\n# 3. Usage\nChallenges are hosted at [https://training.offdef.it/challenges](https://training.offdef.it/challenges) under form of provided services.\n\n**NOTE**: Before running any file, check if the service is up by sending a TCP request: `nc -zv {hostname} {port}`. \n\n`script.py` should interact with the service, exploit it and printing the flag. You can consult documentation on the CTF by reading the `explanation.md` file.\n\n# 4. Contibutions\nContributions are more than welcome! Here's a [short video tutorial](https://www.youtube.com/watch?v=8lGpZkjnkt4) on how to open a *pull request*.\n\n## 4.1. Enhancement\nIf you just thought something could have been done better or you want to fix a mistake, In the pull request, write a brief description of what you *enhanced*.\n\n## 4.2. New exploit\nIf you want to submit a new exploit, follow these steps:\n1. Create a subdirectory with your name in your desired specific CTF folder: `foo/CTF$: mkdir {name}`\n2. Inside that directory, there should be at least:\n   - One `script.py` file with your exploit inside it.\n   - One `explanation.txt` with a clear and concise explanation in steps of your exploit.\n   - You can add any other file you think will be useful.\n3. State in the pull request message that it is a \"New exploit\" contribution.\n\n# 5. Meta\ngcsar\n\n\u003cp xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:dct=\"http://purl.org/dc/terms/\"\u003e\u003ca property=\"dct:title\" rel=\"cc:attributionURL\" href=\"https://github.com/thisisnotgcsar/ODC_23-24-CTFs\"\u003eODC_23_24\u003c/a\u003e by \u003ca rel=\"cc:attributionURL dct:creator\" property=\"cc:attributionName\" href=\"https://github.com/thisisnotgcsar\"\u003egcsar\u003c/a\u003e is licensed under \u003ca href=\"http://creativecommons.org/licenses/by-nc-sa/4.0/?ref=chooser-v1\" target=\"_blank\" rel=\"license noopener noreferrer\" style=\"display:inline-block;\"\u003eCC BY-NC-SA 4.0\u003cimg style=\"height:22px!important;margin-left:3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1\"\u003e\u003cimg style=\"height:22px!important;margin-left:3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1\"\u003e\u003cimg style=\"height:22px!important;margin-left:3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/nc.svg?ref=chooser-v1\"\u003e\u003cimg style=\"height:22px!important;margin-left:3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/sa.svg?ref=chooser-v1\"\u003e\u003c/a\u003e\u003c/p\u003e\n\nhttps://github.com/thisisnotgcsar\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthisisnotgcsar%2Fodc_23-24-ctfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthisisnotgcsar%2Fodc_23-24-ctfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthisisnotgcsar%2Fodc_23-24-ctfs/lists"}