YÜKLENİYOR...

Buffer Overflow: Stack Taşması ve Exploit Geliştirme

0 yanıt0 görüntülenme
  • buffer-overflow
  • stack-smashing
  • exploit-development
Buffer overflow, bellek sınırının aşılmasıyla adjacent memory'nin overwrite edilmesi zafiyetidir ve en temel exploit vektörüdür. Stack buffer overflow, local buffer'a fazla veri yazıldığında return address overwrite edilir ve kontrol flow attacker-controlled address'e yönlendirilir. NOP sled, shellcode öncesine NOP (\x90) instruction'ları ekleyerek jump accuracy artırır ve exploit reliability iyileştirir; modern mitigasyonlar ile etkisi azalmıştır. Offset calculation, pattern create/offset (Metasploit pattern_create.rb) ile exact return address overwrite pozisyonu bulunur ve EIP/RIP control doğrulanır. Shellcode placement, environment variables veya buffer içine shellcode yerleştirilir ve JMP ESP instruction ile execution başlatılır. Egg hunter technique, küçük egg hunter shellcode ile büyük payload'ı memory'de arar ve limited buffer exploit'lerinde kullanılır. SEH overwrite, Windows exception handler'ı overwrite eder ve structured exception handling mechanism'ini sömürür; SafeSEH mitigation ile kısmen engellenir.