Commit Graph

427 Commits

Author SHA1 Message Date
Clayton Zimmerman
dc3d7d1cb7 Adds bounds checks to avoid panic when value-less attributes have the correct name to be recorded directly in results. 2018-07-11 14:57:22 -04:00
Clayton Zimmerman
9d1265db8b Avoids skipping retry when an application error is encountered. 2018-07-11 14:45:46 -04:00
Clayton Zimmerman
6cffb7a888
IPP: document output fields (#151)
Documents fields of IPP scan results in schema.
2018-07-11 13:31:34 -04:00
justinbastress
96d3b8375f
Merge pull request #152 from zmap/feature/ipp-tls-retry
Try TLS before plaintext when using ipps-retry
2018-07-11 13:08:40 -04:00
Clayton Zimmerman
2c47dfc1f2 Makes Attributes default output (rather than debug). 2018-07-11 11:52:13 -04:00
Clayton Zimmerman
f9eb6e00db Rename tls-retry option to ipps-retry 2018-07-11 10:38:42 -04:00
Clayton Zimmerman
b407bb2aaf
Fix read all attributes (#150)
Parses empty attribute-groups correctly by skipping to the next one.
Also, compensates for change in Scanner.config.BaseFlags.Timeout's type.
2018-07-10 17:10:39 -04:00
clayzim
1fa9b886e4 Changes TLS-Retry to attempt TLS before plaintext, ideally gathering more information. 2018-07-10 16:07:28 -04:00
Chris Dzombak
d406a85a58 Add Python gitignore entries (#149) 2018-07-10 14:18:41 -05:00
clayzim
3fa42bef49 Parses empty attribute-groups correctly by skipping to the next one. 2018-07-10 15:16:30 -04:00
clayzim
544652de9d Resolves merge conflict to fix timeouts. 2018-07-10 15:10:24 -04:00
justinbastress
a05ff49d39
Merge pull request #148 from zmap/jb/fix-ipp-timeout
BaseFlags.Timeout is already a duration
2018-07-10 14:51:00 -04:00
Justin Bastress
2a4ffcc3d9 BaseFlags.Timeout is already a duration 2018-07-10 14:25:25 -04:00
clayzim
e77e11cb7f Compensates for change in Scanner.config.BaseFlags.Timeout's type. No longer casts to time.Duration. 2018-07-10 14:05:20 -04:00
Clayton Zimmerman
c11be290dc
Feature/IPP: Fix Retry-TLS and Collect All IPP Attributes (#143)
* Correctly enables TLS only during retry grab when retry-tls flag is set.
* Fixes evaluation which caused too many arguments error in IPP integration test.
* Updates IPP zgrab2 schema to reflect storing all attributes in response.
* Adds Attributes member to ScanResults
* Ensures tryReadAttributes only reads attributes in the case of a postive detection. Cleans up isIPP
* Reads all attributes in IPP response
* Detects invalid length errors when reading IPP attributes.
* Returns the correct amount of uris, ipp versions, and cups versions in ScanResults.
2018-07-09 14:39:54 -04:00
Alex Halderman
db6bf4c8b6
Merge pull request #144 from zmap/ah/io_module
Input/output extensibility
2018-07-05 13:21:29 -04:00
Alex Halderman
1f5e4b0f22 Provides a framework for modularized target input and result output functions. 2018-07-05 12:41:34 -04:00
Alex Holland
4f046b3085 Implement timeout to accept float value (#111)
* Implement timeout as a float value vs int

* remove unnecessary second multiplier

* whoops, missed one

* Switch type to time.Duration

* Fixup integration tests, change default and description

* Whoops, bad merge

* fix build
2018-07-02 13:00:45 -04:00
Alex Halderman
a3a1d7edd1
Merge pull request #141 from zmap/ah/trigger
Add support for Tags and Triggers.
Add proper CSV input.
2018-06-29 12:27:20 +02:00
J. Alex Halderman
3e05503266 Trigger Travis 2018-06-29 06:07:58 -04:00
Alex Halderman
cdda65204e
Restore mult.ini
This file shouldn't have changed in the PR.
2018-06-29 11:46:52 +02:00
Alex Halderman
674475c6c0
Update README.md
Update README to document CSV input format and tag/trigger usage.
2018-06-29 11:36:10 +02:00
Justin Bastress
3e76d14900 use standard method to get host in SSH scanner 2018-06-28 16:52:29 -04:00
Justin Bastress
ccbf497b84 resolve conflict with utility.go 2018-06-28 16:05:48 -04:00
justinbastress
724d02d90d read full banners (#103)
* read full banners

* account for cases where smaller packets are returned
2018-06-28 15:06:39 -04:00
Zakir Durumeric
681d6e0a56
Merge branch 'master' into ah/trigger 2018-06-28 15:05:12 -04:00
Clayton Zimmerman
9bbd62a5b6
(IPP) improve scan output (#140)
* Refactors sending IPP request and handling errors thereof into sendIPPRequest()

* Adds dependency of IPP zgrab2 schema on HTTP zgrab2 schema.

* Refactors out trying to grab with multiple versions into re-usable function.

* Determines whether to output nil result in a concise and accurate manner.

* Refactors reading attributes present in IPP response to its own function. Calls that in Grab and augmentWithCUPSData. Formats code using Go fmt.

* Rejects successful non-IPP responses with protocol error. Reports HTTP errors.

* Removes circular dependency upon http zgrab2 schema.

* Changes name of objects to make IPP schema actually work.
2018-06-28 14:58:40 -04:00
justinbastress
713150b089 merge client/server header list (#134)
* merge client/server header list

* fix formatting of header.go
2018-06-28 14:46:19 -04:00
justinbastress
77ed2ea3f4 support ScanTarget.IP/Domain being set correctly (#142)
* support ScanTarget.IP/Domain being set correctly

* add godocs on ScanTarget.Host
2018-06-28 14:44:08 -04:00
Alex Halderman
f5fdb4985b end 2018-06-28 08:10:25 -04:00
Alex Halderman
1147e936f9 Switch input processing to CSV and add tests 2018-06-28 08:04:50 -04:00
Alex Halderman
938d6eb28d Switch input processing to CSV and add tests 2018-06-28 07:35:06 -04:00
J. Alex Halderman
bd8dc957ed mend 2018-06-27 14:07:07 -04:00
Alex Halderman
0c597e5a8d
Merge branch 'master' into ah/trigger 2018-06-26 17:53:20 -07:00
J. Alex Halderman
0c8413c8cd mend 2018-06-26 13:59:36 -04:00
J. Alex Halderman
cd2070d3bc mend 2018-06-26 13:57:28 -04:00
J. Alex Halderman
9df97e03cf Add support for tags and triggers. 2018-06-26 13:51:10 -04:00
Clayton Zimmerman
9b00db7f29
Feature/create ipp module (#137)
* Changes grab to return *ScanResults. Implements ippInContentType correctly.

* Slots in an operational re-working of several HTTP module functions, and adds dependency on zgrab's http module. Includes some laregly copy-pasted sections worthy of scrutiny.

* Adds support to retry failed HTTP over HTTPS. Removes vestigial functions.

* Implements sending CUPS-get-printers request if CUPS is detected, yielding more detailed & accurate version information. Also handles URI's more correctly.

* Creates separate container to run IPP over TLS on CUPS. Runs basic tests against both containers.

* Creates virtual printer on each container to test for augmenting data with CUPS-get-printers request (which only works when printers exist).

* Augments version information with CUPS-get-printers response if possible.

* Allows specifying IPP version in constructed requests. Checks for version-not-supported server error.

* Allows resending IPP requests with different versions if we hit a version-not-supported error.

* Updates IPP zgrab2 schema to include fields added in modules/ipp/scanner.go

* Removes unnecessary TODO's

* Updates testable example for new definition of AttributeByteString

* Removes versionNotSupported's dependency on bufferFromBody. Checks bounds on generated requests' fields correctly.

* Updates zgrab2 IPP schema to match ScanResults object in modules/ipp/scanner.go

* Corrects IPP tests, bounds checking, zgrab schema formatting.

* Logs errors for unexpected behavior in buffer io operations. Updates schema to include standalone fields for attributes described in CUPS-get-printers response.

* Logs at debug level only when verbose flag is set. Prints accurate error message when CUPSVersion test fails.

* Handles HTTP request errors before checking for nil response/body. Fixes and tests convertURIToIPP.
2018-06-26 12:00:27 -04:00
justinbastress
14e67e9a23
Merge pull request #139 from myvyang/master
Make new.sh compatible with OSX
2018-06-22 09:22:29 -04:00
linus torvalds
baa8744ae5 compatible new.sh with OSX 2018-06-22 11:28:45 +08:00
justinbastress
698dd951bc
Merge pull request #136 from zmap/feature/allowDebugOutput
Add a global --debug flag to include zgrab:debug output
2018-06-19 09:31:24 -04:00
Justin Bastress
1d8475ff32 reformat config.go 2018-06-18 16:44:09 -04:00
Justin Bastress
952dd2ef78 Add a global --debug flag which specifies that zgrab:debug output should be included 2018-06-18 15:18:25 -04:00
Clayton Zimmerman
7252022b2b
Merge pull request #135 from zmap/feature/create-ipp-module
Initial implementation of IPP scan module
2018-06-13 15:45:14 -04:00
Clayton Zimmerman
2afd7d8a2d Addresses comments from pull request #135. Makes ipp Dockerfile conform to best practices. Makes reference to IPP RFC where appropriate. 2018-06-12 17:00:52 -04:00
Clayton Zimmerman
ffaeeab0f1 Cleans up TODOs and includes more results to collect from scans. 2018-06-12 09:27:45 -04:00
justinbastress
0a16c7feb6
Merge pull request #130 from zmap/feature/ssh-kex-omitempty
Omit empty values in ssh ECDH kex
2018-06-12 09:11:43 -04:00
Clayton Zimmerman
e46f988d28 Configures docker container to run scanner correctly. 2018-06-11 16:52:26 -04:00
Clayton Zimmerman
6456dda5e1 Implements basic scanning, without checking for correct protocol. 2018-06-11 12:02:42 -04:00
Clayton Zimmerman
84100ce1b8 Makes necessary initial changes so Dockerfile and testing scripts install and run cups. 2018-06-11 11:53:07 -04:00