From f1a4410019fb77430950163436f51796b23fcca7 Mon Sep 17 00:00:00 2001 From: Tarun Koyalwar <45962551+tarunKoyalwar@users.noreply.github.com> Date: Mon, 20 Nov 2023 21:19:19 +0530 Subject: [PATCH] optionally upload to pdcp cloud (#4396) --- README.md | 57 +++++--- README_CN.md | 24 +--- README_ID.md | 42 +++--- README_KR.md | 274 +++++++++++++++++++++++--------------- cmd/nuclei/main.go | 2 +- internal/runner/runner.go | 8 +- pkg/types/types.go | 2 +- 7 files changed, 236 insertions(+), 173 deletions(-) diff --git a/README.md b/README.md index 457fdd37aa..ccab0a6dbb 100644 --- a/README.md +++ b/README.md @@ -148,8 +148,8 @@ FILTERING: -em, -exclude-matchers string[] template matchers to exclude in result -s, -severity value[] templates to run based on severity. Possible values: info, low, medium, high, critical, unknown -es, -exclude-severity value[] templates to exclude based on severity. Possible values: info, low, medium, high, critical, unknown - -pt, -type value[] templates to run based on protocol type. Possible values: dns, file, http, headless, tcp, workflow, ssl, websocket, whois, code - -ept, -exclude-type value[] templates to exclude based on protocol type. Possible values: dns, file, http, headless, tcp, workflow, ssl, websocket, whois, code + -pt, -type value[] templates to run based on protocol type. Possible values: dns, file, http, headless, tcp, workflow, ssl, websocket, whois, code, javascript + -ept, -exclude-type value[] templates to exclude based on protocol type. Possible values: dns, file, http, headless, tcp, workflow, ssl, websocket, whois, code, javascript -tc, -template-condition string[] templates to run based on expression condition OUTPUT: @@ -197,7 +197,6 @@ CONFIGURATIONS: -i, -interface string network interface to use for network scan -at, -attack-type string type of payload combinations to perform (batteringram,pitchfork,clusterbomb) -sip, -source-ip string source ip address to use for network scan - -config-directory string override the default config path ($home/.config) -rsr, -response-size-read int max response size to read in bytes (default 10485760) -rss, -response-size-save int max response size to read in bytes (default 1048576) -reset reset removes all nuclei configuration and data files (including nuclei-templates) @@ -233,20 +232,20 @@ RATE-LIMIT: -headc, -headless-concurrency int maximum number of headless templates to be executed in parallel (default 10) OPTIMIZATIONS: - -timeout int time to wait in seconds before timeout (default 10) - -retries int number of times to retry a failed request (default 1) - -ldp, -leave-default-ports leave default HTTP/HTTPS ports (eg. host:80,host:443) - -mhe, -max-host-error int max errors for a host before skipping from scan (default 30) - -te, -track-error string[] adds given error to max-host-error watchlist (standard, file) - -nmhe, -no-mhe disable skipping host from scan based on errors - -project use a project folder to avoid sending same request multiple times - -project-path string set a specific project path (default "/tmp") - -spm, -stop-at-first-match stop processing HTTP requests after the first match (may break template/workflow logic) - -stream stream mode - start elaborating without sorting the input - -ss, -scan-strategy value strategy to use while scanning(auto/host-spray/template-spray) (default auto) - -irt, -input-read-timeout duration timeout on input read (default 3m0s) - -nh, -no-httpx disable httpx probing for non-url input - -no-stdin disable stdin processing + -timeout int time to wait in seconds before timeout (default 10) + -retries int number of times to retry a failed request (default 1) + -ldp, -leave-default-ports leave default HTTP/HTTPS ports (eg. host:80,host:443) + -mhe, -max-host-error int max errors for a host before skipping from scan (default 30) + -te, -track-error string[] adds given error to max-host-error watchlist (standard, file) + -nmhe, -no-mhe disable skipping host from scan based on errors + -project use a project folder to avoid sending same request multiple times + -project-path string set a specific project path (default "/tmp") + -spm, -stop-at-first-match stop processing HTTP requests after the first match (may break template/workflow logic) + -stream stream mode - start elaborating without sorting the input + -ss, -scan-strategy value strategy to use while scanning(auto/host-spray/template-spray) (default auto) + -irt, -input-read-timeout value timeout on input read (default 3m0s) + -nh, -no-httpx disable httpx probing for non-url input + -no-stdin disable stdin processing HEADLESS: -headless enable templates that require headless browser support (root user on Linux will disable sandbox) @@ -285,8 +284,30 @@ STATISTICS: -stats display statistics about the running scan -sj, -stats-json display statistics in JSONL(ines) format -si, -stats-interval int number of seconds to wait between showing a statistics update (default 5) - -m, -metrics expose nuclei metrics on a port -mp, -metrics-port int port to expose nuclei metrics on (default 9092) + +CLOUD: + -auth configure projectdiscovery cloud (pdcp) api key + -cup, -cloud-upload upload scan results to pdcp dashboard + + +EXAMPLES: +Run nuclei on single host: + $ nuclei -target example.com + +Run nuclei with specific template directories: + $ nuclei -target example.com -t http/cves/ -t ssl + +Run nuclei against a list of hosts: + $ nuclei -list hosts.txt + +Run nuclei with a JSON output: + $ nuclei -target example.com -json-export output.json + +Run nuclei with sorted Markdown outputs (with environment variables): + $ MARKDOWN_EXPORT_SORT_MODE=template nuclei -target example.com -markdown-export nuclei_report/ + +Additional documentation is available at: https://docs.nuclei.sh/getting-started/running ``` ### Running Nuclei diff --git a/README_CN.md b/README_CN.md index 05c0dff3e9..3e5cfe56cb 100644 --- a/README_CN.md +++ b/README_CN.md @@ -269,31 +269,11 @@ UNCOVER引擎: -stats 显示正在扫描的统计信息 -sj, -stats-json 将统计信息以JSONL格式输出到文件 -si, -stats-inerval int 显示统计信息更新的间隔秒数(默认:5) - -m, -metrics 开启metrics服务 -mp, -metrics-port int 更改metrics服务的端口(默认:9092) 云服务: - -cloud 在nuclei云上运行扫描 - -ads, -add-datasource string 添加指定的数据源(s3、github) - -atr, -add-target string 向云中添加目标 - -atm, -add-template string 向云中添加模板 - -lsn, -list-scan 列出先前的云扫描 - -lso, -list-output string 按扫描ID列出扫描输出 - -ltr, -list-target 按ID列出云目标 - -ltm, -list-template 按ID列出云模板 - -lds, -list-datasource 按ID列出云数据源 - -lrs, -list-reportsource 列出报告源 - -dsn, -delete-scan string 按ID删除云扫描 - -dtr, -delete-target string 从云中删除目标 - -dtm, -delete-template string 从云中删除模板 - -dds, -delete-datasource string 删除指定的数据源 - -drs, -disable-reportsource string 禁用指定的报告源 - -ers, -enable-reportsource string 启用指定的报告源 - -gtr, -get-target string 按ID获取目标内容 - -gtm, -get-template string 按ID获取模板内容 - -nos, -no-store 禁用云上的扫描/输出存储 - -no-tables 不显示漂亮打印的表格 - -limit int 限制要显示的输出数量(默认 100) + -auth 配置projectdiscovery云(pdcp)API密钥 + -cup, -cloud-upload 将扫描结果上传到pdcp仪表板 ``` diff --git a/README_ID.md b/README_ID.md index afde0f2204..f0c09cd2ef 100644 --- a/README_ID.md +++ b/README_ID.md @@ -266,27 +266,27 @@ STATISTICS: -mp, -metrics-port int port to expose nuclei metrics on (default 9092) CLOUD: - -cloud run scan on nuclei cloud - -ads, -add-datasource string add specified data source (s3,github) - -atr, -add-target string add target(s) to cloud - -atm, -add-template string add template(s) to cloud - -lsn, -list-scan list previous cloud scans - -lso, -list-output string list scan output by scan id - -ltr, -list-target list cloud target by id - -ltm, -list-template list cloud template by id - -lds, -list-datasource list cloud datasource by id - -lrs, -list-reportsource list reporting sources - -dsn, -delete-scan string delete cloud scan by id - -dtr, -delete-target string delete target(s) from cloud - -dtm, -delete-template string delete template(s) from cloud - -dds, -delete-datasource string delete specified data source - -drs, -disable-reportsource string disable specified reporting source - -ers, -enable-reportsource string enable specified reporting source - -gtr, -get-target string get target content by id - -gtm, -get-template string get template content by id - -nos, -no-store disable scan/output storage on cloud - -no-tables do not display pretty-printed tables - -limit int limit the number of output to display (default 100) + -auth configure projectdiscovery cloud (pdcp) api key + -cup, -cloud-upload upload scan results to pdcp dashboard + + +EXAMPLES: +Run nuclei on single host: + $ nuclei -target example.com + +Run nuclei with specific template directories: + $ nuclei -target example.com -t http/cves/ -t ssl + +Run nuclei against a list of hosts: + $ nuclei -list hosts.txt + +Run nuclei with a JSON output: + $ nuclei -target example.com -json-export output.json + +Run nuclei with sorted Markdown outputs (with environment variables): + $ MARKDOWN_EXPORT_SORT_MODE=template nuclei -target example.com -markdown-export nuclei_report/ + +Additional documentation is available at: https://docs.nuclei.sh/getting-started/running ``` ### Menjalankan Nuclei diff --git a/README_KR.md b/README_KR.md index d9ea529b59..6fb8808536 100644 --- a/README_KR.md +++ b/README_KR.md @@ -85,144 +85,206 @@ nuclei -h ```console -Nuclei is a fast, template based vulnerability scanner focusing -on extensive configurability, massive extensibility and ease of use. +Nuclei는 빠르고, 템플릿 기반의 취약점 스캐너로 +넓은 설정 가능성, 대규모 확장성 및 사용 편의성에 중점을 두고 있습니다. -Usage: - nuclei [flags] +사용법: + ./nuclei [flags] -Flags: TARGET: - -u, -target string[] 스캔할 URLs/hosts 대상 - -l, -list string 스캔할 URLs/hosts 대상 목록이 포함된 파일 경로(줄당 하나씩) - -resume string resume.cfg를 사용한 스캔 재개(클러스터링이 비활성화됨) + -u, -target string[] 스캔할 대상 URL/호스트 + -l, -list string 스캔할 대상 URL/호스트 목록이 있는 파일 경로 (한 줄에 하나씩) + -resume string resume.cfg를 사용하여 스캔 재개 (클러스터링은 비활성화됨) + -sa, -scan-all-ips dns 레코드와 관련된 모든 IP 스캔 + -iv, -ip-version string[] 스캔할 호스트의 IP 버전 (4,6) - (기본값 4) TEMPLATES: - -nt, -new-templates run only new templates added in latest nuclei-templates release - -ntv, -new-templates-version string[] run new templates added in specific version - -as, -automatic-scan automatic web scan using wappalyzer technology detection to tags mapping - -t, -templates string[] list of template or template directory to run (comma-separated, file) - -turl, -template-url string[] template url or list containing template urls to run (comma-separated, file) - -w, -workflows string[] list of workflow or workflow directory to run (comma-separated, file) - -wurl, -workflow-url string[] workflow url or list containing workflow urls to run (comma-separated, file) - -validate validate the passed templates to nuclei - -nss, -no-strict-syntax disable strict syntax check on templates - -td, -template-display displays the templates content - -tl list all available templates - -sign signs the templates with the private key defined in NUCLEI_SIGNATURE_PRIVATE_KEY env variable - -code enable loading code protocol-based templates + -nt, -new-templates 최신 nuclei-templates 릴리스에 추가된 새 템플릿만 실행 + -ntv, -new-templates-version string[] 특정 버전에 추가된 새 템플릿 실행 + -as, -automatic-scan wappalyzer 기술 감지를 사용하여 태그 매핑으로 자동 웹 스캔 + -t, -templates string[] 실행할 템플릿 또는 템플릿 디렉토리 목록 (쉼표로 구분, 파일) + -turl, -template-url string[] 실행할 템플릿 url 또는 템플릿 url 목록 (쉼표로 구분, 파일) + -w, -workflows string[] 실행할 워크플로우 또는 워크플로우 디렉토리 목록 (쉼표로 구분, 파일) + -wurl, -workflow-url string[] 실행할 워크플로우 url 또는 워크플로우 url 목록 (쉼표로 구분, 파일) + -validate nuclei에 전달된 템플릿 검증 + -nss, -no-strict-syntax 템플릿에서 엄격한 구문 검사 비활성화 + -td, -template-display 템플릿 내용 표시 + -tl 사용 가능한 모든 템플릿 목록 + -sign NUCLEI_SIGNATURE_PRIVATE_KEY 환경 변수에서 정의된 개인 키로 템플릿에 서명 + -code 코드 프로토콜 기반 템플릿 로딩 활성화 FILTERING: - -a, -author string[] 작성자를 기준으로 실행할 템플릿(쉼표로 구분된 파일) - -tags string[] 태그를 기준으로 실행할 템플릿(쉼표로 구분된 파일) - -etags, -exclude-tags string[] 태그를 기준으로 제외할 템플릿(쉼표로 구분된 파일) - -itags, -include-tags string[] 태그가 기본 또는 구성에 의해 제외된 경우에도 실행됨 - -id, -template-id string[] 템플릿 ID들을 기준으로 실행할 템플릿(쉼표로 구분된 파일) - -eid, -exclude-id string[] 템플릿 ID들을 기준으로 제외할 템플릿(쉼표로 구분된 파일) - -it, -include-templates string[] 템플릿이 기본 또는 구성에 의해 제외된 경우에도 실행됨 - -et, -exclude-templates string[] 제외할 템플릿 또는 템플릿 디렉터리(파일로 구분됨, 파일) - -s, -severity value[] 심각도를 기준으로 실행할 템플릿. 가능한 값: info, low, medium, high, critical, unknown - -es, -exclude-severity value[] 심각도를 기준으로 제외할 템플릿. 가능한 값: info, low, medium, high, critical, unknown - -pt, -type value[] 프로토콜 유형을 기준으로 실행할 템플릿. 가능한 값: dns, file, http, headless, network, workflow, ssl, websocket, whois - -ept, -exclude-type value[] 프로토콜 유형에 따라 제외할 템플릿. 가능한 값: dns, file, http, headless, network, workflow, ssl, websocket, whois + -a, -author string[] 저자를 기반으로 실행할 템플릿 (쉼표로 구분, 파일) + -tags string[] 태그를 기반으로 실행할 템플릿 (쉼표로 구분, 파일) + -etags, -exclude-tags string[] 태그를 기반으로 제외할 템플릿 (쉼표로 구분, 파일) + -itags, -include-tags string[] 기본값 또는 구성에 의해 제외되더라도 실행되어야 하는 태그 + -id, -template-id string[] 템플릿 id를 기반으로 실행할 템플릿 (쉼표로 구분, 파일, 와일드카드 허용) + -eid, -exclude-id string[] 템플릿 id를 기반으로 제외할 템플릿 (쉼표로 구분, 파일) + -it, -include-templates string[] 기본값 또는 구성에 의해 제외되더라도 실행되어야 하는 템플릿 + -et, -exclude-templates string[] 제외할 템플릿 또는 템플릿 디렉토리 (쉼표로 구분, 파일) + -em, -exclude-matchers string[] 결과에서 제외할 템플릿 매처 + -s, -severity value[] 심각도를 기반으로 실행할 템플릿. 가능한 값: info, low, medium, high, critical, unknown + -es, -exclude-severity value[] 심각도를 기반으로 제외할 템플릿. 가능한 값: info, low, medium, high, critical, unknown + -pt, -type value[] 프로토콜 유형을 기반으로 실행할 템플릿. 가능한 값: dns, file, http, headless, tcp, workflow, ssl, websocket, whois, code, javascript + -ept, -exclude-type value[] 프로토콜 유형을 기반으로 제외할 템플릿. 가능한 값: dns, file, http, headless, tcp, workflow, ssl, websocket, whois, code, javascript + -tc, -template-condition string[] 표현식 조건을 기반으로 실행할 템플릿 OUTPUT: - -o, -output string 발견된 문제/취약점를 쓰기 위한 출력 파일 - -sresp, -store-resp nuclei을 통해 전달된 모든 요청/응답을 출력 디렉터리에 저장 - -srd, -store-resp-dir string nuclei을 통해 전달된 모든 요청/응답을 사용자 지정 디렉터리에 저장(기본 "output") + -o, -output string 발견된 문제/취약점을 작성할 출력 파일 + -sresp, -store-resp 모든 요청/응답을 nuclei를 통해 출력 디렉토리에 저장 + -srd, -store-resp-dir string 모든 요청/응답을 nuclei를 통해 사용자 정의 디렉토리에 저장 (기본값 "output") -silent 결과만 표시 - -nc, -no-color 출력 내용 색상 비활성화 (ANSI escape codes) - -j, -jsonl JSONL(ines) 형식으로 출력 - -irr, -include-rr JSONL 출력에 요청/응답 쌍 포함(결과만) - -or, -omit-raw - -nm, -no-meta cli 출력에서 결과 메타데이터 출력 비활성화 - -nts, -no-timestamp cli 출력에서 결과 타임스탬프 출력 비활성화 - -rdb, -report-db string nuclei 보고 데이터베이스(보고서 데이터를 유지하려면 항상 이것을 사용) + -nc, -no-color 출력 내용 색상 비활성화 (ANSI 이스케이프 코드) + -j, -jsonl JSONL(ines) 형식으로 출력 작성 + -irr, -include-rr -omit-raw JSON, JSONL, Markdown 출력에 요청/응답 쌍 포함 (결과만 해당) [사용 중단 -omit-raw 사용] (기본값 true) + -or, -omit-raw JSON, JSONL, Markdown 출력에서 요청/응답 쌍 생략 (결과만 해당) + -ot, -omit-template JSON, JSONL 출력에서 인코딩된 템플릿 생략 + -nm, -no-meta CLI 출력에서 결과 메타데이터 인쇄 비활성화 + -ts, -timestamp CLI 출력에 타임스탬프 인쇄 활성화 + -rdb, -report-db string nuclei 보고 데이터베이스 (보고 데이터를 유지하려면 항상 이것을 사용) -ms, -matcher-status 매치 실패 상태 표시 - -me, -markdown-export string 마크다운 형식으로 결과를 내보낼 디렉터리 - -se, -sarif-export string 결과를 SARIF 형식으로 내보내는 파일 + -me, -markdown-export string Markdown 형식으로 결과를 내보낼 디렉토리 + -se, -sarif-export string SARIF 형식으로 결과를 내보낼 파일 + -je, -json-export string JSON 형식으로 결과를 내보낼 파일 + -jle, -jsonl-export string JSONL(ine) 형식으로 결과를 내보낼 파일 CONFIGURATIONS: - -config string nuclei 환경 설정 파일 경로 - -fr, -follow-redirects http 템플릿에 following redirects 활성화 - -mr, -max-redirects int http 템플릿에 따라야 할 최대 리디렉션 수(기본값 10) - -dr, -disable-redirects http 템플릿에 대한 리디렉션 비활성화 - -rc, -report-config string nuclei 보고 모듈 환경 설정 파일 - -H, -header string[] 헤더:값 형식의 모든 http 요청에 포함할 사용자 정의 헤더/쿠키(cli, file) - -V, -var value 키=값 형식의 사용자 정의 변수 - -r, -resolvers string nuclei에 대한 리졸버 목록이 포함된 파일 - -sr, -system-resolvers 에러 fallback으로 시스템 DNS 리졸빙 사용 - -passive 수동 HTTP 응답 처리 모드 활성화 - -ev, -env-vars 템플릿에서 환경 변수를 사용할 수 있도록 설정 - -cc, -client-cert string 스캔된 호스트에 인증하는 데 사용되는 클라이언트 인증서 파일(PEM-encoded) - -ck, -client-key string 스캔된 호스트에 인증하는 데 사용되는 클라이언트 key 파일(PEM-encoded) - -ca, -client-ca string 스캔된 호스트에 인증하는 데 사용되는 클라이언트 인증 기관 파일(PEM-encoded) - -sml, -show-match-line 파일 템플릿에 대해 일치하는 줄 표시, extractors에서만 작동 - -ztls tls13의 표준으로 autofallback과 함께 ztls 라이브러리 사용 - -sni string 사용할 tls sni 호스트 이름(기본: 입력한 도메인 이름) + -config string nuclei 구성 파일 경로 + -fr, -follow-redirects http 템플릿에 대한 리디렉션 따라가기 활성화 + -fhr, -follow-host-redirects 같은 호스트에서 리디렉션 따라가기 + -mr, -max-redirects int http 템플릿에 대해 따라갈 최대 리디렉션 수 (기본값 10) + -dr, -disable-redirects http 템플릿에 대한 리디렉션 비활성화 + -rc, -report-config string nuclei 보고 모듈 구성 파일 + -H, -header string[] 모든 http 요청에 포함할 사용자 정의 헤더/쿠키 (header:value 형식) (cli, file) + -V, -var value key=value 형식의 사용자 정의 변수 + -r, -resolvers string nuclei에 대한 리졸버 목록이 있는 파일 + -sr, -system-resolvers 오류 대체로 시스템 DNS 해결 사용 + -dc, -disable-clustering 요청 클러스터링 비활성화 + -passive 수동 HTTP 응답 처리 모드 활성화 + -fh2, -force-http2 요청에 http2 연결 강제 + -ev, -env-vars 템플릿에서 환경 변수 사용 활성화 + -cc, -client-cert string 스캔 대상 호스트에 대한 인증에 사용되는 클라이언트 인증서 파일 (PEM 인코딩) + -ck, -client-key string 스캔 대상 호스트에 대한 인증에 사용되는 클라이언트 키 파일 (PEM 인코딩) + -ca, -client-ca string 스캔 대상 호스트에 대한 인증에 사용되는 클라이언트 인증서 기관 파일 (PEM 인코딩) + -sml, -show-match-line 파일 템플릿에 대한 매치 라인 표시, 추출기만 작동 + -ztls ztls 라이브러리 사용, tls13에 대한 표준 하나로 자동 대체 [사용 중단] 자동 대체는 기본적으로 ztls로 활성화됨 + -sni string 사용할 tls sni 호스트 이름 (기본값: 입력 도메인 이름) + -lfa, -allow-local-file-access 시스템 어디에서나 파일 (페이로드) 액세스 허용 + -lna, -restrict-local-network-access 로컬 / 개인 네트워크로의 연결 차단 + -i, -interface string 네트워크 스캔에 사용할 네트워크 인터페이스 + -at, -attack-type string 수행할 페이로드 조합 유형 (batteringram,pitchfork,clusterbomb) + -sip, -source-ip string 네트워크 스캔에 사용할 소스 IP 주소 + -rsr, -response-size-read int 바이트 단위로 읽을 최대 응답 크기 (기본값 10485760) + -rss, -response-size-save int 바이트 단위로 읽을 최대 응답 크기 (기본값 1048576) + -reset reset은 모든 nuclei 구성 및 데이터 파일을 제거합니다 (nuclei-templates 포함) + -tlsi, -tls-impersonate 실험적인 클라이언트 hello (ja3) tls 무작위화 활성화 INTERACTSH: - -iserver, -interactsh-server string 자체 호스팅된 인스턴스에 대한 interactsh 서버 URL (기본: oast.pro,oast.live,oast.site,oast.online,oast.fun,oast.me) - -itoken, -interactsh-token string 자체 호스팅된 interactsh 서버에 대한 인증 토큰 - -interactions-cache-size int 상호 작용 캐시에 유지할 요청 수 (기본 5000) - -interactions-eviction int 캐시에서 요청을 제거하기 전에 대기할 시간(초) (기본 60) - -interactions-poll-duration int 각 상호 작용 폴링 요청 전에 대기할 시간(초) (기본 5) - -interactions-cooldown-period int 종료 전 상호작용 폴링을 위한 추가 시간 (기본 5) - -ni, -no-interactsh OAST 테스트를 위해 interactsh 서버 비활성화, OAST 기반 템플릿 제외 + -iserver, -interactsh-server string 자체 호스팅 인스턴스를 위한 interactsh 서버 url (기본값: oast.pro,oast.live,oast.site,oast.online,oast.fun,oast.me) + -itoken, -interactsh-token string 자체 호스팅 interactsh 서버를 위한 인증 토큰 + -interactions-cache-size int 상호 작용 캐시에 유지할 요청 수 (기본값 5000) + -interactions-eviction int 캐시에서 요청을 제거하기 전에 기다릴 초 수 (기본값 60) + -interactions-poll-duration int 각 상호 작용 폴 요청 사이에 기다릴 초 수 (기본값 5) + -interactions-cooldown-period int 종료 전에 상호 작용 폴링에 추가 시간 (기본값 5) + -ni, -no-interactsh OAST 테스트를 위한 interactsh 서버 비활성화, OAST 기반 템플릿 제외 + +FUZZING: + -ft, -fuzzing-type string 템플릿에 설정된 퍼징 유형 재정의 (replace, prefix, postfix, infix) + -fm, -fuzzing-mode string 템플릿에 설정된 퍼징 모드 재정의 (multiple, single) + +UNCOVER: + -uc, -uncover uncover 엔진 활성화 + -uq, -uncover-query string[] uncover 검색 쿼리 + -ue, -uncover-engine string[] uncover 검색 엔진 (shodan,censys,fofa,shodan-idb,quake,hunter,zoomeye,netlas,criminalip,publicwww,hunterhow) (기본값 shodan) + -uf, -uncover-field string 반환할 uncover 필드 (ip,port,host) (기본값 "ip:port") + -ul, -uncover-limit int 반환할 uncover 결과 (기본값 100) + -ur, -uncover-ratelimit int 알려지지 않은 ratelimit의 엔진을 재정의하는 ratelimit (기본값 60 req/min) (기본값 60) RATE-LIMIT: - -rl, -rate-limit int 초당 보낼 최대 요청 수 (기본 150) - -rlm, -rate-limit-minute int 분당 보낼 최대 요청 수 - -bs, -bulk-size int 템플릿당 병렬로 분석할 최대 호스트 수 (기본 25) - -c, -concurrency int 병렬로 실행할 최대 템플릿 수 (기본 25) - -hbs, -headless-bulk-size int 템플릿당 병렬로 분석할 최대 headless 호스트 수 (기본 10) - -hc, -headless-concurrency int 병렬로 실행할 최대 headless 템플릿 수 (기본 10) + -rl, -rate-limit int 초당 보낼 최대 요청 수 (기본값 150) + -rlm, -rate-limit-minute int 분당 보낼 최대 요청 수 + -bs, -bulk-size int 템플릿당 병렬로 분석할 최대 호스트 수 (기본값 25) + -c, -concurrency int 병렬로 실행할 최대 템플릿 수 (기본값 25) + -hbs, -headless-bulk-size int 템플릿당 병렬로 분석할 최대 headless 호스트 수 (기본값 10) + -headc, -headless-concurrency int 병렬로 실행할 최대 headless 템플릿 수 (기본값 10) OPTIMIZATIONS: - -timeout int 타임아웃 전 대기 시간(초) (기본 5) - -retries int 실패한 요청을 재시도하는 횟수 (기본 1) - -ldp, -leave-default-ports leave default HTTP/HTTPS ports (eg. host:80,host:443 - -mhe, -max-host-error int 스캔을 건너뛰기 전에 호스트에 대한 최대 오류 수 (기본 30) - -te, -track-error string[] 주어진 오류를 max-host-error 감시 목록(표준, 파일)에 추가 - -nmhe, -no-mhe disable skipping host from scan based on errors - -project 프로젝트 폴더를 사용하여 동일한 요청을 여러 번 보내지 않음 - -project-path string 특정 프로젝트 경로 설정 - -spm, -stop-at-first-match 첫 번째 일치 후 HTTP 요청 처리 중지 (template/workflow 로직이 중단될 수 있음) - -stream stream 모드 - 입력을 정렬하지 않고 elaborating 시작 + -timeout int 타임아웃 전에 기다릴 초 수 (기본값 10) + -retries int 실패한 요청을 재시도하는 횟수 (기본값 1) + -ldp, -leave-default-ports 기본 HTTP/HTTPS 포트 남겨두기 (예: host:80,host:443) + -mhe, -max-host-error int 스캔에서 건너뛰기 전에 호스트에서 허용되는 최대 오류 수 (기본값 30) + -te, -track-error string[] 최대 호스트 오류 감시 목록에 주어진 오류 추가 (표준, 파일) + -nmhe, -no-mhe 오류를 기반으로 스캔에서 호스트 건너뛰기 비활성화 + -project 동일한 요청을 여러 번 보내는 것을 피하기 위해 프로젝트 폴더 사용 + -project-path string 특정 프로젝트 경로 설정 (기본값 "/tmp") + -spm, -stop-at-first-match 첫 번째 매치 후 HTTP 요청 처리 중지 (템플릿/워크플로우 로직이 깨질 수 있음) + -stream 스트림 모드 - 입력 정렬 없이 시작 + -ss, -scan-strategy value 스캔하는 동안 사용할 전략(auto/host-spray/template-spray) (기본값 auto) + -irt, -input-read-timeout value 입력 읽기 시간 초과 (기본값 3m0s) + -nh, -no-httpx 비 URL 입력에 대한 httpx 프로브 비활성화 + -no-stdin stdin 처리를 비활성화합니다 HEADLESS: - -headless 헤드리스 브라우저 지원이 필요한 템플릿 활성화(root user on linux will disable sandbox) - -page-timeout int 헤드리스 모드에서 각 페이지를 기다리는 시간(초)(기본 20) - -sb, -show-browser 헤드리스 모드로 템플릿을 실행할 때 화면에 브라우저 표시 - -sc, -system-chrome 설치된 nuclei 대신 로컬에 설치된 chrome 브라우저 사용 + -headless headless 브라우저 지원이 필요한 템플릿 활성화 (Linux의 root 사용자는 샌드박스 비활성화) + -page-timeout int headless 모드에서 각 페이지를 기다리는 시간(초) (기본값 20) + -sb, -show-browser headless 모드로 실행하는 템플릿에서 브라우저 화면 표시 + -ho, -headless-options string[] 추가 옵션으로 headless chrome 시작 + -sc, -system-chrome nuclei가 설치한 Chrome 대신 로컬에 설치된 Chrome 브라우저 사용 + -lha, -list-headless-action 사용 가능한 headless 액션 목록 표시 DEBUG: - -debug 모든 요청 및 응답 표시 + -debug 모든 요청과 응답 표시 -dreq, -debug-req 보낸 모든 요청 표시 -dresp, -debug-resp 받은 모든 응답 표시 - -p, -proxy string[] 사용할 http/socks5 프록시 목록(쉼표로 구분하거나 파일 입력) - -pi, -proxy-internal 모든 내부 요청을 프록시 + -p, -proxy string[] 사용할 http/socks5 프록시 목록 (쉼표로 구분하거나 파일 입력) + -pi, -proxy-internal 모든 내부 요청을 프록시를 통해 전송 + -ldf, -list-dsl-function 지원되는 모든 DSL 함수 시그니처 목록 표시 -tlog, -trace-log string 보낸 요청 추적 로그를 기록할 파일 -elog, -error-log string 보낸 요청 오류 로그를 기록할 파일 - -version nuclei 버전 출력 - -hm, -hang-monitor nuclei hang monitoring 활성화 - -v, -verbose 상세 출력 표시 - -vv 스캔을 위해 로드된 디스플레이 템플릿 표시 - -ep, -enable-pprof pprof debugging server 활성화 - -tv, -templates-version 설치된 nuclei-templates 버전 출력 + -version nuclei 버전 표시 + -hm, -hang-monitor nuclei 멈춤 모니터링 활성화 + -v, -verbose 자세한 출력 표시 + -profile-mem string 선택적인 nuclei 메모리 프로필 덤프 파일 + -vv 스캔에 로드된 템플릿 표시 + -svd, -show-var-dump 디버깅을 위한 변수 덤프 표시 + -ep, -enable-pprof pprof 디버깅 서버 활성화 + -tv, -templates-version 설치된 nuclei-templates의 버전 표시 + -hc, -health-check 진단 검사 실행 UPDATE: - -update 최신 릴리스 버전으로 nuclei 엔진 업데이트 - -ut, -update-templates 최신 릴리스 버전으로 nuclei-templates 엔진 업데이트 - -ud, -update-directory string nuclei-templates를 설치할 기본 디렉터리를 덮어씀 - -duc, -disable-update-check 자동 nuclei/templates 업데이트 확인 비활성화 + -up, -update 최신 릴리스 버전으로 nuclei 엔진 업데이트 + -ut, -update-templates 최신 릴리스 버전으로 nuclei-templates 업데이트 + -ud, -update-template-dir string nuclei-templates를 설치/업데이트할 사용자 지정 디렉토리 + -duc, -disable-update-check 자동 nuclei/templates 업데이트 확인 비활성화 STATISTICS: -stats 실행 중인 스캔에 대한 통계 표시 - -sj, -stats-json JSONL(ines) 형식으로 출력 파일에 통계 데이터 쓰기 - -si, -stats-interval int 통계 업데이트를 표시할 때까지 대기하는 시간(초) (기본 5) - -m, -metrics expose nuclei metrics on a port - -mp, -metrics-port int port to expose nuclei metrics on (기본 9092) + -sj, -stats-json JSONL(ines) 형식으로 통계 표시 + -si, -stats-interval int 통계 업데이트를 표시하기까지 기다릴 초 수 (기본값 5) + -mp, -metrics-port int nuclei 메트릭스를 노출할 포트 (기본값 9092) + +CLOUD: + -auth projectdiscovery cloud (pdcp) api 키 설정 + -cup, -cloud-upload 스캔 결과를 pdcp 대시보드에 업로드 + + +예시: +단일 호스트에서 nuclei 실행: + $ nuclei -target example.com + +특정 템플릿 디렉토리로 nuclei 실행: + $ nuclei -target example.com -t http/cves/ -t ssl + +호스트 목록에 대해 nuclei 실행: + $ nuclei -list hosts.txt + +JSON 출력으로 nuclei 실행: + $ nuclei -target example.com -json-export output.json + +정렬된 Markdown 출력으로 nuclei 실행 (환경 변수 사용): + $ MARKDOWN_EXPORT_SORT_MODE=template nuclei -target example.com -markdown-export nuclei_report/ + +추가 문서는 여기에서 확인할 수 있습니다: https://docs.nuclei.sh/getting-started/running ``` ### Nuclei 실행 diff --git a/cmd/nuclei/main.go b/cmd/nuclei/main.go index ed45947b75..dbd190afd6 100644 --- a/cmd/nuclei/main.go +++ b/cmd/nuclei/main.go @@ -367,7 +367,7 @@ on extensive configurability, massive extensibility and ease of use.`) flagSet.CreateGroup("cloud", "Cloud", flagSet.BoolVar(&pdcpauth, "auth", false, "configure projectdiscovery cloud (pdcp) api key"), - flagSet.BoolVarP(&options.DisableCloudUpload, "disable-cloud-upload", "dcu", false, "disable uploading scan results to pdcp"), + flagSet.BoolVarP(&options.EnableCloudUpload, "cloud-upload", "cup", false, "upload scan results to pdcp dashboard"), ) flagSet.SetCustomHelpText(`EXAMPLES: diff --git a/internal/runner/runner.go b/internal/runner/runner.go index c78fb83e3d..edbbc678be 100644 --- a/internal/runner/runner.go +++ b/internal/runner/runner.go @@ -60,8 +60,8 @@ import ( var ( // HideAutoSaveMsg is a global variable to hide the auto-save message HideAutoSaveMsg = false - // DisableCloudUpload is a global variable to disable cloud upload - DisableCloudUpload = false + // EnableCloudUpload is global variable to enable cloud upload + EnableCloudUpload = false ) // Runner is a client for running the enumeration process. @@ -344,7 +344,7 @@ func (r *Runner) Close() { // setupPDCPUpload sets up the PDCP upload writer // by creating a new writer and returning it func (r *Runner) setupPDCPUpload(writer output.Writer) output.Writer { - if r.options.DisableCloudUpload || DisableCloudUpload { + if !(r.options.EnableCloudUpload || EnableCloudUpload) { r.pdcpUploadErrMsg = fmt.Sprintf("[%v] Scan results upload to cloud is disabled.", aurora.BrightYellow("WRN")) return writer } @@ -675,5 +675,5 @@ func expandEndVars(f reflect.Value, fieldType reflect.StructField) { func init() { HideAutoSaveMsg = env.GetEnvOrDefault("DISABLE_CLOUD_UPLOAD_WRN", false) - DisableCloudUpload = env.GetEnvOrDefault("DISABLE_CLOUD_UPLOAD", false) + EnableCloudUpload = env.GetEnvOrDefault("ENABLE_CLOUD_UPLOAD", false) } diff --git a/pkg/types/types.go b/pkg/types/types.go index fa6c11b63c..e8d03d1c6b 100644 --- a/pkg/types/types.go +++ b/pkg/types/types.go @@ -357,7 +357,7 @@ type Options struct { // EnableCodeTemplates enables code templates EnableCodeTemplates bool // Disables cloud upload - DisableCloudUpload bool + EnableCloudUpload bool } // ShouldLoadResume resume file