# Identificación de servicios

## Banner grabbing

```sh
nc -vn <target> <port>
telnet <target> <port>
```

## Nmap

### Identificación de servicios para “principales” puertos TCP

```shell
nmap -sC -sV -n <target> -oN nmap.txt
```

* -sC = utilización de secuencias de comandos predeterminado.
* -sV = identificación de servicio y su versión.
* -n = sin ejecución de resolución DNS.
* \<target> = objetivo.
* -oN = guarda resultado del escaneo en archivo `nmap.txt`.

### Identificación de servicios para determinados puertos TCP y UDP

```shell
nmap -sC -sV -p T:22,80,443,U:53,161 -n <target> -oN nmap.txt
```

* -sC = utilización de secuencias de comandos predeterminado.
* -sV = identificación de servicio y su versión.
* -p T:22,80,443,U:53,161 = únicamente los puertos 22/TCP, 80/TCP, 443/TCP, 53/UDP y 161/UDP.
* -n = sin ejecución de resolución DNS.
* \<target> = objetivo.
* -oN = guarda resultado del escaneo en archivo `nmap.txt`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pentesting.mrw0l05zyn.cl/escaneo-y-enumeracion/identificacion-de-servicios.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
