SlideShare a Scribd company logo
1 of 18
Best MSF Interface
Ever!
  {   < kernelsmith
msfrpcd duh
Via Lua
Ooh ooh, via NMap
You probably can’t hear this




http://nmap.org/presentations/BHDC10/ 24th Minute
I.E. Because I Can

or I at least thought I could

   It’s Also All the “Flame”
                  These Days
For Lua Need:

  Lua 5.1 for now
sockets – luasocket
 http – luasocket*
msgpack – let’s talk

* http://w3.impa.br/~diego/software/luasocket/
Lua 5.1

Default package for most Linux
   “Sweet spot” right now
    apt-get install lua5.1 liblua5.1-0-dev # <-- this is key#


             LuaSocket too!
    liblua5.1-socket2 liblua5.1-socket-dev liblua-socket-doc
msgpack:

     mplua – C/++      1
lua-msgpack – luarocks 2
 lua-cmsgpack (redis) N

       others
Testing

box:~/lua/code> lua
Lua 5.2.0 Copyright (C) 1994…
>require “msgpack”

if not error then g2g
else check path & cpath
end
>print(package.path)
Easy Part:
    Learn Lua
  Learn luasocket
Learn rpc api and…
Harder Part:

     NSE Integration

 Lots of nmap.org reading
   Brushing up on GCC
      #nmap helpful
mad thanks to bonsaiviking
NSE Integration:

Pure Lua easy, Clib annoying

Nmap 6.1 == Lua 5.1
Nmap 5.2 == Lua 5.2
NSE Integration:

I used cmsgpack, so clib
Created nse_cmsgpack.h
cmsgpack.c => nse_cmsgpack.c
    - edited for 5.2
Edited nse_main.cc
Edited Makefile.in
Prayed a lot.

Got lots of help from #nmap
near the end
nse_main.cc = pastebin.com/aCYNfUA5
Makefile.in = pastebin.com/AjinN6Y8
nse_cmsgpack.h = pastebin.com/zz0z6TWC
nse_cmsgpack.c = pastebin.com/SJbcmB9N
I will finish updating these pastes and put in github.com/kernelsmith
Lame Demo

More Related Content

What's hot

Distributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromqDistributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromq
Ruben Tan
 
Picobgp - A simple deamon for routing advertising
Picobgp - A simple deamon for routing advertisingPicobgp - A simple deamon for routing advertising
Picobgp - A simple deamon for routing advertising
Claudio Mignanti
 
Pound & Varnish - Cache e Balanceamento de Carga
Pound & Varnish - Cache e Balanceamento de CargaPound & Varnish - Cache e Balanceamento de Carga
Pound & Varnish - Cache e Balanceamento de Carga
gsroma
 
XMPP & AMQP
XMPP & AMQPXMPP & AMQP
XMPP & AMQP
voluntas
 
OSNoise Tracer: Who Is Stealing My CPU Time?
OSNoise Tracer: Who Is Stealing My CPU Time?OSNoise Tracer: Who Is Stealing My CPU Time?
OSNoise Tracer: Who Is Stealing My CPU Time?
ScyllaDB
 

What's hot (19)

Distributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromqDistributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromq
 
PHP at Density and Scale
PHP at Density and ScalePHP at Density and Scale
PHP at Density and Scale
 
ZeroMQ in PHP
ZeroMQ in PHPZeroMQ in PHP
ZeroMQ in PHP
 
Picobgp - A simple deamon for routing advertising
Picobgp - A simple deamon for routing advertisingPicobgp - A simple deamon for routing advertising
Picobgp - A simple deamon for routing advertising
 
Vimm
VimmVimm
Vimm
 
Pound & Varnish - Cache e Balanceamento de Carga
Pound & Varnish - Cache e Balanceamento de CargaPound & Varnish - Cache e Balanceamento de Carga
Pound & Varnish - Cache e Balanceamento de Carga
 
The BlackBox Project: Safely store secrets in Git/Mercurial (originally for P...
The BlackBox Project: Safely store secrets in Git/Mercurial (originally for P...The BlackBox Project: Safely store secrets in Git/Mercurial (originally for P...
The BlackBox Project: Safely store secrets in Git/Mercurial (originally for P...
 
Making your first contribution to Foreman
Making your first contribution to ForemanMaking your first contribution to Foreman
Making your first contribution to Foreman
 
Installation of LAMP Server with Ubuntu 14.10 Server Edition
Installation of LAMP Server with Ubuntu 14.10 Server EditionInstallation of LAMP Server with Ubuntu 14.10 Server Edition
Installation of LAMP Server with Ubuntu 14.10 Server Edition
 
Ruby e xmpp
Ruby e xmppRuby e xmpp
Ruby e xmpp
 
ZeroMQ with NodeJS
ZeroMQ with NodeJSZeroMQ with NodeJS
ZeroMQ with NodeJS
 
Open web mail setup
Open web mail setupOpen web mail setup
Open web mail setup
 
Breaking the RpiDocker challenge
Breaking the RpiDocker challenge Breaking the RpiDocker challenge
Breaking the RpiDocker challenge
 
XMPP & AMQP
XMPP & AMQPXMPP & AMQP
XMPP & AMQP
 
OSNoise Tracer: Who Is Stealing My CPU Time?
OSNoise Tracer: Who Is Stealing My CPU Time?OSNoise Tracer: Who Is Stealing My CPU Time?
OSNoise Tracer: Who Is Stealing My CPU Time?
 
Zmq in context of openstack
Zmq in context of openstackZmq in context of openstack
Zmq in context of openstack
 
ORTC SVC SimulCast
ORTC SVC SimulCastORTC SVC SimulCast
ORTC SVC SimulCast
 
zeromq
zeromqzeromq
zeromq
 
Zeromq anatomy & jeromq
Zeromq anatomy & jeromqZeromq anatomy & jeromq
Zeromq anatomy & jeromq
 

Viewers also liked

3 - Silvane penkal
3 - Silvane penkal3 - Silvane penkal
3 - Silvane penkal
Abrato-SC
 
Njcate
NjcateNjcate
Njcate
obepsp
 

Viewers also liked (9)

зайн сургалт 1
зайн сургалт 1зайн сургалт 1
зайн сургалт 1
 
Conseils sur le Design pour les Développeurs par un Développeur
Conseils sur le Design pour les Développeurs par un DéveloppeurConseils sur le Design pour les Développeurs par un Développeur
Conseils sur le Design pour les Développeurs par un Développeur
 
3 - Silvane penkal
3 - Silvane penkal3 - Silvane penkal
3 - Silvane penkal
 
M124 mat01-01 de un blog Blogger
M124 mat01-01 de un blog BloggerM124 mat01-01 de un blog Blogger
M124 mat01-01 de un blog Blogger
 
Perkahwinan
PerkahwinanPerkahwinan
Perkahwinan
 
Challenges Developing Realtime Web Apps
Challenges Developing Realtime Web AppsChallenges Developing Realtime Web Apps
Challenges Developing Realtime Web Apps
 
Weboptimization Cycle
Weboptimization CycleWeboptimization Cycle
Weboptimization Cycle
 
EL BARBERO
EL BARBEROEL BARBERO
EL BARBERO
 
Njcate
NjcateNjcate
Njcate
 

Similar to AHA-best-msf-interface-ever

Similar to AHA-best-msf-interface-ever (20)

Revisiting ppm
Revisiting ppmRevisiting ppm
Revisiting ppm
 
Smoking docker
Smoking dockerSmoking docker
Smoking docker
 
Approaching package manager
Approaching package managerApproaching package manager
Approaching package manager
 
Hadoop meet Rex(How to construct hadoop cluster with rex)
Hadoop meet Rex(How to construct hadoop cluster with rex)Hadoop meet Rex(How to construct hadoop cluster with rex)
Hadoop meet Rex(How to construct hadoop cluster with rex)
 
Puppet Camp Berlin 2015: Rapid testing Setups for Puppet
Puppet Camp Berlin 2015: Rapid testing Setups for PuppetPuppet Camp Berlin 2015: Rapid testing Setups for Puppet
Puppet Camp Berlin 2015: Rapid testing Setups for Puppet
 
Puppet Camp Berlin 2015: Felix Frank | Rapid Testing Setups for Puppet
Puppet Camp Berlin 2015: Felix Frank | Rapid Testing Setups for PuppetPuppet Camp Berlin 2015: Felix Frank | Rapid Testing Setups for Puppet
Puppet Camp Berlin 2015: Felix Frank | Rapid Testing Setups for Puppet
 
Plesk CLI Wrapper
Plesk CLI WrapperPlesk CLI Wrapper
Plesk CLI Wrapper
 
Omnibus to the future!
Omnibus to the future!Omnibus to the future!
Omnibus to the future!
 
grate techniques
grate techniquesgrate techniques
grate techniques
 
FPM at the Ruby Drink-up of Sophia, September 2011
FPM at the Ruby Drink-up of Sophia, September 2011FPM at the Ruby Drink-up of Sophia, September 2011
FPM at the Ruby Drink-up of Sophia, September 2011
 
走向开源:提交CPAN模块Step by Step
走向开源:提交CPAN模块Step by Step走向开源:提交CPAN模块Step by Step
走向开源:提交CPAN模块Step by Step
 
Make your cheap VM fly
Make your cheap VM flyMake your cheap VM fly
Make your cheap VM fly
 
NPF scripting with Lua by Lourival Vieira Neto
NPF scripting with Lua by Lourival Vieira NetoNPF scripting with Lua by Lourival Vieira Neto
NPF scripting with Lua by Lourival Vieira Neto
 
Dynamic tracing of MariaDB on Linux - problems and solutions (MariaDB Server ...
Dynamic tracing of MariaDB on Linux - problems and solutions (MariaDB Server ...Dynamic tracing of MariaDB on Linux - problems and solutions (MariaDB Server ...
Dynamic tracing of MariaDB on Linux - problems and solutions (MariaDB Server ...
 
packaging
packagingpackaging
packaging
 
FPC for the Masses - CoRIIN 2018
FPC for the Masses - CoRIIN 2018FPC for the Masses - CoRIIN 2018
FPC for the Masses - CoRIIN 2018
 
CPAN Training
CPAN TrainingCPAN Training
CPAN Training
 
Introduction to Lua Luajit Openresty Luvit
Introduction to Lua Luajit Openresty LuvitIntroduction to Lua Luajit Openresty Luvit
Introduction to Lua Luajit Openresty Luvit
 
Intro to pl/PHP Oscon2007
Intro to pl/PHP Oscon2007Intro to pl/PHP Oscon2007
Intro to pl/PHP Oscon2007
 
RPM: Speed up your deploy
RPM: Speed up your deployRPM: Speed up your deploy
RPM: Speed up your deploy
 

Recently uploaded

Recently uploaded (20)

Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 

AHA-best-msf-interface-ever

  • 1. Best MSF Interface Ever! { < kernelsmith
  • 2.
  • 6.
  • 7. You probably can’t hear this http://nmap.org/presentations/BHDC10/ 24th Minute
  • 8. I.E. Because I Can or I at least thought I could It’s Also All the “Flame” These Days
  • 9. For Lua Need: Lua 5.1 for now sockets – luasocket http – luasocket* msgpack – let’s talk * http://w3.impa.br/~diego/software/luasocket/
  • 10. Lua 5.1 Default package for most Linux “Sweet spot” right now apt-get install lua5.1 liblua5.1-0-dev # <-- this is key# LuaSocket too! liblua5.1-socket2 liblua5.1-socket-dev liblua-socket-doc
  • 11. msgpack: mplua – C/++ 1 lua-msgpack – luarocks 2 lua-cmsgpack (redis) N others
  • 12. Testing box:~/lua/code> lua Lua 5.2.0 Copyright (C) 1994… >require “msgpack” if not error then g2g else check path & cpath end >print(package.path)
  • 13. Easy Part: Learn Lua Learn luasocket Learn rpc api and…
  • 14. Harder Part: NSE Integration Lots of nmap.org reading Brushing up on GCC #nmap helpful mad thanks to bonsaiviking
  • 15. NSE Integration: Pure Lua easy, Clib annoying Nmap 6.1 == Lua 5.1 Nmap 5.2 == Lua 5.2
  • 16. NSE Integration: I used cmsgpack, so clib Created nse_cmsgpack.h cmsgpack.c => nse_cmsgpack.c - edited for 5.2 Edited nse_main.cc Edited Makefile.in
  • 17. Prayed a lot. Got lots of help from #nmap near the end nse_main.cc = pastebin.com/aCYNfUA5 Makefile.in = pastebin.com/AjinN6Y8 nse_cmsgpack.h = pastebin.com/zz0z6TWC nse_cmsgpack.c = pastebin.com/SJbcmB9N I will finish updating these pastes and put in github.com/kernelsmith