Skip to content

Commit fd0da2c

Browse files
authored
Merge pull request #163 from bauthard/master
updating information for chained workflow
2 parents 9826772 + 0801439 commit fd0da2c

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed

GUIDE.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Let's start with the basics and define our own workflow file for detecting the p
3232
* [<strong>Retries</strong>](#retries)
3333
* [<strong>Matchers</strong>](#matchers)
3434
* [<strong>Example DNS Template</strong>](#example-dns-template)
35+
* [<strong>Chained workflow</strong>](#chained-workflow)
3536

3637
## Template Details
3738

@@ -540,3 +541,83 @@ dns:
540541
- "IN\tA"
541542
condition: and
542543
```
544+
545+
# Chained workflow
546+
547+
It's also possible to create conditional templates which executes after matching the condition from the previous templates, mostly useful for vulnerability detection and exploitation and tech based detection and exploitation, single, multiple along with directory based templates can be executed in chained workflow template.
548+
549+
Chained workflow supports both HTTP and DNS request based templates.
550+
551+
Example of running single / multiple templates only if `detect-jira.yaml` is detected host running Jira application.
552+
553+
```yaml
554+
id: workflow-example
555+
info:
556+
name: Jira-Pawner
557+
author: mzack9999
558+
559+
variables:
560+
561+
# defining templates using variables.
562+
# variables names as user-defined, it could be anything.
563+
# relative path support is now added into the nuclei engine for better UX.
564+
565+
jira: panels/detect-jira.yaml
566+
jira-cve-1: cves/CVE-2018-20824.yaml
567+
jira-cve-2: cves/CVE-2019-3399.yaml
568+
jira-cve-3: cves/CVE-2019-11581.yaml
569+
jira-cve-4: cves/CVE-2017-18101.yaml
570+
571+
logic:
572+
|
573+
574+
# defening conditional templates.
575+
576+
if jira() {
577+
578+
# if the above condition returns true, run all the below templates.
579+
# if the above condition fails, no templates will be executed.
580+
581+
jira-cve-1()
582+
jira-cve-2()
583+
jira-cve-3()
584+
jira-cve-4()
585+
586+
}
587+
```
588+
589+
Example of running directory based templates when `detect-jira.yaml` is detected host running Jira application, based on this you can define your own workflow to run scans based on any or specific stacks.
590+
591+
```yaml
592+
id: workflow-example
593+
info:
594+
name: Jira-Pawner
595+
author: mzack9999
596+
597+
variables:
598+
599+
# defining templates using variables.
600+
# variables names as user-defined, it could be anything.
601+
# relative path support is now added into the nuclei engine for better UX.
602+
603+
jira: panels/detect-jira.yaml
604+
605+
# defining directory to run all the templates
606+
607+
jira-pwn: my-jira-templates/
608+
609+
logic:
610+
|
611+
612+
# defening conditional templates.
613+
614+
if jira() {
615+
616+
# if the above condition returns true, run all templates from directory.
617+
# if the above condition fails, no templates will be executed.
618+
619+
jira-pwn()
620+
621+
}
622+
```
623+

0 commit comments

Comments
 (0)