{"id":13633768,"url":"https://github.com/arturmiller/adversarial_ml_ctf","last_synced_at":"2025-04-18T14:33:10.777Z","repository":{"id":230234766,"uuid":"288954136","full_name":"arturmiller/adversarial_ml_ctf","owner":"arturmiller","description":"This repository is a CTF challenge, showing a security flaw in most (all?) common artificial neural networks. They are vulnerable for adversarial images.","archived":false,"fork":false,"pushed_at":"2020-08-24T15:00:04.000Z","size":112,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-09T03:36:11.371Z","etag":null,"topics":["adversarial","challenge","ctf","docker","flask","machine-learning","optimization","python","security","website"],"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/arturmiller.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":"2020-08-20T08:49:05.000Z","updated_at":"2024-04-04T02:59:45.000Z","dependencies_parsed_at":"2024-03-28T15:51:44.349Z","dependency_job_id":null,"html_url":"https://github.com/arturmiller/adversarial_ml_ctf","commit_stats":null,"previous_names":["arturmiller/adversarial_ml_ctf"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturmiller%2Fadversarial_ml_ctf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturmiller%2Fadversarial_ml_ctf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturmiller%2Fadversarial_ml_ctf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturmiller%2Fadversarial_ml_ctf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arturmiller","download_url":"https://codeload.github.com/arturmiller/adversarial_ml_ctf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249505464,"owners_count":21282881,"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":["adversarial","challenge","ctf","docker","flask","machine-learning","optimization","python","security","website"],"created_at":"2024-08-01T23:00:51.456Z","updated_at":"2025-04-18T14:33:10.512Z","avatar_url":"https://github.com/arturmiller.png","language":"Python","funding_links":[],"categories":["Open Source Security Tools"],"sub_categories":[],"readme":"# Adversarial Machine Learning CTF\n\nWith the rise of Machine Learning IT Security might look different in a few years. This repository is a CTF challenge, showing a security flaw in most (all?) common artificial neural networks. They are vulnerable for adversarial images.  \nThis challenge not only requires from you to analyse the website, but also some data handling and number crunching is required.  \nThe challenge is to login into the website. The authentication is done by a Machine Learning model in the backend. It is able to identify valid users by an image from your webcam. You have solved the challenge when the website says \"You are authenticated\".  \nThis challenge is similar to existing challenges, e.g. [hackmit-puzzle-2017-tinbot](https://github.com/techx/hackmit-puzzle-2017-tinbot) and [UTCTF-19-facesafe](https://github.com/utisss/UTCTF-19/tree/master/facesafe). However in this one you won't have access to the model parameters, which makes it black box in regards to the Machine Learning model.  \n\n![Website](https://raw.githubusercontent.com/arturmiller/adversarial_ml_ctf/master/images/website.png)\n\n## Installation\nThe easiest way to install and run the webserver is by using [docker](https://docs.docker.com/get-docker/). Just pull and run the docker image.\n```bash\ndocker pull arturmiller/adversarial_ml_ctf\ndocker run -it -p 5000:5000 --name=adversarial_ml_ctf arturmiller/adversarial_ml_ctf\n```\n\nNow you can access the website locally ([http://localhost:5000](http://localhost:5000)) with any browser.\nI recommend to access the website from the same machine, where the container is running. For security reasons most browsers block opening the webcam if the connection is not secure (http instead of https). The only exception localhost.\n\n## I have no webcam?\nYou actually don't need a webcam to solve this challenge. On Ubuntu you can create a fake webcam with v4l2loopback and pyfakewebcam.\n\n```bash\nsudo apt-get install -y v4l2loopback-dkms\npip3 install pyfakewebcam\n```\n\nRunning v4l2loopback should create a fake device \"/dev/video0\".\n```bash\nsudo modprobe v4l2loopback exclusive_caps=1\n```\n\nNow you can stream images with [pyfakewebcam](https://github.com/jremmons/pyfakewebcam#usage).\n\n## Build the image on your own\nIf you want to build the Docker image on your, download the source code and build it with docker.\n```bash\ngit clone https://github.com/arturmiller/adversarial_ml_ctf.git\ncd adversarial_ml_ctf\ndocker build -t adversarial_ml_ctf .\n```\n\nYou can run the image with:\n```bash\ndocker run -it -p 5000:5000 --name=adversarial_ml_ctf adversarial_ml_ctf\n```\n\n## Run without Docker\nIf you want to run the webserver without Docker you need [Python3](https://wiki.python.org/moin/BeginnersGuide/Download) on your machine.  \nThen download the source code and install the dependencies:\n\n```bash\ngit clone https://github.com/arturmiller/adversarial_ml_ctf.git\ncd adversarial_ml_ctf\npip3 install -r /requirements.txt\n```\n\nRun the webserver with:\n```bash\npython3 main.py\n```\n\n## Solution\nYou can find the solution of this challenge in the [adversarial_ml_ctf](https://github.com/arturmiller/adversarial_ml_ctf) repository.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farturmiller%2Fadversarial_ml_ctf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farturmiller%2Fadversarial_ml_ctf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farturmiller%2Fadversarial_ml_ctf/lists"}