May 18, 2022 09:18 AM
(This post was last modified: May 18, 2022 09:26 AM by nerdy.)
htaccess exploitation
🤩 Here i will cover about a misconfiguration which many sysadmins make. 🤩
[1] BASIC MISCONFIG
It depends on how the htaccess is configured, many sysadmins commit misconfigurations and that leads to shit like this.
Example:
What's wrong here?
Problem comes at here:
It limits only for GET and POST requests. An attacker could use other requests like PUT and bypass it.
For example:
🤩 Here i will cover about a misconfiguration which many sysadmins make. 🤩
[1] BASIC MISCONFIG
It depends on how the htaccess is configured, many sysadmins commit misconfigurations and that leads to shit like this.
Example:
Code
AuthUserFile /location/.htpasswd
AuthName "Restricted Area."
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>What's wrong here?
Problem comes at here:
Code
<Limit GET POST>
require valid-user
</Limit>It limits only for GET and POST requests. An attacker could use other requests like PUT and bypass it.
For example:
Code
curl -X PUT targetLinkTo/protected-area


![[Image: Gpd2P4I.png]](https://i.imgur.com/Gpd2P4I.png)