# NetExec

<https://github.com/Pennyw0rth/NetExec>

<https://www.netexec.wiki/>

***

### Comandos

```bash
nxc smb <TARGET>
```

```bash
nxc smb <TARGET> -u '' -p '' --users
```

```bash
nxc smb <TARGET> -u '' -p '' --groups
```

```bash
nxc smb <TARGET> -u '' -p '' --loggedon-users
```

```bash
nxc smb <TARGET> -u guest -p '' --shares
```

```bash
nxc smb <TARGET> -u "<USERNAME>" -p '<PASSWORD>' --spider <SHARE> --pattern .
```

```bash
nxc smb <TARGET> -u "<USERNAME>" -p '<PASSWORD>' --spider <SHARE> --get-file <FILENAME> <FILENAME-OUTPUT>
```

Password policy

```bash
nxc smb <TARGET-IP> -u '<USERNAME>' -p '<PASSWORD>' --pass-pol
```

Todos los objetos (usuarios, grupos, computadoras, contactos, etc.)

```bash
nxc ldap <TARGET> -u '' -p '' --query "(objectClass=*)" "" --log nxcLdapObjectClassOutput.txt
```

Objetos con sAMAccountName (cuentas de usuario y computadora)

```bash
nxc ldap <TARGET> -u '' -p '' --query "(sAMAccountName=*)" "" --log nxcLdapSanAccountNameOutput.txt
```

Password spraying

```bash
nxc smb <TARGET> -u <USER-LIST> -p <PASSWORD> --continue-on-success
```

Cambiar password

```bash
nxc ldap <TARGET> -u <USER> -p <PASSWORD> -M change-password -o NEWWPASS=<NEW-PASSWORD>
```
