Linux Fundamentals - HTB Academy

🎉 Module Completed
Verification: HTB Academy Achievement
Descripción del Curso
Este curso documenta los ejercicios prácticos del módulo Linux Fundamentals de Hack The Box Academy. Cubre los conceptos esenciales de Linux desde la perspectiva de ciberseguridad.
Progreso Total: 100% ✓
| Sección | Título | Estado |
|---|---|---|
| 1 | Linux Structure | 📖 Teoría |
| 2 | Linux Distributions | 📖 Teoría |
| 3 | Introduction to Shell | 📖 Teoría |
| 4 | Prompt Description | 📖 Teoría |
| 5 | Getting Help | 📖 Teoría |
| 6 | System Information | ✅ Completado |
| 7 | Navigation | ✅ Completado |
| 8 | Working with Files and Directories | 📖 Teoría |
| 9 | Editing Files | 📖 Teoría |
| 10 | Find Files and Directories | ✅ Completado |
| 11 | File Descriptors and Redirections | ✅ Completado |
| 12 | Filter Contents | ✅ Completado |
| 13 | Regular Expressions | 📖 Teoría |
| 14 | Permission Management | 📖 Teoría |
| 15 | User Management | ✅ Completado |
| 16 | Package Management | 📖 Teoría |
| 17 | Service and Process Management | ✅ Completado |
| 18 | Task Scheduling | ✅ Completado |
| 19 | Network Services | 📖 Teoría |
| 20 | Working with Web Services | ✅ Completado |
| 21 | Backup and Restore | 📖 Teoría |
| 22 | File System Management | ✅ Completado |
| 23 | Containerization | 📖 Teoría |
| 24 | Network Configuration | 📖 Teoría |
| 25 | Remote Desktop Protocols in Linux | 📖 Teoría |
| 26 | Linux Security | 📖 Teoría |
| 27 | Firewall Setup | 📖 Teoría |
| 28 | System Logs and Monitoring | 📖 Teoría |
| 29 | Linux Distributions vs Solaris | 📖 Teoría |
| 30 | Shortcuts | 📖 Teoría |
Contenido Detallado
Introduction (Sections 1-5)
01. Linux Structure
Estructura de Linux: kernel, shell, filesystem hierarchy standard (FHS), y filosofía UNIX.
02. Linux Distributions
Distribuciones principales: Ubuntu, Debian, Fedora, CentOS, Kali, Parrot OS.
03. Introduction to Shell
El shell de Linux: terminal, emuladores, multiplexers (tmux).
04. Prompt Description
El prompt de bash: PS1, personalización, información mostrada.
05. Getting Help
Documentación: man, --help, -h, apropos, explainshell.com.
The Shell (Section 6)
06. System Information
:octicons-link-external-16: Ver lección
Comandos básicos para obtener información del sistema: - uname -a - Información del kernel - hostname - Nombre del host - whoami - Usuario actual - id - Identidad y grupos - /etc/passwd - Estructura de usuarios
Respuestas clave: - Machine hardware name: x86_64 - Home directory: /home/htb-student - Kernel release: 4.15.0
Workflow (Sections 7-14)
08. Working with Files and Directories
:octicons-link-external-16: Ver lección
Gestión de archivos: - touch - Crear archivo - mkdir -p - Crear directorios anidados - mv - Mover/renombrar - cp - Copiar - rm -r - Eliminar - ls -lt - Ordenar por tiempo
Respuestas clave: - Last modified file in /var/backups: apt.extended_states.0 - Inode of shadow.bak: 265293
09. Editing Files
Editores de texto en Linux: - nano - Editor simple - vim - Editor modal avanzado - vimtutor - Tutorial interactivo
10. Find Files and Directories
:octicons-link-external-16: Ver lección
Búsqueda avanzada: - which - Ubicar binarios - find - Búsqueda con filtros - locate - Búsqueda rápida (database) - Filtros: -name, -size, -mtime, -newermt
Respuestas clave: - Config file after 2020-03-03, 25k-28k: 00-mesa-defaults.conf - Count .bak files: 4 - Path to xxd: /usr/bin/xxd
11. File Descriptors and Redirections
:octicons-link-external-16: Ver lección
Descriptores de archivo: - STDIN (0) - Entrada estándar - STDOUT (1) - Salida estándar - STDERR (2) - Errores - Redirecciones: >, >>, <, 2>/dev/null - Pipes: |
Respuestas clave: - Count .log files: 32 - Total packages installed: 737
12. Filter Contents
:octicons-link-external-16: Ver lección
Herramientas de filtrado: - grep - Filtrar por patrón - cut - Extraer campos - tr - Transformar caracteres - awk - Procesamiento avanzado - sed - Editor de streams - sort, uniq, wc
Respuestas clave: - Services listening (not localhost): 7 - ProFTPd user: proftpd - Unique paths from inlanefreight.com: 34
13. Regular Expressions
Expresiones regulares: - Metacaracteres: ., *, +, ?, [], () - Operadores OR (|) y AND (.*) - grep -E para regex extendido
14. Permission Management
Sistema de permisos: - r, w, x (read, write, execute) - Owner, Group, Others - chmod, chown, chgrp - SUID, SGID, Sticky bit - Notación octal (755, 644)
System Management (Sections 15-22)
15. User Management
:octicons-link-external-16: Ver lección
Gestión de usuarios: - useradd -m - Crear usuario con home - usermod - Modificar usuario - userdel - Eliminar usuario - passwd - Cambiar contraseña - su --command - Ejecutar como otro usuario
Respuestas clave: - Option to create home: -m - Option to lock user: --lock - Option to execute command with su: --command
16. Package Management
Gestión de paquetes: - apt, apt-get - Debian/Ubuntu - dpkg - Instalar .deb - snap - Paquetes universales - pip, gem, npm - Lenguajes específicos
17. Service and Process Management
:octicons-link-external-16: Ver lección
Gestión de servicios y procesos: - systemctl start/stop/status - Gestionar servicios - ps aux - Listar procesos - kill, pkill, killall - Enviar señales - jobs, bg, fg - Background/foreground - Señales: SIGTERM (15), SIGKILL (9), SIGINT (2)
Respuestas clave: - Service type of dconf: dbus
18. Task Scheduling
Programación de tareas: - Cron - crontab -e - Systemd timers - .timer y .service - Formato cron: min hour day month weekday
Respuestas clave: - dconf.service type: dbus
19. Network Services
Servicios de red: - SSH - systemctl start ssh - NFS - Network File System - Web Server - Apache, Nginx, Python HTTP - VPN - OpenVPN
20. Working with Web Services
:octicons-link-external-16: Ver lección
Servidores web: - npm http-server - http-server -p 8080 - PHP built-in - php -S 127.0.0.1:8080 - Python - python3 -m http.server 8080 - curl - Cliente HTTP - wget - Descargar archivos
Respuestas clave: - npm HTTP server command: http-server -p 8080 - PHP server command: php -S 127.0.0.1:8080
21. Backup and Restore
Copias de seguridad: - rsync - Sincronización eficiente - Deja Dup - Backup gráfico - Duplicity - Backup cifrado - SSH tunnels para transferencia segura
22. File System Management
:octicons-link-external-16: Ver lección
Gestión de filesystem: - lsblk - Listar dispositivos de bloque - fdisk -l - Ver particiones - mount, umount - Montar/desmontar - /etc/fstab - Montaje automático - Tipos: ext4, xfs, btrfs, ntfs
Respuestas clave: - Partitions in Pwnbox: 3
Linux Networking (Sections 23-25)
23. Containerization
Containers en Linux: - Docker - docker run, docker build, Dockerfile - LXC - Linux Containers - Diferencias con VMs - cgroups y namespaces
24. Network Configuration
Configuración de red: - ip addr, ifconfig - Ver interfaces - ip route - Ver rutas - /etc/resolv.conf - DNS - /etc/network/interfaces - Configuración persistente - NAC: DAC, MAC, RBAC
25. Remote Desktop Protocols
Protocolos de escritorio remoto: - X11 - Puertos 6000-6009 - VNC - Puerto 5900+ - XDMCP - UDP 177 - Seguridad: X11 sin cifrar, VNC con SSH tunnel
Linux Hardening (Sections 26-28)
26. Linux Security
Endurecimiento de Linux: - Actualizaciones regulares - SSH hardening (no root, solo claves) - fail2ban - Protección brute force - SELinux, AppArmor - TCP Wrappers: /etc/hosts.allow, /etc/hosts.deny
27. Firewall Setup
Configuración de firewall: - iptables - Reglas de filtrado - Tablas: filter, nat, mangle - Chains: INPUT, OUTPUT, FORWARD - Targets: ACCEPT, DROP, REJECT - UFW - Uncomplicated Firewall
28. System Logs and Monitoring
Logs del sistema: - /var/log/syslog - Logs del sistema - /var/log/auth.log - Autenticación - /var/log/kern.log - Kernel - journalctl - Logs de systemd - Herramientas: tail, grep, less
Distributions vs Solaris (Section 29)
29. Linux Distributions vs Solaris
Diferencias clave: - Solaris - Propietario (Oracle) - ZFS - Filesystem avanzado - SMF - Service Management Facility - showrev vs uname - pkgadd vs apt
Tips & Tricks (Section 30)
30. Shortcuts
Atajos de teclado: - [TAB] - Auto-completar - [CTRL]+A/E - Inicio/Fin de línea - [CTRL]+U/K - Borrar línea - [CTRL]+C - Terminar proceso - [CTRL]+Z - Background - [CTRL]+R - Buscar en historial
Resumen de Aprendizaje
Comandos Dominados
| Categoría | Comandos |
|---|---|
| Información | uname, hostname, whoami, id |
| Navegación | pwd, ls, cd, tree |
| Archivos | touch, mkdir, mv, cp, rm |
| Búsqueda | find, locate, which, grep |
| Redirección | >, >>, <, 2>, \| |
| Filtrado | grep, cut, tr, awk, sed |
| Procesos | ps, top, kill, systemctl |
| Red | ip, ss, curl, wget |
Conceptos Clave
- File Descriptors: STDIN (0), STDOUT (1), STDERR (2)
- Inodos: Identificadores únicos de archivos
- Permisos: SUID, SGID, sticky bit
- Pipes: Conexión entre comandos
- /etc/passwd: Estructura de usuarios
- systemd: Gestor de servicios moderno
- iptables: Firewall de Linux
Lecciones Principales
- El shell es poderoso: Dominar pipes y redirecciones multiplica las capacidades
- find es esencial: Combinar filtros permite búsquedas precisas
- grep + awk + sed: Tríada para procesamiento de texto
- systemctl: Control total sobre servicios del sistema
- HTB cuenta diferente: Preguntas pueden tener interpretaciones específicas
Próximos Pasos
Módulos recomendados después de Linux Fundamentals: - Linux Privilege Escalation - Escalada de privilegios - Linux Hardening - Endurecimiento de sistemas - Bash Scripting - Automatización - Network Traffic Analysis - Análisis de red
Recursos Adicionales
Curso completado el 2026-02-20