Muestra las diferencias entre dos versiones de la página.
| Próxima revisión | Revisión previa | ||
|
rusia:aprendiendo-nmap-kremlin [2025/01/23 03:13] anonimo creado |
rusia:aprendiendo-nmap-kremlin [2025/01/25 04:05] (actual) anonimo |
||
|---|---|---|---|
| Línea 1: | Línea 1: | ||
| + | Nmap viene con 599 scripts NSE, y están organizados en categorías\\ | ||
| <code> | <code> | ||
| - | -sV: Información de servicio, versión | + | puton@kremlin:$ ls -1 /usr/share/nmap/scripts/ | wc -l |
| - | -O: Detección de sistema operativo | + | 599 |
| + | puton@kremlin:$ | ||
| + | </code> | ||
| + | Si queremos buscar a ver si existe algún script relacionado con algún sofware servidor podemos hacer\\ | ||
| + | <code> | ||
| + | puton@kremlin:$ ls -1 /usr/share/nmap/scripts/ | grep apache | ||
| + | http-apache-negotiation.nse | ||
| + | http-apache-server-status.nse | ||
| + | puton@kremlin:$ ls -1 /usr/share/nmap/scripts/ | grep drupal | ||
| + | http-drupal-enum.nse | ||
| + | http-drupal-enum-users.nse | ||
| + | puton@kremlin:$ ls -1 /usr/share/nmap/scripts/ | grep joomla | ||
| + | http-joomla-brute.nse | ||
| + | puton@kremlin:$ | ||
| + | </code> | ||
| + | Si queremos ver detalles de determinado script | ||
| + | <code> | ||
| + | puton@kremlin:$ nmap --script-help http-apache-negotiation.nse | ||
| + | Starting Nmap 7.80 ( https://nmap.org ) at 2025-01-25 02:58 CET | ||
| + | http-apache-negotiation | ||
| + | Categories: safe discovery | ||
| + | https://nmap.org/nsedoc/scripts/http-apache-negotiation.html | ||
| + | Checks if the target http server has mod_negotiation enabled. This | ||
| + | feature can be leveraged to find hidden resources and spider a web | ||
| + | site using fewer requests. | ||
| + | |||
| + | The script works by sending requests for resources like index and home | ||
| + | without specifying the extension. If mod_negotiate is enabled (default | ||
| + | Apache configuration), the target would reply with content-location header | ||
| + | containing target resource (such as index.html) and vary header containing | ||
| + | "negotiate" depending on the configuration. | ||
| + | |||
| + | For more information, see: | ||
| + | * http://www.wisec.it/sectou.php?id=4698ebdc59d15 | ||
| + | * Metasploit auxiliary module | ||
| + | /modules/auxiliary/scanner/http/mod_negotiation_scanner.rb | ||
| + | Warning: File ./scripts/ exists, but Nmap is using /usr/bin/../share/nmap/scripts/ for security and consistency reasons. set NMAPDIR=. to give priority to files in your local directory (may affect the other data files too). | ||
| + | puton@kremlin:$ | ||
| + | |||
| + | </code> | ||
| + | |||
| + | Podemos hacer un script en bash que ejecute determinados scripts NSE al host o que ejecute todos los que pertenezcan a una categoría | ||
| + | <code bash> | ||
| + | for script in {"vuln","brute","safe","http-apache-negotiation"};do | ||
| + | echo "$script" | ||
| + | sudo nmap -sV -Pn -p80 -O --script=$script kremlin.ru | ||
| + | done | ||
| + | </code> | ||
| + | -sV: Información de servicio, versión\\ | ||
| + | -O: Detección de sistema operativo\\ | ||
| + | <code> | ||
| puton@kremlin:$ sudo nmap -sV -p80 -O kremlin.ru | puton@kremlin:$ sudo nmap -sV -p80 -O kremlin.ru | ||
| [sudo] contraseña para puton: | [sudo] contraseña para puton: | ||
| Línea 9: | Línea 59: | ||
| Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn | Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn | ||
| Nmap done: 1 IP address (0 hosts up) scanned in 5.25 seconds | Nmap done: 1 IP address (0 hosts up) scanned in 5.25 seconds | ||
| + | </code> | ||
| nmap por defecto hace ping para saber si el host está activo antes de proceder a hacer el escaneo, como kremlin.ru bloquea pings entonces nmap asume que está apagado pero nosotros sabemos que no porque la página está funcionando, para decirle a nmap que asuma que el host está activo y proceda se usa la opción -Pn | nmap por defecto hace ping para saber si el host está activo antes de proceder a hacer el escaneo, como kremlin.ru bloquea pings entonces nmap asume que está apagado pero nosotros sabemos que no porque la página está funcionando, para decirle a nmap que asuma que el host está activo y proceda se usa la opción -Pn | ||
| + | <code> | ||
| puton@kremlin:$ sudo nmap -sV -Pn -p80 -O kremlin.ru | puton@kremlin:$ sudo nmap -sV -Pn -p80 -O kremlin.ru | ||
| Starting Nmap 7.80 ( https://nmap.org ) at 2025-01-23 01:14 CET | Starting Nmap 7.80 ( https://nmap.org ) at 2025-01-23 01:14 CET | ||
| Línea 261: | Línea 311: | ||
| de aquí lo único mas que se extrae es el subdominio admin.accred.kremlin.ru | de aquí lo único mas que se extrae es el subdominio admin.accred.kremlin.ru | ||
| + | |||
| + | Escaneo sin afectar a redes locales ni intermedias, sólo al objetivo | ||
| + | |||
| + | puton@kremlin:$ sudo nmap -Pn --script=brute --exclude 192.168.0.0/16,10.0.0.0/8,172.16.0.0/12 95.173.136.72 | ||
| + | Starting Nmap 7.80 ( https://nmap.org ) at 2025-01-23 03:46 CET | ||
| + | Nmap scan report for 95.173.136.72 | ||
| + | Host is up. | ||
| + | All 1000 scanned ports on 95.173.136.72 are filtered | ||
| + | |||
| + | Nmap done: 1 IP address (1 host up) scanned in 202.38 seconds | ||
| + | |||
| + | En este caso no encontró nada | ||
| </code> | </code> | ||