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

Support ip in result output in javascript protocol similar to http protocol #5021

Closed
tarunKoyalwar opened this issue Apr 8, 2024 · 0 comments · Fixed by #5023
Closed

Support ip in result output in javascript protocol similar to http protocol #5021

tarunKoyalwar opened this issue Apr 8, 2024 · 0 comments · Fixed by #5023
Assignees
Labels
Type: Enhancement Most issues will probably ask for additions or changes.
Milestone

Comments

@tarunKoyalwar
Copy link
Member

Please describe your feature request:

http protocol output

$ just to confirm you expect similar json output in result for javascript protocol ( check `ip` here ) 

```bash
 nuclei -id tech-detect -u https://projectdiscovery.io -j -or | jq .

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v3.2.3

        projectdiscovery.io

[INF] Current nuclei version: v3.2.3 (latest)
[INF] Current nuclei-templates version: v9.8.1 (latest)
[WRN] Scan results upload to cloud is disabled.
[INF] New templates added in latest release: 77
[INF] Templates loaded for current scan: 1
[INF] Executing 1 signed templates from projectdiscovery/nuclei-templates
[INF] Targets loaded for current scan: 1
{
  "template": "http/technologies/tech-detect.yaml",
  "template-url": "https://cloud.projectdiscovery.io/public/tech-detect",
  "template-id": "tech-detect",
  "template-path": "/Users/tarun/nuclei-templates/http/technologies/tech-detect.yaml",
  "info": {
    "name": "Wappalyzer Technology Detection",
    "author": [
      "hakluke"
    ],
    "tags": [
      "tech"
    ],
    "severity": "info",
    "metadata": {
      "max-request": 1
    }
  },
  "matcher-name": "cloudflare",
  "type": "http",
  "host": "projectdiscovery.io",
  "port": "443",
  "scheme": "https",
  "url": "https://projectdiscovery.io",
  "matched-at": "https://projectdiscovery.io",
  "ip": "104.26.7.152",
  "timestamp": "2024-04-09T00:32:41.691467+05:30",
  "curl-command": "curl -X 'GET' -H 'Accept: */*' -H 'Accept-Language: en' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36 Edg/91.0.864.41' 'https://projectdiscovery.io'",
  "matcher-status": true
}

js protocol output

$  nuclei -id ssh-auth-methods  -u https://scanme.sh -j -or | jq .                         4 ↵

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v3.2.3

		projectdiscovery.io

[INF] Current nuclei version: v3.2.3 (latest)
[INF] Current nuclei-templates version: v9.8.1 (latest)
[WRN] Scan results upload to cloud is disabled.
[INF] New templates added in latest release: 77
[INF] Templates loaded for current scan: 1
[INF] Executing 1 signed templates from projectdiscovery/nuclei-templates
[INF] Targets loaded for current scan: 1
{
  "template": "javascript/detection/ssh-auth-methods.yaml",
  "template-url": "https://cloud.projectdiscovery.io/public/ssh-auth-methods",
  "template-id": "ssh-auth-methods",
  "template-path": "/Users/tarun/nuclei-templates/javascript/detection/ssh-auth-methods.yaml",
  "info": {
    "name": "SSH Auth Methods - Detection",
    "author": [
      "ice3man543"
    ],
    "tags": [
      "js",
      "detect",
      "ssh",
      "enum",
      "network"
    ],
    "description": "SSH (Secure Shell) authentication modes are methods used to verify the identity of users and ensure secure access to remote systems. Common SSH authentication modes include password-based authentication, which relies on a secret passphrase, and public key authentication, which uses cryptographic keys for a more secure and convenient login process. Additionally, multi-factor authentication (MFA) can be employed to enhance security by requiring users to provide multiple forms of authentication, such as a password and a one-time code.\n",
    "reference": [
      "https://nmap.org/nsedoc/scripts/ssh-auth-methods.html"
    ],
    "severity": "info",
    "metadata": {
      "max-request": 1,
      "shodan-query": "product:\"OpenSSH\""
    }
  },
  "type": "javascript",
  "host": "scanme.sh:22",
  "port": "22",
  "url": "scanme.sh:22",
  "matched-at": "scanme.sh:22",
  "extracted-results": [
    "[\"publickey\",\"password\"]"
  ],
  "timestamp": "2024-04-09T00:34:55.607485+05:30",
  "matcher-status": true
}

Describe the use case of this feature:

@tarunKoyalwar tarunKoyalwar added the Type: Enhancement Most issues will probably ask for additions or changes. label Apr 8, 2024
@tarunKoyalwar tarunKoyalwar self-assigned this Apr 8, 2024
@ehsandeep ehsandeep added this to the nuclei v3.2.3 milestone Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants