Proyecto: Implementación de HomeLab para prácticas de ciberseguridad

Autor: Daniel Carrión

Rol: Estudiante de Ingeniería de Sistemas (6to ciclo)

Fecha de última actualización: 20-05-2025

1. Resumen

Objetivo General: Diseñar e implementar un entorno virtual controlado que permita simular escenarios reales de ciberseguridad, incluyendo pruebas de penetración, gestión de vulnerabilidades, monitoreo de eventos y respuesta ante incidentes. Este laboratorio busca fortalecer habilidades técnicas mediante prácticas operativas, integrando herramientas clave como pfSense, Suricata, Splunk, Nessus y Active Directory.

Alcance Técnico: Se desplegaron servicios esenciales como Active Directory, DNS, DHCP, IDS/IPS, SIEM y escaneo de vulnerabilidades. El entorno incluye estaciones de trabajo, servidores Linux y Windows, y zonas segmentadas (LAN, DMZ, WAN).

Resultados Clave

  • Splunk recibe logs de estaciones, servidores y pfSense.

  • Suricata detecta y bloquea tráfico malicioso.

  • Nessus identifica vulnerabilidades en LAN y DMZ.

  • Las reglas de firewall segmentan correctamente el tráfico.

2. Contexto y Motivación

Motivación Personal: La creación de este laboratorio responde al deseo de adquirir experiencia práctica en ciberseguridad ofensiva y defensiva. El entorno permite validar conocimientos teóricos mediante simulaciones reales, facilitando el aprendizaje por descubrimiento y la mejora continua.

Retos Iniciales

  • Configuración de red segmentada con múltiples interfaces.

  • Integración de herramientas con flujos de logs consistentes.

  • Validación de conectividad entre zonas para escaneo autenticado.

Beneficios Esperados

  • Consolidación de habilidades técnicas en entornos reales.

  • Preparación para certificaciones como CompTIA Linux+, Pentest+, etc.

  • Creación de un portafolio técnico demostrable.

3. Objetivos Detallados

  • Segmentar WAN / LAN / DMZ con pfSense.

  • Desplegar Active Directory + DNS en LAN.

  • Integrar Suricata como IDS/IPS.

  • Instalar y configurar Splunk Enterprise + Universal Forwarders.

  • Ejecutar auditorías de vulnerabilidades con Nessus.

4. Arquitectura de Red

imagen1

4.1. Tabla de Subredes

ZonaSubredGatewayFunción
WANDHCP ISP—Acceso a Internet
LAN192.168.1.0/24192.168.1.1AD DS, Splunk, Nessus, clientes
DMZ10.0.0.0/2410.0.0.1Ubuntu Server, servicios web

4.2. Interfaces de pfSense

InterfazAdaptadorTipoFunciónIP
em0WANNATConexión a InternetAsignada por ISP
em1DMZInternaRed pública segura10.0.0.1/24
em2LANInternaRed interna192.168.1.1/24

5. Inventario de Componentes

5.1. Hardware / VMs

ComponenteRAMCPUAlmacenamientoAdaptadoresTipo
pfSense2GB220GB3NAT, Interna, Interna
Windows Server4GB350GB1Interna (LAN)
Ubuntu Server4GB230GB1Interna (DMZ)
Estaciones Win10/114GB480GB1Interna (LAN)

5.2. Software y Versiones

  • pfSense 2.8.0 + Suricata 7.0.8_2
  • Windows Server 2022
  • Splunk Enterprise 10.0.0 + UF 10.0.0
  • Nessus Essentials 10.9.2

6. Implementación Base

6.1. pfSense

  • Instalación desde ISO y asignación de interfaces.
    imagen2
    imagen3

  • Configuración inicial vía HTTP desde Kali Linux temporal.
    imagen4

  • Asignación de IPs estáticas en LAN y DMZ, y DHCP en LAN.
    imagen5
    imagen6
    imagen7

Comentarios

  • Si no se remueve el .iso, pfSense reinicia el setup como si fuera la primera vez.
  • Se usa Kali Linux como puente temporal para acceder a la gestión HTTP.
  • La interfaz OPT se renombra a DMZ para reflejar su función.

6.2. Active Directory + DNS

  • Instalación de Windows Server desde .iso.
    imagen8

  • Instalación de rol AD DS en Windows Server.
    imagen9

  • Creación de dominio: lab.ciberlabs.local.
    imagen10

  • Asignación de IP estática a Windows Server vía DHCP static mapping en pfSense.
    imagen11

Comentarios

  • La IP estática garantiza conectividad estable para servicios de dominio.

6.3. Estaciones de Trabajo + Ubuntu Server

  • Instalación de Windows 11 desde .iso.
    imagen12

  • Agregar registro a DNS Server para que las estaciones puedan obtener la IP del Windows Server.
    imagen13

  • Unión al dominio.
    imagen14
    imagen15

  • Creación de OUs (WORKSTATIONS, USERS) y usuarios (jhon1, jhon2).
    imagen16
    imagen17
    imagen18
    imagen19
    imagen20

  • Instalación de Ubuntu Server desde .iso
    imagen21
    imagen22

  • Asignación de IP estática por DHCP Static Mapping a Ubuntu Server.
    imagen23

  • Hosting web con Apache
    imagen24
    imagen25

  • Creación de GPO para estaciones de trabajo
    imagen26

  • Habilitar ICMP por firewall en GPO
    imagen27

Comentarios

  • El registro en pfSense es clave para que las estaciones resuelvan el dominio correctamente.
  • La GPO permite verificar conectividad entre estaciones por ping.
  • Apache se instala como base para futuras pruebas de penetración.

7. Splunk Enterprise + Universal Forwarders

7.1. Splunk Enterprise

  • Instalación en Windows Server.
    imagen28
    imagen29

  • Índices creados: windows, ubuntu_server, pfsense.
    imagen30
    imagen31

  • Puertos 9997 y 9969 habilitados para recepción de logs.
    imagen32

  • Regla de firewall para recepción de datos.
    imagen33
    imagen34
    imagen35

7.2. Universal Forwarders

  • Instalación de UF en Windows Server
    imagen36
    imagen37

  • Instalación de UF en Ubuntu Server
    imagen38

  • Instalación de UF en estaciones de trabajo
    imagen39
    imagen40

  • Configuración de redirección de logs de pfSense
    imagen41

  • Habilitar recepción de logs por UDP
    imagen42

Comentarios

  • La regla de firewall en Windows Server es obligatoria para recibir datos por el puerto 9997.
  • El input UDP permite recibir logs de pfSense sin forwarder.
  • La selección de logs en Ubuntu Server cubre eventos clave del sistema.

8. Suricata IDS/IPS

8.1. Instalación

  • Instalado desde el Package Manager de pfSense.
    imagen43

  • Interfaces activas: WAN, LAN, DMZ.
    imagen44

  • Redirección de logs a System Log para Splunk.
    imagen45

8.2. Configuración Crítica

  • Desactivación de:

    • Hardware Checksum Offloading
    • TCP Segmentation Offloading
    • Large Receive Offloading

    imagen46

8.3. Reglas activadas

  • ET Open Rules y Snort GPLv2 Rules activadas.
    imagen47

  • WAN configurada como IPS (bloqueo activo)
    imagen48

Comentarios

  • Si no se desactivan las opciones de offloading, Suricata puede bloquear tráfico DNS por checksums inválidos.
  • Las reglas ETOpen y Snort GPLv2 fueron elegidas ya que son libres y no requieren autenticación.

9. Configuración de Nessus

9.1. Instalación

  • Nessus Essentials instalado en Windows Server.
    imagen49

  • Activación de escaneo autenticado mediante SSH en Ubuntu Server.

    • SSH instalado
      imagen50

9.2. Implementación de escaneos

  • Creación de escaneos
    imagen51
    imagen52

9.3. Escaneos Realizados

Nombre del EscaneoZonaTipo de EscaneoErrores
LAN ScanLANCompletoNo
DMZ ScanDMZCompletoNo
  • LAN Scan
    imagen53

  • DMZ Scan
    imagen54

Comentarios

  • El servicio SSH en Ubuntu Server permite que Nessus acceda a la DMZ.
  • Los escaneos están diseñados para evaluar vulnerabilidades en ambas zonas de red.

10. Reglas de Firewall (pfSense)

10.1. Reglas LAN

AcciónProtocoloPuertoDestinoDescripción
PermitirDNS53InternetResolución de nombres
PermitirHTTPS443InternetAcceso web seguro
PermitirHTTP80pfSense GUIGestión desde Windows Server
PermitirSSH22LAN / DMZEscaneo autenticado desde Nessus
PermitirHTTP80DMZAcceso a servidor web Ubuntu
PermitirICMP—DMZPruebas de conectividad
PermitirTCP9997Windows ServerRecepción de logs desde estaciones
BloquearTodos——Tráfico no autorizado

imagen55

10.2. Reglas DMZ (em3)

AcciónProtocoloPuertoDestinoDescripción
PermitirTCP9997Windows ServerEnvío de logs desde Ubuntu Server
BloquearTodos——Tráfico no autorizado

imagen56

10.3. Reglas WAN

AcciónProtocoloPuertoDestinoDescripción
PermitirTCP80/443DMZAcceso externo a servicios web

imagen57

11. Pruebas y Validación

11.1. Casos de Prueba

ComponentePruebaResultado
SplunkRecepción de logs desde UFCorrecto
AD DSUnión de estaciones al dominioCorrecto
SuricataDetección de alertas IDS/IPSCorrecto
NessusEscaneo autenticado en LAN/DMZCorrecto
  • Splunk

    • Logs al índice “Windows”
      imagen58

    • Logs al índice “Ubuntu_Server”
      imagen59

    • Logs al índice “pfSense”
      imagen60

  • AD DS
    imagen61

  • Suricata
    imagen62

  • Nessus

    • LAN Scan
      imagen63

    • DMZ Scan
      imagen64

12. Lecciones Aprendidas y Recomendaciones

12.1. Retos Técnicos

  • Splunk Free limita el volumen de datos y retención.

  • Suricata requiere desactivar el offloading para evitar falsos positivos.

12.2. Recomendaciones

  • Considerar migración a Splunk Enterprise para mayor capacidad.

13. Conclusión

Este laboratorio representa una plataforma completa para simular escenarios reales de ciberseguridad. La integración de herramientas clave permite practicar detección, análisis y respuesta ante incidentes. La segmentación de red, el monitoreo centralizado y la validación operativa consolidan un entorno ideal para aprendizaje técnico y demostración profesional.

Project : Homelab implementation for practices of Cybersecurity

Author: Daniel Carrion

Role: Systems engineering student (6th cycle)

Last update date: 05-20-2025

1. Summary

General objective: Design and implement a virtual environment controlled to simulate real cybersecurity scenarios, including penetration tests, vulnerability management, event monitoring and incident response. This laboratory seeks strengthen technical skills through operational practices, integrating key tools such as Pfsense, Suricata, Splunk, Nessus and Active Directory.

Technical reach: Essential services such as Active were deployed Directory, DNS, DHCP, IDS/IPS, SIEM and Escane of Vulnerabilities. He environment includes work stations, Linux and Windows servers, and Segmented areas (LAN, DMZ, WAN).

Key results

  • Splunk receives logs of stations, servers and pfsense.

  • Suricata detects and blocks malicious traffic.

  • Nessus identifies vulnerabilities in LAN and DMZ.

  • Firewall rules correctly segment traffic.

2. Context and motivation

Personal motivation: The creation of this laboratory responds to desire to acquire practical experience in offensive cybersecurity and defensive. The environment allows to validate theoretical knowledge through real simulations, facilitating discovery learning and Continuous improvement.

Initial challenges

  • Segmented network configuration with multiple interfaces.

  • Integration of tools with consistent logs flows.

  • Validation of connectivity between areas for authenticated scan.

Expected benefits

  • Consolidation of technical skills in real environments.

  • Preparation for certifications such as CompTIA Linux+, Pentest+, etc.

  • Creation of a demonstrable technical portfolio.

3. Detailed objectives

  • Segment WAN / LAN / DMZ with pfSense.

  • Deploy Active Directory + DNS in LAN.

  • Integrate Suricata AS IDS/IPS.

  • Install and configure Splunk Enterprise + Universal Forwarders.

  • Execute vulnerabilities audits with Nessus.

4. Network architecture

imagen1

4.1. Subnet table

AreaSubnetGatewayFunction
WanDHCP ISP-Internet access
Lan192.168.1.0/24192.168.1.1AD DS, Splunk, Nessus, customers
DMZ10.0.0.0/2410.0.0.1Ubuntu Server, Web Services

4.2. pfSense interfaces

InterfaceZoneAdapterFunctionIP
em0WanNatInternet connectionAssigned by ISP
em1DMZInternalSafe public network10.0.0.1/24
em2LanInternalInternal network192.168.1.1/24

5. Component inventory

5.1. Hardware / VMS

ComponentRAMCPUStorageAdaptersType
pfsense2GB220GB3Nat, internal, internal
Windows Server4GB350GB1Internal (LAN)
Ubuntu server4GB230GB1Internal (dmz)
Stations win10/114GB480GB1Internal (LAN)

5.2. Software and versions

  • pfSense 2.8.0 + Suricata 7.0.8_2
  • Windows Server 2022
  • Splunk Enterprise 10.0.0 + UF 10.0.0
  • Nessus essentials 10.9.2

6. Base implementation

6.1. Pfsense

  • installation from ISO and interface allocation. imagen2

    imagen3

  • Initial configuration via http from Kali Linux temporary. imagen4

  • Assignment of static IPs in LAN and DMZ, and DHCP in LAN. imagen5

    imagen6

    imagen7

Comments

  • If the .iso is not removed, Pfsense restarts the Setup as if it were the first time.
  • Kali Linux is used as a temporary bridge to access HTTP management.
  • The OPT interface is renowned to DMZ to reflect its function.

6.2. Active Directory + DNS

  • Windows Server installation from .iso. imagen8

  • Installation of ad ds role in Windows Server. imagen9

  • Domain creation: Lab.ciberlabs.local. imagen10

  • Static IP allocation to Windows Server via DHCP Static Mapping in Pfsense. imagen11

Comments

  • The static IP guarantees stable connectivity for domain services.

6.3. Work stations + Ubuntu Server

  • Windows 11 installation from .iso. imagen12

  • Add DNS Server record so that the stations can obtain the IP of the Windows Server. imagen13

  • Join to domain. imagen14

    imagen15

  • Creation of OUs (Workstations, Users) and users (Jhon1, Jhon2). imagen16

    imagen17

    imagen18

    imagen19

    imagen20

  • Ubuntu Server installation from .iso imagen21

    imagen22

  • Static IP allocation by DHCP Static Mapping to Ubuntu Server. imagen23

  • Web hosting with Apache imagen24

    imagen25

  • Creation of GPO for work stations imagen26

  • Enable ICMP by Firewall in GPO imagen27

Comments

  • The registration in pfSense is important for the stations to solve the domain correctly.
  • The GPO allows to verify connectivity between ping stations.
  • Apache is installed as a basis for future penetration tests.

7. Splunk Enterprise + Universal Forwarders

7.1. Splunk Enterprise

  • Installation in Windows Server. imagen28

    imagen29

  • Created indices: Windows, Ubuntu_Server, Pfsense. imagen30

    imagen31

  • Ports 9997 and 9969 enabled for logs reception. imagen32

  • Firewall rule for data reception. imagen33

    imagen34

    imagen35

7.2. Universal Forwarders

  • Installation of UF in Windows Server imagen36

    imagen37

  • Installation of UF in Ubuntu Server imagen38

  • Installation of UF in work stations imagen39

    imagen40

  • pfSense Logs Redirection Configuration imagen41

  • Enable Logs by UDP imagen42

Comments

  • The Firewall rule in Windows Server is mandatory to receive data from port 9997.
  • Input UDP allows you to receive pfSense logs without Forwarder.
  • The selection of Logs in Ubuntu Server covers key events of the system.

8. Suricata IDS/IPS

8.1. Installation

  • Installed from the pfSense Package Manager. imagen43

  • Active interfaces: WAN, LAN, DMZ. imagen44

  • Redirection of Logs to System Log for Splunk. imagen45

8.2. Critical configuration

  • Deactivation of:

    • Hardware Checksum offloading
    • TCP Segmentation offloading
    • Lark Receive Offloading

    imagen46

8.3. Activated rules

  • ET Open Rules and SNORT GPLV2 Rules activated. imagen47

  • WAN configured as IPS (active block) imagen48

Comments

  • If offloading options are not deactivated, Suricata can block DNS traffic by invalid checksums.
  • ET Open Rules and Snort GPLV2 rules were chosen as they are free and do not require authentication.

9. Nessus configuration

9.1. Facility

  • Nessus essentials installed in Windows Server. imagen49

  • Authenticated scan activation by SSH in Ubuntu Server.

  • SSh installed imagen50

9.2. Scanning implementation

  • Creation of scanners imagen51

    imagen52

9.3. Scans made

Scan nameAreaType of scanErrors
Lan scanLanFullNo
Dmz scanDMZFullNo
  • LAN Scan imagen53

  • DMZ Scan imagen54

Comments

  • The SSH service in Ubuntu Server allows Nessus to access the DMZ.
  • The scans are designed to evaluate vulnerabilities in both network areas.

10. Firewall Rules (Pfsense)

10.1. LAN Rules

ActionProtocolPortDestinationDescription
AllowDNS53InternetName resolution
AllowHttps443InternetSafe web access
AllowHttp80pfsense guiManagement from Windows Server
AllowSsh22LAN / DMZAuthenticated scan from Nessus
AllowHttp80DMZAccess to Ubuntu Web Server
AllowICMP-DMZConnectivity tests
AllowTCP9997Windows ServerReception of logs from stations
BlockAll--Block Unauthorized traffic

imagen55

10.2. DMZ Rules

ActionProtocolPortDestinationDescription
AllowTCP9997Windows ServerLogs sending from Ubuntu Server
BlockAll--Block Unauthorized traffic

imagen56

10.3. WAN Rules

ActionProtocolPortDestinationDescription
AllowTCP80/443DMZExternal access to web services

imagen57

11. Tests and validation

11.1. Test cases

ComponentProofResult
SplunkReception of Logs from UFCorrect
AD DSUnion of domain stationsCorrect
SuricataIDS/IPS alert detectionCorrect
NessusAuthenticated scan in LAN/DMZCorrect
  • Splunk

    • Logs to the “Windows” index imagen58

    • Logs to the “Ubuntu_Server” index imagen59

    • Logs to the “PfSense” index imagen60

  • AD DS (Active Directory Domain Services) imagen61

  • Suricata imagen62

  • Nessus

    • LAN Scan imagen63

    • DMZ Scan imagen64

12. Lessons learned and recommendations

12.1. Technical challenges

  • Splunk Free limits the volume of data and retention.

  • Suricata requires deactivating offloading to avoid false positives.

12.2. Recommendations

  • Consider migration to Splunk Enterprise for greater capacity.

13. Conclusion

This laboratory represents a complete platform to simulate real cybersecurity scenarios. Integration of tools Key allows to practice detection, analysis and response to incidents. Network segmentation, centralized monitoring and validation Operational consolidate an ideal environment for technical learning and Professional demonstration.