Tufan Turhan
  • Introduction
  • Red Teaming
    • Initial Access
      • VoipHopper
      • SMB – SCF File Attacks
      • MITM6
      • LLMNR, NBT-NS, mDNS Zehirlemeleri ve Relay Ataklar
    • Responder - DNS Injection
    • Privilege Escalation
      • PrintNightmare
      • Juicy Potato ile Windows Yetki Yükseltme
      • Token Impersonation with Incognito
    • Active Directory & Kerberos
      • Kerberos
      • Kerberosting
      • AS-REP Roasting
      • Overpass The Hash/Pass The Key (PTK)
      • DCSync Attack
      • DCShadow Attack
      • GETTGT
      • Golden Tickets
      • Silver Tickets
      • PowerView
      • MS14-025 (GPP Abusing)
      • BloodHound
      • Procdump
    • Lateral Movement
      • RDP MiTM-Hijacking
      • Vlan Hopping
      • Pivoting
    • Network Pentest
      • IPv4 Subnet Cheat Sheet
      • DNS Spoofing
      • DHCP Rogue
    • Shell to Meterpreter
    • Turn Off or Bypass AV
    • Useful CMD or Powershell Command
    • Brute Force
    • Windows Dosya İndirme
    • Windows UAC Bypass
    • Insecure Dosya İzni
  • Pentesting
    • Pentesting FTP - 21
    • Pentesting SMTP - 25,465,587
    • Pentesting SMB - 139 & 445
    • Pentesting Telnet - 23
    • Pentesting DNS - 53
    • Pentesting MSRPC -135
    • Pentesting SNMP - 161,162
    • Pentesting LDAP - 389,636
    • Pentesting MSSQL - 1433
    • Pentesting MYSQL - 3306
    • Pentesting RDP - 3389
    • Pentesing WINRM 5985,5986
  • Web Application
    • 2FA/OTP Bypass
    • Captcha Bypass
    • Cache Poisoning
    • Command Injection (OS)
    • CRLF Injection
    • Cross-site WebSocket hijacking (CSWSH) -
    • Cross-site request forgery (CSRF) -
    • Dangling Markup -
    • Path traversal
    • File Upload
    • Formula Injection (CSV Injection)
    • Login Bypass List
    • OAuth -
    • Open Redirect
    • Race Condition -
    • Registration - Password Reset & Takeover Vulnerabilities
    • SQL Injection
    • SSRF
  • Linux Privilege Escalation
    • PHP Wrapper
    • Simple Http
    • Editing /etc/passwd
    • SUID Binaries
    • Sudo Rights
    • Otomatize Araçlar
    • OSCP Not
  • HTB
  • Reverse Shell w/Msfvenom
  • Upgrading Simple Shells to Fully Interactive TTYs
Powered by GitBook
On this page
  • Kabul edilen diğer uzantılar:
  • Bypassing blacklisting protection
  • Bypassing whitelist protection
  • Dosya Adını Kullanarak Sömürme
  1. Web Application

File Upload

Kabul edilen diğer uzantılar:

  • PHP: .php, .php2, .php3, .php4, .php5, .php6, .php7, .phps, .phps, .pht, .phtm, .phtml, .pgif, .shtml, .htaccess, .phar, .inc

  • ASP: .asp, .aspx, .config, .ashx, .asmx, .aspq, .axd, .cshtm, .cshtml, .rem, .soap, .vbhtm, .vbhtml, .asa, .cer, .shtml

  • Jsp: .jsp, .jspx, .jsw, .jsv, .jspf, .wss, .do, .action

  • Coldfusion: .cfm, .cfml, .cfc, .dbm

  • Flash: .swf

  • Perl: .pl, .cgi

  • Erlang Yaws Web Server: .yaws

Bypassing blacklisting protection

Case 1: Engellenen uzantının adını büyük harf olarak değiştir. (.php yerine .PHP)

Case 2: Alternatif uzantıları dene. Örneğin, bir geliştirici php, html, exe uzantılarını engelleyebilir. Saldırganlar, kısıtlamaları aşmak ve kötü amaçlı dosyalar yüklemek için php1, php2, php3, php4, php5, php6, phtml vb. gibi alternatif uzantıları kullanmaya devam edebilir.

Case 3: Yüklenen dosyanın adını path trevarsal payloadı koyarak dene. Bazen sunucu bulunan dizine dosya kaydetmeye izin vermez ama bir üst dizine payloadı koyabiliriz. Dosya adı ../../shell.php gibi bir isim olabilir.

Case 4: Content-type'ı değiştir. Yüklenen dosya eğer php ise content type application/x-httpd-php olarak gözükür. Bunu burp ile araya girerek, image/png veya image/jpeg olarak değiştir.

Case 5: Magic Byte ekle ya da exiftool ile dosya tipini değiştir.

exiftool -Comment="<?php echo 'START ' . file_get_contents('/home/carlos/secret') . ' END'; ?>" <YOUR-INPUT-IMAGE>.jpg -o polyglot.php

Bypassing whitelist protection

Case 1: Uygulama yalnızca belirtilen dosya adının olup olmadığını kontrol eder. Yani shell.png.php olması biri sorun oluşturmaz çünkü içerisinde png var.

Case 2: Null byte.

exploit.jpg%00.php or exploit.jpg\00.php

Dosya Adını Kullanarak Sömürme

DoS (Denial of Service) from Filename

Case 1: Sisteme yüklenen dosyanın adını çok çok uzun bir şey yapmayı dene. Sistemde her hangi bir sınır konulmamışsa bu dosya yüklenirken sunucu cevap vermeyecek duruma gelir.

Case 2: Dosya boyutunu çok büyük bir şey deneyerek DoS saldırısı yapabiliriz.

XSS (Cross Site Scripting)

Dosya adı direkt olarak bir yerde bastırılıyorsa buraya xss payloadı yazarak dosya adından xss'i tetikleyebiliriz.

Diğer Zafiyetler

  • ../../../tmp/lol.png >>> path traversal

  • sleep(10)-- -.jpg >>> SQL injection

  • <svg onload=alert(document.domain) >>> XSS

  • ; sleep 10; >>> Command Injection

  • Yüklenen png, png gibi dosyaların uzantısını php vs gibi shell uzantısı yapmayı dene.

PreviousPath traversalNextFormula Injection (CSV Injection)

Last updated 2 years ago