Commit Graph

49 Commits (dev)

Author SHA1 Message Date
mzack 7e363984b2 Merge branch 'dev' into feat-3072-init-adaptive-speed 2024-04-09 15:19:51 +02:00
Muhammad Daffa ffbe5deebb
feat: added asreproastable (#4990)
* feat: added asreproastable

* ldap: remove FilterAccountEnabled from AsRepRoastable

* run 'make jsupdate'

---------

Co-authored-by: Tarun Koyalwar <tarun@projectdiscovery.io>
2024-04-08 03:31:30 +05:30
Mzack9999 3c62b56fd9 panic at the pool 2024-04-03 19:02:30 +02:00
Mzack9999 774db61655 lightweight adaptivity on workpool 2024-04-03 18:50:46 +02:00
Mzack9999 a8d1393e96 init- using resizable components 2024-04-03 17:50:57 +02:00
Tarun Koyalwar 255032f4f2
pre-condition in code , fuzz and other misc updates (#4966)
* fuzz: rename 'filters' -> 'pre-condition'

* code proto: pre-condition + integration test

* feat: dsl document generator

* update dsl page header

* fix lint error

* add js defined helper funcs in docs

* remove panic recovery unless its for third party(go-rod,goja)

* handle dynamic values flattening edgecase in flow+multiprotocol

* fix order of kv in form-data (failing test)

* fix template loading counters

* Revert "handle dynamic values flattening edgecase in flow+multiprotocol"

This reverts commit 58fdd4faf7df5d654b46a9585011f614d5c98aa4.

* fix flow iteration using 'iterate'
2024-04-01 19:18:21 +05:30
Tarun Koyalwar 94817ca300 js protocol: fix breaking json export issue 2024-03-15 18:04:08 +05:30
Mzack9999 4c7a0f424e
Transparent Memoization via func Annotation (#4742)
* initial implementation with manual code generation

* testing generation

* refactor to package methods + auto memoize

* more memos

* fixing signatures

* refactor

* adding gen util

* adding util

* regenerate memoized files

---------

Co-authored-by: Tarun Koyalwar <tarun@projectdiscovery.io>
2024-03-01 18:40:18 +05:30
Tarun Koyalwar 8a2ff17ad8
allow specifying self-contained at http request level (#4812)
* allow specifying self-contained at requestlevel

* fix IsSMTP js example

* update smtp + fix examples

* update smtp error message

* add code reference in js protocol

* update js docs

* remove debug stmt
2024-03-01 16:38:56 +05:30
Tarun Koyalwar 36985345a9
javascript bindings + docs generation enhancements ( generate typescript defination .d.ts files) (#4487)
* introduce typescript files generation using ast + tmpl

* feat valid ts with scraping

* feat remove old logic + tsdocs for all modules

* fix ikev and related bugs

* typescript docs for js modules

* lint,build + ldap realm fix

* go mod tidy

* fix named imports ast parsing

* fix ast code generation errors

* complete support for ts files generation

* support go global/const in ts docs

* updated template

* feat: typescript using go code generation

* nuke jsdoc generator

* update generated ts dir structure

* fix multifile ts gen issue

* fix panic in ts code gen

* fix test

* update docs of js libs

* feat: add doc+example for every js class,function,method

* fix missing quotes in ikev example

---------

Co-authored-by: Sandeep Singh <sandeep@projectdiscovery.io>
2024-02-07 21:45:40 +05:30
Tarun Koyalwar 66bc616fd2 update js proto bindings 2024-02-06 04:02:53 +05:30
Tarun Koyalwar fd2ab3ce8a refactor to use nucleijs utils 2024-02-06 03:55:57 +05:30
Tarun Koyalwar 0e11bd7196 Merge remote-tracking branch 'upstream/dev' into ldap-protocol-enhancements 2024-02-06 02:38:38 +05:30
Tarun Koyalwar 3b75db46c7
Merge pull request #4647 from 5amu/remove-kerberos-dependency
switch dependency for kerberos js module (ropnop/gorkb5 -> jcmturner/gokrb5)
2024-02-06 02:37:57 +05:30
Tarun Koyalwar 71154918b0 fix network policy error 2024-02-06 02:03:33 +05:30
Tarun Koyalwar 01487ba1b8 network policy check + ASREP method 2024-02-05 23:56:16 +05:30
Tarun Koyalwar 06d9de3a27 refactor kerberos with nucleijs helper 2024-02-05 23:21:04 +05:30
Tarun Koyalwar cc732875cd
javascript: pooling and reuse with export functions + misc updates (#4709)
* js hotfix: wrap javascript source in anon functions

* mysql module improvements

* misc mysql bugs

* js vm pooling: soft deprecation + incentivised pooling

* misc updates

* disable interactsh failed test

* disable interactsh.yaml integration test on win & mac
2024-02-02 02:22:04 +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
Tarun Koyalwar 2153cc6055
fix panic in smb javascript template + handle panics in js (#4700)
* switch dependency to projectdiscovery/go-smb2 + handle panics

* bump projectdiscovery/go-smb2

* disable interactsh integration test
2024-01-30 04:15:59 +05:30
Tarun Koyalwar 2c2cc2774a feat: introduce nucleijs utils 2024-01-23 04:11:04 +05:30
5amu 2f926c4f72 implement method to close the ldap connection 2024-01-21 19:50:33 +01:00
5amu 2019dab187 implement utilities for timestamps 2024-01-21 18:14:20 +01:00
5amu 642c99bcff move DecodeSID to utils.go making it a generic function exposed by the module 2024-01-21 17:57:23 +01:00
5amu c703fffe80 implement method to grab domain SID 2024-01-21 17:31:08 +01:00
5amu 95d028c5f9 move ad filters to adenum.go 2024-01-21 17:12:09 +01:00
5amu 9d23f5f88f implement enumeration methods + rewrite kerberoastable 2024-01-21 17:11:28 +01:00
5amu 89d30d94d6 implement generic method to find AD objects 2024-01-21 16:55:17 +01:00
5amu 893129eb17 reflect changes for gojs 2024-01-21 12:54:49 +01:00
5amu 6bf8f8769b define frequently used filters and AD UAC filters 2024-01-21 12:53:41 +01:00
5amu cb0d98e4b2 do not append an empty map when generating output in Search() 2024-01-20 23:59:26 +01:00
5amu 9821700f8e simplify CollectMetadata and remove session creation at runtime 2024-01-20 23:57:57 +01:00
5amu bd1238d27e implement authentication methods and change underlying connection because of bugs 2024-01-20 21:02:08 +01:00
5amu fe59057c0d implement a generic search that returns a list of objects given a filter and desired attributes 2024-01-20 12:22:36 +01:00
5amu 73a73eeeac implement method to connect to and verify the ldap server (IsLdap -> Connect) 2024-01-20 01:50:54 +01:00
5amu a167e6c57b make protocolstate.IsHostAllowed check the domaincontroller, not the domain 2024-01-20 00:39:29 +01:00
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
5amu 3b5ce39e86 make protocolstate.IsHostAllowed check the domaincontroller, not the domain 2024-01-16 10:24:26 +01:00
5amu 77e2430788 switch dependency for kerberos in js module to upstream 2024-01-16 10:22:45 +01:00
Valerio Casalino edae2f4ec4
implement GetKerberoastableUsers in ldap module (#4420)
* add method 'GetKerberoastableUsers()'

* add more attributes to KerberostableUser in ldap module
2024-01-13 00:32:00 +05:30
Valerio Casalino 70452efec1
add method GetServiceTicket to the kerberos module (#4422)
* add method GetServiceTicket to the kerberos module

* add target username to service ticket

* destroy kerberos client when function returns
2024-01-12 14:24:39 +05:30
abut0n 199bd9d892
Make the SMTP client used in javascript templates able to send email (#4451)
* Update smtp.go

make smtp module able to send mail

* Pass Lint Test

* chore(deps): bump github.com/projectdiscovery/retryablehttp-go

Bumps [github.com/projectdiscovery/retryablehttp-go](https://github.com/projectdiscovery/retryablehttp-go) from 1.0.36 to 1.0.38.
- [Release notes](https://github.com/projectdiscovery/retryablehttp-go/releases)
- [Commits](https://github.com/projectdiscovery/retryablehttp-go/compare/v1.0.36...v1.0.38)

---
updated-dependencies:
- dependency-name: github.com/projectdiscovery/retryablehttp-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump github.com/projectdiscovery/clistats

Bumps [github.com/projectdiscovery/clistats](https://github.com/projectdiscovery/clistats) from 0.0.19 to 0.0.20.
- [Release notes](https://github.com/projectdiscovery/clistats/releases)
- [Commits](https://github.com/projectdiscovery/clistats/compare/v0.0.19...v0.0.20)

---
updated-dependencies:
- dependency-name: github.com/projectdiscovery/clistats
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump github.com/projectdiscovery/retryabledns

Bumps [github.com/projectdiscovery/retryabledns](https://github.com/projectdiscovery/retryabledns) from 1.0.44 to 1.0.45.
- [Release notes](https://github.com/projectdiscovery/retryabledns/releases)
- [Commits](https://github.com/projectdiscovery/retryabledns/compare/v1.0.44...v1.0.45)

---
updated-dependencies:
- dependency-name: github.com/projectdiscovery/retryabledns
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump github.com/projectdiscovery/dsl from 0.0.32 to 0.0.33

Bumps [github.com/projectdiscovery/dsl](https://github.com/projectdiscovery/dsl) from 0.0.32 to 0.0.33.
- [Release notes](https://github.com/projectdiscovery/dsl/releases)
- [Commits](https://github.com/projectdiscovery/dsl/compare/v0.0.32...v0.0.33)

---
updated-dependencies:
- dependency-name: github.com/projectdiscovery/dsl
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump github.com/projectdiscovery/rawhttp

Bumps [github.com/projectdiscovery/rawhttp](https://github.com/projectdiscovery/rawhttp) from 0.1.27 to 0.1.28.
- [Release notes](https://github.com/projectdiscovery/rawhttp/releases)
- [Commits](https://github.com/projectdiscovery/rawhttp/compare/v0.1.27...v0.1.28)

---
updated-dependencies:
- dependency-name: github.com/projectdiscovery/rawhttp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* http: support arbitrary strings on TLS SNI annotation (#4462)

* 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

* add timeout (#4467)

* add timeout

* ssh: make timeout configurable

* ssh: update bindings + docs

---------

Co-authored-by: Tarun Koyalwar <tarun@projectdiscovery.io>

* use file stat to check if file is empty (#4469)

* version update

* chore(deps): bump github.com/projectdiscovery/ratelimit

Bumps [github.com/projectdiscovery/ratelimit](https://github.com/projectdiscovery/ratelimit) from 0.0.17 to 0.0.19.
- [Release notes](https://github.com/projectdiscovery/ratelimit/releases)
- [Commits](https://github.com/projectdiscovery/ratelimit/compare/v0.0.17...v0.0.19)

---
updated-dependencies:
- dependency-name: github.com/projectdiscovery/ratelimit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump github.com/projectdiscovery/retryabledns

Bumps [github.com/projectdiscovery/retryabledns](https://github.com/projectdiscovery/retryabledns) from 1.0.45 to 1.0.46.
- [Release notes](https://github.com/projectdiscovery/retryabledns/releases)
- [Commits](https://github.com/projectdiscovery/retryabledns/compare/v1.0.45...v1.0.46)

---
updated-dependencies:
- dependency-name: github.com/projectdiscovery/retryabledns
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump github.com/projectdiscovery/interactsh

Bumps [github.com/projectdiscovery/interactsh](https://github.com/projectdiscovery/interactsh) from 1.1.7 to 1.1.8.
- [Release notes](https://github.com/projectdiscovery/interactsh/releases)
- [Changelog](https://github.com/projectdiscovery/interactsh/blob/main/.goreleaser.yml)
- [Commits](https://github.com/projectdiscovery/interactsh/compare/v1.1.7...v1.1.8)

---
updated-dependencies:
- dependency-name: github.com/projectdiscovery/interactsh
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump github.com/projectdiscovery/utils

Bumps [github.com/projectdiscovery/utils](https://github.com/projectdiscovery/utils) from 0.0.65 to 0.0.67.
- [Release notes](https://github.com/projectdiscovery/utils/releases)
- [Changelog](https://github.com/projectdiscovery/utils/blob/main/CHANGELOG.md)
- [Commits](https://github.com/projectdiscovery/utils/compare/v0.0.65...v0.0.67)

---
updated-dependencies:
- dependency-name: github.com/projectdiscovery/utils
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump github.com/projectdiscovery/fastdialer

Bumps [github.com/projectdiscovery/fastdialer](https://github.com/projectdiscovery/fastdialer) from 0.0.46 to 0.0.48.
- [Release notes](https://github.com/projectdiscovery/fastdialer/releases)
- [Commits](https://github.com/projectdiscovery/fastdialer/compare/v0.0.46...v0.0.48)

---
updated-dependencies:
- dependency-name: github.com/projectdiscovery/fastdialer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* network proto: revert full buffer size read (#4497)

* network proto: revert full buffer size read

* fix read-all in network protocol

* version update

* chore(deps): bump github.com/projectdiscovery/retryabledns

Bumps [github.com/projectdiscovery/retryabledns](https://github.com/projectdiscovery/retryabledns) from 1.0.46 to 1.0.47.
- [Release notes](https://github.com/projectdiscovery/retryabledns/releases)
- [Commits](https://github.com/projectdiscovery/retryabledns/compare/v1.0.46...v1.0.47)

---
updated-dependencies:
- dependency-name: github.com/projectdiscovery/retryabledns
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump github.com/projectdiscovery/fastdialer

Bumps [github.com/projectdiscovery/fastdialer](https://github.com/projectdiscovery/fastdialer) from 0.0.48 to 0.0.49.
- [Release notes](https://github.com/projectdiscovery/fastdialer/releases)
- [Commits](https://github.com/projectdiscovery/fastdialer/compare/v0.0.48...v0.0.49)

---
updated-dependencies:
- dependency-name: github.com/projectdiscovery/fastdialer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump github.com/projectdiscovery/ratelimit

Bumps [github.com/projectdiscovery/ratelimit](https://github.com/projectdiscovery/ratelimit) from 0.0.19 to 0.0.20.
- [Release notes](https://github.com/projectdiscovery/ratelimit/releases)
- [Commits](https://github.com/projectdiscovery/ratelimit/compare/v0.0.19...v0.0.20)

---
updated-dependencies:
- dependency-name: github.com/projectdiscovery/ratelimit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump github.com/projectdiscovery/dsl from 0.0.33 to 0.0.35

Bumps [github.com/projectdiscovery/dsl](https://github.com/projectdiscovery/dsl) from 0.0.33 to 0.0.35.
- [Release notes](https://github.com/projectdiscovery/dsl/releases)
- [Commits](https://github.com/projectdiscovery/dsl/compare/v0.0.33...v0.0.35)

---
updated-dependencies:
- dependency-name: github.com/projectdiscovery/dsl
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump github.com/projectdiscovery/utils

Bumps [github.com/projectdiscovery/utils](https://github.com/projectdiscovery/utils) from 0.0.67 to 0.0.68.
- [Release notes](https://github.com/projectdiscovery/utils/releases)
- [Changelog](https://github.com/projectdiscovery/utils/blob/main/CHANGELOG.md)
- [Commits](https://github.com/projectdiscovery/utils/compare/v0.0.67...v0.0.68)

---
updated-dependencies:
- dependency-name: github.com/projectdiscovery/utils
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump golang.org/x/crypto from 0.15.0 to 0.17.0

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.15.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.15.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* misc updates

* misc updates + message builder struct

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: M. Ángel Jimeno <jimen0@users.noreply.github.com>
Co-authored-by: Tarun Koyalwar <45962551+tarunKoyalwar@users.noreply.github.com>
Co-authored-by: Dogan Can Bakir <65292895+dogancanbakir@users.noreply.github.com>
Co-authored-by: Tarun Koyalwar <tarun@projectdiscovery.io>
Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
2023-12-21 18:04:22 +05:30
Dogan Can Bakir 5d1a4b7607
add timeout (#4467)
* add timeout

* ssh: make timeout configurable

* ssh: update bindings + docs

---------

Co-authored-by: Tarun Koyalwar <tarun@projectdiscovery.io>
2023-12-07 22:08:32 +05:30
Valerio Casalino ec5687e2ef
Make the SSH client used in javascript templates able to execute custom commands (#4407)
* make ssh module store the connection

* make ssh module able to execute commands using the client

* add bingen + update docs

---------

Co-authored-by: Tarun Koyalwar <tarun@projectdiscovery.io>
2023-11-24 00:07:45 +05:30
Ice3man 34192ac359
feat: added base64 encoding helpers for js (#4344)
* misc update

* chore(deps): bump github.com/gin-gonic/gin from 1.9.0 to 1.9.1 (#4252)

Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.9.0 to 1.9.1.
- [Release notes](https://github.com/gin-gonic/gin/releases)
- [Changelog](https://github.com/gin-gonic/gin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gin-gonic/gin/compare/v1.9.0...v1.9.1)

---
updated-dependencies:
- dependency-name: github.com/gin-gonic/gin
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump github.com/docker/docker (#4316)

Bumps [github.com/docker/docker](https://github.com/docker/docker) from 24.0.5+incompatible to 24.0.7+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v24.0.5...v24.0.7)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: added base64 encoding helpers for js

* fix README_CN.md typos (#4369)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Xc1Ym <xuedongyuming2233@gmail.com>
2023-11-17 19:29:49 +05:30
Mzack9999 3d37e4603d
Bugfix bin pack (#4298)
* misc update

* chore(deps): bump github.com/gin-gonic/gin from 1.9.0 to 1.9.1 (#4252)

Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.9.0 to 1.9.1.
- [Release notes](https://github.com/gin-gonic/gin/releases)
- [Changelog](https://github.com/gin-gonic/gin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gin-gonic/gin/compare/v1.9.0...v1.9.1)

---
updated-dependencies:
- dependency-name: github.com/gin-gonic/gin
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fixing binary encoding

* pointing gostruct to dev branch

* dep update

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-04 21:12:15 +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
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