Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for aws request signing #1247

Merged
merged 24 commits into from
Dec 19, 2021
Merged

Adding support for aws request signing #1247

merged 24 commits into from
Dec 19, 2021

Conversation

Mzack9999
Copy link
Member

@Mzack9999 Mzack9999 commented Nov 12, 2021

Proposed changes

This PR adds a prototype support for AWS requests signing

Checklist

  • Pull request is created against the dev branch
  • All checks passed (lint, unit/integration/regression tests etc.) with my changes (some tests fail due to known issues)
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@Mzack9999 Mzack9999 added the Type: Enhancement Most issues will probably ask for additions or changes. label Nov 12, 2021
@Mzack9999 Mzack9999 self-assigned this Nov 12, 2021
@Mzack9999 Mzack9999 marked this pull request as draft November 12, 2021 18:53
@ehsandeep ehsandeep linked an issue Nov 16, 2021 that may be closed by this pull request
@Mzack9999
Copy link
Member Author

Mzack9999 commented Nov 17, 2021

template example:

id: aws
info:
  name: AWS Test
  author: test
  severity: info

self-contained: true
signature: aws
requests:
  - raw:
      - |
        POST https://{test.test.amazonaws.com/ HTTP/1.1
        Host: test.test.amazonaws.com
        Accept-Encoding: gzip, deflate

        Action=test

@Mzack9999 Mzack9999 marked this pull request as ready for review November 26, 2021 08:18
@Mzack9999 Mzack9999 added the Status: In Progress This issue is being worked on, and has someone assigned. label Nov 26, 2021
@Mzack9999
Copy link
Member Author

Indirectly fixes #844

@Mzack9999 Mzack9999 linked an issue Nov 26, 2021 that may be closed by this pull request
@Mzack9999 Mzack9999 added Status: Review Needed The issue has a PR attached to it which needs to be reviewed and removed Status: In Progress This issue is being worked on, and has someone assigned. labels Nov 26, 2021
Copy link
Member

@Ice3man543 Ice3man543 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Copy link
Member

@ehsandeep ehsandeep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go run . -duc -no-interactsh -t aws-test.yaml

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   2.5.4

		projectdiscovery.io

[WRN] Use with caution. You are responsible for your actions.
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
[INF] Using Nuclei Engine 2.5.4 (outdated)
[INF] Using Nuclei Templates 8.7.3 (latest)
[INF] Using Interactsh Server https://interactsh.com
[INF] Templates added in last update: 5
[INF] Templates loaded for scan: 1
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x20 pc=0x10325b010]

goroutine 55 [running]:
github.com/projectdiscovery/nuclei/v2/pkg/protocols/http.(*generatedRequest).URL(...)
	/Users/geekboy/Github/nuclei/v2/pkg/protocols/http/build_request.go:46
github.com/projectdiscovery/nuclei/v2/pkg/protocols/http.(*Request).ExecuteWithResults.func1({0x1400020e180, 0x162}, 0x0, 0x14000072150)
	/Users/geekboy/Github/nuclei/v2/pkg/protocols/http/request.go:253 +0x1c0
github.com/projectdiscovery/nuclei/v2/pkg/protocols/http.(*Request).ExecuteWithResults(0x140000e2420, {0x0, 0x0}, 0x14000072150, 0x140000721b0, 0x14000072330)
	/Users/geekboy/Github/nuclei/v2/pkg/protocols/http/request.go:315 +0x280
github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/executer.(*Executer).Execute(0x140004bfd60, {0x0, 0x0})
	/Users/geekboy/Github/nuclei/v2/pkg/protocols/common/executer/executer.go:51 +0x1c4
github.com/projectdiscovery/nuclei/v2/pkg/core.(*Engine).executeSelfContainedTemplateWithInput(0x140000e2160, 0x140004cf6c0, 0x1400003b400)
	/Users/geekboy/Github/nuclei/v2/pkg/core/execute.go:60 +0x38
github.com/projectdiscovery/nuclei/v2/pkg/core.(*Engine).ExecuteWithOpts.func1(0x140000e2160, 0x1400003b400, 0x3, {0x103bf16d8, 0x140004be080}, 0x140004bed60, 0x140004cf6c0)
	/Users/geekboy/Github/nuclei/v2/pkg/core/execute.go:46 +0x40
created by github.com/projectdiscovery/nuclei/v2/pkg/core.(*Engine).ExecuteWithOpts
	/Users/geekboy/Github/nuclei/v2/pkg/core/execute.go:42 +0x13c
exit status 2

@ehsandeep ehsandeep added Status: Revision Needed Submitter of PR needs to revise the PR related to the issue. and removed Status: Review Needed The issue has a PR attached to it which needs to be reviewed labels Dec 16, 2021
@Mzack9999 Mzack9999 added Status: Review Needed The issue has a PR attached to it which needs to be reviewed and removed Status: Revision Needed Submitter of PR needs to revise the PR related to the issue. labels Dec 16, 2021
@ehsandeep ehsandeep merged commit 2dc877a into dev Dec 19, 2021
@ehsandeep ehsandeep deleted the research-aws-signing branch December 19, 2021 19:36
@ehsandeep ehsandeep added Status: Completed Nothing further to be done with this issue. Awaiting to be closed. and removed Status: Review Needed The issue has a PR attached to it which needs to be reviewed labels Dec 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding support for aws request signing Debug flag does not include cookie header
3 participants