{"id":24587898,"url":"https://github.com/parrothacker1/foolish_admin","last_synced_at":"2025-03-17T20:16:46.170Z","repository":{"id":219853355,"uuid":"734194132","full_name":"parrothacker1/foolish_admin","owner":"parrothacker1","description":"A foolish mistake by the admin","archived":false,"fork":false,"pushed_at":"2024-02-26T16:23:17.000Z","size":1983,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T19:59:37.873Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parrothacker1.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}},"created_at":"2023-12-21T05:12:06.000Z","updated_at":"2024-09-11T06:46:56.000Z","dependencies_parsed_at":"2024-01-30T02:49:06.313Z","dependency_job_id":null,"html_url":"https://github.com/parrothacker1/foolish_admin","commit_stats":null,"previous_names":["parrothacker1/foolish_admin"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parrothacker1%2Ffoolish_admin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parrothacker1%2Ffoolish_admin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parrothacker1%2Ffoolish_admin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parrothacker1%2Ffoolish_admin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parrothacker1","download_url":"https://codeload.github.com/parrothacker1/foolish_admin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244102853,"owners_count":20398386,"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":[],"created_at":"2025-01-24T07:13:29.999Z","updated_at":"2025-03-17T20:16:46.142Z","avatar_url":"https://github.com/parrothacker1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# foolish_admin\nA foolish mistake by the admin who is also a web dev.\n\nA CTF that was used in the PASSWORD 2024 Event.\n\n## Working\nThe website is made using fastapi and sqlite3.\n - The webiste when first loaded in the home page, the user will be given a JWT and a session id as cookies.The challenger first has a forge a JWT with None algorithm and pass it to get to the /admin/login page.(UPDATE changed to JWT Bruteforcing)\n - After getting to the admin login page , they need to do error based conditional blind sqli in the session-id field and get the admin password(a 8 character long password)\n - The table details are given in the image avalaibale in the /about page.The can do bruteforce to get the password and extract the table details\n - After submitting the password,they will get the RSA encrypted flag.Again by doing blind sqli they need to find n(modulus),e(public key) and phi(providing these 3 since the RSA keys are generated using [rsa_python](https://pypi.org/project/rsa-python/) library and keys are 128 bits)\n - Using those values decrypt the flag and done !!\n - The flag is in the ``` flag_{s3cr3t} ``` format. The flag is 32 character long with string.hexdigits characters.\n - Flag can be generated using the gen_flag.py script.The program will raise an Exception if challenge.txt is not found or there are no contents in the challenge.txt file.\n\n## Technologies Used\n- [Fastapi](https://fastapi.tiangolo.com/)\n- [Uvicorn](https://www.uvicorn.org/)\n- [SQLAlchemy](https://www.sqlalchemy.org/)\n- [Py-JWT](https://pyjwt.readthedocs.io/en/stable/)\n- [RSA-Python](https://pypi.org/project/rsa-python/)\n- [Poetry](https://python-poetry.org/)\n\n## Deployment\n#### How to build\nRun the following command\n```\nsudo docker-compose build\n```\n\n#### How to deploy \n```\nsudo docker-compose up\n```\n\nThe same can be done using docker commands like docker run,etc\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparrothacker1%2Ffoolish_admin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparrothacker1%2Ffoolish_admin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparrothacker1%2Ffoolish_admin/lists"}