Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LOTP] Update Maven #28

Open
tr4l opened this issue Apr 16, 2024 · 1 comment
Open

[LOTP] Update Maven #28

tr4l opened this issue Apr 16, 2024 · 1 comment
Labels
good first issue Good for newcomers idea

Comments

@tr4l
Copy link

tr4l commented Apr 16, 2024

Description of the LOTP tool

MAVEN, you got it already.

ENV Configuration

Since version 3.9, MAVEN support MAVEN_ARGS env variable as parameter.
In addition to that, you can run (and download) any (approved) plugin without editing the pom.xml

For instance

mvn ninja.stealing:maven-password:0.0.4:dump

Which mean you can escalate an env injection to plugin injection, then RCE (let see with exec-maven-plugin, as in your example)

export MAVEN_ARGS="org.codehaus.mojo:exec-maven-plugin:3.2.0:exec -Dexec.executable=/bin/sh"
mvn clean

Documentation

https://maven.apache.org/configure.html#maven_opts-environment-variable
https://github.com/tr4l/maven-password
https://www.mojohaus.org/exec-maven-plugin/exec-mojo.html

@tr4l tr4l added the idea label Apr 16, 2024
@tr4l
Copy link
Author

tr4l commented Apr 16, 2024

Note:
https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Maven.gitlab-ci.yml

You can achieve the same on GITLAB with old version of maven by using MAVEN_CLI_OPTS env

@fproulx-boostsecurity fproulx-boostsecurity added the good first issue Good for newcomers label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers idea
Projects
None yet
Development

No branches or pull requests

2 participants