Re: Feature: per-target port specification (with patch!)

Jan Gocník <[email protected]> Mon, 8 Apr 2019 15:53:51 +0200
Newsgroups gmane.comp.security.nmap.devel
Message-ID <OF3162E3ED.81A24333-ONC12583D6.004B3738-C12583D6.004C57A4@dcit.cz>
This is a multipart message in MIME format.
--===============0109550062466286587==
Content-Type: multipart/alternative; boundary="=_alternative 004C57A2C12583D6_="

This is a multipart message in MIME format.
--=_alternative 004C57A2C12583D6_=
Content-Type: text/plain; charset="ISO-8859-2"
Content-Transfer-Encoding: quoted-printable

Hi,
I sure can try.

However, as according to https://github.com/nmap/nmap/issues/1217 this=20
feature was requested several times, there may be more use cases than what =

I'm describing.
The biggest point I was making is that "The alternatives" proposed in the=20
github issue can be a lot slower than a proper per-target ports=20
implementation.

The main use case I see is rescanning ports that were open in a previous=20
scan.
Why would you want to do that? You didn't run all the nse scans the first=20
time, or you don't want to discover new services, but only compare=20
versions of the services that were already there.
Why aren't current approaches to this enough? Calling nmap for each host=20
kills parallelism; calling nmap for all ports that were open on at least=20
one target is slow once filtered ports come into play.

Hope it's more clear now.
Jan




From:   "Robin Wood" <[email protected]>
To:     "Jan Gocn=EDk" <[email protected]>
Cc:     "Nmap-dev" <[email protected]>, "Daniel Miller"=20
<[email protected]>
Date:   08.04.2019 15:39
Subject:        Re: Feature: per-target port specification (with patch!)
Sent by:        "dev" <[email protected]>



Hi
I couldn't comment on the patch but I'm trying to understand your use case =

and don't quite get what you were explaining, any chance of a bit more=20
detail on it?

Robin

On Mon, 8 Apr 2019 at 14:15, Jan Gocn=EDk <[email protected]> wrote:
Hey,=20

I worked on this some more.=20

Fixed all of the memory leaks that were my fault, and the crash that was a =

result of a bug in mergeHostSpecificPorts. I took this opportunity to=20
rewrite the mergeHostSpecificPorts algorithm, so now the results are=20
properly sorted.=20
The disrepancy between "Scanning X [max N ports]" and "Completed Connect=20
Scan at X (0 ports max)" should be fixed as well, the totalprobes value is =

now properly initialized.=20

About the features you mentioned:=20
> The "Not shown: X ports" output for Normal output.=20
Well, from what I know, this doesn't always allow you to infer information =

about all ports anyway. For example, if you get "Not shown: 3995 closed=20
ports, 514 filtered ports". Therefore, as long as the counts are=20
calculated correctly, I don't think it's necessary to output information=20
about additional scanned ports, as you can get these from other more=20
verbose outputs.=20

> Properly formed XML output, with changes to the DTD and a=20
"xmloutputversion" number increase.=20
I simply output another scaninfo tag into each host tag. Updated the DTD=20
and xmloutputversion to 1.05.=20
For greppable, I output it in a format similiar to the ports listing.=20

> Combination of this feature with existing --top-ports/port-ratio and -p=20
options=20
From my testing, it merges with them properly.=20

> Combination of this feature with CIDR subnetting and IPv4 octet ranges=20
Should work just fine.=20

> Use of this feature along with advanced features like -O --traceroute=20
and -sV=20
I tested it with these options and everything seemed good to me.=20

On the topic of memory usage:=20
I wrote it so that if you do regular scans, the additional memory usage=20
should be very small - only a scan=5Flists per target group, which is <64=20
bytes, and a few pointers here and there. I can't get reproducible heap=20
reports form valgrind unfortunately, but in one case the new version even=20
allocated less memory than latest SVN trunk for "nmap scanme.nmap.org".=20
The biggest item of all is port=5Fmap=5Frev, which is 65536*sizeof(u16) =3D=
 128=20
kB. This is allocated for each target that has specific ports (but only=20
for those). Only way I can think of making this better is sharing those=20
for the whole target group, but I dunno if it's worth the effort.=20

Now, on the rationale.=20
A very specific (real) example when this feature is useful: We are=20
scanning a network, which has some kind of network appliance that replies=20
to SYNs on port 80 on every unleased IP, but doesn't reply to most other=20
ports at all (not even with a RST). That means that nmap considers every=20
single IP live,=20
but then waits for a long time when attempting to scan all the other=20
ports. I was scanning 521 IPs, of which 11 were really occupied and active =

and the 511 others were the "fakes".=20
I was testing three options: Scan all hosts for all ports that appeared at =

least once (marked all=5Fports), write a simple script that calls nmap for =

each target (script), and then used the per-target ports (per=5Ftarget).=20

With ping scan, the results were the following:=20
* all=5Fports: 102 seconds=20
* per=5Ftarget: 80 seconds=20
* script: 60 seconds=20
Without ping scan:=20
* script: 45 seconds=20
* all=5Fports: 38 seconds=20
* per=5Ftarget: 4 seconds=20

My conclusion is that this feature is useful when you get filtered ports,=20
as these take a lot of time. Basically, if you only have open and closed=20
ports, scanning some additional ones is fast and the "union all ports"=20
strategy is alright. But once you have filtered ports, the waiting quickly =

gets bad.=20
The script could be upgraded to be parallel, but then you're reinventing=20
nmap's parallel engine.=20

Now I know the "proper" solution on this network would be to use a brain=20
and try to discern real and fake machines, but this already gets much=20
faster results without a need for thinking, which is always nice.=20
I understand your concern about losing "new" services, but I see the main=20
usability of this in manual scans, for example running additional nse=20
scripts against your last scan results etc. When you are doing automatic=20
scans (for exmple as a network admin scanning network for new devices each =

week), you probably don't need to care about speed anyway...=20

Updated patch (to svn revision 37611):=20



Looking forward to further comments and hopefully we can make this work :) =



Jan=20



From:        Jan Gocn=EDk/Dcit=20
To:        "Daniel Miller" <[email protected]>=20
Cc:        "Nmap-dev" <[email protected]>=20
Date:        02.04.2019 23:53=20
Subject:        Re: Feature: per-target port specification (with patch!)=20


Hey Dan,=20

thanks for the reply! It's a shame that I didn't find the GitHub issue you =

link to before implementing this, as it does raise a lot of valid=20
concerns.=20

First, let me say that the company I work for wants this feature, so even=20
if it doesn't end up in upstream, I will try to keep it at least as a fork =

- as I'll have to maintain it internally anyway, I wanted to share with=20
the community, in case others have a need for it as well.=20

I will go through all the things you mentioned (most of the compatibility=20
with other options should be taken care of, but memory leaks are a=20
problem), fix up the code, look at maybe getting the memory footprint=20
lower, and try to come up with some stronger numbers and rationale.=20

Jan=20





From:        "Daniel Miller" <[email protected]>=20
To:        "Jan Gocn=EDk" <[email protected]>=20
Cc:        "Nmap-dev" <[email protected]>=20
Date:        02.04.2019 21:21=20
Subject:        Re: Feature: per-target port specification (with patch!)=20
Sent by:        "dev" <[email protected]>=20



Some initial notes from building and testing this:=20

./nmap scanme.nmap.org^22-80 -d
Starting Nmap 7.70SVN ( https://nmap.org ) at 2019-04-02 18:37 UTC
PORTS: Using top 1000 ports found open (TCP:1000, UDP:0, SCTP:0)
--------------- Timing report ---------------
  hostgroups: min 1, max 100000
  rtt-timeouts: init 1000, min 100, max 10000
  max-scan-delay: TCP 1000, UDP 1000, SCTP 1000
  parallelism: min 0, max 0
  max-retries: 10, host-timeout: 0
  min-rate: 0, max-rate: 0
---------------------------------------------
Initiating Ping Scan at 18:37
Scanning scanme.nmap.org (45.33.32.156) [max 2 ports]
Completed Ping Scan at 18:37, 0.09s elapsed (1 total hosts)
Overall sending rates: 24.44 packets / s.
mass=5Frdns: Using DNS server X.X.X.X
Initiating Parallel DNS resolution of 1 host. at 18:37
mass=5Frdns: 0.12s 0/1 [#: 3, OK: 0, NX: 0, DR: 0, SF: 0, TR: 1]
Completed Parallel DNS resolution of 1 host. at 18:37, 0.06s elapsed
DNS resolution of 1 IPs took 0.15s. Mode: Async [#: 3, OK: 1, NX: 0, DR:=20
0, SF: 0, TR: 1, CN: 0]
Initiating Connect Scan at 18:37
Scanning scanme.nmap.org (45.33.32.156) [max 1059 ports]
Discovered open port 80/tcp
Discovered open port 22/tcp
Discovered open port 9929/tcp
Discovered open port 31337/tcp
nmap: portlist.cc:688: void PortList::mapPort(u16*, u8*) const: Assertion=20
`mapped=5Fportno < port=5Flist=5Fcount[mapped=5Fprotocol]' failed.
Aborted (core dumped)=20


Valgrind identified some memory leaks. These were the ones that are=20
definitely from this patch: Portlist::setIdStr(), idstr;=20
PortList::mergeHostSpecificPorts(), new=5Fport=5Fmap and new=5Fport=5Fmap=
=5Frev;=20

There was also a discrepancy between the "Scanning X [max N ports]" and=20
"Completed Connect Scan at X (0 ports max)", which valgrind says is due to =

an uninitialized value, probably GroupScanStats::totalprobes.=20

Of course, as you noted before, the results are not sorted by port number, =

which we would have to do to ensure predictable output that can be=20
compared with previous scans.=20

IPv6 addresses, CIDR, and IPv4 octet ranges seem to work fine with this.=20

With just my one test scan of localhost and scanme.nmap.org with one=20
unique port each and one port in common, the patched code allocated an=20
additional 383KB of heap memory. I do not know how this would scale up or=20
down, and I haven't compared it with a scan that should behave the same in =

both cases (for instance, "nmap 192.168.1.0/24".=20

My primary concern remains that repeated use of this feature will result=20
in missing new services and dropping existing ones if they are missed in=20
just one scan. This is more about use case than about the code, though, so =

I will defer to users on that.=20

Dan=20

On Tue, Apr 2, 2019 at 1:30 PM Daniel Miller <[email protected]>=20
wrote:=20
Jan,=20

Thanks for this contribution. We've had many requests for this type of=20
feature in the past, but have elected not to include it for a variety of=20
reasons. There is an open discussion on our issue tracker that lays out=20
some of the challenges in correctly implementing such a feature:=20
http://issues.nmap.org/1217=20

It looks like your patch has tried to handle some of these situations, for =

example the "Ports scanned" output for Grepable output (and maybe XML, but =

it didn't look complete at first glance). If we are to do an actual code=20
review and include this new feature, we would have to look for a complete=20
solution that can handle the following situations:=20

* The "Not shown: X ports" output for Normal output.=20
* Properly formed XML output, with changes to the DTD and a=20
"xmloutputversion" number increase.=20
* Combination of this feature with existing --top-ports/port-ratio and -p=20
options=20
* Combination of this feature with CIDR subnetting and IPv4 octet ranges=20
* Use of this feature along with advanced features like -O --traceroute=20
and -sV=20

Have you done any measurement of scans before and after adding this=20
feature to determine the actual impact on scan times and bandwidth? Do you =

have a bandwidth target for your scans that Nmap is exceeding right now,=20
and by how much? What does a typical nmap command line look like, and what =

performance options have you already tried?=20

I look forward to hearing more about this from you and our other devs and=20
users.=20

Dan=20

On Tue, Apr 2, 2019 at 8:07 AM Jan Gocn=EDk <[email protected]> wrote:=20
Hey,=20

I would like to propose a feature enabling specifying ports for each=20
target separately.=20

Rationale:=20
It often happens that we already have an nmap scan of 200 machines, and we =

want to do a service scan on those same machines. Usually that forces us=20
to scan the whole network for all the ports that appeared at least once.=20
That is a big waste of time and bandwidth. What we want to have is=20
essentially a rescan-like feature, that would rescan just ports that were=20
found to be open before.=20

User experience:=20
Everywhere where you could specify a target (-iL file, command line) you=20
can supply a "target^ports". It works with all the nmap magic ranges, so=20
"192.168.1.1-255^22-60" works. The common ports (supplied with -p) are=20
scanned on all targets.=20

Implementation details:=20
I tried to keep it so that if you don't use any "^" in the targets, the=20
code path should remain largely the same, so there should be no=20
regressions. However, I had to do some tuning in functions that expected=20
they can just get the number of probes by multiplying common ports by=20
targets.=20
There's a small issue, in that the results of the scan are not sorted=20
properly, as the target-specific ports get scanned last.=20

Usage example:=20
=3D=3D=3Dpaste start=3D=3D=3D=20
$ nmap -v -Pn -n -p22 "165.227.141.119^80,443" "40.113.73.59^8080"=20
Starting Nmap 7.70SVN ( https://nmap.org ) at 2019-04-01 19:46 CEST=20
Initiating SYN Stealth Scan at 19:46=20
Scanning 2 hosts [max 3 ports/host]=20
Discovered open port 22/tcp=20
Discovered open port 80/tcp=20
Discovered open port 443/tcp=20
Discovered open port 22/tcp=20
Completed SYN Stealth Scan at 19:46, 1.45s elapsed (1626388576 total ports =

max)=20
Nmap scan report for 165.227.141.119=20
Host is up (0.0090s latency).=20

PORT    STATE SERVICE=20
22/tcp  open  ssh=20
80/tcp  open  http=20
443/tcp open  https=20

Nmap scan report for 40.113.73.59=20
Host is up (0.038s latency).=20

PORT     STATE    SERVICE=20
22/tcp   open     ssh=20
8080/tcp filtered http-proxy=20

Read data files from: /home/gocnik/nmap=20
Nmap done: 2 IP addresses (2 hosts up) scanned in 1.52 seconds=20
           Raw packets sent: 6 (264B) | Rcvd: 4 (176B)=20
=3D=3D=3Dpaste end=3D=3D=3D=20

If done the usual way:=20
$ nmap -v -Pn -n -p22,80,443,8080 165.227.141.119 40.113.73.59=20
[...]=20
Raw packets sent: 10 (440B) | Rcvd: 6 (260B)=20


The patch is against svn trunk at this moment (revision 37608).=20



Looking forward to all comments!=20
JaGoTu=20

P.S.: Sorry if you recieve this e-mail twice, but the previous one=20
apparently got caught in a moderation queue or something, as it doesn't=20
show on seclists.org=20
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/=20


=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


--=_alternative 004C57A2C12583D6_=
Content-Type: text/html; charset="ISO-8859-2"
Content-Transfer-Encoding: quoted-printable

<span style=3D" font-size:10pt;font-family:sans-serif">Hi,</span>
<br><span style=3D" font-size:10pt;font-family:sans-serif">I sure can try.<=
/span>
<br>
<br><span style=3D" font-size:10pt;font-family:sans-serif">However, as acco=
rding
to </span><a href=3Dhttps://github.com/nmap/nmap/issues/1217><span style=3D=
" font-size:10pt;color:blue;font-family:sans-serif">https://github.com/nmap=
/nmap/issues/1217</span></a><span style=3D" font-size:10pt;font-family:sans=
-serif">
this feature was requested several times, there may be more use cases than
what I'm describing.</span>
<br><span style=3D" font-size:10pt;font-family:sans-serif">The biggest point
I was making is that &quot;The alternatives&quot; proposed in the github
issue<b> can be a lot slower</b> than a proper per-target ports implementat=
ion.</span>
<br>
<br><span style=3D" font-size:10pt;font-family:sans-serif">The main use case
I see is rescanning ports that were open in a previous scan.</span>
<br><span style=3D" font-size:10pt;font-family:sans-serif">Why would you
want to do that? You didn't run all the nse scans the first time, or you
don't want to discover new services, but only compare versions of the servi=
ces
that were already there.</span>
<br><span style=3D" font-size:10pt;font-family:sans-serif">Why aren't curre=
nt
approaches to this enough? Calling nmap for each host kills parallelism;
calling nmap for all ports that were open on at least one target is slow
once filtered ports come into play.</span>
<br>
<br><span style=3D" font-size:10pt;font-family:sans-serif">Hope it's more
clear now.</span>
<br><span style=3D" font-size:10pt;font-family:sans-serif">Jan</span>
<br>
<br>
<br>
<br>
<br><span style=3D" font-size:9pt;color:#5f5f5f;font-family:sans-serif">Fro=
m:
&nbsp; &nbsp; &nbsp; &nbsp;</span><span style=3D" font-size:9pt;font-family=
:sans-serif">&quot;Robin
Wood&quot; &lt;[email protected]&gt;</span>
<br><span style=3D" font-size:9pt;color:#5f5f5f;font-family:sans-serif">To:
&nbsp; &nbsp; &nbsp; &nbsp;</span><span style=3D" font-size:9pt;font-family=
:sans-serif">&quot;Jan
Gocn=EDk&quot; &lt;[email protected]&gt;</span>
<br><span style=3D" font-size:9pt;color:#5f5f5f;font-family:sans-serif">Cc:
&nbsp; &nbsp; &nbsp; &nbsp;</span><span style=3D" font-size:9pt;font-family=
:sans-serif">&quot;Nmap-dev&quot;
&lt;[email protected]&gt;, &quot;Daniel Miller&quot; &lt;[email protected]&=
gt;</span>
<br><span style=3D" font-size:9pt;color:#5f5f5f;font-family:sans-serif">Dat=
e:
&nbsp; &nbsp; &nbsp; &nbsp;</span><span style=3D" font-size:9pt;font-family=
:sans-serif">08.04.2019
15:39</span>
<br><span style=3D" font-size:9pt;color:#5f5f5f;font-family:sans-serif">Sub=
ject:
&nbsp; &nbsp; &nbsp; &nbsp;</span><span style=3D" font-size:9pt;font-family=
:sans-serif">Re:
Feature: per-target port specification (with patch!)</span>
<br><span style=3D" font-size:9pt;color:#5f5f5f;font-family:sans-serif">Sent
by: &nbsp; &nbsp; &nbsp; &nbsp;</span><span style=3D" font-size:9pt;font-fa=
mily:sans-serif">&quot;dev&quot;
&lt;[email protected]&gt;</span>
<br>
<hr noshade>
<br>
<br>
<br><span style=3D" font-size:12pt">Hi</span>
<br><span style=3D" font-size:12pt">I couldn't comment on the patch but I'm
trying to understand your use case and don't quite get what you were explai=
ning,
any chance of a bit more detail on it?</span>
<br>
<br><span style=3D" font-size:12pt">Robin</span>
<br>
<br><span style=3D" font-size:12pt">On Mon, 8 Apr 2019 at 14:15, Jan Gocn=
=EDk
&lt;</span><a href=3Dmailto:[email protected]><span style=3D" font-size:12pt;c=
olor:blue"><u>[email protected]</u></span></a><span style=3D" font-size:12pt">=
&gt;
wrote:</span>
<br><span style=3D" font-size:10pt;font-family:sans-serif">Hey,</span><span=
 style=3D" font-size:12pt">
<br>
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
I worked on this some more.</span><span style=3D" font-size:12pt"> <br>
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
Fixed all of the <b>memory leaks</b> that were my fault, and the crash
that was a result of a bug in mergeHostSpecificPorts. I took this opportuni=
ty
to rewrite the mergeHostSpecificPorts algorithm, so now <b>the results
are properly sorted</b>.</span><span style=3D" font-size:12pt"> </span><spa=
n style=3D" font-size:10pt;font-family:sans-serif"><br>
The disrepancy between &quot;Scanning X [max N ports]&quot; and &quot;Compl=
eted
Connect Scan at X (0 ports max)&quot; should be fixed as well, the totalpro=
bes
value is now properly initialized.</span><span style=3D" font-size:12pt">
<br>
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
About the features you mentioned:</span><span style=3D" font-size:12pt">
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
&gt; The &quot;Not shown: X ports&quot; output for Normal output.</span><sp=
an style=3D" font-size:12pt">
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
Well, from what I know, this doesn't always allow you to infer information
about all ports anyway. For example, if you get &quot;Not shown: 3995 closed
ports, 514 filtered ports&quot;. Therefore, as long as the counts are calcu=
lated
correctly, I don't think it's necessary to output information about additio=
nal
scanned ports, as you can get these from other more verbose outputs.</span>=
<span style=3D" font-size:12pt">
<br>
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
&gt; Properly formed XML output, with changes to the DTD and a &quot;xmlout=
putversion&quot;
number increase.</span><span style=3D" font-size:12pt"> </span><span style=
=3D" font-size:10pt;font-family:sans-serif"><br>
I simply output another scaninfo tag into each host tag. Updated the DTD
and xmloutputversion to 1.05.</span><span style=3D" font-size:12pt"> </span=
><span style=3D" font-size:10pt;font-family:sans-serif"><br>
For greppable, I output it in a format similiar to the ports listing.</span=
><span style=3D" font-size:12pt">
<br>
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
&gt; Combination of this feature with existing --top-ports/port-ratio and
-p options</span><span style=3D" font-size:12pt"> </span><span style=3D" fo=
nt-size:10pt;font-family:sans-serif"><br>
From my testing, it merges with them properly.</span><span style=3D" font-s=
ize:12pt">
<br>
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
&gt; Combination of this feature with CIDR subnetting and IPv4 octet ranges=
</span><span style=3D" font-size:12pt">
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
Should work just fine.</span><span style=3D" font-size:12pt"> <br>
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
&gt; Use of this feature along with advanced features like -O --traceroute
and -sV</span><span style=3D" font-size:12pt"> </span><span style=3D" font-=
size:10pt;font-family:sans-serif"><br>
I tested it with these options and everything seemed good to me.</span><spa=
n style=3D" font-size:12pt">
<br>
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
On the topic of <b>memory usage:</b></span><span style=3D" font-size:12pt">
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
I wrote it so that if you do regular scans, the additional memory usage
should be very small - only a scan=5Flists per target group, which is &lt;64
bytes, and a few pointers here and there. I can't get reproducible heap
reports form valgrind unfortunately, but in one case the new version even
allocated less memory than latest SVN trunk for &quot;nmap </span><a href=
=3Dhttp://scanme.nmap.org/ target=3D=5Fblank><span style=3D" font-size:10pt=
;color:blue;font-family:sans-serif"><u>scanme.nmap.org</u></span></a><span =
style=3D" font-size:10pt;font-family:sans-serif">&quot;.</span><span style=
=3D" font-size:12pt">
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
The biggest item of all is port=5Fmap=5Frev, which is 65536*sizeof(u16) =3D=
 128
kB. This is allocated for each target that has specific ports (but only
for those). Only way I can think of making this better is sharing those
for the whole target group, but I dunno if it's worth the effort.</span><sp=
an style=3D" font-size:12pt">
<br>
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
Now, on the <b>rationale.</b></span><span style=3D" font-size:12pt"> </span=
><span style=3D" font-size:10pt;font-family:sans-serif"><br>
A very specific (real) example when this feature is useful: We are scanning
a network, which has some kind of network appliance that replies to SYNs
on port 80 on every unleased IP, but doesn't reply to most other ports
at all (not even with a RST). That means that nmap considers every single
IP live,</span><span style=3D" font-size:12pt"> </span><span style=3D" font=
-size:10pt;font-family:sans-serif"><br>
but then waits for a long time when attempting to scan all the other ports.
I was scanning 521 IPs, of which 11 were really occupied and active and
the 511 others were the &quot;fakes&quot;.</span><span style=3D" font-size:=
12pt">
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
I was testing three options: Scan all hosts for all ports that appeared
at least once (marked all=5Fports), write a simple script that calls nmap
for each target (script), and then used the per-target ports (per=5Ftarget)=
.</span><span style=3D" font-size:12pt">
<br>
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
With ping scan, the results were the following:</span><span style=3D" font-=
size:12pt">
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
* all=5Fports: 102 seconds</span><span style=3D" font-size:12pt"> </span><s=
pan style=3D" font-size:10pt;font-family:sans-serif"><br>
* per=5Ftarget: 80 seconds</span><span style=3D" font-size:12pt"> </span><s=
pan style=3D" font-size:10pt;font-family:sans-serif"><br>
* script: 60 seconds</span><span style=3D" font-size:12pt"> </span><span st=
yle=3D" font-size:10pt;font-family:sans-serif"><br>
Without ping scan:</span><span style=3D" font-size:12pt"> </span><span styl=
e=3D" font-size:10pt;font-family:sans-serif"><br>
* script: 45 seconds</span><span style=3D" font-size:12pt"> </span><span st=
yle=3D" font-size:10pt;font-family:sans-serif"><br>
* all=5Fports: 38 seconds</span><span style=3D" font-size:12pt"> </span><sp=
an style=3D" font-size:10pt;font-family:sans-serif"><br>
* per=5Ftarget: 4 seconds</span><span style=3D" font-size:12pt"> <br>
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
My conclusion is that this feature is useful when you get filtered ports,
as these take a lot of time. Basically, if you only have open and closed
ports, scanning some additional ones is fast and the &quot;union all ports&=
quot;
strategy is alright. But once you have filtered ports, the waiting quickly
gets bad.</span><span style=3D" font-size:12pt"> </span><span style=3D" fon=
t-size:10pt;font-family:sans-serif"><br>
The script could be upgraded to be parallel, but then you're reinventing
nmap's parallel engine.</span><span style=3D" font-size:12pt"> <br>
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
Now I know the &quot;proper&quot; solution on this network would be to
use a brain and try to discern real and fake machines, but this already
gets much faster results without a need for thinking, which is always nice.=
</span><span style=3D" font-size:12pt">
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
I understand your concern about losing &quot;new&quot; services, but I
see the main usability of this in manual scans, for example running additio=
nal
nse scripts against your last scan results etc. When you are doing automatic
scans (for exmple as a network admin scanning network for new devices each
week), you probably don't need to care about speed anyway...</span><span st=
yle=3D" font-size:12pt">
<br>
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
Updated patch (to svn revision 37611):</span><span style=3D" font-size:12pt=
">
<br>
<br>
<br>
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
Looking forward to further comments and hopefully we can make this work
:)</span><span style=3D" font-size:12pt"> <br>
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
Jan</span><span style=3D" font-size:12pt"> <br>
<br>
<br>
</span><span style=3D" font-size:9pt;color:#5f5f5f;font-family:sans-serif">=
<br>
From: &nbsp; &nbsp; &nbsp; &nbsp;</span><span style=3D" font-size:9pt;font-=
family:sans-serif">Jan
Gocn=EDk/Dcit</span><span style=3D" font-size:12pt"> </span><span style=3D"=
 font-size:9pt;color:#5f5f5f;font-family:sans-serif"><br>
To: &nbsp; &nbsp; &nbsp; &nbsp;</span><span style=3D" font-size:9pt;font-fa=
mily:sans-serif">&quot;Daniel
Miller&quot; &lt;</span><a href=3Dmailto:[email protected] target=3D=
=5Fblank><span style=3D" font-size:9pt;color:blue;font-family:sans-serif"><=
u>[email protected]</u></span></a><span style=3D" font-size:9pt;font-f=
amily:sans-serif">&gt;</span><span style=3D" font-size:12pt">
</span><span style=3D" font-size:9pt;color:#5f5f5f;font-family:sans-serif">=
<br>
Cc: &nbsp; &nbsp; &nbsp; &nbsp;</span><span style=3D" font-size:9pt;font-fa=
mily:sans-serif">&quot;Nmap-dev&quot;
&lt;</span><a href=3Dmailto:[email protected] target=3D=5Fblank><span style=3D" =
font-size:9pt;color:blue;font-family:sans-serif"><u>[email protected]</u></span>=
</a><span style=3D" font-size:9pt;font-family:sans-serif">&gt;</span><span =
style=3D" font-size:12pt">
</span><span style=3D" font-size:9pt;color:#5f5f5f;font-family:sans-serif">=
<br>
Date: &nbsp; &nbsp; &nbsp; &nbsp;</span><span style=3D" font-size:9pt;font-=
family:sans-serif">02.04.2019
23:53</span><span style=3D" font-size:12pt"> </span><span style=3D" font-si=
ze:9pt;color:#5f5f5f;font-family:sans-serif"><br>
Subject: &nbsp; &nbsp; &nbsp; &nbsp;</span><span style=3D" font-size:9pt;fo=
nt-family:sans-serif">Re:
Feature: per-target port specification (with patch!)</span><span style=3D" =
font-size:12pt">
<br>
</span>
<hr noshade><span style=3D" font-size:12pt"><br>
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
Hey Dan,</span><span style=3D" font-size:12pt"> <br>
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
thanks for the reply! It's a shame that I didn't find the GitHub issue
you link to before implementing this, as it does raise a lot of valid conce=
rns.</span><span style=3D" font-size:12pt">
<br>
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
First, let me say that the company I work for wants this feature, so even
if it doesn't end up in upstream, I will try to keep it at least as a fork
- as I'll have to maintain it internally anyway, I wanted to share with
the community, in case others have a need for it as well.</span><span style=
=3D" font-size:12pt">
<br>
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
I will go through all the things you mentioned (most of the compatibility
with other options should be taken care of, but memory leaks are a problem),
fix up the code, look at maybe getting the memory footprint lower, and
try to come up with some stronger numbers and rationale.</span><span style=
=3D" font-size:12pt">
<br>
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
Jan</span><span style=3D" font-size:12pt"> <br>
<br>
<br>
<br>
<br>
</span><span style=3D" font-size:9pt;color:#5f5f5f;font-family:sans-serif">=
<br>
From: &nbsp; &nbsp; &nbsp; &nbsp;</span><span style=3D" font-size:9pt;font-=
family:sans-serif">&quot;Daniel
Miller&quot; &lt;</span><a href=3Dmailto:[email protected] target=3D=
=5Fblank><span style=3D" font-size:9pt;color:blue;font-family:sans-serif"><=
u>[email protected]</u></span></a><span style=3D" font-size:9pt;font-f=
amily:sans-serif">&gt;</span><span style=3D" font-size:12pt">
</span><span style=3D" font-size:9pt;color:#5f5f5f;font-family:sans-serif">=
<br>
To: &nbsp; &nbsp; &nbsp; &nbsp;</span><span style=3D" font-size:9pt;font-fa=
mily:sans-serif">&quot;Jan
Gocn=EDk&quot; &lt;</span><a href=3Dmailto:[email protected] target=3D=5Fblank=
><span style=3D" font-size:9pt;color:blue;font-family:sans-serif"><u>gocnik=
@dcit.cz</u></span></a><span style=3D" font-size:9pt;font-family:sans-serif=
">&gt;</span><span style=3D" font-size:12pt">
</span><span style=3D" font-size:9pt;color:#5f5f5f;font-family:sans-serif">=
<br>
Cc: &nbsp; &nbsp; &nbsp; &nbsp;</span><span style=3D" font-size:9pt;font-fa=
mily:sans-serif">&quot;Nmap-dev&quot;
&lt;</span><a href=3Dmailto:[email protected] target=3D=5Fblank><span style=3D" =
font-size:9pt;color:blue;font-family:sans-serif"><u>[email protected]</u></span>=
</a><span style=3D" font-size:9pt;font-family:sans-serif">&gt;</span><span =
style=3D" font-size:12pt">
</span><span style=3D" font-size:9pt;color:#5f5f5f;font-family:sans-serif">=
<br>
Date: &nbsp; &nbsp; &nbsp; &nbsp;</span><span style=3D" font-size:9pt;font-=
family:sans-serif">02.04.2019
21:21</span><span style=3D" font-size:12pt"> </span><span style=3D" font-si=
ze:9pt;color:#5f5f5f;font-family:sans-serif"><br>
Subject: &nbsp; &nbsp; &nbsp; &nbsp;</span><span style=3D" font-size:9pt;fo=
nt-family:sans-serif">Re:
Feature: per-target port specification (with patch!)</span><span style=3D" =
font-size:12pt">
</span><span style=3D" font-size:9pt;color:#5f5f5f;font-family:sans-serif">=
<br>
Sent by: &nbsp; &nbsp; &nbsp; &nbsp;</span><span style=3D" font-size:9pt;fo=
nt-family:sans-serif">&quot;dev&quot;
&lt;</span><a href=3D"mailto:[email protected]" target=3D=5Fblank><span =
style=3D" font-size:9pt;color:blue;font-family:sans-serif"><u>dev-bounces@n=
map.org</u></span></a><span style=3D" font-size:9pt;font-family:sans-serif"=
>&gt;</span><span style=3D" font-size:12pt">
<br>
</span>
<hr noshade><span style=3D" font-size:12pt"><br>
<br>
<br>
Some initial notes from building and testing this: <br>
<br>
./nmap </span><a href=3Dhttp://scanme.nmap.org/ target=3D=5Fblank><span sty=
le=3D" font-size:12pt;color:blue"><u>scanme.nmap.org</u></span></a><span st=
yle=3D" font-size:12pt">^22-80
-d<br>
Starting Nmap 7.70SVN ( </span><a href=3Dhttps://nmap.org/ target=3D=5Fblan=
k><span style=3D" font-size:12pt;color:blue"><u>https://nmap.org</u></span>=
</a><span style=3D" font-size:12pt">
) at 2019-04-02 18:37 UTC<br>
PORTS: Using top 1000 ports found open (TCP:1000, UDP:0, SCTP:0)<br>
--------------- Timing report ---------------<br>
&nbsp; hostgroups: min 1, max 100000<br>
&nbsp; rtt-timeouts: init 1000, min 100, max 10000<br>
&nbsp; max-scan-delay: TCP 1000, UDP 1000, SCTP 1000<br>
&nbsp; parallelism: min 0, max 0<br>
&nbsp; max-retries: 10, host-timeout: 0<br>
&nbsp; min-rate: 0, max-rate: 0<br>
---------------------------------------------<br>
Initiating Ping Scan at 18:37<br>
Scanning </span><a href=3Dhttp://scanme.nmap.org/ target=3D=5Fblank><span s=
tyle=3D" font-size:12pt;color:blue"><u>scanme.nmap.org</u></span></a><span =
style=3D" font-size:12pt">
(45.33.32.156) [max 2 ports]<br>
Completed Ping Scan at 18:37, 0.09s elapsed (1 total hosts)<br>
Overall sending rates: 24.44 packets / s.<br>
mass=5Frdns: Using DNS server X.X.X.X<br>
Initiating Parallel DNS resolution of 1 host. at 18:37<br>
mass=5Frdns: 0.12s 0/1 [#: 3, OK: 0, NX: 0, DR: 0, SF: 0, TR: 1]<br>
Completed Parallel DNS resolution of 1 host. at 18:37, 0.06s elapsed<br>
DNS resolution of 1 IPs took 0.15s. Mode: Async [#: 3, OK: 1, NX: 0, DR:
0, SF: 0, TR: 1, CN: 0]<br>
Initiating Connect Scan at 18:37<br>
Scanning </span><a href=3Dhttp://scanme.nmap.org/ target=3D=5Fblank><span s=
tyle=3D" font-size:12pt;color:blue"><u>scanme.nmap.org</u></span></a><span =
style=3D" font-size:12pt">
(45.33.32.156) [max 1059 ports]<br>
Discovered open port 80/tcp<br>
Discovered open port 22/tcp<br>
Discovered open port 9929/tcp<br>
Discovered open port 31337/tcp<br>
nmap: portlist.cc:688: void PortList::mapPort(u16*, u8*) const: Assertion
`mapped=5Fportno &lt; port=5Flist=5Fcount[mapped=5Fprotocol]' failed.<br>
Aborted (core dumped) <br>
<br>
<br>
Valgrind identified some memory leaks. These were the ones that are definit=
ely
from this patch: Portlist::setIdStr(), idstr; PortList::mergeHostSpecificPo=
rts(),
new=5Fport=5Fmap and new=5Fport=5Fmap=5Frev; <br>
<br>
There was also a discrepancy between the &quot;Scanning X [max N ports]&quo=
t;
and &quot;Completed Connect Scan at X (0 ports max)&quot;, which valgrind
says is due to an uninitialized value, probably GroupScanStats::totalprobes.
<br>
<br>
Of course, as you noted before, the results are not sorted by port number,
which we would have to do to ensure predictable output that can be compared
with previous scans. <br>
<br>
IPv6 addresses, CIDR, and IPv4 octet ranges seem to work fine with this.
<br>
<br>
With just my one test scan of localhost and </span><a href=3Dhttp://scanme.=
nmap.org/ target=3D=5Fblank><span style=3D" font-size:12pt;color:blue"><u>s=
canme.nmap.org</u></span></a><span style=3D" font-size:12pt">
with one unique port each and one port in common, the patched code allocated
an additional 383KB of heap memory. I do not know how this would scale
up or down, and I haven't compared it with a scan that should behave the
same in both cases (for instance, &quot;nmap </span><a href=3Dhttp://192.16=
8.1.0/24 target=3D=5Fblank><span style=3D" font-size:12pt;color:blue"><u>19=
2.168.1.0/24</u></span></a><span style=3D" font-size:12pt">&quot;.
<br>
<br>
My primary concern remains that repeated use of this feature will result
in missing new services and dropping existing ones if they are missed in
just one scan. This is more about use case than about the code, though,
so I will defer to users on that. <br>
<br>
Dan <br>
<br>
On Tue, Apr 2, 2019 at 1:30 PM Daniel Miller &lt;</span><a href=3Dmailto:bo=
[email protected] target=3D=5Fblank><span style=3D" font-size:12pt;color=
:blue"><u>[email protected]</u></span></a><span style=3D" font-size:12=
pt">&gt;
wrote: <br>
Jan, <br>
<br>
Thanks for this contribution. We've had many requests for this type of
feature in the past, but have elected not to include it for a variety of
reasons. There is an open discussion on our issue tracker that lays out
some of the challenges in correctly implementing such a feature: </span><a =
href=3Dhttp://issues.nmap.org/1217 target=3D=5Fblank><span style=3D" font-s=
ize:12pt;color:blue"><u>http://issues.nmap.org/1217</u></span></a><span sty=
le=3D" font-size:12pt">
<br>
<br>
It looks like your patch has tried to handle some of these situations,
for example the &quot;Ports scanned&quot; output for Grepable output (and
maybe XML, but it didn't look complete at first glance). If we are to do
an actual code review and include this new feature, we would have to look
for a complete solution that can handle the following situations: <br>
<br>
* The &quot;Not shown: X ports&quot; output for Normal output. <br>
* Properly formed XML output, with changes to the DTD and a &quot;xmloutput=
version&quot;
number increase. <br>
* Combination of this feature with existing --top-ports/port-ratio and
-p options <br>
* Combination of this feature with CIDR subnetting and IPv4 octet ranges
<br>
* Use of this feature along with advanced features like -O --traceroute
and -sV <br>
<br>
Have you done any measurement of scans before and after adding this feature
to determine the actual impact on scan times and bandwidth? Do you have
a bandwidth target for your scans that Nmap is exceeding right now, and
by how much? What does a typical nmap command line look like, and what
performance options have you already tried? <br>
<br>
I look forward to hearing more about this from you and our other devs and
users. <br>
<br>
Dan <br>
<br>
On Tue, Apr 2, 2019 at 8:07 AM Jan Gocn=EDk &lt;</span><a href=3Dmailto:goc=
[email protected] target=3D=5Fblank><span style=3D" font-size:12pt;color:blue"><u=
>[email protected]</u></span></a><span style=3D" font-size:12pt">&gt;
wrote: </span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
Hey,</span><span style=3D" font-size:12pt"> </span><span style=3D" font-siz=
e:10pt;font-family:sans-serif"><br>
<br>
I would like to propose a feature enabling specifying ports for each target
separately.</span><span style=3D" font-size:12pt"> </span><span style=3D" f=
ont-size:10pt;font-family:sans-serif"><br>
<br>
Rationale:</span><span style=3D" font-size:12pt"> </span><span style=3D" fo=
nt-size:10pt;font-family:sans-serif"><br>
It often happens that we already have an nmap scan of 200 machines, and
we want to do a service scan on those same machines. Usually that forces
us to scan the whole network for all the ports that appeared at least once.=
</span><span style=3D" font-size:12pt">
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
That is a big waste of time and bandwidth. What we want to have is essentia=
lly
a rescan-like feature, that would rescan just ports that were found to
be open before.</span><span style=3D" font-size:12pt"> </span><span style=
=3D" font-size:10pt;font-family:sans-serif"><br>
<br>
User experience:</span><span style=3D" font-size:12pt"> </span><span style=
=3D" font-size:10pt;font-family:sans-serif"><br>
Everywhere where you could specify a target (-iL file, command line) you
can supply a &quot;target^ports&quot;. It works with all the nmap magic
ranges, so &quot;192.168.1.1-255^22-60&quot; works. The common ports (suppl=
ied
with -p) are scanned on all targets.</span><span style=3D" font-size:12pt">
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
<br>
Implementation details:</span><span style=3D" font-size:12pt"> </span><span=
 style=3D" font-size:10pt;font-family:sans-serif"><br>
I tried to keep it so that if you don't use any &quot;^&quot; in the target=
s,
the code path should remain largely the same, so there should be no regress=
ions.
However, I had to do some tuning in functions that expected they can just
get the number of probes by multiplying common ports by targets.</span><spa=
n style=3D" font-size:12pt">
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
There's a small issue, in that the results of the scan are not sorted prope=
rly,
as the target-specific ports get scanned last.</span><span style=3D" font-s=
ize:12pt">
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
<br>
Usage example:</span><span style=3D" font-size:12pt"> </span><span style=3D=
" font-size:10pt;font-family:sans-serif"><br>
=3D=3D=3Dpaste start=3D=3D=3D</span><span style=3D" font-size:12pt"> </span=
><span style=3D" font-size:10pt;font-family:sans-serif"><br>
$ nmap -v -Pn -n -p22 &quot;165.227.141.119^80,443&quot; &quot;40.113.73.59=
^8080&quot;</span><span style=3D" font-size:12pt">
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
Starting Nmap 7.70SVN ( </span><a href=3Dhttps://nmap.org/ target=3D=5Fblan=
k><span style=3D" font-size:10pt;color:blue;font-family:sans-serif"><u>http=
s://nmap.org</u></span></a><span style=3D" font-size:10pt;font-family:sans-=
serif">
) at 2019-04-01 19:46 CEST</span><span style=3D" font-size:12pt"> </span><s=
pan style=3D" font-size:10pt;font-family:sans-serif"><br>
Initiating SYN Stealth Scan at 19:46</span><span style=3D" font-size:12pt">
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
Scanning 2 hosts [max 3 ports/host]</span><span style=3D" font-size:12pt">
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
Discovered open port 22/tcp</span><span style=3D" font-size:12pt"> </span><=
span style=3D" font-size:10pt;font-family:sans-serif"><br>
Discovered open port 80/tcp</span><span style=3D" font-size:12pt"> </span><=
span style=3D" font-size:10pt;font-family:sans-serif"><br>
Discovered open port 443/tcp</span><span style=3D" font-size:12pt"> </span>=
<span style=3D" font-size:10pt;font-family:sans-serif"><br>
Discovered open port 22/tcp</span><span style=3D" font-size:12pt"> </span><=
span style=3D" font-size:10pt;font-family:sans-serif"><br>
Completed SYN Stealth Scan at 19:46, 1.45s elapsed (1626388576 total ports
max)</span><span style=3D" font-size:12pt"> </span><span style=3D" font-siz=
e:10pt;font-family:sans-serif"><br>
Nmap scan report for 165.227.141.119</span><span style=3D" font-size:12pt">
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
Host is up (0.0090s latency).</span><span style=3D" font-size:12pt"> </span=
><span style=3D" font-size:10pt;font-family:sans-serif"><br>
<br>
PORT &nbsp; &nbsp;STATE SERVICE</span><span style=3D" font-size:12pt"> </sp=
an><span style=3D" font-size:10pt;font-family:sans-serif"><br>
22/tcp &nbsp;open &nbsp;ssh</span><span style=3D" font-size:12pt"> </span><=
span style=3D" font-size:10pt;font-family:sans-serif"><br>
80/tcp &nbsp;open &nbsp;http</span><span style=3D" font-size:12pt"> </span>=
<span style=3D" font-size:10pt;font-family:sans-serif"><br>
443/tcp open &nbsp;https</span><span style=3D" font-size:12pt"> </span><spa=
n style=3D" font-size:10pt;font-family:sans-serif"><br>
<br>
Nmap scan report for 40.113.73.59</span><span style=3D" font-size:12pt">
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
Host is up (0.038s latency).</span><span style=3D" font-size:12pt"> </span>=
<span style=3D" font-size:10pt;font-family:sans-serif"><br>
<br>
PORT &nbsp; &nbsp; STATE &nbsp; &nbsp;SERVICE</span><span style=3D" font-si=
ze:12pt">
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
22/tcp &nbsp; open &nbsp; &nbsp; ssh</span><span style=3D" font-size:12pt">
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
8080/tcp filtered http-proxy</span><span style=3D" font-size:12pt"> </span>=
<span style=3D" font-size:10pt;font-family:sans-serif"><br>
<br>
Read data files from: /home/gocnik/nmap</span><span style=3D" font-size:12p=
t">
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
Nmap done: 2 IP addresses (2 hosts up) scanned in 1.52 seconds</span><span =
style=3D" font-size:12pt">
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Raw packets sent: 6 (264B) | Rcvd:
4 (176B)</span><span style=3D" font-size:12pt"> </span><span style=3D" font=
-size:10pt;font-family:sans-serif"><br>
=3D=3D=3Dpaste end=3D=3D=3D</span><span style=3D" font-size:12pt"> </span><=
span style=3D" font-size:10pt;font-family:sans-serif"><br>
<br>
If done the usual way:</span><span style=3D" font-size:12pt"> </span><span =
style=3D" font-size:10pt;font-family:sans-serif"><br>
$ nmap -v -Pn -n -p22,80,443,8080 165.227.141.119 40.113.73.59</span><span =
style=3D" font-size:12pt">
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
[...]</span><span style=3D" font-size:12pt"> </span><span style=3D" font-si=
ze:10pt;font-family:sans-serif"><br>
Raw packets sent: 10 (440B) | Rcvd: 6 (260B)</span><span style=3D" font-siz=
e:12pt">
<br>
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
<br>
The patch is against svn trunk at this moment (revision 37608).</span><span=
 style=3D" font-size:12pt">
<br>
<br>
</span><span style=3D" font-size:10pt;font-family:sans-serif"><br>
<br>
Looking forward to all comments!</span><span style=3D" font-size:12pt"> </s=
pan><span style=3D" font-size:10pt;font-family:sans-serif"><br>
JaGoTu</span><span style=3D" font-size:12pt"> </span><span style=3D" font-s=
ize:10pt;font-family:sans-serif"><br>
<br>
P.S.: Sorry if you recieve this e-mail twice, but the previous one apparent=
ly
got caught in a moderation queue or something, as it doesn't show on </span=
><a href=3Dhttp://seclists.org/ target=3D=5Fblank><span style=3D" font-size=
:10pt;color:blue;font-family:sans-serif"><u>seclists.org</u></span></a><spa=
n style=3D" font-size:12pt">
<br>
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F<br>
Sent through the dev mailing list</span><span style=3D" font-size:12pt;colo=
r:blue"><u><br>
</u></span><a href=3Dhttps://nmap.org/mailman/listinfo/dev target=3D=5Fblan=
k><span style=3D" font-size:12pt;color:blue"><u>https://nmap.org/mailman/li=
stinfo/dev</u></span></a><span style=3D" font-size:12pt"><br>
Archived at </span><a href=3D"http://seclists.org/nmap-dev/" target=3D=5Fbl=
ank><span style=3D" font-size:12pt;color:blue"><u>http://seclists.org/nmap-=
dev/</u></span></a><tt><span style=3D" font-size:10pt">=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F<br>
Sent through the dev mailing list</span></tt><span style=3D" font-size:12pt=
;color:blue"><u><br>
</u></span><a href=3Dhttps://nmap.org/mailman/listinfo/dev target=3D=5Fblan=
k><tt><span style=3D" font-size:10pt;color:blue"><u>https://nmap.org/mailma=
n/listinfo/dev</u></span></tt></a><tt><span style=3D" font-size:10pt"><br>
Archived at </span></tt><a href=3D"http://seclists.org/nmap-dev/" target=3D=
=5Fblank><tt><span style=3D" font-size:10pt;color:blue"><u>http://seclists.=
org/nmap-dev/</u></span></tt></a><span style=3D" font-size:12pt">
<br>
<br>
<br>
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F<br>
Sent through the dev mailing list</span><span style=3D" font-size:12pt;colo=
r:blue"><u><br>
</u></span><a href=3Dhttps://nmap.org/mailman/listinfo/dev target=3D=5Fblan=
k><span style=3D" font-size:12pt;color:blue"><u>https://nmap.org/mailman/li=
stinfo/dev</u></span></a><span style=3D" font-size:12pt"><br>
Archived at </span><a href=3D"http://seclists.org/nmap-dev/" target=3D=5Fbl=
ank><span style=3D" font-size:12pt;color:blue"><u>http://seclists.org/nmap-=
dev/</u></span></a><tt><span style=3D" font-size:10pt">=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F<br>
Sent through the dev mailing list<br>
</span></tt><a href=3Dhttps://nmap.org/mailman/listinfo/dev><tt><span style=
=3D" font-size:10pt">https://nmap.org/mailman/listinfo/dev</span></tt></a><=
tt><span style=3D" font-size:10pt"><br>
Archived at </span></tt><a href=3D"http://seclists.org/nmap-dev/"><tt><span=
 style=3D" font-size:10pt">http://seclists.org/nmap-dev/</span></tt></a>
<br>
<br>
--=_alternative 004C57A2C12583D6_=--


--===============0109550062466286587==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/
--===============0109550062466286587==--