TGViewer
white2hack 📚 white2hack 📚 @w2hack · 13K subscribers
Post #6891 2.61K
👩‍💻 Attacking and defensing Nginx

Nginx, a popular web server and reverse proxy, is a critical component in many web infrastructures, making it a prime target for attacks. To secure Nginx, it’s crucial to apply best practices in configuration.

📌 Missing Root Location in Nginx Configuration:
- Explanation;
- The Missing Root Location Issue.

📌 Attack Scenario: Exploiting the Missing Root Location:
- Mitigating the Risk.

📌 Unsafe Path Restriction in Nginx:
- Explanation;
- Potential Bypass Techniques;
- Attack Scenario: Exploiting Path Restriction Bypass;
- Mitigation Strategies.

📌 Unsafe variable use / HTTP Request Splitting:
- Unsafe Use of Variables: $uri and $document_uri;
- Regex Vulnerabilities;
- Safe Configuration;
- Attack Scenarios and Detection Techniques;
- CRLF Injection and HTTP Request Splitting;
- Bypassing Path Restrictions Using Encoded Characters;
- Examples of Vulnerable Configurations.

📌 Raw Backend Response Reading:
- Example Scenario: Exposing Raw Backend Responses;
- Example uWSGI Application;
- Nginx Configuration;
- Example Invalid HTTP Request;
- Example Output for Invalid Request;
- Attack Scenario;
- Mitigation Strategies.

📌 merge_slashes set to off:
- merge_slashes Directive;
- Malicious Response Headers;
- map Directive Default Value;
- DNS Spoofing Vulnerability;
- proxy_pass and internal Directives.

📌 proxy_set_header Upgrade & Connection:
- Vulnerable Configuration;
- Vulnerability;
- Attack Scenario;
- Mitigation;
- Additional Attack Scenarios and Commands.

#hardening #web #linux
  • ❤ 5
  • 🔥 5
  • 👍 3
  • 🤡 1
More from @w2hack
  1. Oct 10, 2026Здарово, ребята! Мы с топовыми ИБ-авторами заколлабились в папку 🕐 "ИБэшечка", чтобы вам…
  2. Sep 23, 2026TECHNICAL ENGLISH FOR CYBERSECURITY. E-BOOK, Ivan Piskunov | White2hack, 2026 Practical Ha…
  3. Jun 3, 2026STAY CURIOUS. BUILD YOUR OWN. 🥷 "Hacking means exploring the limits of what is possible,…
  4. May 29, 2026📱 BASH БАЗА ДЛЯ КИБЕРБЕЗОПАНОСТИ, I.P. | White2Hack, 2026 (ver. 1.1), free editon
  5. May 29, 2026Starter Kit (ZIP) | BASH БАЗА ДЛЯ КИБЕРБЕЗОПАНОСТИ, I.P. | White2Hack, 2026 (ver. 1.1)
  6. May 29, 2026📱 BASH БАЗА ДЛЯ КИБЕРБЕЗОПАНОСТИ, I.P. | White2Hack, 2026 (ver. 1.1), free editon Выпусти…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →