Home page logo

nmap-dev logo Nmap Development mailing list archives

Re: [NSE] snmp-ios-config - Config grabber
From: Patrik Karlsson <patrik () cqure net>
Date: Tue, 22 Feb 2011 12:31:19 +0100

On Feb 22, 2011, at 12:21 , Vikas Singhal wrote:

What if the machine is already running a tftp server. I guess that the part where it wasn't responding for me. 

Unfortunately I don't think it's possible to detect this at the moment, due to a bug in the socket code.
I think I've identified the problem but couldn't come up with a solution at  the time.
The problem is described here:


On Tue, Feb 22, 2011 at 2:51 PM, Patrik Karlsson <patrik () cqure net> wrote:

On Feb 22, 2011, at 07:31 , David Fifield wrote:

On Thu, Feb 03, 2011 at 11:28:31PM +0100, Patrik Karlsson wrote:

On 3 feb 2011, at 23.13, Thomas Buchanan wrote:

-----Original Message-----
From: Patrik Karlsson [mailto:patrik () labb1 com] On Behalf Of
Patrik Karlsson
Sent: Wednesday, February 02, 2011 11:28 AM
To: Vikas Singhal; Thomas Buchanan; David Fifield; Nmap-Dev
Subject: Re: [NSE] snmp-ios-config - Config grabber

I still haven't seen any debug results or packet captures of
cases where this doesn't work and since I can't reproduce the
problems myself I'm not making any progress here.

Has anyone else been able to test yet?



I had a chance to test your latest revision of the script and tftp
library, and it seems to work fine for me.  I even dug up another Cisco
box to run against, and got good results from that one as well.

Ok, I'm happy to hear that.

The two Cisco boxes are quite different, and it takes one of them about
twice as long to build the running config and connect back to the TFTP
server.  This means that I haven't really been able to test how
effective the concurrency of the library is.  However, it seems to have
no problems handling the files as they come in:

I've been emulating several identical routers and got data back more or less at the same time and it seems to work 
good for me to.

Completed NSE at 15:53, 5.80s elapsed
Nmap scan report for
Host is up (0.00s latency).
161/udp open  snmp    SNMPv1 server (public)
| snmp-ios-config:
| !
| version 12.4

Nmap scan report for
Host is up (0.00s latency).
161/udp open  snmp    SNMPv1 server (public)
| snmp-ios-config:
| !
| version 12.3

Let me know if you want more details or would like to see any additional

Thanks for testing! I'm happy with the details. As far as I can tell,
the script now works as intended.

It's been interesting to watch the development of this script. Let's get
this most recent version committed. It looks like there are a few more
minor enhancements possible, but the main functionality of the script is

David Fifield

It's been an interesting twist adding a server piece as a NSE script :)
I committed the most recent version with the following changes as r22344:
* improved script documentation
* cleaned up some minor things in the script (receive_bytes(1) -> receive(), etc...)
* changed so that the script fails silently if it the initial SNMP query fails.
  this way the script does not produce an error every time it runs with an incorrect community.
* removed support for an external tftp server as this was no longer working.
  if we need this, we can add support for this in coming versions
* modified the script to return the name of the saved file, rather then the contents, in case the tftproot argument 
was used.

Patrik Karlsson

Patrik Karlsson

Sent through the nmap-dev mailing list
Archived at http://seclists.org/nmap-dev/

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]