SlideShare una empresa de Scribd logo
1 de 23
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?

Más contenido relacionado

La actualidad más candente

Apache2 BootCamp : Understanding Apache Internals
Apache2 BootCamp : Understanding Apache InternalsApache2 BootCamp : Understanding Apache Internals
Apache2 BootCamp : Understanding Apache InternalsWildan Maulana
 
Open Source Libraries for.NET developers
Open Source Libraries for.NET developersOpen Source Libraries for.NET developers
Open Source Libraries for.NET developersAndrei Marukovich
 
Node Architecture.pptx
Node Architecture.pptxNode Architecture.pptx
Node Architecture.pptxAhmed Hassan
 
6 Months PHP internship in Noida
6 Months PHP internship in Noida6 Months PHP internship in Noida
6 Months PHP internship in NoidaTech Mentro
 
Introduction to Rust Programming Language
Introduction to Rust Programming LanguageIntroduction to Rust Programming Language
Introduction to Rust Programming LanguageRobert 'Bob' Reyes
 
Introduction to Rust - Admios ALTalk Nov 2018
Introduction to Rust - Admios ALTalk Nov 2018Introduction to Rust - Admios ALTalk Nov 2018
Introduction to Rust - Admios ALTalk Nov 2018Cristiano Amici
 
LMAX Disruptor - High Performance Inter-Thread Messaging Library
LMAX Disruptor - High Performance Inter-Thread Messaging LibraryLMAX Disruptor - High Performance Inter-Thread Messaging Library
LMAX Disruptor - High Performance Inter-Thread Messaging LibrarySebastian Andrasoni
 
Introduction to Napa.js
Introduction to Napa.jsIntroduction to Napa.js
Introduction to Napa.jsDaiyi Peng
 
MongoDB EuroPython 2009
MongoDB EuroPython 2009MongoDB EuroPython 2009
MongoDB EuroPython 2009Mike Dirolf
 
44CON 2014 - Meterpreter Internals, OJ Reeves
44CON 2014 - Meterpreter Internals, OJ Reeves44CON 2014 - Meterpreter Internals, OJ Reeves
44CON 2014 - Meterpreter Internals, OJ Reeves44CON
 

La actualidad más candente (12)

Apache2 BootCamp : Understanding Apache Internals
Apache2 BootCamp : Understanding Apache InternalsApache2 BootCamp : Understanding Apache Internals
Apache2 BootCamp : Understanding Apache Internals
 
B2g
B2gB2g
B2g
 
Open Source Libraries for.NET developers
Open Source Libraries for.NET developersOpen Source Libraries for.NET developers
Open Source Libraries for.NET developers
 
Node Architecture.pptx
Node Architecture.pptxNode Architecture.pptx
Node Architecture.pptx
 
6 Months PHP internship in Noida
6 Months PHP internship in Noida6 Months PHP internship in Noida
6 Months PHP internship in Noida
 
Introduction to Rust Programming Language
Introduction to Rust Programming LanguageIntroduction to Rust Programming Language
Introduction to Rust Programming Language
 
Introduction to Rust - Admios ALTalk Nov 2018
Introduction to Rust - Admios ALTalk Nov 2018Introduction to Rust - Admios ALTalk Nov 2018
Introduction to Rust - Admios ALTalk Nov 2018
 
LMAX Disruptor - High Performance Inter-Thread Messaging Library
LMAX Disruptor - High Performance Inter-Thread Messaging LibraryLMAX Disruptor - High Performance Inter-Thread Messaging Library
LMAX Disruptor - High Performance Inter-Thread Messaging Library
 
Introduction to Napa.js
Introduction to Napa.jsIntroduction to Napa.js
Introduction to Napa.js
 
.Net
.Net.Net
.Net
 
MongoDB EuroPython 2009
MongoDB EuroPython 2009MongoDB EuroPython 2009
MongoDB EuroPython 2009
 
44CON 2014 - Meterpreter Internals, OJ Reeves
44CON 2014 - Meterpreter Internals, OJ Reeves44CON 2014 - Meterpreter Internals, OJ Reeves
44CON 2014 - Meterpreter Internals, OJ Reeves
 

Destacado

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

Destacado (19)

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

Similar a Metasploit Module Development

Open Source Cyber Weaponry
Open Source Cyber WeaponryOpen Source Cyber Weaponry
Open Source Cyber WeaponryJoshua L. Davis
 
Ceylon module repositories by Aleš Justin
Ceylon module repositories by Aleš JustinCeylon module repositories by Aleš Justin
Ceylon module repositories by Aleš JustinUnFroMage
 
WSO2 Microservices Framework for Java - Product Overview
WSO2 Microservices Framework for Java - Product OverviewWSO2 Microservices Framework for Java - Product Overview
WSO2 Microservices Framework for Java - Product OverviewWSO2
 
Pune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCDPune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCDPrashant Rane
 
Bootstraping real world Jakarta EE/MicroProfile microservices with Maven Arch...
Bootstraping real world Jakarta EE/MicroProfile microservices with Maven Arch...Bootstraping real world Jakarta EE/MicroProfile microservices with Maven Arch...
Bootstraping real world Jakarta EE/MicroProfile microservices with Maven Arch...Víctor Leonel Orozco López
 
Cloud Infrastructures Slide Set 7 - Docker - Neo4j | anynines
Cloud Infrastructures Slide Set 7 - Docker - Neo4j | anyninesCloud Infrastructures Slide Set 7 - Docker - Neo4j | anynines
Cloud Infrastructures Slide Set 7 - Docker - Neo4j | anyninesanynines GmbH
 
[WSO2Con EU 2017] Writing Microservices Using MSF4J
[WSO2Con EU 2017] Writing Microservices Using MSF4J[WSO2Con EU 2017] Writing Microservices Using MSF4J
[WSO2Con EU 2017] Writing Microservices Using MSF4JWSO2
 
Integrating Doctrine with Laravel
Integrating Doctrine with LaravelIntegrating Doctrine with Laravel
Integrating Doctrine with LaravelMark Garratt
 
Open11 maria db the new m in lamp
Open11 maria db the new m in lampOpen11 maria db the new m in lamp
Open11 maria db the new m in lampColin Charles
 
Living with SQL and NoSQL at craigslist, a Pragmatic Approach
Living with SQL and NoSQL at craigslist, a Pragmatic ApproachLiving with SQL and NoSQL at craigslist, a Pragmatic Approach
Living with SQL and NoSQL at craigslist, a Pragmatic ApproachJeremy Zawodny
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Newlink
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Newlink
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640LLC NewLink
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Newlink
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Newlink
 
RubyStack: the easiest way to deploy Ruby on Rails
RubyStack: the easiest way to deploy Ruby on RailsRubyStack: the easiest way to deploy Ruby on Rails
RubyStack: the easiest way to deploy Ruby on Railselliando dias
 

Similar a Metasploit Module Development (20)

Open Source Cyber Weaponry
Open Source Cyber WeaponryOpen Source Cyber Weaponry
Open Source Cyber Weaponry
 
Ceylon module repositories by Aleš Justin
Ceylon module repositories by Aleš JustinCeylon module repositories by Aleš Justin
Ceylon module repositories by Aleš Justin
 
WSO2 Microservices Framework for Java - Product Overview
WSO2 Microservices Framework for Java - Product OverviewWSO2 Microservices Framework for Java - Product Overview
WSO2 Microservices Framework for Java - Product Overview
 
Require.JS
Require.JSRequire.JS
Require.JS
 
Pune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCDPune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCD
 
4 threads
4 threads4 threads
4 threads
 
Bootstraping real world Jakarta EE/MicroProfile microservices with Maven Arch...
Bootstraping real world Jakarta EE/MicroProfile microservices with Maven Arch...Bootstraping real world Jakarta EE/MicroProfile microservices with Maven Arch...
Bootstraping real world Jakarta EE/MicroProfile microservices with Maven Arch...
 
Cloud Infrastructures Slide Set 7 - Docker - Neo4j | anynines
Cloud Infrastructures Slide Set 7 - Docker - Neo4j | anyninesCloud Infrastructures Slide Set 7 - Docker - Neo4j | anynines
Cloud Infrastructures Slide Set 7 - Docker - Neo4j | anynines
 
[WSO2Con EU 2017] Writing Microservices Using MSF4J
[WSO2Con EU 2017] Writing Microservices Using MSF4J[WSO2Con EU 2017] Writing Microservices Using MSF4J
[WSO2Con EU 2017] Writing Microservices Using MSF4J
 
Apereo OAE - Bootcamp
Apereo OAE - BootcampApereo OAE - Bootcamp
Apereo OAE - Bootcamp
 
Integrating Doctrine with Laravel
Integrating Doctrine with LaravelIntegrating Doctrine with Laravel
Integrating Doctrine with Laravel
 
Kafka overview v0.1
Kafka overview v0.1Kafka overview v0.1
Kafka overview v0.1
 
Open11 maria db the new m in lamp
Open11 maria db the new m in lampOpen11 maria db the new m in lamp
Open11 maria db the new m in lamp
 
Living with SQL and NoSQL at craigslist, a Pragmatic Approach
Living with SQL and NoSQL at craigslist, a Pragmatic ApproachLiving with SQL and NoSQL at craigslist, a Pragmatic Approach
Living with SQL and NoSQL at craigslist, a Pragmatic Approach
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640
 
RubyStack: the easiest way to deploy Ruby on Rails
RubyStack: the easiest way to deploy Ruby on RailsRubyStack: the easiest way to deploy Ruby on Rails
RubyStack: the easiest way to deploy Ruby on Rails
 

Metasploit Module Development

Notas del editor

  1. 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
  2. Stagers Payload which download stages Use normal condition Stageless Use when buffer size is no enough, network traffic is not enough
  3. /lib/msf/core/exploit/http/client.rb /lib/msf/core/auxiliary/wmapmodule.rb /lib/msf/core/auxiliary/scanner.rb
  4. 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