Commit Graph

42 Commits

Author SHA1 Message Date
bwireman
27e6033b03 fix schema in redis for nonexistent_response being required 2019-09-06 11:00:30 -04:00
Ricky Diaz Gomez
67fbf1facb Redis: Store the major, minor, and patchlevel as ints as well as the whole version as a string 2019-06-28 15:54:11 -04:00
Ricky Diaz Gomez
2495ff6a8c Redis: Changed casing of 'redis' within schema 2019-06-21 16:16:14 -04:00
Ricky Diaz Gomez
bcaf844200 Redis: Made check so that if line_prefix_suffix only contains prefix, adds empty string to suffix index 2019-06-21 16:14:13 -04:00
Ricky Diaz Gomez
d6059c655d Redis: Updated the testdata 2019-06-20 17:30:01 -04:00
Ricky Diaz Gomez
84ffc2c667 Redis: Updated the break condition when looking for fields within info_response 2019-06-20 12:17:26 -04:00
Ricky Diaz Gomez
f3184857b4 Redis: Updated testdata 2019-06-19 16:15:52 -04:00
Ricky Diaz Gomez
4446024636 Redis: Changed commandMappings to map[string]string, fixed QUIT err=io.EOF bug, and capture redis_mode now 2019-06-19 16:06:43 -04:00
Ricky Diaz Gomez
d9ccfe88f6 Redis: Updated testdata 2019-06-19 13:02:20 -04:00
Ricky Diaz Gomez
e12f32b521 Redis: Now gather the OS the server is running 2019-06-19 09:51:40 -04:00
Ricky Diaz Gomez
5be58b2b0d Redis: Actually send the custom commands and store the responses. Also updated the zschema 2019-06-17 17:32:51 -04:00
Jeff Cody
6e38ec3e72
SMB: Fix typos in schema (PR204 review)
@justinbastress noted a couple of typos in the schema file, and
suggested a doc addition.
2019-05-29 16:15:04 -04:00
Jeff Cody
37bb923ce4
SMB: Parse capabilties flags for the server
This parses the capabilities flags for the server, masking off invalid
flags based on dialect.

While both the NegotiationLogs and SessionSetupLog contain capabilities
flags, we extract the flags from the NegotiationLogs to represent the
server, as it is explicitly stated in [MS-SMB2] that those are the ones
that represent the capabilities of the server.
2019-05-24 15:47:22 -04:00
Jeff Cody
79a96f08ae
SMB: Parse SMB Versions and Dialects.
This parses the SMB Version response, and the dialect, to determine the
full SMB version.  This is done in accordance to "[MS-SMB2] - v20190430"
from Microsoft, Section 2.2.4.
2019-05-24 15:47:10 -04:00
AnthraX1
bcc4b05d6c Add custom regexp banner grabber (#199)
https://github.com/zmap/zgrab2/pull/199
2019-04-11 17:29:34 -04:00
justinbastress
808dd3e528 ssh schema updates (re #176) (#187) 2019-02-23 10:47:11 -08:00
David Adrian
65a215407a Use Python 3 compatible imports in schemas 2019-01-07 11:58:59 -05:00
justinbastress
407a953537 make IPP types IndexedBinary (#183)
https://github.com/zmap/zgrab2/pull/183
2018-12-02 22:14:17 -05:00
parkanzky
264b811a72
Merge pull request #156 from zmap/paul/mongodb
Add MongoDB scanner.
2018-08-22 13:54:28 -04:00
Paul A. Parkanzky
d9aec0ae40 Improve partial results for mongodb scanner
* Separate out isMaster and buildInfo commands
* Return results of both in separate sub-structs
* Include isMaster results regardless of whether buildInfo succeeds
2018-08-22 11:49:17 -04:00
Justin Bastress
a139cc9349 add missing 'constraint' field for postgres_error 2018-08-22 10:07:59 -04:00
Paul A. Parkanzky
7419796cfc Address more PR comments
* Add error message to invalid BSON log msg
* Use snake case for json output
* Update affect integration tests
2018-08-21 16:34:35 -04:00
Paul A. Parkanzky
8b9c23f122 Fix typo and integration test which tested for it 2018-08-21 16:01:40 -04:00
Paul A. Parkanzky
2f316b2242 Add mongodb integration tests. 2018-08-21 13:11:34 -04:00
Chris Dzombak
d8bba99313
Stop marking fields as “required” (#158)
This causes problems when trying to load data into BigQuery if, for example, an entire protocol or subrecord is unpopulated.
2018-08-21 12:33:26 -04:00
Justin Bastress
ecbd12f11a note source location 2018-08-20 12:04:35 -04:00
Justin Bastress
1e4f4b9b51 Enums are Strings, but this value is actually a uint32 2018-08-20 12:03:18 -04:00
justinbastress
e3e5189068 Replace Strings with WhitespaceAnalyzedStrings
https://github.com/zmap/zgrab2/pull/155
2018-08-14 14:37:39 -04:00
Clayton Zimmerman
8318aae089
Changes CertType's id field to an Enum of strings, as ES expects. (#154) 2018-08-03 13:59:05 -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
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
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
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
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
Clayton Zimmerman
b076c7b005 Boilerplate for IPP scan module. 2018-06-07 15:13:01 -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
c35a9f29e2 add missing _unknown_error_tag to postgres error schema 2018-05-31 10:56:16 -04:00
Justin Bastress
a14f3dc584 include negotiated encrypt_mode 2018-05-22 17:06:48 -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
1e4ec64650 schemas.zgrab2 -> zgrab2_schemas 2018-05-04 11:15:09 -04:00