Bypass 403 Response Code by Adding Creative String | IRSYADSEC

Irsyad Muhammad Fawwaz
3 min readJul 1, 2024

--

HTTP 403 is a response code indicating that access to the requested resource is forbidden. This can happen due to various reasons, such as insufficient permissions or IP restrictions. However, certain creative strings can sometimes bypass these restrictions by exploiting flaws in the server’s handling of URL paths and inputs. Below are some examples and explanations of how these strings work:

  1. /../: The ../ sequence is used to traverse up one directory level. If a server does not properly sanitize input, this can be used to access parent directories that might not be explicitly protected.
  2. /...: Multiple dots can sometimes confuse the server's path resolution, potentially leading it to process the path incorrectly and grant access.
  3. /~root, /~admin: Some servers use the tilde (~) to reference user home directories. By targeting common usernames, one might access restricted directories.
  4. /%20/: %20 represents a space character. Adding spaces can sometimes confuse the server’s path parsing, leading to unintended access.
  5. /..%00, /..%01, /..%0a, /..%0d, /..%09: These sequences involve URL encoding for null byte (%00), and other characters like newline (%0a), carriage return (%0d), and tab (%09). These encodings can sometimes manipulate the server’s path processing, making it overlook certain security checks.
  6. /%2e%2e/: %2e is the URL encoded representation of a dot (.). Using encoded sequences can sometimes bypass the server's input validation.
  7. /%c0%af/, /%e0%80%af/: These are UTF-8 encoded characters that translate to slashes or dots. These can trick the server into processing the path in unexpected ways.
  8. /%252e%252e/: This is a double URL encoding where %25 represents %, so %252e%252e translates to %2e%2e, which then becomes ../. This technique can be used to bypass simple URL decoding routines.

How Do These Strings Work?

These strings exploit various weaknesses in how servers handle URL paths and encoded characters. Many servers have mechanisms to prevent directory traversal attacks, but improper or incomplete input validation can leave them vulnerable. By carefully crafting the URL with these creative strings, it is possible to manipulate the server’s path resolution logic, potentially granting access to restricted resources.

Ethical Considerations

While understanding these techniques can be valuable for security professionals to identify and patch vulnerabilities, using them to gain unauthorized access is illegal and unethical. Always ensure you have proper authorization before testing these techniques, and report any vulnerabilities you find to the appropriate parties to improve security.

Conclusion

Bypassing a 403 response code using creative strings involves exploiting flaws in the server’s URL handling and input validation. Although it demonstrates interesting aspects of web security, it underscores the importance of robust input validation and proper security measures to protect sensitive resources.

Would you like to see more insightful articles like this? Your support enables me to create valuable content. Consider buying me a coffee to fuel the creation of more free prompts. Your contribution is greatly appreciated! ❤️❤️❤️

--

--

No responses yet