Commit Graph

585 Commits

Author SHA1 Message Date
kayos@tcp.direct 91e8cb4586
Fix: conn_bytelimit_test 2022-11-11 05:10:37 -08:00
kayos@tcp.direct 369eed2daa
Attempt to appease go vet ./ 2022-11-10 19:02:44 -08:00
kayos@tcp.direct 1679165b6b
Update CI 2022-11-10 12:20:13 -08:00
kayos@tcp.direct 3dbf28d63f
Update README.md (to trigger pipeline) 2022-11-10 12:07:49 -08:00
kayos@tcp.direct 7e7bec5310
Fix various issues found when testing 2022-11-10 12:05:48 -08:00
dabdine 48f15ef93b
Add mongodb dbnames (#332)
* Allow database names & sizes to be pulled from mongo hosts

* Use cached getListDatabases msg; remove unused code
2022-07-01 15:04:46 -06:00
David Adrian 11f0b8bd38
Remove source IP option (#356) 2022-07-01 15:03:00 -06:00
David Adrian 2405a0f37e
Bump go version in actions 2022-07-01 15:00:29 -06:00
Nils Hanke 50cb798c8e
Use original result when retry-https encounters an error (#357) 2022-07-01 14:57:43 -06:00
Jeff Cody 3fc8248931
ipp: nameLength should be uint16, not int16 (#350)
nameLength is used for slice allocation.  If the value is unmarshaled
as a negative value, then a runtime error will occur:

   runtime error: makeslice: len out of range

(this commit also includes some minor formatting cleanup)
2022-04-28 16:22:14 -04:00
Julian Kornberger e2ba515279
Add tls.Config to TLSFlags (#238) 2022-02-08 10:24:12 -05:00
Erik d753afcd25
Add brackets to IPv6 literals with standard ports (#329)
Co-authored-by: erik <fake@not.real>

https://github.com/zmap/zgrab2/pull/329
2022-02-08 10:21:53 -05:00
Andrew Marcuse 8dadfc8509
Fix link to schemas in README (#340) 2022-02-08 10:19:48 -05:00
Jeff Cody 4a6f6b51a3
smb: fix panic in ntlmssp when unmarshaling (#333)
* smb: panic in ntlmssp when unmarshaling

There are two errors here:

1. The offsets to the ParentBuf are not checked to be in-bounds
2. Types are uint64, but subtracted and compared to > 0.  This allows
   underflow during subtraction of the size.

* smb: check offset/length/size are positive after cast
2021-11-17 16:30:20 -05:00
dabdine a1fba22c6b
mongodb: Use OP_QUERY for buildinfo for wire proto < 6 (#330) 2021-10-13 06:15:25 -04:00
vl4deee11 c9a9ac1df0
Fix possible http module panic
https://github.com/zmap/zgrab2/pull/327
2021-10-12 12:44:05 -06:00
aspacewalz 00fe9ca9af
jarm: update jarm to not fail on handshake failure (#328) 2021-09-30 15:40:46 -04:00
svbatalov 11611670fe
Adds --hex option to `banner` module (#325)
Conversion of binary responses to UTF8 occasionally yields U+FFFD [replacement characters](https://en.wikipedia.org/wiki/Specials_(Unicode_block))
(see #197, #263). As a result it is not possible to restore the original response.

This introduces the `--hex` option to the `banner` module. When enabled,
the `banner` value will contain server response in hex.

Refs #197, #263

https://github.com/zmap/zgrab2/pull/325
2021-08-29 17:00:18 -06:00
Houlton McGuinn a70b93322f
remove masking of s7 protocols errors (#322) 2021-07-30 12:13:55 -04:00
Houlton McGuinn 904ea05789
add jarm-go to go.mod (#321) 2021-07-30 12:13:41 -04:00
Elliot Cubit a1d5e930ca
smb: allow dynamic length fields of exact length (#323) 2021-07-26 15:57:24 -04:00
Tom Sellers 6a8e4f5abe
README.md - minor typo correction (#320) 2021-07-19 14:15:15 -06:00
Zakir Durumeric ade0a8c420
Update README.md 2021-07-07 15:40:13 -07:00
Houlton McGuinn f9dcf9f703
Add error handling for FTP TLS handshake (#314)
Co-authored-by: Houlton McGuinn <houlton@censys.io>
2021-06-07 23:17:59 -04:00
Silas Cutler 9a23e804e3
Added JARM fingerprinting module (#282)
JARM is an active-fingerprinting technique developed by Salesforce. It was released https://github.com/salesforce/jarm and a write-up on it can be found at: https://engineering.salesforce.com/easily-identify-malicious-servers-on-the-internet-with-jarm-e095edac525a

Co-authored-by: Silas Cutler <silas@blacklab.io>
2021-06-06 19:15:28 -06:00
David Adrian daaf631ad2 Delete .travis.yaml 2021-06-06 18:57:40 -06:00
engn33r ee0da7b609
First draft of GitHub Action (#309)
https://github.com/zmap/zgrab2/pull/309
2021-06-06 18:55:53 -06:00
engn33r 577c906710
First draft of GitHub Action (#309)
This does not run the integration tests.

https://github.com/zmap/zgrab2/pull/309
2021-06-06 18:55:15 -06:00
AG ecd32d0d5d
Feature fail http to https for known status code and substrings (#308)
* Add `--fail-http-to-https` to retry as HTTPS when --retry-https is used and certain known responses are encountered indicating HTTPS should be used

* Apache: HTTP/400, substring "You're speaking plain HTTP to an SSL-enabled server port"
* NGINX: HTTP/400, substring "The plain HTTP request was sent to HTTPS port"

* Add additional substring observed indicating http->https

* Add another observed substring, adjust whitespace

* Use go-ism for slicing implicitly from index 0

Co-authored-by: Adam Greene <copyright@mzpqnxow.com>
2021-06-06 11:31:36 -07:00
Meteorite 2b6e6cb2ec
update zflags module to new version (#243)
Co-authored-by: Zakir Durumeric <zakird@gmail.com>
2021-06-06 11:30:01 -07:00
Rick van Schijndel ed21e07e04
Fix incorrect logging calls that don't do formatting (#290)
The errors can be found by running `go vet`.
Found these issues while packaging.
2021-06-06 11:27:01 -07:00
Anthr@X fcd8f0dc1c
Read probe from file (hex probe support) (#269)
* Adds TLS connection to banner module

* Adds support to read probe from file

Co-authored-by: AnthraX <anthrax1@users.noreply.github.com>
2021-06-06 11:25:09 -07:00
AG 3c55bbe861
Specify arbitrary HTTP headers (#284)
* Add support for specifying arbitrary HTTP headers

* * (Minor, Comment) Fix incorrect comment, replace with more helpful (and accurate) comment
* (Minor, Linting) Rename raw_hash => rawHash, 4 occurences (linter)
* (Minor, Linting) Rename s -> scanner, 1 occurence (linter)
* (Sanity Checking) Prevent duplicate custom headers
* (Sanity Checking) Prevent attempts to set known immutable headers (host, content-length)

* Add --custom-header-delimeter for convenience, in practice, quoting the header values that contain comma can be problematic

* Make the separator consistent for both custom-headers-names and custom-headers-values. It's just weird having them be different :>

* Spelling delimiter correctly would probably help...

* Update modules/http/scanner.go

Co-authored-by: engn33r <engn33r@users.noreply.github.com>

Co-authored-by: Adam Greene <copyright@mzpqnxow.com>
Co-authored-by: Zakir Durumeric <zakird@gmail.com>
Co-authored-by: engn33r <engn33r@users.noreply.github.com>
2021-06-06 11:17:33 -07:00
AG 5e9507cacf
[BUGFIX] Set SNI on each redirect to avoid handshake failures / incorrect server name (#306)
* Set SNI explicitly, in case it's a redirect (fix for #300)

* Fix the SNI issue correctly, using the host portion of addr, while respecting --server-name and --no-sni

* Clean up double error logging pointed out by dadrien

* Comply with RFC4366, do not set SNI server name for IP address

Co-authored-by: Adam Greene <copyright@mzpqnxow.com>
https://github.com/zmap/zgrab2/pull/306
2021-04-09 13:36:07 -06:00
David Adrian 4e047842a6 stm: go get -u, fix compile errors 2021-04-06 16:49:27 -06:00
AG 0eb497e803
Add support for specifying the "PortableCiphers" cipher-suite list added in https://github.com/zmap/zcrypto/pull/238 (#302)
Co-authored-by: Adam Greene <copyright@mzpqnxow.com>
2021-04-06 16:44:47 -06:00
Elliot Cubit 17a5257565
Add NativeOS, NTLM, and GroupName to SMBv1 results (#286)
* add smbv1 session setup scan

* remove unused values

* rename os_name to native_os to match smb documentation

* remove superfluous comment

* update zschema to include new SMB fields

* improve clarity on bounds checking for SMBv1 requests
2021-03-15 09:23:55 -04:00
vl4deee11 d3d2a3746a
Fix null results in fox module (#294)
Co-authored-by: vl4deee11 <boi4enkovlad@yandex.ru>
Co-authored-by: vl4deee11 <boi4chenkovlad@yandex.ru>
Co-authored-by: vl4deee11 <boi4enkovlad@yandex>
2021-03-12 19:49:37 -07:00
vl4deee11 0d51d0d401
fix issue 288 (#289)
Co-authored-by: vl4deee11 <boi4enkovlad@yandex.ru>
2021-03-05 09:42:32 -07:00
David Adrian 31126e97ab fix compilation error introduced by #244 merge 2021-03-04 09:03:34 -07:00
Jack Cable a9fc785eb0
Add option to flush after each line of input (#244) 2021-03-02 10:10:19 -07:00
Elliot Cubit 3c17bf32e8
Fix SMB scanner marshaller panic (#299) 2021-02-11 14:44:36 -05:00
aspacewalz d25b7ad901
fix for smtp module (#297)
The SMTP module was matching on "STMP" when verifying the contents of the scan response. This PR fixes the typo and adds a test for the VerifySMTPContents() function.
2021-02-05 07:29:14 -05:00
Benjamin Wireman d9ed4f141d
improves http body decoding and enforces max length (#295)
https://github.com/zmap/zgrab2/pull/295
2021-02-03 10:56:32 -05:00
Jeff Cody 3613392bf0
telnet: Optionally return result even on error (#277)
Even if the server does not respond to the telnet commands, the
banner may have useful information.  Add the option "--force-banner"
so that the banner string may be returned even on failure.
2020-10-30 10:06:46 -04:00
grace-murphy 8aa9230e29
[DATA-970] Increase buffer size in FTP scanner (#279) 2020-10-21 14:25:43 -04:00
justinbastress dae700ea10
Merge pull request #275 from twschum/http-decoded-hash
Add option to compute http BodySHA256 on decoded BodyText

NOTE: CI errors are preexisting pop3 issues
2020-09-18 11:39:12 -04:00
Tim Schumacher 66c842d234 Put body_length behind flag to zschema 2020-09-18 11:01:46 -04:00
Tim Schumacher c034bb26a1 Use hash setting on getCheckRedirect 2020-09-17 17:14:23 -04:00
Tim Schumacher fc82b6b673 Capture BodyTextLength 2020-09-17 15:01:27 -04:00