Pentest Manager A Simple Vulnerability Management System
๐ก๏ธ Pentest Manager
Faraday์์ ์๊ฐ์ ๋ฐ์ ๊ฐ๋จํ ์ทจ์ฝ์ ๊ด๋ฆฌ ์์คํ (Vulnerability Management System)
- Antigravity๋ฅผ ํตํด ์์ฑ
Pentest Manager๋ ๋ณด์ ํ ์คํธ ์ค ๋ฐ๊ฒฌ๋ ์ทจ์ฝ์ ์ ํจ์จ์ ์ผ๋ก ๊ด๋ฆฌํ๊ณ ์ถ์ ํ ์ ์๋ ์น ๊ธฐ๋ฐ ํ๋ซํผ์ ๋๋ค.
โจ ์ฃผ์ ๊ธฐ๋ฅ
- ๐๏ธ ์ํฌ์คํ์ด์ค ๊ด๋ฆฌ - ํ๋ก์ ํธ๋ณ๋ก ์์ ๊ทธ๋ฃนํ
- ๐ป ํธ์คํธ ๊ด๋ฆฌ - ์ค์บ ๋์ ์์คํ ์ถ์
- ๐ ์ทจ์ฝ์ ๊ด๋ฆฌ - ์ฌ๊ฐ๋๋ณ ์ทจ์ฝ์ ๋ถ๋ฅ ๋ฐ ๊ด๋ฆฌ
- ๐ ๋์๋ณด๋ - ์ค์๊ฐ ํต๊ณ ๋ฐ ์๊ฐํ
- ๐ ์๋ ๋ฌธ์ํ - Swagger UI๋ฅผ ํตํ API ๋ฌธ์
๐๏ธ ๊ธฐ์ ์คํ
๋ฐฑ์๋
- FastAPI - ๊ณ ์ฑ๋ฅ Python ์น ํ๋ ์์ํฌ
- SQLAlchemy - ORM (Object-Relational Mapping)
- SQLite - ๊ฒฝ๋ ๋ฐ์ดํฐ๋ฒ ์ด์ค
- Pydantic - ๋ฐ์ดํฐ ๊ฒ์ฆ
ํ๋ก ํธ์๋
- React 18 - UI ๋ผ์ด๋ธ๋ฌ๋ฆฌ
- TypeScript - ํ์ ์์ ์ฑ
- Vite - ๋น ๋ฅธ ๋น๋ ๋๊ตฌ
- Axios - HTTP ํด๋ผ์ด์ธํธ
๐ ํ๋ก์ ํธ ๊ตฌ์กฐ
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Dashboard/
โโโ backend/ # FastAPI ๋ฐฑ์๋
โ โโโ api/ # API ๋ผ์ฐํฐ
โ โ โโโ dashboard.py
โ โ โโโ hosts.py
โ โ โโโ vulnerabilities.py
โ โ โโโ workspaces.py
โ โโโ main.py # ์ฑ ์ง์
์
โ โโโ database.py # DB ์ค์
โ โโโ models.py # ORM ๋ชจ๋ธ
โ โโโ schemas.py # Pydantic ์คํค๋ง
โ โโโ requirements.txt
โ
โโโ frontend/ # React ํ๋ก ํธ์๋
โโโ src/
โ โโโ components/ # React ์ปดํฌ๋ํธ
โ โโโ services/ # API ํด๋ผ์ด์ธํธ
โ โโโ App.tsx
โ โโโ main.tsx
โโโ package.json
โโโ vite.config.ts
๐ ์์ํ๊ธฐ
์ฌ์ ์๊ตฌ์ฌํญ
- Python 3.9+
- Node.js 16+
- npm ๋๋ yarn
๋ฐฑ์๋ ์ค์
1
2
3
4
5
6
7
8
9
10
11
12
# ๋ฐฑ์๋ ๋๋ ํ ๋ฆฌ๋ก ์ด๋
cd backend
# ๊ฐ์ํ๊ฒฝ ์์ฑ (์ต์
)
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# ์์กด์ฑ ์ค์น
pip3 install -r requirements.txt
# ์๋ฒ ์คํ
python3 -m uvicorn main:app --reload --port 8000
๋ฐฑ์๋ ์๋ฒ๊ฐ http://127.0.0.1:8000 ์์ ์คํ๋ฉ๋๋ค.
๐ API ๋ฌธ์: http://127.0.0.1:8000/docs
ํ๋ก ํธ์๋ ์ค์
์ ํฐ๋ฏธ๋ ์ฐฝ์์:
1
2
3
4
5
6
7
8
# ํ๋ก ํธ์๋ ๋๋ ํ ๋ฆฌ๋ก ์ด๋
cd frontend
# ์์กด์ฑ ์ค์น
npm install
# ๊ฐ๋ฐ ์๋ฒ ์คํ
npm run dev
ํ๋ก ํธ์๋๊ฐ http://localhost:5173 ์์ ์คํ๋ฉ๋๋ค.
๐ API ์๋ํฌ์ธํธ
Workspaces
GET /api/workspaces- ์ํฌ์คํ์ด์ค ๋ชฉ๋ก ์กฐํPOST /api/workspaces- ์ ์ํฌ์คํ์ด์ค ์์ฑGET /api/workspaces/{id}- ์ํฌ์คํ์ด์ค ์์ธ ์กฐํPUT /api/workspaces/{id}- ์ํฌ์คํ์ด์ค ์์ DELETE /api/workspaces/{id}- ์ํฌ์คํ์ด์ค ์ญ์
Hosts
GET /api/hosts- ํธ์คํธ ๋ชฉ๋ก ์กฐํPOST /api/hosts- ์ ํธ์คํธ ์ถ๊ฐGET /api/hosts/{id}- ํธ์คํธ ์์ธ ์กฐํPUT /api/hosts/{id}- ํธ์คํธ ์ ๋ณด ์์ DELETE /api/hosts/{id}- ํธ์คํธ ์ญ์
Vulnerabilities
GET /api/vulnerabilities- ์ทจ์ฝ์ ๋ชฉ๋ก ์กฐํPOST /api/vulnerabilities- ์ ์ทจ์ฝ์ ๋ฑ๋กGET /api/vulnerabilities/{id}- ์ทจ์ฝ์ ์์ธ ์กฐํPUT /api/vulnerabilities/{id}- ์ทจ์ฝ์ ์ ๋ณด ์์ DELETE /api/vulnerabilities/{id}- ์ทจ์ฝ์ ์ญ์
Dashboard
GET /api/dashboard/stats- ๋์๋ณด๋ ํต๊ณ ์กฐํ
๐จ ์ฃผ์ ํน์ง
๋ฐฑ์๋
- โ RESTful API ์ค๊ณ
- โ ์๋ ๋ฐ์ดํฐ ๊ฒ์ฆ (Pydantic)
- โ Swagger/OpenAPI ์๋ ๋ฌธ์ํ
- โ CORS ์ง์
- โ SQLAlchemy ORM
ํ๋ก ํธ์๋
- โ ๋คํฌ ํ ๋ง UI
- โ ๋ฐ์ํ ๋์์ธ
- โ ๋ถ๋๋ฌ์ด ์ ๋๋ฉ์ด์
- โ ์ฌ๊ฐ๋๋ณ ์์ ์ฝ๋ (Critical, High, Medium, Low, Info)
- โ TypeScript ํ์ ์์ ์ฑ
๐ธ ์คํฌ๋ฆฐ์ท
๋์๋ณด๋
์์คํ ์ ์ฒด ํต๊ณ๋ฅผ ํ๋์ ํ์ธ
์ํฌ์คํ์ด์ค
ํ๋ก์ ํธ๋ณ ์์ ๊ณต๊ฐ ๊ด๋ฆฌ
ํธ์คํธ
์ค์บ ๋์ ์์คํ ๋ฑ๋ก ๋ฐ ๊ด๋ฆฌ
์ทจ์ฝ์
๋ฐ๊ฒฌ๋ ๋ณด์ ์ทจ์ฝ์ ์ถ์ ๋ฐ ๊ด๋ฆฌ
๐ ๏ธ ์ฌ์ฉ ์์
1. ์ํฌ์คํ์ด์ค ์์ฑ
1
2
3
4
5
6
curl -X POST "http://localhost:8000/api/workspaces/" \
-H "Content-Type: application/json" \
-d '{
"name": "Web Application Security Test",
"description": "Q1 2024 Security Assessment"
}'
2. ํธ์คํธ ์ถ๊ฐ
1
2
3
4
5
6
7
8
curl -X POST "http://localhost:8000/api/hosts/" \
-H "Content-Type: application/json" \
-d '{
"workspace_id": 1,
"ip": "192.168.1.100",
"hostname": "webserver",
"os": "Ubuntu 22.04"
}'
3. ์ทจ์ฝ์ ๋ฑ๋ก
1
2
3
4
5
6
7
8
9
curl -X POST "http://localhost:8000/api/vulnerabilities/" \
-H "Content-Type: application/json" \
-d '{
"workspace_id": 1,
"host_id": 1,
"name": "SQL Injection",
"severity": "high",
"description": "SQL injection vulnerability found in login form"
}'
๐ฎ ํฅํ ๊ฐ์ ๊ณํ
- ์ฌ์ฉ์ ์ธ์ฆ ๋ฐ ๊ถํ ๊ด๋ฆฌ
- ํ๋ฌ๊ทธ์ธ ์์คํ (Nmap, Burp Suite ํตํฉ)
- PDF ๋ณด๊ณ ์ ์๋ ์์ฑ
- ๊ฒ์ ๋ฐ ํํฐ๋ง ๊ณ ๋ํ
- ํ์ด์ง๋ค์ด์
- WebSocket ์ค์๊ฐ ์ ๋ฐ์ดํธ
- ๋ฐ์ดํฐ ๋ด๋ณด๋ด๊ธฐ (CSV, JSON, XML)
- ์ทจ์ฝ์ ํ ํ๋ฆฟ ์์คํ
- ํ์ ๊ธฐ๋ฅ (๋๊ธ, ํ๊ทธ)
๐ค ๊ธฐ์ฌํ๊ธฐ
๊ธฐ์ฌ๋ ์ธ์ ๋ ํ์ํฉ๋๋ค! ๋ค์ ๋จ๊ณ๋ฅผ ๋ฐ๋ผ์ฃผ์ธ์:
- ์ด ์ ์ฅ์๋ฅผ Fork
- Feature ๋ธ๋์น ์์ฑ (
git checkout -b feature/AmazingFeature) - ๋ณ๊ฒฝ์ฌํญ ์ปค๋ฐ (
git commit -m 'Add some AmazingFeature') - ๋ธ๋์น์ Push (
git push origin feature/AmazingFeature) - Pull Request ์์ฑ
๐ ๋ผ์ด์ ์ค
์ด ํ๋ก์ ํธ๋ MIT ๋ผ์ด์ ์ค ํ์ ์์ต๋๋ค.
๐ ๊ฐ์ฌ์ ๋ง
**Made with โค๏ธ for Security Professionals