> For the complete documentation index, see [llms.txt](https://ret2basic.gitbook.io/ctfnote/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ret2basic.gitbook.io/ctfnote/red-teaming/enumeration/service-enumeration.md).

# Service Enumeration

### pentest.ws

{% embed url="<https://pentest.ws/>" %}
pentest.ws
{% endembed %}

I recommend pentest.ws for notetaking. The commands below work in the pentest.ws context.

### Ping Scan

Discovery all living hosts in a subnet:

```bash
$ nmap -sn <cidr> -oG - | grep Up | cut -d' ' -f2
```

### Port Scan (All TCP)

Enumerate open ports and versions:

```bash
$ nmap -sT -O -sV --version-all <cidr>
```

###
