You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Android rooting frameworks commonly hook a syscall to expose privileged kernel functionality to a userspace manager. Weak manager authentication (e.g., signature checks based on FD-order or poor password schemes) can enable a local app to impersonate the manager and escalate to root on already-rooted devices. Learn more and exploitation details here:
Android rooting frameworks commonly hook a syscall to expose privileged kernel functionality to a userspace manager. Weak manager authentication (e.g., signature checks based on FD-order or poor password schemes) can enable a local app to impersonate the manager and escalate to root on already-rooted devices. Learn more and exploitation details here:
## LFI via .htaccess ErrorDocument file provider (ap_expr)
31
+
32
+
If you can control a directory’s .htaccess and AllowOverride includes FileInfo for that path, you can turn 404 responses into arbitrary local file reads using the ap_expr file() function inside ErrorDocument.
33
+
34
+
- Requirements:
35
+
- Apache 2.4 with expression parser (ap_expr) enabled (default in 2.4).
36
+
- The vhost/dir must allow .htaccess to set ErrorDocument (AllowOverride FileInfo).
37
+
- The Apache worker user must have read permissions on the target file.
38
+
39
+
.htaccess payload:
40
+
41
+
```apache
42
+
# Optional marker header just to identify your tenant/request path
43
+
Header always set X-Debug-Tenant "demo"
44
+
# On any 404 under this directory, return the contents of an absolute filesystem path
45
+
ErrorDocument 404 %{file:/etc/passwd}
46
+
```
47
+
48
+
Trigger by requesting any non-existing path below that directory, for example when abusing userdir-style hosting:
49
+
50
+
```bash
51
+
curl -s http://target/~user/does-not-exist | sed -n '1,20p'
52
+
```
53
+
54
+
Notes and tips:
55
+
- Only absolute paths work. The content is returned as the response body for the 404 handler.
56
+
- Effective read permissions are those of the Apache user (typically www-data/apache). You won’t read /root/* or /etc/shadow in default setups.
57
+
- Even if .htaccess is root-owned, if the parent directory is tenant-owned and permits rename, you may be able to rename the original .htaccess and upload your own replacement via SFTP/FTP:
58
+
- rename .htaccess .htaccess.bk
59
+
- put your malicious .htaccess
60
+
- Use this to read application source under DocumentRoot or vhost config paths to harvest secrets (DB creds, API keys, etc.).
These types of attacks has been introduced and documented [**by Orange in this blog post**](https://blog.orange.tw/2024/08/confusion-attacks-en.html?m=1) and the following is a summary. The "confusion" attack basically abuses how the tens of modules that work together creating a Apache don't work perfectly synchronised and making some of them modify some unexpected data can cause a vulnerability in a later module.
0 commit comments