Project

General

Profile

Actions

Bug #4439

closed

nmap partially broken on /hipster

Added by Predrag Zečević over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
OI-Userland
Target version:
-
Start date:
2014-01-07
Due date:
2014-01-12
% Done:

100%

Estimated time:
1.00 h
Difficulty:
Bite-size
Tags:
nmap

Description

Hi,

nmap utility is partially broken: some options require root privileges, and those return no result:

$ /usr/bin/nmap -O solarix
TCP/IP fingerprinting (for OS scan) requires root privileges.
QUITTING!

With pfexec or sudo:
$ pfexec /usr/bin/nmap -O solarix

Starting Nmap 6.25 ( http://nmap.org ) at 2014-01-07 13:30 CET
route_dst_generic: Failed to obtain system routes: getsysroutes_dnet: route_open() failed

Package info:
$ pkg info nmap
          Name: diagnostic/nmap
       Summary: Network exploration tool and security / port scanner.
   Description: Nmap is useful for inventorying the network, managing service
                upgrade schedules, and monitoring host or service uptime.
      Category: System/Administration and Configuration
         State: Installed
     Publisher: openindiana.org
       Version: 6.25
        Branch: 0.151.1.8.1
Packaging Date: November 11, 2013 07:47:15 PM 
          Size: 18.96 MB
          FMRI: pkg://openindiana.org/diagnostic/nmap@6.25-0.151.1.8.1:20131111T194715Z

Output from command:
$ pfexec truss -o /tmp/nmap.truss -f /usr/bin/nmap -O solarix

Starting Nmap 6.25 ( http://nmap.org ) at 2014-01-07 13:32 CET
route_dst_generic: Failed to obtain system routes: getsysroutes_dnet: route_open() failed

is attached to ticket.

I have tried to compile it myself (nmap version 6.40), using gcc compiler and have no such problem.

Regards.


Files

nmap.truss (78.4 KB) nmap.truss Predrag Zečević, 2014-01-07 12:35 PM
Actions #1

Updated by Ken Mays over 7 years ago

  • Category changed from OpenIndiana Misc to 10
  • Assignee set to OI Userland
  • Difficulty changed from Medium to Bite-size
  • Tags changed from needs-triage to nmap
Actions #2

Updated by Alexander Pyhalov over 7 years ago

it seems to be a mess in nmap configure + our autoconf. Configure can't compile check script for net/route.h, because prerequisitive headers are missing. So during compilation route-bsd.c is not used. I can fix it. But despite of it nmap remains unusable - it says that open ports are closed and hosts that respond to pings are unaccessible. Is your self-compiled nmap fully functional?

Actions #3

Updated by Alexander Pyhalov over 7 years ago

OK, it seems to be some mess on this particular test host. Have a fix for this issue.

Actions #4

Updated by Predrag Zečević over 7 years ago

Hi,

yes, nmap is fully functional.. This is what I have used to compile it with /hipster default gcc:

export NMAP_V=6.40
export PREFIX=/opt/SFW 
export LDFLAGS="-R${PREFIX}/lib -R${PREFIX}/apr/lib -R/usr/gnu/lib -L${PREFIX}/lib -L${PREFIX}/apr/lib -L/usr/gnu/lib" 

wget http://nmap.org/dist/nmap-${NMAP_V}.tar.bz2
tar xf nmap-${NMAP_V}.tar.bz2 && cd nmap-${NMAP_V}
./configure --prefix=${PREFIX} \\
            --with-openssl=${PREFIX} \\
            --with-apr=${PREFIX}/apr \\
            --with-libpcap=included \\
            --with-libpcre=included \\
            --with-libdnet=included \\
            --with-liblua=included
gmake 
pfexec gmake -n install

Regards.

Actions #5

Updated by Alexander Pyhalov over 7 years ago

Please, could you retest latest nmap from hipster repository?

Actions #6

Updated by Predrag Zečević over 7 years ago

Yes, works now...

I have tested few cases.

Thank you. Regards.

Actions #7

Updated by Alexander Pyhalov over 7 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 100
Actions #8

Updated by Ken Mays over 7 years ago

  • Due date set to 2014-01-12
  • Status changed from In Progress to Closed
  • Estimated time set to 1.00 h

Implement in ,5.11-0.151.1.8.1:20140109T131922Z. Closing ticket.

Actions

Also available in: Atom PDF