Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Documentation Update
about: Suggest improvements or corrections to documentation
title: 'docs: '
labels: 'documentation'
assignees: ''

---

**Which documentation needs updating?**
Please specify which document(s) need to be updated (e.g., README.md, docs/ctf-overview.md)

**What needs to be changed?**
A clear and concise description of what should be updated, corrected, or added.

**Why is this change needed?**
Explain why this documentation change would be helpful.

**Proposed content (optional)**
If you have specific wording or content to suggest, please include it here.

**Additional context**
Add any other context, screenshots, or links about the documentation update.
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/script-tool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Script/Tool Contribution
about: Share a script or tool for CTF challenges
title: 'tool: '
labels: 'script,tool'
assignees: ''

---

**Script/Tool Name**
What would you like to call this script or tool?

**Purpose**
What CTF challenge category or problem does this script/tool address?
- [ ] Enumeration
- [ ] Exploitation
- [ ] Cryptography
- [ ] Forensics
- [ ] Web Exploitation
- [ ] Reverse Engineering
- [ ] Other (please specify)

**Description**
Provide a clear description of what the script/tool does and how it works.

**Usage Example**
Show an example of how to use the script/tool:
```bash
# Example usage
./your-script.sh [arguments]
```

**Dependencies**
List any dependencies or requirements:
- Language/Runtime: (e.g., Python 3.x, Bash, etc.)
- External tools: (e.g., nmap, metasploit, etc.)
- Libraries: (e.g., pip packages, etc.)

**Script/Tool Location**
Where should this be added in the repository?
- Suggested path: `scripts/[category]/your-script.ext`

**Additional Notes**
Any additional context, links, or references that would be helpful.
86 changes: 86 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Deploy to GitHub Pages

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: site/package-lock.json

- name: Install dependencies
working-directory: ./site
run: npm ci

- name: Fetch repository data
working-directory: ./site
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Fetching repository statistics..."
node --loader tsx scripts/fetch_repo_data.ts || npm exec tsx scripts/fetch_repo_data.ts

- name: Fetch discussions
working-directory: ./site
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Fetching discussions..."
node --loader tsx scripts/fetch_discussions.ts || npm exec tsx scripts/fetch_discussions.ts

- name: Fetch projects
working-directory: ./site
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Fetching project data..."
node --loader tsx scripts/fetch_projects.ts || npm exec tsx scripts/fetch_projects.ts

- name: Scan scripts
working-directory: ./site
run: |
echo "Scanning scripts directory..."
node --loader tsx scripts/scan_scripts.ts || npm exec tsx scripts/scan_scripts.ts

- name: Build site
working-directory: ./site
run: npm run build

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./site/dist

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,16 @@ secrets.txt
# CTF-specific
writeups/drafts/
notes/private/

# Node.js
node_modules/
package-lock.json

# Astro
.astro/
dist/

# Site build artifacts
site/dist/
site/.astro/
site/node_modules/
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Welcome to the CTF-Kit Repository

🌐 **Live Site**: [https://cywf.github.io/ctf-kit/](https://cywf.github.io/ctf-kit/)

## Introduction

Welcome to the CTF-Kit repository! This project is designed to be a collaborative and evolving resource for anyone interested in participating in Capture The Flag (CTF) competitions. Whether you're a seasoned veteran or a newcomer to the world of CTFs, this repository aims to provide you with the tools, resources, and knowledge you need to succeed.
Expand Down Expand Up @@ -69,3 +71,48 @@ Your input is valuable! If you have ideas for new features, tools, or improvemen
## Conclusion

Thank you for being a part of the CTF-Kit community! Whether you’re here to learn, contribute, or both, we’re excited to have you with us. This repository is a living project that grows and improves with each contribution, so don’t hesitate to get involved. Fork the repo, create your branch, and start tackling those CTFs!

## Contributing to the Documentation

### Adding Documentation
Documentation files are stored in the `/docs/` directory and are automatically rendered on the [live site](https://cywf.github.io/ctf-kit/docs). To add or update documentation:

1. Create or edit markdown files in `/docs/` or subdirectories
2. Use clear headings and formatting
3. Submit a pull request with your changes
4. The site will automatically update when changes are merged to main

### Adding Mermaid Diagrams
Visual diagrams help explain complex concepts and workflows. To add a diagram:

1. Create a `.mmd` file in the `/mermaid/` directory (create this directory if it doesn't exist)
2. Write your diagram using [Mermaid syntax](https://mermaid.js.org/intro/)
3. Commit and push your changes
4. The CI workflow will process the diagram and make it available on the [visualizer page](https://cywf.github.io/ctf-kit/visualizer)

Example diagram structure:
```mermaid
graph TD
A[Start] --> B{Is it?}
B -->|Yes| C[OK]
B -->|No| D[End]
```

## How the Site Works

### CI/CD Pipeline
Our GitHub Actions workflow automatically:
1. Fetches live repository statistics (stars, forks, languages, commits)
2. Retrieves discussions from GitHub Discussions
3. Syncs project board items or falls back to issues
4. Indexes scripts with descriptions from comments
5. Builds and deploys the site to GitHub Pages

### Data Snapshots
The site uses JSON data snapshots created during the CI build:
- `stats.json` - Repository metrics and activity
- `discussions.json` - Latest community discussions
- `projects.json` - Development board status
- `scripts.json` - Available scripts with descriptions

These snapshots are generated server-side and consumed client-side for optimal performance.
26 changes: 26 additions & 0 deletions mermaid/contribution-flow.mmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
graph LR
A[CTF-Kit Repository] --> B[Fork Repository]
B --> C[Create Branch]
C --> D{CTF Event}

D --> E[Use Tools & Scripts]
E --> F[Document Findings]
F --> G[Add Solutions]

G --> H{Event Complete?}
H -->|No| E
H -->|Yes| I[Submit Pull Request]

I --> J[Code Review]
J --> K{Approved?}
K -->|Yes| L[Merge to Main]
K -->|No| M[Make Changes]
M --> I

L --> N[Community Benefits]
N --> O[Enhanced Repository]

style A fill:#8b5cf6,stroke:#8b5cf6,color:#fff
style I fill:#00ffff,stroke:#00ffff,color:#000
style L fill:#00ff00,stroke:#00ff00,color:#000
style O fill:#ff00ff,stroke:#ff00ff,color:#000
27 changes: 27 additions & 0 deletions mermaid/ctf-workflow.mmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
graph TD
A[Start CTF] --> B{Choose Challenge Type}
B -->|Web| C[Web Exploitation]
B -->|Crypto| D[Cryptography]
B -->|Forensics| E[Forensics]
B -->|Reversing| F[Reverse Engineering]
B -->|Misc| G[Miscellaneous]

C --> H[Enumerate & Scan]
D --> H
E --> H
F --> H
G --> H

H --> I[Find Vulnerability]
I --> J{Exploit Successful?}
J -->|Yes| K[Capture Flag]
J -->|No| L[Try Different Approach]
L --> H

K --> M[Document Solution]
M --> N[Submit Flag]
N --> O[End]

style A fill:#00ffff,stroke:#00ffff,color:#000
style K fill:#00ff00,stroke:#00ff00,color:#000
style O fill:#ff00ff,stroke:#ff00ff,color:#000
16 changes: 16 additions & 0 deletions site/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { defineConfig } from 'astro/config';
import react from '@astrojs/react';
import tailwind from '@astrojs/tailwind';

// https://astro.build/config
export default defineConfig({
site: 'https://cywf.github.io',
base: '/ctf-kit',
integrations: [
react(),
tailwind({
applyBaseStyles: false,
}),
],
output: 'static',
});
31 changes: 31 additions & 0 deletions site/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "ctf-kit-site",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"typecheck": "astro check"
},
"dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/react": "^3.6.2",
"@astrojs/tailwind": "^5.1.2",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"astro": "^4.16.12",
"chart.js": "^4.4.6",
"daisyui": "^4.12.14",
"mermaid": "^11.4.0",
"react": "^18.3.1",
"react-chartjs-2": "^5.2.0",
"react-dom": "^18.3.1",
"tailwindcss": "^3.4.15",
"typescript": "^5.6.3"
},
"devDependencies": {
"@types/node": "^22.9.0",
"tsx": "^4.19.2"
}
}
1 change: 1 addition & 0 deletions site/public/data/discussions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
4 changes: 4 additions & 0 deletions site/public/data/projects.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Project Board",
"items": []
}
37 changes: 37 additions & 0 deletions site/public/data/scripts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[
{
"path": "README.md",
"name": "README.md",
"description": "Script: README.md"
},
{
"path": "Networking/README.md",
"name": "README.md",
"description": "Script: README.md"
},
{
"path": "Networking/advanced_nmap_scan.sh",
"name": "advanced_nmap_scan.sh",
"description": "############################################################################"
},
{
"path": "Networking/basic_nmap_scan.sh",
"name": "basic_nmap_scan.sh",
"description": "############################################################################"
},
{
"path": "Enumeration/README.md",
"name": "README.md",
"description": "Script: README.md"
},
{
"path": "Enumeration/smb_share_enum.sh",
"name": "smb_share_enum.sh",
"description": "############################################################################"
},
{
"path": "Enumeration/web_server_enum.sh",
"name": "web_server_enum.sh",
"description": "############################################################################"
}
]
7 changes: 7 additions & 0 deletions site/public/data/stats.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"stars": 0,
"forks": 0,
"watchers": 0,
"languages": {},
"commitActivity": []
}
3 changes: 3 additions & 0 deletions site/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading