{"id":20394289,"url":"https://github.com/hexcowboy/pactf","last_synced_at":"2025-07-16T03:48:38.738Z","repository":{"id":121041899,"uuid":"392806569","full_name":"hexcowboy/pactf","owner":"hexcowboy","description":"An automated CTF machine builder","archived":false,"fork":false,"pushed_at":"2021-08-04T19:41:11.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-04T15:14:12.486Z","etag":null,"topics":["ctf","hackthebox","packer"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/hexcowboy.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":"2021-08-04T19:36:52.000Z","updated_at":"2021-08-05T16:59:58.000Z","dependencies_parsed_at":"2023-04-24T14:41:22.238Z","dependency_job_id":null,"html_url":"https://github.com/hexcowboy/pactf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hexcowboy/pactf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexcowboy%2Fpactf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexcowboy%2Fpactf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexcowboy%2Fpactf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexcowboy%2Fpactf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hexcowboy","download_url":"https://codeload.github.com/hexcowboy/pactf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexcowboy%2Fpactf/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265479968,"owners_count":23773640,"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":["ctf","hackthebox","packer"],"created_at":"2024-11-15T03:52:39.284Z","updated_at":"2025-07-16T03:48:38.675Z","avatar_url":"https://github.com/hexcowboy.png","language":"Shell","readme":"# pactf\n\n\u003e Description: Packer CTF automated build process \\\n\u003e Author: hexcowboy ([@hexcowboy](https://twitter.com/hexcowboy))\n\nThis repository will automate the build of an entire Ubuntu 20.04 VirtualBox machine that you can submit to your favorite Capture the Flag provider.\n\n\n## VM Settings\n\n- **Type**: VirtualBox OVA\n- **OS**: Ubuntu 20.04\n- **CPU**: 1 CPU\n- **Memory**: 1GB\n- **Disk**: 8GB\n\n## Build Guide\n\n### Production\n\n#### Requirements:\n\n- [Packer](https://github.com/hashicorp/packer)\n- [VirtualBox](https://www.virtualbox.org/)\n\n#### Steps\n\n1. Build with packer\n```bash\npacker build -force packer/packer.json\n```\n2. Wait for the build process to complete (10+ minutes)\n3. The VM will be output in `build/\u003cmachine\u003e.ova`\n\n### Testing on a VPS\n\n1. Install Ubuntu 20.04 LTS\n2. Enable network connectivity and export the VPS IP as a variable\n```bash\nexport IP=\u003cIP ADDRESS HERE\u003e\n```\n3. Upload the skeleton directory\n```bash\nrsync -Pazh skel/ root@$IP:/\n```\n4. Run the build script\n```bash\nssh \"root@$IP\" \"bash -s\" \u003c packer/scripts/build.sh\n```\n\n## Structure\n\n```bash\n.\n├── README.md                       # YOU ARE HERE\n├── builds                          # Your VMs will be built here\n│   └── machine.ova\n├── exploit                         # Add your exploit scripts here\n│   ├── cve-XXXX.py\n│   └── www\n│       └── enum-script.sh\n├── htb                             # Information and writeup for HTB\n│   ├── information.md\n│   └── writeup.md\n├── packer\n│   ├── http                        # Don't touch these (for your own safety)\n│   │   ├── meta-data               # ↵\n│   │   └── user-data               # ↵\n│   ├── packer.json                 # The VM config\n│   └── scripts\n│       ├── base.sh                 # Base Ubuntu install\n│       ├── build.sh                # CTF build scripts\n│       └── network.sh              # CTF network scripts\n└── skel                            # Files that will be uploaded to the root directory tree\n    └── home\n        └── user\n            └── webserver.zip\n```\n\n## Methodology\n\nHere is how your workflow might look:\n\n1. Edit the `packer/packer.json` to configure and set the name of the VM\n1. Install vulnerable software in the `packer/scripts/build.sh` file\n1. Add any files to the directory root in `skel/` where all files will get added to the VM in the respective file heirarchy\n1. Configure the VM's network properties in `packer/scripts/network.sh`\n1. Build the box (see above)\n1. Test the box and add exploit tools to the `exploit/` folder\n1. Once finished, create the writeup and information in `htb/`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexcowboy%2Fpactf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhexcowboy%2Fpactf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexcowboy%2Fpactf/lists"}