SlideShare a Scribd company logo
Metasploit Module Development
By
Kyaw Thiha
Contents
• Prerequisites
• Introduction to Metasploit
• Understanding Metasploit
• Metasploit Object Model
• Dig into Current Module
• Show Time
Prerequisites
• Ruby installed
• Metasploit framework
• Linux
Introduction to Metasploit
Understanding Metasploit Architecture
• MSF File System
• Libraries
Understanding Metasploit Architecture
• MSF File System
• Data
• Documentation
• External
• Lib
• Modules
• Plugins
• Scripts
• tools
Understanding Metasploit Architecture
• Msf File System
Understanding Metasploit Architecture
• Libraries
• Rex
• The basic library for most tasks
• Handles sockets, protocols, text transformations, and others
• SSL, SMB, HTTP, XOR, Base64, Unicode
• Msf:Core
• Provides the ‘basic’ API
• Define Metasploit Framework
• Msf:Base
• Provides Friendly API
• Provides simplified API for use in the framework
Understanding Metasploit Architecture
Libraries
Understanding Metasploit Modules
The Metasploit Framework is composed of modules.
• Exploits
• Payloads, Encoders, Nops
• Primary Module Tree
• User-Specified Module Tree
Understanding Metasploit Modules
• Exploit
• Defined as modules that use payloads
• An exploit without a payload is an Auxiliary module
• Payloads, Encoders, Nops
• Payloads consist of code that runs remotely
• Encoders ensure that payloads make it to their destination
• Nops keep the payload sizes consistent
Understanding Metasploit Modules
• Primary Module Tree
• /usr/share/metaspoit-framework/modules
• ~/git/metasploit-framework/modules/
• User-Specified Module Tree
• External module import by users
• ~./msf4/modules/
Understanding Metasploit Modules
Understanding Metasploit Object Model
• Module
• All Modules are ruby class
• Inherit from Msf:Module
• Payload
• Staged and Stagless
Understanding Metasploit Object Model
• Payload
• Stager and Stageless
• Stage
• Stage0
• Create connection metsrv
• Send shellcode
• Stage 1
• Listen for back connect
• Push up metapreter extension DLL
• Stapi and priv
Understanding Metasploit Object Model
• Stageless
• No Stage
• Direct Read metsrv
Understanding Metasploit Object Model
• What’s wrong wiht Stage?
• Buffer in stage0
• Low-bandwidth
Dig into Current Module
Dig Into Current Module
Update Information
Paramater of wmapmodule.rb
Dig Into Current Module
run_host - which start the method
Send_request_raw() - /rex/http/client_request/rb
:response as res parametr which denote of data , when
http_fingerprint() is called
Show Time
Show Time
Thanks
Questions?

More Related Content

PDF
MSF Auxiliary Modules
PPTX
#OSSPARIS17 - Tosca : Construire et déployer rapidement des applications dist...
PPTX
Servlet and concurrency
PDF
SFScon14: Schrödinger’s elephant: why PostgreSQL can solve all your database ...
PPTX
mongodb-brief-intro-february-2012
PDF
Rust system programming language
PDF
Stack Frame Protection
MSF Auxiliary Modules
#OSSPARIS17 - Tosca : Construire et déployer rapidement des applications dist...
Servlet and concurrency
SFScon14: Schrödinger’s elephant: why PostgreSQL can solve all your database ...
mongodb-brief-intro-february-2012
Rust system programming language
Stack Frame Protection

What's hot (12)

PDF
Apache2 BootCamp : Understanding Apache Internals
PPTX
Open Source Libraries for.NET developers
PPTX
Node Architecture.pptx
PDF
6 Months PHP internship in Noida
PDF
Introduction to Rust Programming Language
PPTX
Introduction to Rust - Admios ALTalk Nov 2018
PPSX
LMAX Disruptor - High Performance Inter-Thread Messaging Library
PPTX
Introduction to Napa.js
PPT
KEY
MongoDB EuroPython 2009
PPTX
44CON 2014 - Meterpreter Internals, OJ Reeves
Apache2 BootCamp : Understanding Apache Internals
Open Source Libraries for.NET developers
Node Architecture.pptx
6 Months PHP internship in Noida
Introduction to Rust Programming Language
Introduction to Rust - Admios ALTalk Nov 2018
LMAX Disruptor - High Performance Inter-Thread Messaging Library
Introduction to Napa.js
MongoDB EuroPython 2009
44CON 2014 - Meterpreter Internals, OJ Reeves
Ad

Viewers also liked (19)

PPTX
Exploit Development
PPTX
Debugging With GNU Debugger GDB
PPTX
Penetration testing using metasploit
PPTX
Metasploit For Beginners
PPT
Future of marketing the cloud john fearon, drop mysite
PPTX
Opetus Erp
PDF
H.E. Mr. bui thanh son, Asia Business Week Dublin
PPTX
"Attracting Blue Chip Chinese Firms to Set Up a European base in Ireland" Eil...
PDF
Building Partnerships for Growth: Building Europe- China Linkages in Mobile B...
PPTX
“In Pursuit of Excellence: Creating a Global University” Professor Andrew Deeks
PPTX
“Nurturing International Talent from Ireland’s Largest Higher Education Insti...
PPTX
Opening Opportunities: The Business View on the EU-Japan FTA/ EPA, Danny Ris...
PPTX
"Ireland's Leadership Role in Creating Global Value Chains in the AgriFood Se...
DOCX
Diàleg teatre històric
PPTX
"Meeting Future Industry Need in Asia and Europe: The Renaissance of Vocation...
PPTX
【七頭狼】Ufun SOP
PDF
Vision planet
PPTX
"Jiangsu Region: The Economic Gateway to China" Liang Baolin
PPTX
Opetus erp
Exploit Development
Debugging With GNU Debugger GDB
Penetration testing using metasploit
Metasploit For Beginners
Future of marketing the cloud john fearon, drop mysite
Opetus Erp
H.E. Mr. bui thanh son, Asia Business Week Dublin
"Attracting Blue Chip Chinese Firms to Set Up a European base in Ireland" Eil...
Building Partnerships for Growth: Building Europe- China Linkages in Mobile B...
“In Pursuit of Excellence: Creating a Global University” Professor Andrew Deeks
“Nurturing International Talent from Ireland’s Largest Higher Education Insti...
Opening Opportunities: The Business View on the EU-Japan FTA/ EPA, Danny Ris...
"Ireland's Leadership Role in Creating Global Value Chains in the AgriFood Se...
Diàleg teatre històric
"Meeting Future Industry Need in Asia and Europe: The Renaissance of Vocation...
【七頭狼】Ufun SOP
Vision planet
"Jiangsu Region: The Economic Gateway to China" Liang Baolin
Opetus erp
Ad

Similar to Metasploit Module Development (20)

PPTX
Metasploit
PDF
Metasploit - The Exploit Learning Tree
PDF
Open Source Cyber Weaponry
DOCX
Backtrack Manual Part6
PPTX
BSides Algiers - Metasploit framework - Oussama Elhamer
PPTX
Metasploit
PDF
01 Metasploit kung fu introduction
PDF
Metasploit Basics
PPTX
Metasploit (Module-1) - Getting Started With Metasploit
PDF
Introduction to Metasploit
PDF
PPTX
Metasploit
PPTX
Metasploit framwork
PDF
Metasploit Humla for Beginner
PDF
24 33 -_metasploit
PDF
The State of the Metasploit Framework.pdf
PPTX
Finalppt metasploit
PDF
Metasploitation part-1 (murtuja)
PPT
Metasploit-TOI-Ebryx-PVT-Ltd
Metasploit
Metasploit - The Exploit Learning Tree
Open Source Cyber Weaponry
Backtrack Manual Part6
BSides Algiers - Metasploit framework - Oussama Elhamer
Metasploit
01 Metasploit kung fu introduction
Metasploit Basics
Metasploit (Module-1) - Getting Started With Metasploit
Introduction to Metasploit
Metasploit
Metasploit framwork
Metasploit Humla for Beginner
24 33 -_metasploit
The State of the Metasploit Framework.pdf
Finalppt metasploit
Metasploitation part-1 (murtuja)
Metasploit-TOI-Ebryx-PVT-Ltd

Metasploit Module Development

Editor's Notes

  • #7: data: editable files used by Metasploit documentation: provides documentation for the framework external: source code and third-party libraries lib: the ‘meat’ of the framework code base modules: the actual MSF modules plugins: plugins that can be loaded at run-time scripts: Meterpreter and other scripts tools: various useful command-line utilities
  • #15: Stagers Payload which download stages Use normal condition Stageless Use when buffer size is no enough, network traffic is not enough
  • #20: /lib/msf/core/exploit/http/client.rb /lib/msf/core/auxiliary/wmapmodule.rb /lib/msf/core/auxiliary/scanner.rb
  • #21: Run_host() => method start Send_request_raw() /rex/proto/http/client_request.rb http_fingerprint() => :response as res parameter which denote that fingerprint from res Rescue => catch error