Pentest və SOC Cheat Sheet
  • Reconnaissance
  • Post-Explotation
    • Linux Post-Explotation
      • Linux Local Enumeration
      • Linux Privilege Escalation
      • Dumping and cracking hashes on Linux
      • Linux Persistence
    • Windows Post-Explotation
      • Windows Local Enumeration
      • Windows Privilege Escalation
      • Windows Persistence
  • Network Services Pentesting
    • 21-Pentesting FTP
    • 22-Pentesting SSH
    • 23-Pentesting Telnet
    • 53-Pentesting DNS
    • 25,465,587-Pentesting SMTP
    • 110,995-Pentesting POP
    • 139,445-Pentesting SMB
    • 3306-Pentesting MySQL
    • 3389-Pentesting RDP
    • 1433-Pentesting MSSQL-Microsoft SQL Server
    • 389,636,3268,3269-Pentesting LDAP
  • Web Pentesting
    • Broken Access Control
      • Praktiki nümunə
    • OS Command Injection
      • Praktiki nümunə
    • SQL Injection
      • Praktiki nümunə
    • Cross-Site-Scripting (XSS)
      • Praktiki nümunə
    • File Upload
      • Praktiki nümunə
    • Directory Traversal və Path Traversal
      • Praktiki nümunə
    • CSRF
    • XXE
    • Clickjacking
      • Praktiki nümunə
    • SSRF
      • Praktiki nümunə
    • JWT (Json Web Token)
      • Praktiki nümunə
    • Local&Remote File İnclusion
      • Praktiki nümunə
      • Local File inclusion ilə reverse shell almaq
    • 401&403 Bypass
    • Login Bypass
    • Open Redirect
    • Unicode Injection
    • Security Misconfiguration
    • CRLF injection
    • LDAP Injection
    • Cookies Hacking
    • Cross site WebSocket hijacking (CSWSH)
    • SSTI (Server Side Template Injection)
    • CSTI (Client Side Template Injection)
    • XSLT Server Side Injection (Extensible Stylesheet Languaje Transformations)
    • Registration & Takeover Vulnerabilities
    • Regular expression Denial of Service - ReDoS
    • Reset/Forgotten Password Bypass
    • SAML Hücumları
    • Reverse Tab Nabbing
    • Web Tool - WFuzz
    • XPATH enjeksiyonu
    • Server-Side Includes (SSI) Injection
    • Edge Side Inclusion Injection (ESII)
    • Race Condition
    • PostMessage
    • Parameter Pollution
    • Cache Poisoning and Cache Deception
    • Captcha Bypass
  • AD Pentesting
    • Domain Enumeration
      • PowerView ilə enumeration
      • AD Module ilə enumeration
      • BloodHound ilə enumeration
        • On Site BloodHound
      • Using Adalanche
        • Remote adalanche
      • Useful Enumeration Tools
    • Local Privilege Escalation
      • Useful Local Priv Esc Tools
      • UAC Bypass
    • Lateral Movement
      • Powershell Remoting
      • Mimikatz
      • Remote Desktop Protocol
      • URL File Attacks
      • Useful Tools
    • Domain Privilege Escalation
      • Kerberoast
      • ASREPRoast
      • Password Spray Attack
      • Force Set SPN
      • Abusing Shadow Copies
      • List and Decrypt Stored Credentials using Mimikatz
      • Unconstrained Delegation
      • Constrained Delegation
      • Resource Based Constrained Delegation
      • DNSAdmins Abuse
      • Abusing Active Directory-Integraded DNS (ADIDNS) poisoning
      • Abusing Backup Operators Group
      • SID History Abuse
      • Active Directory Certificate Services
    • Domain Persistence
      • Golden Ticket Attack
      • Silver Ticket Attack
      • Skeleton Key Attack
      • DSRM Abuse
      • DCsync Attack
    • Cross Forest Attacks
      • Trust Tickets
      • Abuse MSSQL Servers
      • Breaking Forest Trusts
  • SOC - Cheat Sheet
    • SOC Nədir?
    • SOC Komponentləri Nələrdir?
    • SOC Checklist
    • SIEM
      • Splunk Qurulması və Konfiqurasiyası
    • IDS/IPS
    • Firewall
    • Firewall qurulması və konfiqurasiyası
    • EDR/XDR
    • SOAR
    • Windows Commands for SOC analysts
      • GUI Programs in Windows
      • Event Viewer
      • Task Scheduler
      • Group Policy Editor
      • Device Manager
      • Task Manager
      • Registry Manager
    • Linux Commands for SOC analysts
    • LOLBAS Apps and Commands
      • Apps and Commands
Powered by GitBook
On this page

Was this helpful?

  1. Web Pentesting

401&403 Bypass

PreviousLocal File inclusion ilə reverse shell almaqNextLogin Bypass

Last updated 1 year ago

Was this helpful?

Veb təhlükəsizliyi sahəsində HTTP 401 Unauthorized(İcazəsiz) və 403 Forbidden(Qadağan) status kodları veb resurslarına girişi diktə etməkdə əsas rol oynayır. Pentesterin bu status kodlarının nüanslarını dərk etməsi, potensial zəiflikləri müəyyən etmək və onlardan istifadə etmək üçün vacibdir.

401 Unauthorized status kodunu parol tələb edən bir qapıya bənzədə bilərik. Düzgün parol yoxdursa, içəri ötürülmürsünüz. Bizim məqsədimiz düzgün parol olmadan keçməyin yollarını tapmaq, qapının həqiqətən təhlükəsiz olub-olmadığını yoxlamaqdır.

Bəzən parolumuz düzgün olsa belə, 403 Forbidden status kodu ilə qarşılaşa bilərik.Yuxarıda verdiyim nümunə ilə izah etsək, düzgün açara sahibik, lakin içəri girməyə icazəmiz yoxdur. Pentest zamanı bizim işimiz bunun səbəbini tapmaq və içəri daxil olmaq üçün gizli yollar axtarmaqdır. Bu cheatsheet həmin yollar haqqındadır. Məqsəd sadəcə zəifliklərin aşkarlanması deyil, onların harada olduğunu göstərməklə təqtbiqi daha təhlükəsiz etməkdir.

HTTP Verbs/Methods Fuzzing

Daxil olmaq üçün digər metod və feillərdən istifadə etmək yaxşı fikirdir:

GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH, INVENTED, HACK

Serverdın gələn cavabı yoxlamaq məlumat əldə etməyə kömək edə bilər. Məsələn, HEAD’ə “Content-Length: 55” cavabı məlumatın əldə edilə biləcəyini göstərir. Sadəcə bu məlumat əlçatanlıq üçün bir yol tapılmalıdır. TRACE’dən istifadə edərək, intermediate proksilər tərəfindən əlavə edilən başlıqları görə bilərik.

HTTP Headers Fuzzing

  • HOST Header’ə her hansı ixtiyari dəyər verməklə 403 bypass mümkündür.

  • User Agent’ə başqa dəyərlər ver.()

  • HTTP header fuzzing üçün avtomatik alət:

Path Fuzzing

  • /%2e/path _ istifadə et (əgər giriş proksi tərəfindən bloklanıbsa, bu metod bypass edə bilər). Burada %2e nöqtənin encode olunmuş dəyəridir.Həmçinin ** /%252e**/path (ikiqat URL encode) yoxlayın.

  • Unicode bypass yoxla: /%ef%bc%8fpath (URL encode olunmuş simvollar "/" kimidir), beləliklə, decode olunduqda //path olacaq və ola bilsin ki, artıq /path adı yoxlanışını bypass etdin.

Digər metodlar:

  • example.com/secret–> HTTP 403 Forbidden

  • example.com/SECRET–> HTTP 200 OK

  • example.com/secret/–> HTTP 200 OK

  • example.com/secret/.–> HTTP 200 OK

  • example.com//secret//–> HTTP 200 OK

  • example.com/;/secret –> HTTP 200 OK

  • example.com/.;/secret–> HTTP 200 OK

  • example.com//;//secret–> HTTP 200 OK

  • /FUZZsecret

  • /FUZZ/secret

  • /secretFUZZ

API bypass üsulları:

  • /v3/users_data/1234 --> 403 Forbidden

  • /v1/users_data/1234 --> 200 OK

  • {“id”:111} --> 401 Unauthriozied

  • {“id”:[111]} --> 200 OK

  • {“id”:111} --> 401 Unauthriozied

  • {“id”:{“id”:111}} --> 200 OK

  • {"user_id":"<legit_id>","user_id":"<victims_id>"}

  • user_id=ATTACKER_ID&user_id=VICTIM_ID)

Parameter Manipulation

  • Parametr dəyərini dəyişdirin: id=123 --> id=124 Parametrlərdə sərhəd testini həyata keçirin — -234 və ya 0 və ya 99999999 kimi dəyərlər təmin edin (yalnız bir neçə nümunə dəyər).

  • URL-ə əlavə parametrlər əlavə edin: ?id=124 —-> id=124&isAdmin=true

  • Parametrləri silin.

  • Xüsusi simvollardan istifadə edin.

  • Parametrlərdə sərhəd testi həyata keçirin — -234, 0, 99999999 kimi dəyərlər yoxlayın

Protocol version

Əgər HTTP/1.1 istifadə edirsə, 1.0 və ya 2.0-ı versiyalarını yoxlayın.

Digər üsullar

  • Protokolu dəyişin: HTTP’dən HTTPS’ə və ya əksinə.

Avtomatik Alətlər

Aşağıdakı vəziyyətlərdə istifadə et:

Serveri Get request’ləri ilə yükləməyə çalışın.()

** saytından giriş əldə etmək istədyiniz path’ın əvvəl açıq olub-olmadığını yoxlayın.

Buprsuite’də 403 bypass üçün 403-Bypasser adlı extension var.Bu extension yükləyib avtomatik bypass həyata keçirə bilərsiniz ()

Forbidden Buster, HTTP 401 və 403 cavablarını bypass, sistemdəki icazəsiz sahələrə giriş əldə etmək üçün müxtəlif texnikaları avtomatlaşdıran digər bir alətdir.()

https://github.com/danielmiessler/SecLists/blob/master/Fuzzing/User-Agents/UserAgents.fuzz.txt
https://github.com/carlospolop/fuzzhttpbypass
bu listdən
Facebook’da işləyən metod
https://archive.org/web/**
https://portswigger.net/bappstore/444407b96d9c4de0adb7aed89e826122
https://github.com/Sn1r/Forbidden-Buster