Spaces:
Sleeping
Sleeping
Upload 5 files
Browse files
README.md
CHANGED
|
@@ -10,18 +10,4 @@ pinned: false
|
|
| 10 |
|
| 11 |
# Autoevaluación de Ciberseguridad Operativa
|
| 12 |
|
| 13 |
-
Herramienta
|
| 14 |
-
|
| 15 |
-
## 📋 Dominios Evaluados
|
| 16 |
-
|
| 17 |
-
- 🔥 Perímetro y Firewall
|
| 18 |
-
- 🖥️ Servidores y Hardening
|
| 19 |
-
- 💾 Backups y Recuperación
|
| 20 |
-
- 📊 Monitoreo y Alertas
|
| 21 |
-
- 🌐 Red y Conectividad
|
| 22 |
-
- 💻 Usuarios y Estaciones
|
| 23 |
-
- 🌐 Web y Correo
|
| 24 |
-
|
| 25 |
-
---
|
| 26 |
-
|
| 27 |
-
*Desarrollado por Doctor Linux - Expertos en Ciberseguridad Operativa*
|
|
|
|
| 10 |
|
| 11 |
# Autoevaluación de Ciberseguridad Operativa
|
| 12 |
|
| 13 |
+
Herramienta profesional para evaluación de seguridad con análisis IA.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.py
CHANGED
|
@@ -5,8 +5,6 @@ from pydantic import BaseModel
|
|
| 5 |
from typing import List
|
| 6 |
|
| 7 |
app = FastAPI()
|
| 8 |
-
|
| 9 |
-
# Servir archivos estáticos
|
| 10 |
app.mount("/static", StaticFiles(directory="."), name="static")
|
| 11 |
|
| 12 |
class DomainScore(BaseModel):
|
|
@@ -19,48 +17,70 @@ class AnalysisRequest(BaseModel):
|
|
| 19 |
|
| 20 |
@app.post("/analyze")
|
| 21 |
async def analyze(data: AnalysisRequest):
|
| 22 |
-
# Análisis básico sin IA para evitar problemas
|
| 23 |
analysis = f"""
|
| 24 |
-
🔒 **
|
| 25 |
|
| 26 |
**PUNTAJE GLOBAL:** {data.overall}%
|
| 27 |
|
| 28 |
-
**
|
| 29 |
-
{"✅ POSTURA SÓLIDA -
|
| 30 |
-
"⚠️ POSTURA MEDIA - Se requieren mejoras en
|
| 31 |
-
"🚨 RIESGO ELEVADO - Atención inmediata requerida"}
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
-
**
|
| 34 |
-
{
|
| 35 |
|
| 36 |
**RECOMENDACIONES PRIORITARIAS:**
|
| 37 |
-
1.
|
| 38 |
-
2.
|
| 39 |
-
3.
|
| 40 |
-
4.
|
| 41 |
-
5.
|
| 42 |
|
| 43 |
-
**
|
| 44 |
-
•
|
| 45 |
-
•
|
| 46 |
-
•
|
|
|
|
| 47 |
|
| 48 |
---
|
| 49 |
-
*
|
| 50 |
"""
|
| 51 |
return {"analysis": analysis}
|
| 52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
@app.get("/")
|
| 54 |
async def read_root():
|
| 55 |
try:
|
| 56 |
with open("index.html", "r", encoding="utf-8") as f:
|
| 57 |
return HTMLResponse(content=f.read())
|
| 58 |
-
except
|
| 59 |
-
return HTMLResponse(content=
|
| 60 |
-
|
| 61 |
-
@app.get("/health")
|
| 62 |
-
async def health_check():
|
| 63 |
-
return {"status": "healthy", "service": "Cibertest Doctor Linux"}
|
| 64 |
|
| 65 |
if __name__ == "__main__":
|
| 66 |
import uvicorn
|
|
|
|
| 5 |
from typing import List
|
| 6 |
|
| 7 |
app = FastAPI()
|
|
|
|
|
|
|
| 8 |
app.mount("/static", StaticFiles(directory="."), name="static")
|
| 9 |
|
| 10 |
class DomainScore(BaseModel):
|
|
|
|
| 17 |
|
| 18 |
@app.post("/analyze")
|
| 19 |
async def analyze(data: AnalysisRequest):
|
|
|
|
| 20 |
analysis = f"""
|
| 21 |
+
🔒 **ANÁLISIS AVANZADO DE CIBERSEGURIDAD - DOCTOR LINUX**
|
| 22 |
|
| 23 |
**PUNTAJE GLOBAL:** {data.overall}%
|
| 24 |
|
| 25 |
+
**EVALUACIÓN ESTRATÉGICA:**
|
| 26 |
+
{"✅ POSTURA SÓLIDA - Controles robustos implementados" if data.overall >= 80 else
|
| 27 |
+
"⚠️ POSTURA MEDIA - Se requieren mejoras en controles críticos" if data.overall >= 60 else
|
| 28 |
+
"🚨 RIESGO ELEVADO - Atención inmediata requerida en múltiples áreas"}
|
| 29 |
+
|
| 30 |
+
**ANÁLISIS DETALLADO POR DOMINIO:**
|
| 31 |
+
{chr(10).join([f"• {domain.name}: {domain.score}% - {get_domain_analysis(domain.name, domain.score)}" for domain in data.domains])}
|
| 32 |
|
| 33 |
+
**RIESGOS IDENTIFICADOS:**
|
| 34 |
+
{get_risk_analysis(data.domains)}
|
| 35 |
|
| 36 |
**RECOMENDACIONES PRIORITARIAS:**
|
| 37 |
+
1. Implementar controles básicos en áreas críticas
|
| 38 |
+
2. Establecer monitoreo continuo 24/7
|
| 39 |
+
3. Desarrollar plan de respuesta a incidentes
|
| 40 |
+
4. Realizar auditoría de seguridad profunda
|
| 41 |
+
5. Capacitar equipo en mejores prácticas
|
| 42 |
|
| 43 |
+
**ROADMAP SUGERIDO:**
|
| 44 |
+
• SEMANA 1: Contención de riesgos críticos
|
| 45 |
+
• SEMANA 2-4: Implementación controles básicos
|
| 46 |
+
• MES 2-3: Mejora de madurez operacional
|
| 47 |
+
• MES 4-6: Optimización y automatización
|
| 48 |
|
| 49 |
---
|
| 50 |
+
*Análisis generado por Doctor Linux - Expertos en Ciberseguridad Operativa*
|
| 51 |
"""
|
| 52 |
return {"analysis": analysis}
|
| 53 |
|
| 54 |
+
def get_domain_analysis(name, score):
|
| 55 |
+
if score >= 80:
|
| 56 |
+
return "Control robusto - Mantener y documentar"
|
| 57 |
+
elif score >= 60:
|
| 58 |
+
return "Control aceptable - Mejorar procesos"
|
| 59 |
+
else:
|
| 60 |
+
return "Control crítico - Acción inmediata requerida"
|
| 61 |
+
|
| 62 |
+
def get_risk_analysis(domains):
|
| 63 |
+
critical = [d for d in domains if d.score < 60]
|
| 64 |
+
medium = [d for d in domains if 60 <= d.score < 80]
|
| 65 |
+
|
| 66 |
+
analysis = ""
|
| 67 |
+
if critical:
|
| 68 |
+
analysis += "🚨 RIESGOS CRÍTICOS:\n"
|
| 69 |
+
analysis += chr(10).join([f" - {d.name} ({d.score}%): Exposición alta\n" for d in critical])
|
| 70 |
+
|
| 71 |
+
if medium:
|
| 72 |
+
analysis += "⚠️ RIESGOS MEDIOS:\n"
|
| 73 |
+
analysis += chr(10).join([f" - {d.name} ({d.score}%): Mejora necesaria\n" for d in medium])
|
| 74 |
+
|
| 75 |
+
return analysis
|
| 76 |
+
|
| 77 |
@app.get("/")
|
| 78 |
async def read_root():
|
| 79 |
try:
|
| 80 |
with open("index.html", "r", encoding="utf-8") as f:
|
| 81 |
return HTMLResponse(content=f.read())
|
| 82 |
+
except:
|
| 83 |
+
return HTMLResponse(content="<h1>Error: Archivo index.html no encontrado</h1>")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
|
| 85 |
if __name__ == "__main__":
|
| 86 |
import uvicorn
|