> For the complete documentation index, see [llms.txt](https://oscp.adot8.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://oscp.adot8.com/linux-privilege-escalation/misc/library-hijacking.md).

# Library Hijacking

This script is only readable by everyone. Its not running in cron that we can see but we can use **pspy** to see if it really is.

{% hint style="info" %}
Understand the script format and what it's doing
{% endhint %}

<figure><img src="/files/eONROKgYBlTksGUlI4sr" alt=""><figcaption></figcaption></figure>

We can see that it's running as a cronjob and calling the **call.py and urllib.py** libraries but them deleting them

<figure><img src="/files/gMmabQbSxZqXWn6q7vwq" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/cOf2HNlkx2cfyVykrEYb" alt=""><figcaption></figcaption></figure>

We can create a python reverse shell and make it call that as well and call it urllib.py


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://oscp.adot8.com/linux-privilege-escalation/misc/library-hijacking.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.
