From 5f5f2dd82b99ba2941be87d28b541ac657cad713 Mon Sep 17 00:00:00 2001 From: Michael Skelton <886344+codingo@users.noreply.github.com> Date: Mon, 19 Aug 2019 21:57:45 +1000 Subject: [PATCH 01/20] Update __version__.py --- Interlace/lib/core/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Interlace/lib/core/__version__.py b/Interlace/lib/core/__version__.py index c24ed73..6d5e09d 100644 --- a/Interlace/lib/core/__version__.py +++ b/Interlace/lib/core/__version__.py @@ -1 +1 @@ -__version__ = '1.5.4' +__version__ = '1.6' From 07bee4d6ed4e084f900e2f22c53c9bcba85ea77d Mon Sep 17 00:00:00 2001 From: Michael Skelton <886344+codingo@users.noreply.github.com> Date: Mon, 19 Aug 2019 22:20:52 +1000 Subject: [PATCH 02/20] Added blocker explanation --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index f383e50..db88bd0 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,32 @@ The following variables will be replaced in commands at runtime: | \_proxy\_ | Replaced with the proxy list from interlace | | \_random\_ | Replaced with the randomly-chosen file from interlace | +# Advanced Command File Usage (block and blocker) +Interlace also makes the use of two additional features for controlling execution flow within a command file: `\_blocker\_` and `\_block:\_`. + +## Blocker +Blockers prevent anything below them from executing until all commands above them have completed (for the currently active host). For example, in the following: + +``` +mkdir -p _output_/_target_/scans/ +_blocker_ +nmap _target_ -oA _output_/_target_/scans/_target_-nmap +``` + +The use of a blocker here prevents nmap from running on a target before the base folder structure has been created, preventing nmap from throwing an exception. + +## Blocks +Blocks force everything within them to run sequentially. You can also use multiple blocks per command file. For example, in the following: + +``` +_block:nmap_ +mkdir -p _target_/output/scans/ +nmap _target_ -oN _target_/output/scans/_target_-nmap +_block:nmap_ +nikto --host _target_ +``` +In this example, the block would run the same as before, but assuming the thread count is high enough then nikto would begin to run immediately, passing results back to the terminal (whilst nmap and file creation happened in the background). + # Usage Examples ## Run Nikto Over Multiple Sites Let's assume that you have a file `targets.txt` that has the following contents: From 92b693fc0e1a196eead9fc05043796b59750ff6c Mon Sep 17 00:00:00 2001 From: Michael Skelton <886344+codingo@users.noreply.github.com> Date: Mon, 19 Aug 2019 22:22:55 +1000 Subject: [PATCH 03/20] Update README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index db88bd0..3249302 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,16 @@ Easily turn single threaded command line applications into a fast, multi-threade [![Python 3.2|3.6](https://img.shields.io/badge/python-3.2|3.6-green.svg)](https://www.python.org/) [![License](https://img.shields.io/badge/license-GPL3-_red.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html) [![Twitter](https://img.shields.io/badge/twitter-@codingo__-blue.svg)](https://twitter.com/codingo_) [![Twitter](https://img.shields.io/badge/twitter-@sml555__-blue.svg)](https://twitter.com/sml555_) + + # Reviews / Howto Guides [Interlace: A Tool to Easily Automate and Multithread Your Pentesting & Bug Bounty Workflow Without Any Coding](https://medium.com/@hakluke/interlace-a-productivity-tool-for-pentesters-and-bug-hunters-automate-and-multithread-your-d18c81371d3d) +# Table of Contents +- [Setup](#Setup) +- [Usage](#Usage) +- [Further information regarding ports (-p)](# Further information regarding ports (-p) + # Setup Install using: From e60df0ddd0b3f199863c554f6820551d4db23a0d Mon Sep 17 00:00:00 2001 From: Michael Skelton <886344+codingo@users.noreply.github.com> Date: Mon, 19 Aug 2019 22:23:07 +1000 Subject: [PATCH 04/20] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3249302..22161a0 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Easily turn single threaded command line applications into a fast, multi-threade # Table of Contents - [Setup](#Setup) - [Usage](#Usage) -- [Further information regarding ports (-p)](# Further information regarding ports (-p) +- [Further information regarding ports (-p)](# Further information regarding ports (-p)) # Setup Install using: From fa6e4f96275802b00319f47ed88cc7799ba9eab2 Mon Sep 17 00:00:00 2001 From: Michael Skelton <886344+codingo@users.noreply.github.com> Date: Mon, 19 Aug 2019 22:23:41 +1000 Subject: [PATCH 05/20] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 22161a0..7d93e39 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Easily turn single threaded command line applications into a fast, multi-threade # Table of Contents - [Setup](#Setup) - [Usage](#Usage) -- [Further information regarding ports (-p)](# Further information regarding ports (-p)) +- [Further information regarding ports (-p)](#Further-information-regarding-ports) # Setup Install using: From a476705dd9277d1ff9dd028a9433ad3ae69efc06 Mon Sep 17 00:00:00 2001 From: Michael Skelton <886344+codingo@users.noreply.github.com> Date: Mon, 19 Aug 2019 22:25:03 +1000 Subject: [PATCH 06/20] Update README.md --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7d93e39..95b07e5 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,9 @@ Easily turn single threaded command line applications into a fast, multi-threade # Table of Contents - [Setup](#Setup) - [Usage](#Usage) -- [Further information regarding ports (-p)](#Further-information-regarding-ports) +- [Further information regarding ports](#Further-information-regarding-ports) +- [Further information regarding targets](#Further-information-regarding-targets) +- [Variable Replacements](#Variable-Replacements) # Setup Install using: @@ -46,7 +48,7 @@ Dependencies will then be installed and Interlace will be added to your path as | --silent | If set then only important information will be displayed and banners and other information will be redacted | | -v | If set then verbose output will be displayed in the terminal | -## Further information regarding ports (-p) +## Further information regarding ports | Example | Notation Type | |---------|----------------------------------------------------------| @@ -54,7 +56,7 @@ Dependencies will then be installed and Interlace will be added to your path as | 1-80 | Dash notation, perform a command for each port from 1-80 | | 80,443 | Perform a command for both port 80, and port 443 | -## Further information regarding targets (-t or -tL) +## Further information regarding targets Both `-t` and `-tL` will be processed the same. You can pass targets the same as you would when using nmap. This can be done using CIDR notation, dash notation, or a comma-delimited list of targets. A single target list file can also use different notation types per line. Alternatively, you can pass targets in via stdin and neither -t or -tL will be required. From 8f626dbd2347cd35411aace4417b8a6fae49d0ba Mon Sep 17 00:00:00 2001 From: Michael Skelton <886344+codingo@users.noreply.github.com> Date: Mon, 19 Aug 2019 22:26:48 +1000 Subject: [PATCH 07/20] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 95b07e5..12cb963 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,10 @@ Easily turn single threaded command line applications into a fast, multi-threade - [Further information regarding ports](#Further-information-regarding-ports) - [Further information regarding targets](#Further-information-regarding-targets) - [Variable Replacements](#Variable-Replacements) +- [Advanced Usage: Blocker](#Blocker) +- [Advanced Usage: Blocks](#Blocks) +- [Usage Examples](#Usage-Examples) +- [Exclusions](#Exclusions) # Setup Install using: @@ -210,8 +214,6 @@ Using the above example, let's assume you want independent scans to be via diffe ➜ /tmp interlace -tL ./targets.txt -pL ./proxies.txt -threads 5 -c "nikto --host _target_:_port_ -useproxy _proxy_ > ./_target_-_port_-nikto.txt" -p 80,443 -v ``` - - # Authors and Thanks Originally written by Michael Skelton ([codingo](https://twitter.com/codingo_)) and Sajeeb Lohani ([sml555](https://twitter.com/sml555_)) with help from Charelle Collett ([@Charcol0x89](https://twitter.com/Charcol0x89)) for threading refactoring and overall approach, and Luke Stephens ([hakluke](https://twitter.com/hakluke)) for testing and approach. From 39ecc2f76602017e3080c3fe8ab8022a3b844df0 Mon Sep 17 00:00:00 2001 From: Michael Skelton <886344+codingo@users.noreply.github.com> Date: Mon, 19 Aug 2019 22:29:22 +1000 Subject: [PATCH 08/20] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 12cb963..9e06a8d 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,9 @@ The following variables will be replaced in commands at runtime: | \_random\_ | Replaced with the randomly-chosen file from interlace | # Advanced Command File Usage (block and blocker) -Interlace also makes the use of two additional features for controlling execution flow within a command file: `\_blocker\_` and `\_block:\_`. +Interlace also makes the use of two additional features for controlling execution flow within a command file: `_blocker_` and `_block:_`. Blockers prevent execution before them, and blocks can be used to force sequential execution of threads for a target. + +Threads will still multithread per-target, but using these features can allow you to control the execution flow for those targets more directly to prevent commands from running out of order. ## Blocker Blockers prevent anything below them from executing until all commands above them have completed (for the currently active host). For example, in the following: From cf75280b012bc0be819af4a8dd6ec482df425653 Mon Sep 17 00:00:00 2001 From: Michael Skelton <886344+codingo@users.noreply.github.com> Date: Mon, 19 Aug 2019 22:30:23 +1000 Subject: [PATCH 09/20] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9e06a8d..685e25e 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Easily turn single threaded command line applications into a fast, multi-threade - [Further information regarding ports](#Further-information-regarding-ports) - [Further information regarding targets](#Further-information-regarding-targets) - [Variable Replacements](#Variable-Replacements) +- [Advanced Command File Usage](#Advanced-Command-File-Usage) - [Advanced Usage: Blocker](#Blocker) - [Advanced Usage: Blocks](#Blocks) - [Usage Examples](#Usage-Examples) @@ -78,7 +79,7 @@ The following variables will be replaced in commands at runtime: | \_proxy\_ | Replaced with the proxy list from interlace | | \_random\_ | Replaced with the randomly-chosen file from interlace | -# Advanced Command File Usage (block and blocker) +# Advanced Command File Usage Interlace also makes the use of two additional features for controlling execution flow within a command file: `_blocker_` and `_block:_`. Blockers prevent execution before them, and blocks can be used to force sequential execution of threads for a target. Threads will still multithread per-target, but using these features can allow you to control the execution flow for those targets more directly to prevent commands from running out of order. From 0d1ee79abf89182e94bc96280b16149e341676df Mon Sep 17 00:00:00 2001 From: Michael Skelton <886344+codingo@users.noreply.github.com> Date: Mon, 19 Aug 2019 22:31:54 +1000 Subject: [PATCH 10/20] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 685e25e..87d9073 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ The following variables will be replaced in commands at runtime: | \_random\_ | Replaced with the randomly-chosen file from interlace | # Advanced Command File Usage -Interlace also makes the use of two additional features for controlling execution flow within a command file: `_blocker_` and `_block:_`. Blockers prevent execution before them, and blocks can be used to force sequential execution of threads for a target. +Interlace also makes the use of two additional features for controlling execution flow within a command file: `_blocker_` and `_block:_`. Blockers prevent execution of commands listed after them, until all commands before them have completed, and blocks can be used to force sequential execution of commands stated within a block, for a target. Threads will still multithread per-target, but using these features can allow you to control the execution flow for those targets more directly to prevent commands from running out of order. From 1576d94a25ad1206ac580a53d0f1080bd48ed15f Mon Sep 17 00:00:00 2001 From: Michael Skelton <886344+codingo@users.noreply.github.com> Date: Mon, 19 Aug 2019 22:39:37 +1000 Subject: [PATCH 11/20] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 87d9073..7dc51bf 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,8 @@ The following variables will be replaced in commands at runtime: # Advanced Command File Usage Interlace also makes the use of two additional features for controlling execution flow within a command file: `_blocker_` and `_block:_`. Blockers prevent execution of commands listed after them, until all commands before them have completed, and blocks can be used to force sequential execution of commands stated within a block, for a target. +These are run on a per-target level. If there are threads available and a blocker is in the way for the current target, Interlace will start commands from the next target within a target list in order to maximise efficiency. + Threads will still multithread per-target, but using these features can allow you to control the execution flow for those targets more directly to prevent commands from running out of order. ## Blocker From 23fd1ca9c1e73b9a08d10ff75c9b46a9554e02cd Mon Sep 17 00:00:00 2001 From: Michael Skelton <886344+codingo@users.noreply.github.com> Date: Mon, 19 Aug 2019 22:40:39 +1000 Subject: [PATCH 12/20] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7dc51bf..2cdc245 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ Interlace also makes the use of two additional features for controlling executio These are run on a per-target level. If there are threads available and a blocker is in the way for the current target, Interlace will start commands from the next target within a target list in order to maximise efficiency. -Threads will still multithread per-target, but using these features can allow you to control the execution flow for those targets more directly to prevent commands from running out of order. +Using these features will allow you to control the execution flow for individual targets more directly in order to prevent commands from running out of order. ## Blocker Blockers prevent anything below them from executing until all commands above them have completed (for the currently active host). For example, in the following: From 7d4cd00efa6b4c21b64debea36e62690d53f7079 Mon Sep 17 00:00:00 2001 From: Michael Skelton <886344+codingo@users.noreply.github.com> Date: Mon, 19 Aug 2019 22:43:06 +1000 Subject: [PATCH 13/20] Update README.md --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2cdc245..cace180 100644 --- a/README.md +++ b/README.md @@ -10,14 +10,15 @@ Easily turn single threaded command line applications into a fast, multi-threade # Table of Contents - [Setup](#Setup) -- [Usage](#Usage) -- [Further information regarding ports](#Further-information-regarding-ports) -- [Further information regarding targets](#Further-information-regarding-targets) +- [Usage - Flags](#Usage) +- [Usage Examples](#Usage-Examples) +- [Port Notation Explained](#Further-information-regarding-ports) +- [Target Notation Explained](#Further-information-regarding-targets) - [Variable Replacements](#Variable-Replacements) - [Advanced Command File Usage](#Advanced-Command-File-Usage) - [Advanced Usage: Blocker](#Blocker) - [Advanced Usage: Blocks](#Blocks) -- [Usage Examples](#Usage-Examples) + - [Exclusions](#Exclusions) # Setup From 190ca1350b044abf98ed48605be394dbad107128 Mon Sep 17 00:00:00 2001 From: Michael Skelton <886344+codingo@users.noreply.github.com> Date: Mon, 19 Aug 2019 22:43:18 +1000 Subject: [PATCH 14/20] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index cace180..7ee8d78 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,6 @@ Easily turn single threaded command line applications into a fast, multi-threade - [Advanced Command File Usage](#Advanced-Command-File-Usage) - [Advanced Usage: Blocker](#Blocker) - [Advanced Usage: Blocks](#Blocks) - - [Exclusions](#Exclusions) # Setup From 3eb075e5bc8a7543a2936b65c4567a673bc72771 Mon Sep 17 00:00:00 2001 From: Michael Skelton <886344+codingo@users.noreply.github.com> Date: Mon, 19 Aug 2019 22:45:37 +1000 Subject: [PATCH 15/20] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 7ee8d78..9980088 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,10 @@ Easily turn single threaded command line applications into a fast, multi-threade - [Setup](#Setup) - [Usage - Flags](#Usage) - [Usage Examples](#Usage-Examples) +--[Threading support for an Application that doesn't support it](#glob-notation-with-an-application-that-doesnt-support-it) +--[CIDR Notation for an Application that doesn't support it](#cidr-notation-with-an-application-that-doesnt-support-it) +--[GLOB Notation for an Application that doesn't support it](#glob-notation-with-an-application-that-doesnt-support-it) +--[Multiple Proxy support for an Application that doesn't support it](#run-nikto-using-multiple-proxies) - [Port Notation Explained](#Further-information-regarding-ports) - [Target Notation Explained](#Further-information-regarding-targets) - [Variable Replacements](#Variable-Replacements) From 02d8b05a5cbfa4b196f5f34aa1be271d41950c47 Mon Sep 17 00:00:00 2001 From: Michael Skelton <886344+codingo@users.noreply.github.com> Date: Mon, 19 Aug 2019 22:46:19 +1000 Subject: [PATCH 16/20] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9980088..b1eda37 100644 --- a/README.md +++ b/README.md @@ -12,12 +12,12 @@ Easily turn single threaded command line applications into a fast, multi-threade - [Setup](#Setup) - [Usage - Flags](#Usage) - [Usage Examples](#Usage-Examples) ---[Threading support for an Application that doesn't support it](#glob-notation-with-an-application-that-doesnt-support-it) ---[CIDR Notation for an Application that doesn't support it](#cidr-notation-with-an-application-that-doesnt-support-it) ---[GLOB Notation for an Application that doesn't support it](#glob-notation-with-an-application-that-doesnt-support-it) ---[Multiple Proxy support for an Application that doesn't support it](#run-nikto-using-multiple-proxies) - [Port Notation Explained](#Further-information-regarding-ports) - [Target Notation Explained](#Further-information-regarding-targets) +- [Threading support for an Application that doesn't support it](#glob-notation-with-an-application-that-doesnt-support-it) +- [CIDR Notation for an Application that doesn't support it](#cidr-notation-with-an-application-that-doesnt-support-it) +- [GLOB Notation for an Application that doesn't support it](#glob-notation-with-an-application-that-doesnt-support-it) +- [Multiple Proxy support for an Application that doesn't support it](#run-nikto-using-multiple-proxies) - [Variable Replacements](#Variable-Replacements) - [Advanced Command File Usage](#Advanced-Command-File-Usage) - [Advanced Usage: Blocker](#Blocker) From 04e30b85b31cea86dccc1d1e2ade83883683a635 Mon Sep 17 00:00:00 2001 From: Michael Skelton <886344+codingo@users.noreply.github.com> Date: Mon, 19 Aug 2019 22:50:02 +1000 Subject: [PATCH 17/20] Delete bar.test --- bar.test | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 bar.test diff --git a/bar.test b/bar.test deleted file mode 100644 index b8f5fbd..0000000 --- a/bar.test +++ /dev/null @@ -1,2 +0,0 @@ -localhost -localone From 49c402cfb656d107791955d0d00c79c56ad2802b Mon Sep 17 00:00:00 2001 From: Michael Skelton <886344+codingo@users.noreply.github.com> Date: Mon, 19 Aug 2019 22:50:11 +1000 Subject: [PATCH 18/20] Delete foo.test --- foo.test | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 foo.test diff --git a/foo.test b/foo.test deleted file mode 100644 index 441c494..0000000 --- a/foo.test +++ /dev/null @@ -1,16 +0,0 @@ -echo hello -_block:file-creation_ -echo _target_ -echo _target_/a/ -echo _target_/output/scans -_block:file-creation_ -echo "Doing this" -_blocker_ -echo "Proceeding" -_block:file_ -echo _target_/out/scans -echo _target_/b/ -echo _target_/re/ -_block:file_ -_blocker_ -echo "Done" From 377a9482806149207c305f2f7e96ff9ba36b1088 Mon Sep 17 00:00:00 2001 From: Joshua Ogunyinka Date: Tue, 20 Aug 2019 13:26:33 +0100 Subject: [PATCH 19/20] Delete foo.test --- foo.test | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 foo.test diff --git a/foo.test b/foo.test deleted file mode 100644 index 61db40f..0000000 --- a/foo.test +++ /dev/null @@ -1,20 +0,0 @@ -echo hello -_block:file-creation_ -echo _target_ -echo _target_/a/ -echo _target_/output/scans -_block:file-creation_ -echo "Doing this" -_blocker_ -echo "Proceeding" -_block:file_ -echo _target_/out/scans -echo _target_/b/ -echo _target_/re/ -_block:file_ -_blocker_ -ping 127.0.0.1 -n 10 > nul -ping 127.0.0.1 -n 10 > nul && echo "sleepy" -ping 127.0.0.1 -n 5 > nul && echo "test1" -_blocker_ -echo "Done" From 1ac7a7486e3afe985730da99d142fd450af8e4e0 Mon Sep 17 00:00:00 2001 From: Michael Skelton <886344+codingo@users.noreply.github.com> Date: Tue, 20 Aug 2019 22:30:49 +1000 Subject: [PATCH 20/20] Update __version__.py --- Interlace/lib/core/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Interlace/lib/core/__version__.py b/Interlace/lib/core/__version__.py index 6d5e09d..bb64aa4 100644 --- a/Interlace/lib/core/__version__.py +++ b/Interlace/lib/core/__version__.py @@ -1 +1 @@ -__version__ = '1.6' +__version__ = '1.6.1'