1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-10 09:49:05 +00:00
Commit Graph

1614 Commits

Author SHA1 Message Date
batrick
1f7c51a85d Reverted a change made to mutex("running") documentation concerning the
return value (someone changed it to "returns an identification string"
when in fact it returns a thread).
2008-08-02 21:21:33 +00:00
michael
4a7022bf04 Updated as per Davids request. I misinterpreted what David said and made a change, when he really meant for me to suggest the change in the mailing list rather then just committing it. 2008-08-02 20:42:11 +00:00
michael
64219d7e41 Change suggested by Fyodor 2008-08-02 20:05:38 +00:00
michael
aaf2a60970 Fixed typo from previous patch 2008-08-02 19:45:04 +00:00
michael
a4542861a8 Nmaps XML output will now report that an idle scan has occurred in the 'scaninfo' element when applicable. 2008-08-02 19:28:30 +00:00
pgpickering
d6066bb332 fixed bug in snma.lua: fetchResponseValues(): wrong "local" when decoding 2008-08-02 10:40:03 +00:00
pgpickering
7c4db4f2ee silenced signed/unsigned warnings in nse_binlib.cc 2008-08-02 10:35:28 +00:00
kris
910cb5ca48 Moving block_socket() and unblock_socket() from Nmap to Nbase for reuse in
Nsock and Ncat
2008-08-02 03:44:35 +00:00
pgpickering
178a40f281 updated NSEDoc documentation for snmp.lua, pop3.lua, base64.lua 2008-08-01 20:33:56 +00:00
fyodor
9a9523a93d add apt-cacher service 2008-08-01 08:26:35 +00:00
david
6c506e5c5b CHANGELOG entry for IP protocol ping probe fix. 2008-08-01 00:20:29 +00:00
david
901915dfbc Simplify and fix the logic surrounding the handling of host discovery
probes, especially IP protocol probes.

Previously if IP protocol ping (-PO) was used anywhere in a host
discovery scan, any response was treated as a protocol response. (The
handlers for other response types had an explicit check for this.) This
means that if you did

nmap -PS -PO

and got back a SYN/ACK in response to the -PS probe, it would be marked
with a reason of proto-response rather than syn-ack. Now, because the IP
protocol response handler matches so broadly, it is given the last
chance at handling a response, only if no interpretation makes sense.
Now the aforementioned scan will give a reason of syn-ack.

The old behavior was not only misleading with respect to reasons, it had
a minor and subtle bug. Consider the following packet trace:

SENT (2.0990s) TCP 192.168.0.21:42205 > target:25 S ttl=40 id=39342 iplen=44  seq=114128202 win=1024 <mss 1460>
SENT (2.2560s) TCP 192.168.0.21:42205 > target:53 S ttl=40 id=51247 iplen=44  seq=114128202 win=1024 <mss 1460>
SENT (2.3280s) TCP 192.168.0.21:42206 > target:25 S ttl=37 id=31111 iplen=44  seq=114062667 win=2048 <mss 1460>
RCVD (2.3530s) TCP target:53 > 192.168.0.21:42205 SA ttl=51 id=0 iplen=44  seq=4159224453 win=5840 ack=114128203 <mss 1460>
ultrascan_host_probe_update called for machine target state UNKNOWN -> HOST_UP (trynum 1 time: 25123)
Ultrascan DROPPED probe packet to target detected
Changing ping technique for target to tcp to port 25; flags: S

Why is the received packet marked as a drop? And why is the ping
technique change to SYN to port 25 when the response came back from port
53? The reason is that the IP protocol response handler caught the probe
and decided it was in response to one of the sent TCP probes--any of the
TCP probes. It selected the probe to port 25 essentially at random and
used that as the relevant probe. The result is that a drop is wrongly
recorded (slowing down the scan), and a worse than useless ping probe is
used (worse than useless because it will cause another drop any time
it's used).

I found this while trying to emulate PortBunny's default ping scan,
which is
-PS80,25,22,443,21,113,23,53,554,3389,445 -PA3333,11 -PE -PP -PU161,162 -PO51
though not in the same order Nmap uses.
2008-08-01 00:08:47 +00:00
pgpickering
0b542cb755 added brutePOP3.nse 2008-07-31 22:55:28 +00:00
pgpickering
5dc92c3c58 added popcapa.nse 2008-07-31 22:55:05 +00:00
pgpickering
5e44f53b8d added SNMPcommunitybrute.nse 2008-07-31 22:54:40 +00:00
pgpickering
3fae2b9fdd modified SNMPsysdesr.nse to use the SNMP library 2008-07-31 22:54:20 +00:00
pgpickering
88c80f73a3 added pop3.lua 2008-07-31 22:51:45 +00:00
pgpickering
d769960f42 added snmp.lua 2008-07-31 22:51:34 +00:00
pgpickering
a37dfa7f3e added base64.lua 2008-07-31 22:49:39 +00:00
fyodor
90cb66aae4 trivial rewording, typo fixing, etc. 2008-07-31 21:50:15 +00:00
pgpickering
3398e1f94e modified nse_init.cc, added binlib and hashlib to NSE 2008-07-31 14:21:28 +00:00
pgpickering
f07cebb87f modified nmap.vcproj, added binlib and hashlib for NSE 2008-07-31 14:20:45 +00:00
pgpickering
78d3be0968 modified Makefile.in, added binlib and hashlib for nse 2008-07-31 14:20:10 +00:00
pgpickering
177de9e877 added nse_binlib.cc: bin.pack() and bin.unpack() 2008-07-31 14:19:23 +00:00
pgpickering
da51facaa6 added nse_binlib.h 2008-07-31 14:18:21 +00:00
pgpickering
a8a470ea59 added nse_hash.cc, hash-functions for nse 2008-07-31 14:17:41 +00:00
pgpickering
ddb81fe158 added nse_hash.h 2008-07-31 14:17:12 +00:00
batrick
35553f80bd [NSE] Added fix for deadlocks on sockets. Now, 10 or max.parallelism threads
can have as many sockets open as they need. Previously, only 10 sockets could
be open.

See: http://seclists.org/nmap-dev/2008/q3/0130.html
2008-07-31 07:35:19 +00:00
batrick
f8059d931e [NSE] Added an error check for loading a file. 2008-07-31 07:30:39 +00:00
fyodor
e198b0fa4a mostly just word wrapping changes back to 4.60 release (to max 70 chars) 2008-07-31 04:33:50 +00:00
kris
2dd62530e5 o Updated zoneTrans.nse to replace length bytes in returned domain names to
periods itself rather than relying on NSE's old behavior of replacing non-
  printable characters with periods.  Thanks to Rob Nicholls for reporting the
  problem. [Kris]
2008-07-31 03:49:25 +00:00
michael
2a31e712da Added more documentation and a warning to ASN.nse 2008-07-30 21:39:29 +00:00
kris
9d54506dc2 little fix to make --max_rate (underscore) work 2008-07-30 04:06:22 +00:00
fyodor
a2c8e87ddf fix wrong function name noted by Tom Sellers 2008-07-30 00:27:59 +00:00
david
25215ce9ba Add --max-rate to go with --min-rate. 2008-07-30 00:15:57 +00:00
fyodor
c0e4374b0f update CHANGELOG to reflect nsock fix related to dealing with individual UDP packets rather than concatenating them together in a buffer 2008-07-30 00:00:59 +00:00
david
69f67ad49e Remove byte-order mark from the beginning of CHANGELOG. 2008-07-29 23:33:46 +00:00
kris
de4a980a39 o Fixed a segmentation fault in Nsock which occurred when calling nsock_write()
with a data length of -1 (which means the data is a NULL-terminated string
  and Nsock should take the length itself) and the Nsock trace level was at
  least 2. [Kris]

This occurs because memcpy() is called with datalen as it's length argument and
then fails.

Another noticable change is that instead of saying a write request of -1 bytes
was registered, it now prints the correct length.
2008-07-29 21:02:30 +00:00
michael
d01c5071cd Nmap will no longer misreport a localhost-response during PN scans, it will now be reported as 'user-set'. 2008-07-29 17:01:31 +00:00
batrick
e74d43097d Fixed some poor grammar in a comment. 2008-07-29 05:12:34 +00:00
batrick
909b47f492 [NSE] Unprintable characters are now printed as "\xXX" where XX is the hexidecimal
representation of the character. (See: http://seclists.org/nmap-dev/2008/q3/0180.html)
2008-07-29 03:48:06 +00:00
fyodor
b6b1d5916a add iPhone port 62078 - if anyone has more information about this port which would be useful for the entry, let me know. It seems to be used for syncing, so I called it iphone-sync for now. 2008-07-28 17:19:19 +00:00
fyodor
338a19ba4f updated to allow RateMeter::update to accept time decreases up to 5ms rather than a 1ms limit, as I just had a crash where now=1217210189.144224; last_update_tv=1217210189.148486. I still think this may be a bug in my SMP Linux kernel. But if it affects me, probably affects others. 2008-07-28 03:34:19 +00:00
kris
a285f82299 o The NSE Comm library now defaults to trying to read as many bytes as are
available rather than lines if neither the "bytes" nor "lines" options are
  given.  Thanks to Brandon for reporting a problem which he noticed in the
  dns-test-open-recursion script. [Kris]
2008-07-28 01:47:26 +00:00
michael
7bb32b409f Added a script to query ASNs, it still needs a bit of work(like some way to get dns server ip's) but it works and Team Cymru set up a special domain jsut for nmap :) 2008-07-27 20:17:13 +00:00
david
f0d21f4c16 svn:ignore some files in libpcap that are generated by a static RPM build. 2008-07-27 19:17:09 +00:00
david
356c01eec8 Include the new .desktop files in zenmap.spec.in. 2008-07-27 19:15:24 +00:00
batrick
b0a62d2aca Applied Jah's patch to fix --script-updatedb use of an old index for the
script table.

http://seclists.org/nmap-dev/2008/q3/0164.html
2008-07-27 02:55:31 +00:00
kris
5f2e6cf5ac Fixing a Windows casting-related compilation error. Thanks to Jah for reporting this 2008-07-26 02:58:07 +00:00
kris
332e8aa176 (The last paragraph of this message has an implementation re-work suggestion)
o Fixed host discovery probe matching when looking at the returned TCP data in
  an ICMP error message.  This could lead to incorrectly discarded responses
  and the debugging error message: "Bogus trynum or sequence number in ICMP
  error message" [Kris]

Fyodor was getting the error message "Got ICMP error with a TCP header that was
too short" while scanning, and looked at the code to see a comment I made about
requiring 12 bytes of TCP data in an ICMP error message instead of the minimum
RFC requirement of 8 bytes.

I made this comment and requirement because tcp_trynum_pingseq_decode() was
being called on the TCP data, and was using the ACK field (which is just past
the 8 byte range).  However, upon further inspection, we came to the conclusion
that this code was broken because examining the ACK field should only be done
on a TCP response, not on our own probe (which is what we're looking at in the
ICMP data).

This assumes that -g is used (the only reason that the SEQ/ACK is checked since
the source port number is used otherwise), but the code is also broken without
it because the *_decode() function checks the destination port number rather
than the source port (which should be checked since it's our own probe we're
looking at).

So I've removed the 12-byte requirement and pingseq checking calls, and just
check that the received SEQ number matches the probe SEQ number.


Should we just work with the SEQ/ACK matching when using TCP and leave the
pingseq/trynum port number encoding to UDP?  This means behavior won't change
with the use of -g, and it should be guaranteed to be there since we'll only
be looking at whole TCP headers rather than any smaller chunks.  Plus, the SEQ
number is already getting encoded with the pingseq/trynum info, we're just not
decoding the ACK responses unless -g is used.
2008-07-26 00:25:24 +00:00