# Doas Privilege Escalation

### [Investigation](https://exploit-notes.hdks.org/exploit/linux/privilege-escalation/doas/#investigation) <a href="#investigation" id="investigation"></a>

First of all, search location of doas.conf.

```sh
find / -type f -name "doas.conf" 2>/dev/null
Copied!
```

Next check the configuration.

```sh
doas -C /path/to/doas.conf
doas -C /etc/doas.conf
# or
cat /etc/doas.conf
Copied!
```

Execute doas as below.

```sh
doas -u root <command> <arg>
Copied!
```

Please also refer to [GTFOBins](https://gtfobins.github.io/) to PrivEsc.
