# Using Modules

## Using Modules

### Viewing Available Modules for a Protocol

Run `nxc <protocol> -L` to view available modules for the specified protocol.

For example to view all modules for the SMB protocol:

```bash
nxc smb -L
```

### Using a Module

Run `nxc <protocol> <target(s)> -M <module name>`.

For example to run the SMB Mimikatz module:

```bash
nxc smb <target(s)> -u Administrator -p 'October2022' -M lsassy
```

### Viewing Module Options

Run `nxc <protocol> -M <module name> --options` to view a modules supported options, e.g:

```bash
nxc smb -M lsassy --options
```

### Using Module Options

Module options are specified with the `-o` flag. All options are specified in the form of KEY=value (msfvenom style)

Example:

```bash
nxc <protocol> <target(s)> -u Administrator -p 'P@ssw0rd' -M lsassy -o COMMAND=xxxxxxxxug'
```

### 🆕 Running Multiple Modules

Simply define all the modules you want, each proceeded by a `-M` option flag:

```bash
nxc <protocol> <target(s)> -u Administrator -p 'P@ssw0rd' -M spooler -M iis -M lsassy -M winscp
```


---

# 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://www.netexec.wiki/getting-started/using-modules.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.
