> For the complete documentation index, see [llms.txt](https://lyethar.gitbook.io/slort/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lyethar.gitbook.io/slort/privilege-escalation.md). Agents can also search and read this documentation through its [MCP server](https://lyethar.gitbook.io/slort/~gitbook/mcp).

# Privilege Escalation

The Privilege Escalation on this machine was rather easy to identify and easy to exploit as well. This was actually an exploit path that I have encoutered multiple times during my journey to the OSCP.

So right off the bat.&#x20;

![](https://328597950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC01qT6YExS9JZIncykrV%2Fuploads%2FHV9RUCOUeXOLu2InKKTD%2F2022-07-06_13-41.png?alt=media\&token=7782426f-b8fb-4b7e-b8d9-bc3dd8ea6cbb)

An unusual directory that could possibly lead us somewhere interesting.&#x20;

![](https://328597950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC01qT6YExS9JZIncykrV%2Fuploads%2FLOfpHyD4kYTieZfGdZNd%2F2022-07-06_13-41_1.png?alt=media\&token=0c3b8858-aed6-4796-8fff-b0c879ba3787)

Inside this folder we see multiple notes, and upon reading this note, we now understand that the TFTP.exe is executed every 5 minutes. Although this is not necessarily a set down to stone a privilege escalation path, it usaully is.&#x20;

So how do we exploit this? We basically generate a payload with the same name and replace it in that folder. Wait 5 minutes and we should get a reverse shell with the permissions as the binary. In our case hopefully it is Administrator.

![We are also able to write the binary.](https://328597950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC01qT6YExS9JZIncykrV%2Fuploads%2FEKBBPnSQkdFCx8rH9ldF%2F2022-07-06_13-42.png?alt=media\&token=fb441b1e-bb98-443e-b61a-1bb845a9d1fd)

We rename TFTP.EXE to TFTP\_old.exe

![](https://328597950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC01qT6YExS9JZIncykrV%2Fuploads%2F1pEGKdauoNfhPRoHA4y8%2F2022-07-06_13-42_1.png?alt=media\&token=bb4c4b05-06e5-4fec-93ce-20ea4d95ca05)

Transfered the binary to that Backup folder and after waiting 5 minutes.&#x20;

![](https://328597950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC01qT6YExS9JZIncykrV%2Fuploads%2FLjUZVeavM48X0posip0x%2F2022-07-06_13-43.png?alt=media\&token=3f0878f3-2c5d-416f-a933-b800775c99ad)
