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

AHA-best-msf-interface-ever

  • 1.
  • 3.
  • 4.
  • 5.
  • 7.
    You probably can’thear this http://nmap.org/presentations/BHDC10/ 24th Minute
  • 8.
    I.E. Because ICan 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 packagefor 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.0Copyright (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 Luaeasy, Clib annoying Nmap 6.1 == Lua 5.1 Nmap 5.2 == Lua 5.2
  • 16.
    NSE Integration: I usedcmsgpack, 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. Gotlots 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
  • 18.