From def7c40830ae33cea1aa07096242df004c7d38c5 Mon Sep 17 00:00:00 2001 From: nzdjb Date: Sat, 22 Oct 2022 19:52:36 +1300 Subject: [PATCH 1/2] feat: Backgrounding long running commands --- Command Injection/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Command Injection/README.md b/Command Injection/README.md index 54aa11b..76c574c 100644 --- a/Command Injection/README.md +++ b/Command Injection/README.md @@ -297,6 +297,16 @@ echo "YOURCMD/*$(sleep 5)`sleep 5``*/-sleep(5)-'/*$(sleep 5)`sleep 5` #*/-sleep( echo 'YOURCMD/*$(sleep 5)`sleep 5``*/-sleep(5)-'/*$(sleep 5)`sleep 5` #*/-sleep(5)||'"||sleep(5)||"/*`*/' ``` +## Backgrounding long running commands + +In some instances, you might have a long running command that gets killed by the process injecting it timing out. + +Using nohup, you can keep the process running after the parent process exits. + +```bash +nohup sleep 120 > /dev/null & +``` + ## Labs * [OS command injection, simple case](https://portswigger.net/web-security/os-command-injection/lab-simple) From 5ca6c9a22bca85c1bdf027f222f180120f45aef1 Mon Sep 17 00:00:00 2001 From: nzdjb Date: Sat, 22 Oct 2022 20:05:57 +1300 Subject: [PATCH 2/2] feat: Add entry to page contents. --- Command Injection/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Command Injection/README.md b/Command Injection/README.md index 76c574c..e53cc68 100644 --- a/Command Injection/README.md +++ b/Command Injection/README.md @@ -25,6 +25,7 @@ * [Time based data exfiltration](#time-based-data-exfiltration) * [DNS based data exfiltration](#dns-based-data-exfiltration) * [Polyglot command injection](#polyglot-command-injection) +* [Backgrounding long running commands](#backgrounding-long-running-commands) * [References](#references)