📚
Securiters Wiki
  • 👋Índice
  • 🐣Conceptos Básicos
  • 🔍OSINT
    • Empresas
    • Personas
    • SOCMINT
    • URLs / IPs
  • 🕸️Web
    • 1. Recolección de información
    • 2. Enumeración y descubrimiento
    • 3. Configuración del servidor
    • 4. Entrada de datos
    • 5. Fuerza bruta
    • 6. Autenticación y autorización
    • 7. LFI/RFI
    • 🧞‍♂️CMS
  • 🐢APIs
  • ☎️Móviles
    • 👾Android
    • Analisis Estatico Android
    • Analisis Dinamico Android
    • 📱iOS
    • Jailbreak
    • Analisis Estatico iOS
    • Analisis Dinamico iOS
  • 🎯Internas
    • 🐧Linux
    • 🏹AD
      • Enumeracion
      • Mimikatz & PassTheHash
      • Local Privilege Escalation
      • PE - AS-REPRoast
      • PE - DNSAdmin
      • PE - Kerberoast
      • PE - Trusts
      • PE - Delegations
      • Persistencia - ACLs
      • Persistencia - Kerberos & Tickets
  • 📶Wifi
    • WEP
    • WPS
    • Redes PSK
    • Redes MGT
    • Redes ocultas
  • ⚔️Pentesting / Red team
    • Windows
      • Enumeración
      • Elevación de Privilegios
    • Linux
      • Enumeración
      • Elevación de Privilegios
    • Shells
  • 🛡️Blue Team
  • 📡Puertos & Servicios
    • 21 - FTP
    • 22 - SSH
    • 23 - Telnet
    • 25 - SMTP
    • 53 - DNS
    • 79 - Finger
    • 80 - HTTP
    • 88 - Kerberos
    • 110 - POP3
    • 111 - RPC
    • 123 - NTP (UDP)
    • 135 - MSRPC
    • 139 - Netbios-ssn
    • 143 - IMAP
    • 161/162 - SNMP
    • 389 - LDAP
    • 443 - HTTPS
    • 445 - SMB
    • 464 - kpasswd5
    • 500 - IPSec/IKE VPN
    • 587 - SMPT STARTTLS
    • 623 - IPMI
    • 631 - CUPS
    • 636 - LDAP
    • 1433/1434 - MS SQL Server
    • 1521 - OracleDB
    • 1720 - VoIP - SIP
    • 1900 - UPnP
    • 2049 - NFS
    • 3306 - MySQL
    • 3389 - RDP
    • 4500 - IPSec (UDP)
    • 5357 - WSDAPI
    • 6379 - Redis
    • 6697 - IRC
    • 8009 - Apache Jserv
    • 8080 - HTTP Alt
    • 8500 - Adobe Coldfusion
    • 10000 - Webmin
    • 49981 - System Management Hub
    • 50000 - SAP
  • 🎣Phishing
  • 🐛Bug Bounty
  • ☁️Cloud
    • AWS
    • Azure
  • 🪲Malware
  • 👻Forense
  • 🛠️Tools & Scripts
    • BloodHound
    • Burp Suite
    • Enum4linux
    • Frida
    • Apps Móviles
      • ADB
      • Objection
    • Wireshark
    • Transferencia de ficheros
    • Libros de hacking
    • Addons
    • 🐧WSL
  • ⛳Practicar
  • 🧙‍♂️Certificaciones
    • Repaso CRTP
    • Repaso OSCP
      • 1. Enumeración
      • 2. Vector de entrada
      • 3. Obtención de credenciales
      • 4. Spraying
      • 5. Movimiento lateral
      • 6. Siguientes pasos
  • 📜Recursos en Telegram
  • 🔊Congresos de ciberseguridad
  • 🗣️Entrevistas realizadas
  • 🎤Charlas y Eventos
  • 👣WRITE-UPS
    • 📗Hack The Box
      • 🟢Return
      • 🟢Love
      • 🟢GoodGames
      • 🟢ToolBox
      • 🟢Traverxec
      • 🟢Granny
      • 🟢Jerry
      • 🟢Networked
      • 🟢Arctic
      • 🟢Mirai
      • 🟢Bashed
      • 🟢TwoMillion
      • 🟠Chaos
      • 🟢Validation
      • 🟢Antique
      • 🟢Busqueda
    • 📗Proving Grounds
      • 🟢MoneyBox
      • 🟢Gaara
      • 🟢InfoSec Prep
      • 🟢DC-1
      • 🟢SunsetNoontide
      • 🟢Shakabrah
      • 🟢Ha-Natraj
      • 🟢Monitoring
      • 🟢DriftingBlues6
      • 🟢PyExp
      • 🟢OnSystemShellDredd
      • 🟢Blogger
      • 🟢Dawn
      • 🟢DC-2
      • 🟢FunboxEasy
      • 🟢Sumo
      • 🟢Inclusiveness
      • 🟢FunboxEasyEnum
      • 🟢Potato
      • 🟢Solstice
      • 🟢SunsetDecoy
      • 🟢Lampiao
      • 🟢Vegeta1
      • 🟢Katana
      • 🟢BBSCute
      • 🟢Sar
      • 🟢EvilBox-One
      • 🟢Seppuku
      • 🟢Funbox Rookie
      • 🟢Photographer
      • 🟢CyberSploit1
      • 🟢Amaterasu
      • 🟠Pwned1
      • 🟠My-CMSMS
      • 🟠ICMP
      • 🟠DC-9
      • 🟠SunsetMidnight
      • 🟠Election1
      • 🟠DC-4
      • 🟠Stapler
      • 🟠BTRSys2.1
      • 🟠Assertion101
      • 🟠Loly
      • 🟠SoSimple
      • 🟠Tre
      • 🟠Funbox
      • 🟠NoName
      • 🔴GlasgowSmile
      • 🔴InsanityHosting
      • 🔴Djinn3
      • 🟠CTF SunsetMidnight
Powered by GitBook
On this page

Was this helpful?

  1. Pentesting / Red team
  2. Linux

Enumeración

Aquí vamos a identificar y comprobar permisos, configuraciones, procesos corriendo... Cualquier cosa que pueda darnos una vía para posteriormente escalar privilegios, ya sea accediendo como root, ejecutando comandos con los permisos de éste, elevando los permisos de nuestro usuario, etc...

Listar servicios corriendo como root

ps aux | grep root

Listar servicios corriendo como root , permiso, y exports NFS

echo 'services running as root'; ps aux | grep root; echo 'permissions'; ps aux | awk '{print $11}'|xargs -r ls -la 2>/dev/null |awk '!x[$0]++'; echo 'nfs info'; ls -la /etc/exports 2>/dev/null; cat /etc/exports 2>/dev/null

Listar conexiones en la máquina y servicios a la escucha asignados a puertos

netstat -putona

Configuración de red

/sbin/ifconfig -a; cat /etc/network/interfaces; cat /etc/sysconfig/network; cat /etc/resolv.conf; cat /etc/sysconfig/network; cat /etc/networks; iptables -L; hostname; dnsdomainname

Listar programas con el SUID activado (que se ejecuten con permisos de root)

find / -user root -perm -4000 -print 2>/dev/null
find / -perm -u=s -type f 2>/dev/null
find / -perm -g=s -o -perm -4000 ! -type l -maxdepth 6 -exec ls -ld {} \\; 2>/dev/null
find / -perm -1000 -type d 2>/dev/null
find / -perm -g=s -type f 2>/dev/null

Listar tareas programados

crontab -l
ls -alh /var/spool/cron
ls -al /etc/ | grep cron
ls -al /etc/cron*
cat /etc/cron*
cat /etc/at.allow
cat /etc/at.deny
cat /etc/cron.allow
cat /etc/cron.deny
cat /etc/crontab
cat /etc/anacrontab
cat /var/spool/cron/crontabs/root
crontab -l; ls -alh /var/spool/cron; ls -al /etc/ | grep cron; ls -al /etc/cron*; cat /etc/cron*; cat /etc/at.allow; cat /etc/at.deny; cat /etc/cron.allow; cat /etc/cron.deny

Listar variables de entorno

env
export
cat /etc/profile; cat /etc/bashrc; cat ~/.bash_profile; cat ~/.bashrc; cat ~/.bash_logout; env; set

Listar impresoras

lpstat -a

Listar aplicaciones instaladas

  • ls -alh /usr/bin/; ls -alh /sbin/; dpkg -l; rpm -qa; ls -alh /var/cache/apt/archivesO; ls -alh /var/cache/yum/*;

Listar archivos de configuración con permisos de escritura (directorio /etc/)

/find /etc/ -writable -type f 2>/dev/null

Listar servicios mal configurados

cat /etc/syslog.conf; cat /etc/chttp.conf; cat /etc/lighttpd.conf; cat /etc/cups/cupsd.conf; cat /etc/inetd.conf; cat /etc/apache2/apache2.conf; cat /etc/my.conf; cat /etc/httpd/conf/httpd.conf; cat /opt/lampp/etc/httpd.conf; ls -aRl /etc/ | awk '$1 ~ /^.r./'

Buscar contraseñas/usuarios hardcodeados• grep -i user [filename]

grep -i pass [filename]
find . -name "*.php" -print0 | xargs -0 grep -i -n "var $password"
grep -C 5 "password" [filename]

Buscar otros usuarios

id; who; w; last; cat /etc/passwd | cut -d: -f1; echo 'sudoers:'; cat /etc/sudoers; sudo -l

Listar superusuarios

grep -v -E "^#" /etc/passwd | awk -F: '$3 == 0 { print $1}'
awk -F: '($3 == "0") {print}' /etc/passwd

Listar directorios /home/ de otros usuarios

ls -ahlR /root/; ls -ahlR /home/

Contenido del histórico del usuario

cat ~/.bash_history; cat ~/.nano_history; cat ~/.atftp_history; cat ~/.mysql_history; cat ~/.php_history

Contenido de mails de usuarios

cat ~/.bashrc; cat ~/.profile; cat /var/mail/root; cat /var/spool/mail/root

Búsqueda de aplicaciones de interés (para futuras operaciones) (WGET, NC/NetCat, FTP)

find / -name wget; find / -name nc*; find / -name netcat*; find / -name tftp*; find / -name ftp

Listar unidades de disco / sistemas de archivo montados en la máquina

mount; df -h; cat /etc/fstab

Listar carpetas con permisos de lectura, escritura y ejecución globales

echo "world-writeable folders"; find / -writable -type d 2>/dev/null; echo "world-writeable folders"; find / -perm -222 -type d 2>/dev/null; echo "world-writeable folders"; find / -perm -o w -type d 2>/dev/null; echo "world-executable folders"; find / -perm -o x -type d 2>/dev/null; echo "world-writeable & executable folders"; find / \\( -perm -o w -perm -o x \\) -type d 2>/dev/null;

Ficheros donde buscar claves privadas de SSH

~/.ssh/authorized_keys
~/.ssh/identity.pub
~/.ssh/identity
~/.ssh/id_rsa.pub
~/.ssh/id_rsa
~/.ssh/id_dsa.pub
~/.ssh/id_dsa
/etc/ssh/ssh_config
/etc/ssh/sshd_config
/etc/ssh/ssh_host_dsa_key.pub
/etc/ssh/ssh_host_dsa_key
/etc/ssh/ssh_host_rsa_key.pub
/etc/ssh/ssh_host_rsa_key
/etc/ssh/ssh_host_key.pub
/etc/ssh/ssh_host_key

Búsqueda de información en logs de interés

~/.ssh/authorized_keys
/etc/httpd/logs/access.log/
etc/httpd/logs/error_log
/etc/httpd/logs/error.log
/var/log/apache2/access_log
/var/log/apache2/access.log
/var/log/apache2/error_log
/var/log/apache2/error.log
/var/log/apache/access_log
/var/log/apache/access.log
/var/log/auth.log
/var/log/chttp.log
/var/log/cups/error_log
/var/log/dpkg.log
/var/log/faillog
/var/log/httpd/access_log
/var/log/httpd/access.log
/var/log/httpd/error_log
/var/log/httpd/error.log
/var/log/lastlog
/var/log/lighttpd/access.log
/var/log/lighttpd/error.log
/var/log/lighttpd/lighttpd.access.log
/var/log/lighttpd/lighttpd.error.log
/var/log/messages
/var/log/secure
/var/log/syslog
/var/log/wtmp
/var/log/xferlog
/var/log/yum.log
/var/run/utmp
/var/webmin/miniserv.log
/var/www/logs/access_log
/var/www/logs/access.log
/var/lib/dhcp3/
/var/log/postgresql/
/var/log/proftpd/
/var/log/samba/

PreviousLinuxNextElevación de Privilegios

Last updated 1 year ago

Was this helpful?

⚔️