Commit Graph

90 Commits (a140a4194e2a521ecac5bffb03573e6a120c4ad6)

Author SHA1 Message Date
Tarun Koyalwar ead58f4ab9
implicit thread count when not specified in payloads + threads support in dns,network (#4715)
* default threads + add threads support in dns payloads

* add threads support in network protocol

* add optional callback to override threadSetter

* fix broken fuzz integration tests
2024-02-02 02:05:30 +05:30
Tarun Koyalwar e4298a5ae1
fix misc issues with -as (#4714) 2024-02-02 01:48:22 +05:30
xxcdd 8d904709c0
HybridTechDetection with wappalyzer and tech templates. (#4656)
* HybridTechDetection with wappalyzer and tech templates.

* automatic scan: refactor + misc updates

* fix progress multi init panic

* fix no result found statement

* fix target in print statement

* include detect,favicon tags as part of detection

---------

Co-authored-by: Tarun Koyalwar <tarun@projectdiscovery.io>
2024-02-01 12:49:20 +05:30
Dogan Can Bakir 5f4dcfb6be
use projectdiscovery/useragent (#4708)
* use projectdiscovery/useragent

* minor
2024-02-01 03:12:38 +05:30
Tarun Koyalwar 93b66af9fb
mysql: ignore warning log + misc updates (#4702) 2024-01-31 02:32:23 +05:30
Tarun Koyalwar 5bd9d9ee68
memory leak fixes and optimizations (#4680)
* feat http response memory optimization + reuse buffers

* update nuclei version

* feat: reuse js vm's and compile to programs

* fix failing http integration test

* remove dead code + add -jsc

* feat reuse js vms in pool with concurrency

* update comments as per review

* bug fix+ update interactsh test to look for dns interaction

* try enabling all interactsh integration tests

---------

Co-authored-by: mzack <marco.rivoli.nvh@gmail.com>
2024-01-31 01:59:49 +05:30
monitor c32acd0921
Fix: sometimes dnslog request record is uppercase caused by nuclei templates uneffective (#4697)
* Fix: sometimes dnslog request record is upper caused by cannot validate vuln

* convert request to lower for dns only

---------

Co-authored-by: daiwei11 <daiwei11@baidu.com>
Co-authored-by: Tarun Koyalwar <tarun@projectdiscovery.io>
Co-authored-by: Tarun Koyalwar <45962551+tarunKoyalwar@users.noreply.github.com>
2024-01-31 01:30:03 +05:30
Tarun Koyalwar c7c35ffb94
fix multiple mem leaks + optimizations (#4630)
* fix mem leak

* bump version tag

* http: add  global resp body read limit of 4MB

* skip creating templateCtx in normal templates

* fix mem leak via retryablehttp , fastdialer

* go mod tidy

* remove unused var

* dep update

---------

Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
2024-01-18 05:53:42 +05:30
Tarun Koyalwar a677fca192
misc improvements in js protocol execution (#4643)
* js protocol  timeout using -timeout flag

* fix zgrab smb hang

* fix lint error

* custom timeout field in js protocol

* minor update: bound checking

* add 6 * -timeout in code protocol by default
2024-01-18 04:39:15 +05:30
Dogan Can Bakir 76f7c0c903
fix panic in interactsh process interaction ( nil check on compiled operators) (#4511)
* nil check

* misc updates

---------

Co-authored-by: Tarun Koyalwar <tarun@projectdiscovery.io>
2024-01-13 03:24:52 +05:30
Tarun Koyalwar a8cdd21120
code: fix variables merge order (#4623)
* fix variables merge order

* format screen: quote and trim extracted result

* code: interpret env vars in debug mode

* update integration test
2024-01-12 23:10:00 +05:30
Tarun Koyalwar 1d246329ea
add logical check before creating result: #4603 (#4608) 2024-01-10 16:34:40 +05:30
Tarun Koyalwar 02a9b86dd7
fix missing results in flow template + feature: internal matchers using `internal: true` (#4582)
* log warnings + use scanContext in flow

* refactor flow to use scanContext + log all events

* feat: internal matcher

* fix integration test

* bug fix extractor: merge dynamic values, fix missing extractors in file

* flow: fix 'No Results Found' if last statement output is false

* fix unit test
2024-01-08 05:12:11 +05:30
Mzack9999 5e48aed29b
Using network policy everywhere (#4578)
* Using network policy everywhere

* fixing bool param

* fixing websocket parsing issue

* fixing other schemes

* go mod tidy

---------

Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
2024-01-08 05:09:11 +05:30
Tarun Koyalwar 056073da25
code protocol: donot exit on non zero status code (#4585) 2024-01-08 03:27:08 +05:30
Mzack9999 342cc56a28
Merge pull request #4575 from projectdiscovery/feat-fastdialer-exclude
pass exclude list to layer 4 fast dialer
2024-01-05 12:46:07 +01:00
Tarun Koyalwar d064801270
fallthrough extracted values in order (#4574)
* fallthrough extracted values in order

* fix unit test & update .gitignore

* remove temp file

---------

Co-authored-by: Sandeep Singh <sandeep@projectdiscovery.io>
2024-01-05 05:25:31 +05:30
Tarun Koyalwar f663d1c9cf
deprecate(remove): file write in extractor using `to` (#4565)
* fix race-condition & oow in extracted file output

* add mutex for file.Write + set finalizer for os.File

* fix integration test

* disable extractor save to file in lib mode(configurable)

* use sync.Once for init

* disable out of bound image write in headless

* misc updates

* fix headless screenshot test

* fix extractor save to file integration test

* remove 'to' feature in extractors
2024-01-05 03:23:08 +05:30
mzack 80d347d3f1 pass exclude list to layer 4 fast dialer 2024-01-04 21:18:20 +01:00
Dogan Can Bakir 2d3906cafc
add tags as addition to `-as` (#4543) 2023-12-29 03:35:56 +05:30
Dogan Can Bakir f6ebe7f5f1
fix fuzzing self-contained input requirement (#4531) 2023-12-24 14:16:09 +05:30
Dogan Can Bakir e6133ef6bc
fix missing eq sign (#4513) 2023-12-20 17:00:34 +05:30
Tarun Koyalwar e912c7c58d
network proto: revert full buffer size read (#4497)
* network proto: revert full buffer size read

* fix read-all in network protocol
2023-12-17 18:02:19 +05:30
Tarun Koyalwar 47e75038f0
headless: fix panic + refactor waitevent action (#4465)
* fix waitEvent action

* avoid future panics

* integration test + bug fix

* headless: add max-duration support in waitevent

* fix comment + max-duration input
2023-12-06 19:08:26 +05:30
M. Ángel Jimeno 7da3921c12
http: support arbitrary strings on TLS SNI annotation (#4462) 2023-12-06 14:15:30 +05:30
Jean Rougé b420672b38
Allow to set dialers' timeout and keep-alive duration (#4441)
* Allow to set dialers' timeout and keep-alive duration

* docs

---------

Co-authored-by: mzack <marco.rivoli.nvh@gmail.com>
2023-11-30 01:47:10 +05:30
Wing b633ef63dc
Fix the bug that nuclei keeps scanning for http connection failures (#4265)
* misc update

* Fix the bug that nuclei keeps scanning for http connection failures

* Adding common error messages

* remove

---------

Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
Co-authored-by: Wing <taiyuan.yang@shopee.com>
2023-11-28 21:16:23 +05:30
Tarun Koyalwar 6e969cbd3c
add additional json fields: port,ip,scheme,url (#4417)
* add additional json fields: port,ip,scheme,url

* include host field in case of ip input
2023-11-28 14:26:23 +05:30
Dogan Can Bakir ce5df9cc02
introduce scan context (#4373)
* introduce scan context

* minor

* add joined errors to resultevents

* change `executor` funcs' signature

* fix tests

* join errors in `LogError` func

* change func signature

* add guard
2023-11-28 00:24:45 +05:30
Tarun Koyalwar a09b8afd0f
add support for multiple ports in network template (#4401)
* add support for multiple ports in network template

* backwords compatibility for templates without 'port' field

* fix nil panic in compile
2023-11-23 16:34:26 +05:30
sandeep 43750ea8c7 tls attribute update 2023-11-18 14:33:52 +05:30
Dogan Can Bakir a9efb75d59
introduce disable-cookie (#4292)
* introduce disable-cookie

* remove debug statement

* fix headless template

* increase `-interactions-poll-duration` value to 5

* docs update

---------

Co-authored-by: Tarun Koyalwar <tarun@projectdiscovery.io>
Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
2023-11-18 13:02:10 +05:30
Maciej Mionskowski ecae94d0cf
feat: allow cipher enumeration in SSL protocol (#4297)
* feat: allow cipher enumeration in SSL protocol

* cipher enum improvements

---------

Co-authored-by: Tarun Koyalwar <tarun@projectdiscovery.io>
2023-11-17 14:48:34 +05:30
Dogan Can Bakir 7c2db9c394
introduce `template-encoded` field (#4315)
* introduce `template-encoded` field

* remove IsCustomTemplate func

* refactor and move encoding to `MakeResultEventItem` func

* encode template in case of no results were found

* commit to last commit

* don't encode templates when`-ms` is used
2023-11-11 04:42:27 +05:30
Dogan Can Bakir 83abe0969e
introduce `self-contained` to headless (#4322)
* introduce `self-contained` to headless

* fix matched url print
2023-11-02 19:08:20 +05:30
Tarun Koyalwar 595ba8e3a5
bug fixes in js , network protocol and flow (#4313)
* fix net read

* only return N bytes if extra available

* use ConnReadN from readerutil

* add integration test

* print unsigned warning in stderr

* fix js protocol in flow #4318

* fix integration test: url encoding issue

* fix network protocol issue + integration tests

* multiple improvements to integration test

* replace all conn.Read() from tests

* disable network-basic.yaml in windows

* disable code protocol in win CI

* fix bitwise login  ps1-snippet.yaml

* hide previous matcher events in flow

* remove dead code+ update integration tests

---------

Co-authored-by: Sandeep Singh <sandeep@projectdiscovery.io>
2023-11-02 13:33:40 +05:30
Dogan Can Bakir c79d2f05c4
fix trailing dot (#4295)
* fix trailing dot

* remove trailing dot from `domain`

* remove trailing dots from answer

* remove dots

* fix integration test
2023-11-01 16:51:22 +05:30
Tarun Koyalwar 5c9af62037
fix relative path issue + remove residual code (#4284)
* fix relative path issue + remove residual code

* use template dir in templateFS

* fix dir relative path issue

* print metrics server address in verbose mode

* add timeout for downloading binary & templates

* update stats & metrics docs

* add template-id loader integration test
2023-10-26 19:07:04 +05:30
Tarun Koyalwar e9ab5f498a
template preprocessor + multi request variables indexing bug fix (#4262)
* add randstr preprocessor to defaults

* fix indexing in http + preprocessor integration test

* add multi-request integration test

* skip test if asnmap is down
2023-10-20 17:54:10 +05:30
Tarun Koyalwar dc44105baf
nuclei v3 : misc updates (#4247)
* use parsed options while signing

* update project layout to v3

* fix .gitignore

* remove example template

* misc updates

* bump tlsx version

* hide template sig warning with env

* js: retain value while using log

* fix nil pointer derefernce

* misc doc update

---------

Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
2023-10-17 17:44:13 +05:30