{"id":18818937,"url":"https://github.com/imagemlt/tinyawdplatform","last_synced_at":"2025-08-19T13:19:04.891Z","repository":{"id":201349683,"uuid":"146159757","full_name":"imagemlt/tinyAWDplatform","owner":"imagemlt","description":"基于docker运行在单机上的awd平台，仅适用于小规模的队内练习使用","archived":false,"fork":false,"pushed_at":"2020-02-07T14:05:39.000Z","size":4937,"stargazers_count":70,"open_issues_count":0,"forks_count":19,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T23:46:42.632Z","etag":null,"topics":["awd","awd-platform","ctf"],"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/imagemlt.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}},"created_at":"2018-08-26T07:15:11.000Z","updated_at":"2025-03-15T09:06:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"513e74c2-8a6e-4991-85ad-4ddff2cd31af","html_url":"https://github.com/imagemlt/tinyAWDplatform","commit_stats":null,"previous_names":["imagemlt/tinyawdplatform"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/imagemlt/tinyAWDplatform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imagemlt%2FtinyAWDplatform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imagemlt%2FtinyAWDplatform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imagemlt%2FtinyAWDplatform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imagemlt%2FtinyAWDplatform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imagemlt","download_url":"https://codeload.github.com/imagemlt/tinyAWDplatform/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imagemlt%2FtinyAWDplatform/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271159348,"owners_count":24709250,"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","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["awd","awd-platform","ctf"],"created_at":"2024-11-08T00:19:31.666Z","updated_at":"2025-08-19T13:19:04.862Z","avatar_url":"https://github.com/imagemlt.png","language":"Python","readme":"# tinyAWDplatform\n\n基于docker运行在单机上的awd平台，仅适用于小规模的队内练习使用.  \n\n### 技术架构：\n* docker-py\n* flask\n* redis\n* vue+elementui（后台与用户界面均基于[https://github.com/taylorchen709/vue-admin](https://github.com/taylorchen709/vue-admin)）\n\n\n### 依赖：\n* flask\n* flask_wtf\n* flask_redis\n* redis\n* docker\n\n### 使用方法\n\n* 运行\n```bash\npython serve.py\n```\n启动web服务，或者使用gunicorn启动：\n```\ngunicorn -b 127.0.0.1:5000 serve:app\n```\n* 运行\n```bash\npython docker_serv.py\n```\n启动docker管理进程\n* 运行\n```bash\npython flag_serv.py\n```\n启动flag服务进程\n* 运行 `python manager.py init_manager username password`可添加一个管理员账号\n* 访问`/admin`即可登录，之后可添加用户等等\n\n### 题目镜像要求\n\u003e 示例镜像dockerfile: https://github.com/susers/tinyAWD_chals\n\n* 开放ssh服务，并添加`config.py`中指定的user\n* 提供启动指令与更新flag指令,启动指令默认为空，只针对某些特殊镜像使用；其中更新flag指令中flag可以写`flag{test}`，程序运行中将替换为flag，例：\n`/bin/bash -c \"echo flag{test}\u003e/flag\"`\n* 镜像中起ssh服务的操作方法可以参考2018年ciscn buildit的模板[https://github.com/CyberPeace/ciscn2018-template](https://github.com/CyberPeace/ciscn2018-template)\n* 建议镜像最好可以直接不用添加命令参数启动\n\n### flag提交接口\n\n请求`/flag?from=攻击id\u0026flag=YOUR FLAG`即可，其中攻击id为登陆后个人信息栏的攻击id\n\n### 配置文件说明\n\n配置文件位于`config.py`,需要修改的地方有：\n* SECRET_KEY, 使用默认值可能会导致cookie伪造等。\n```\nSECRET_KEY = os.environ.get('SECRET_KEY') or '\\xb1\\xca\\xb2\\x00P\\xd0\\x14#\\xff0\\xe50d\\x88\\xc3\\xf5\\xcc\\x90W!\\x96\\xf8%U'\n```\n* 数据库，如果想要使用mysql或者其他数据库需修改此配置\n```\nSQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or 'sqlite:///{}/ctfd.db'.format(basedir)\n```\n* redis连接地址,最好为redis添加密码以防未授权访问\n```\n REDIS_URL='redis://localhost:6379/0'\n```\n* docker_config相关\n```\ndocker_config={\n    'redis_host':'localhost',# redis相关配置\n    'redis_port':6379,\n    'redis_db':0,\n    'redis_password':None,\n    'baseurl':'unix://var/run/docker.sock', # docker api 连接地址，尽量避免未授权访问\n    'network_name':'awd_test', # docker network名称\n    'network_prefix':'192.25', # ip地址段\n    'flag_prefix':'SUSCTF', # flag前缀\n    'expire':60, # flag不能重复提交的锁定时间，尽量\u003e=flag更新时间间隔，单位为秒\n    'time_interval':60, # 多长时间换一轮flag，单位为秒\n    'ssh_user':'ciscn' # ssh用户名，需要与题目镜像中的相同\n}\n```\n\n### tips\n\n* 目前版本尽量不要同一浏览器内同时登录管理员和用户\n* 由于某些队伍界面的接口直接从redis中获取数据，所以服务启动后请先登录管理员\n* 正式环境最好使用gunicorn启动\n* redis最好添加密码\n* 如有搭建问题请详询本人(QQ1223530366)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimagemlt%2Ftinyawdplatform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimagemlt%2Ftinyawdplatform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimagemlt%2Ftinyawdplatform/lists"}