🖥️
Siber Güvenlik Notları
  • WHOAMI
    • 👨‍💻Who Am I?
  • 🔭Information Gathering
    • Pentest VM Setup
    • Passive Information Gathering
    • Subdomain Enumeration
    • Host Discovery
    • Port Scanning
    • Email Enumeration
    • Leaked Passwords
    • Zafiyet Araştırma
  • 🪟Windows Pentesting
    • Windows Privilege Escalation
    • Windows Persistence
    • Windows Lateral Movement
    • AV Evasion
  • 🐧Linux Pentesting
    • Linux Privilege Escalation
    • Linux Persistence
    • Linux Lateral Movement
  • 🕸️Web Application Pentesting
    • Web Pentest Checklist
    • SQL Injection
    • NoSQL Injection
    • OS Command Injection
    • XXE Injection
    • SSTI
    • XSS
    • CSRF
    • SSRF
    • LFI/RFI
    • Insecure Deserialization
    • CORS Misconfiguration
    • Directory Traversal
    • File Upload
    • Broken Authentication
    • Broken Access Control
    • Business Logic
    • Race Conditions
    • Web Cache Deception
    • AWS Testing
    • Web Cache Poisoning
    • Clickjacking
    • API Testing
    • Broken Link Hijacking
    • HTTP Request Smuggling
    • LLM
    • HTTP Host Header Attack
    • OAuth Zafiyetleri
    • GraphQL API
    • HTTP Parameter Pollution
    • Configuration and Deployment Management Testing
    • Information Disclosure
    • Prototype pollution
    • JWT
  • 🖲️Network Service Pentesting
    • 📘Active Directory Services
      • Bleeding Edge Vulns
      • Misconfigs
      • Domain Trust
      • DNS (53)
      • Kerberos (88)
      • LDAP (389,636)
      • RPC WMI (135)
      • SMB (445)
      • WinRM - 5985
    • 📂FTP - 21
    • 🔐SSH - 22
    • 🤣Telnet - 23
    • SMTP - 25
    • TFTP - 69 UDP
    • HTTP - 80,443
      • Apache
      • Joomla
      • Drupal
      • Wordpress
      • WEBDAV
      • PHP
      • Laravel
    • IMAP/POP3 - 110,143,993,995
    • SNMP - 161
    • Rservices - 512
    • IPMI - 623
    • Rsync - 873
    • MSSQL - 1433
    • Oracle TNS - 1521
    • NFS - 2049
    • Docker
    • Grafana - 3000
    • MySQL - 3306
    • RDP - 3389
    • Postgresql - 5432
    • Redis - 6379
    • JDWP - 8000
    • MongoDB - 27017
  • 🕸️Network Pentesting
    • ARP Poisoning
  • 📞Android Pentesting
    • Android Derleme Süreci
    • Reversing
    • Rooting
    • Burp Suite Sertifikası
    • SSL Pinning Bypass
    • Patching
    • MobSF Kurulumu
    • Flutter Pentesting
  • 📰Teori
    • Güvenlik Ürünleri
    • OSI
    • Security Principles
  • Diger
    • Hacking Gadgets
      • Wifi Pineapple
      • Pwnagotchi
    • Stego
    • Buffer Overflow
    • Phishing
    • Nessus
    • DDOS Attacks
    • MSFConsole
  • ⏪Reverse
    • GCC Reverse
    • Python Reverse
    • Flare VM
    • Remnux
  • 🛜Wireless Pentesting
    • Wireless Pentest
    • Wireless V2
Powered by GitBook
On this page
  • Web Cache Deception Nedir?
  • Yöntemler
  • Cache Kontrolü
  • Static Extension and Directory
  • Redirect Kodu
  • Delimeter List
  • Origin Server Directory Normalization
  • Cache Server Directory Normalization
  • Önlemler
  • Araçlar
  • Kaynaklar

Was this helpful?

  1. Web Application Pentesting

Web Cache Deception

PreviousRace ConditionsNextAWS Testing

Last updated 18 days ago

Was this helpful?

Web Cache Deception Nedir?

  • Web cache deception, bir saldırganın bir web önbelleğini hassas, dinamik içeriği depolaması için kandırmasını sağlayan bir güvenlik zafiyetidir.

  • Bu zafiyet, önbellek sunucusu ile kaynak sunucusunun istekleri işleme şekilleri arasındaki tutarsızlıklardan kaynaklanır.

Yöntemler

Cache Kontrolü

Uygulamada cache olup olmadığını anlamak için aşağıdakileri kontrol edebiliriz. Zaten cache yoksa zafiyet olamaz.

  • X-Cache Header

  • Cache-Control Header

  • Yanıtlar arası çok zaman farkı

Static Extension and Directory

  • Origin server en sondaki / karakterini dikkate almamalı.

  • Cache server sondaki uzantıya veya dosya ismine bakarak cache almalı.

https://example.com/my-account/a.css
https://example.com/my-account/a.js
https://example.com/my-account/a.ico
https://example.com/my-account/a.png
https://example.com/my-account/a.jpg
https://example.com/my-account/a.exe

https://example.com/my-account/robots.txt
https://example.com/my-account/index.html
https://example.com/my-account/favicon.ico

Redirect Kodu

  • Kurbanı linke yönlendirmek için script.

<script>document.location="https://example/my-account/a.js"</script>

Delimeter List

  • Sunucunun desteklediği bir delimeter karakter varsa aşağıdaki liste ile deneyebiliriz.

  • https://example.com/my-account;a.css

!
"
#
$
%
&
'
(
)
*
+
,
-
.
/
:
;
<
=
>
?
@
[
\
]
^
_
`
{
|
}
~
%00
%0A
%09
%21
%22
%23
%24
%25
%26
%27
%28
%29
%2A
%2B
%2C
%2D
%2E
%2F
%3A
%3B
%3C
%3D
%3E
%3F
%40
%5B
%5C
%5D
%5E
%5F
%60
%7B
%7C
%7D
%7E

Origin Server Directory Normalization

  • Origin server %2f karakterini encode etmeli

    • /static/..%2fmy-account -> /my-account

  • Cache server %2f karakterini encode etmemeli

    • /static/..%2fmy-account -> /static/..%2fmy-account

  • Eğer bu şekilde ise aşağıdaki payloadları kullanırız.

https://example.com/static/..%2fmy-account
https://example.com/assets/..%2fmy-account
https://example.com/scripts/..%2fmy-account
https://example.com/images/..%2fmy-account

Cache Server Directory Normalization

  • Origin server %2f karakterini encode etmemeli fakat delimeter çözmeli

    • /my-account;%2f%2e%2e%2fstatic -> /my-account

  • Cache server %2f karakterini encode etmeli fakat delimeter çözmemeli

    • /my-account;%2f%2e%2e%2fstatic -> /static

https://example.com/my-account;%2f%2e%2e%2fstatic
https://example.com/my-account;%2f%2e%2e%2fassets
https://example.com/my-account;%2f%2e%2e%2fscripts
https://example.com/my-account;%2f%2e%2e%2fimages

Önlemler

  • Dinamik sayfaları işaretlemek için her zaman Cache-Control başlıklarını kullanın, no-store ve private yönergeleriyle ayarlayın.

  • CDN ayarlarınızı, önbelleğe alma kurallarınızın Cache-Control üstbilgisini geçersiz kılmayacağı şekilde yapılandırın.

  • CDN'nizin web cache deception saldırılarına karşı sahip olduğu tüm korumaları etkinleştirin. Örneğin, Cloudflare's Cache Deception Armor.

  • Kaynak sunucu ile önbelleğin URL yollarını yorumlama biçimleri arasında herhangi bir tutarsızlık olmadığını kontrol edin.

Araçlar

Kaynaklar

🕸️
https://portswigger.net/bappstore/7c1ca94a61474d9e897d307c858d52f0
https://portswigger.net/web-security/web-cache-deception