> For the complete documentation index, see [llms.txt](https://cas-cyber.gitbook.io/cas-cybersecurity/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cas-cyber.gitbook.io/cas-cybersecurity/scanning-and-enumeration/scanning-with-msf-auxiliary.md).

# Scanning with msf auxiliary

### scanning with msf auxiliary

Scanning the htb network for SMB Ports 445

> sudo msfconsole
>
> use auxiliary/scanner/portscan/tcp
>
> show options
>
> set ports 445
>
> set rhosts 10.10.10.0/24
>
> set threads 64
>
> exploit -j

![two machines with smb 445 detected](/files/-MhYMncnbL7yzOhr0kQW)

Lets comparte that with nmap

> sudo nmap -T5 -Pn -sS -p445 --open --randomize-hosts -oA htb\_host445 10.10.10.0/24

![nmap shows the same hosts](/files/-MhYNo0btSHFk-hKUv5Z)

Let's do another scan with port 80

![6 machines with port 80 detected](/files/-MhYPZSdPB8dbPLC7AK_)

Compare with nmap

> sudo nmap -T5 -Pn -sS -p80 --open --randomize-hosts -oA htb\_hosts80 10.10.10.0/24

Convert xml output from nmap to html file

> xsltproc htb\_*hosts80.xml -o htb*\_hosts80.html

<div align="left"><img src="/files/-MhYRmcy5_J14aXgVfan" alt="html report from nmap scan"></div>

Scan for ssh version

> use auxiliary/scanner/ssh/ssh\_version
>
> show options
>
> set threads 64
>
> set rhosts 10.10.10.0/24

![ssh version result from auxiliary scan](/files/-MhYUtcCtx9tx_UL5Lf2)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://cas-cyber.gitbook.io/cas-cybersecurity/scanning-and-enumeration/scanning-with-msf-auxiliary.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
