Commit Graph

342 Commits

Author SHA1 Message Date
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
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
Clayton Zimmerman
b076c7b005 Boilerplate for IPP scan module. 2018-06-07 15:13:01 -04:00
Andrew Sardone
1f381fb22f
Feature/fix new module script (#127)
* Fix new.sh, add sample container setup; add apt-update target for zgrab2_service_base

* make base-apt-update a phony target

https://github.com/zmap/zgrab2/pull/127
2018-06-04 10:31:18 -04:00
justinbastress
27b68177be
Merge pull request #131 from zmap/dadrian/schema-fixes-bq
Make auth mode enum optional
2018-06-01 10:34:02 -04:00
David Adrian
b9fdae7774 Make auth mode enum optional
This gets lifted out of the subrecord in other schemas, which makes it
optional in them. This is the easiest way to fix that, although it is
indicative or an underlying problem.
2018-06-01 10:30:54 -04:00
Justin Bastress
320f6f4a8a in SSH kex ECDH JSONLog, don't create a field unless it's going to be populated (to allow omitempty to work properly) 2018-05-31 16:29:59 -04:00
justinbastress
ee93d7171f
Merge pull request #128 from zmap/feature/add-unknown-error-tag-to-postgres-error
add missing _unknown_error_tag to postgres error schema
2018-05-31 11:23:27 -04:00
Justin Bastress
c35a9f29e2 add missing _unknown_error_tag to postgres error schema 2018-05-31 10:56:16 -04:00
Justin Bastress
1ebac1da5e make base-apt-update a phony target 2018-05-30 12:08:08 -04:00
Justin Bastress
2b8f04234e Fix new.sh, add sample container setup; add apt-update target for zgrab2_service_base 2018-05-30 12:07:24 -04:00
justinbastress
84101fbb54
Merge pull request #126 from zmap/feature/postgres-output-format
Postgres: Output format tweaks
2018-05-29 16:27:14 -04:00
Justin Bastress
01cd84926e Strip/cap the output value length; include output error in cases where format was not expected 2018-05-25 17:01:31 -04:00
justinbastress
ecd60043ee
Merge pull request #123 from zmap/feature/fix-mssql-error-return
handshakeErr, not err
2018-05-23 08:55:23 -04:00
Justin Bastress
71090d71b3 handshakeErr, not err 2018-05-22 18:23:19 -04:00
justinbastress
90ec19c371
Merge pull request #122 from zmap/feature/add-root-encrypt-mode
MSSQL: include negotiated encrypt_mode
2018-05-22 18:17:24 -04:00
Justin Bastress
a14f3dc584 include negotiated encrypt_mode 2018-05-22 17:06:48 -04:00
justinbastress
54812168d4
Merge pull request #121 from zmap/feature/more-omit-empty
Feature/more omit empty
2018-05-22 16:40:56 -04:00
Justin Bastress
05841e9ab4 raw_packets is debug; server_version is omitempty 2018-05-22 16:05:56 -04:00
Justin Bastress
434ccaa3f4 make all debug fields omitempty; make capability_flags/status_flags omitempty, in the aux type as well. 2018-05-22 16:03:00 -04:00
Chris Dzombak
c3ffa3ede5
Merge pull request #120 from zmap/feature/address-issuers
Address zgrab2 issues
2018-05-21 14:10:54 -04:00
Justin Bastress
486dc517a3 fix required/non-required in schemas; add error_ids, and code to get them; throw ERRPacket as APPLICATION_ERROR 2018-05-21 12:15:17 -04:00
Justin Bastress
89e0e956d5 MSSQL: Strip null terminator from instance_name; changeInstanceName to a pointer to distinguish the empty names (e.g. just a null terminator) from no name being returned. 2018-05-18 15:25:08 -04:00
justinbastress
2bd2d7768c
Merge pull request #119 from zmap/feature/fix-postgres-memory-error
Fix Postgres memory usage issue
2018-05-18 09:19:13 -04:00
Justin Bastress
f3437bbc62 don't log full packet; don't create packet until returning 2018-05-17 14:36:51 -04:00
justinbastress
e44863ac7f
Merge pull request #118 from zmap/feature/golang-profiling
lower max packet size to 512k, not 128MB
2018-05-15 17:45:32 -04:00
Justin Bastress
3ffbf89c36 lower max packet size to 512k, not 128MB. Add maximum on number of packets as well. 2018-05-15 15:47:14 -04:00
justinbastress
5da0d217bb
Merge pull request #117 from zmap/feature/golang-profiling
fix packet length calculation
2018-05-15 14:50:56 -04:00
Justin Bastress
bf1d74483e fix packet length calculation 2018-05-15 14:16:51 -04:00
justinbastress
77eea31a48
Merge pull request #116 from zmap/feature/golang-profiling
ZGrab2 pre-release bugfixes
2018-05-15 13:20:54 -04:00
Justin Bastress
88707e7a87 fix comment typo 2018-05-14 14:48:48 -04:00
Justin Bastress
531ba31c34 Add memory and CPU profiling (if ZGRAB_[MEM/CPU]PROFILE is set); add upper bound on data read from postgres 2018-05-14 11:24:25 -04:00
Justin Bastress
b5fbfcc690 ensure postgres connections get closed 2018-05-11 14:01:10 -04:00
Justin Bastress
e4388ad861 handle server returning < 2 bytes 2018-05-11 12:21:11 -04:00
Justin Bastress
7dc895a975 fix logrus collision 2018-05-11 11:52:08 -04:00
Justin Bastress
0cfc4bdff3 lower log level of per-scan errors 2018-05-11 11:45:59 -04:00
Justin Bastress
e77866dfea loglevel fixes 2018-05-11 11:43:08 -04:00