Skip to content

Latest commit

 

History

History
104 lines (60 loc) · 2.66 KB

Task 27 [Day 21] DevSecOps Yule be Poisoned: A Pipeline of Insecure Code!.md

File metadata and controls

104 lines (60 loc) · 2.66 KB

Task 27 [Day 21] DevSecOps Yule be Poisoned: A Pipeline of Insecure Code!


Learning Objectives

  • Understand how a larger CI/CD environment operates.
  • Explore indirect poisoned pipeline execution (PPE) and how it can be used to exploit Git.
  • Apply CI/CD exploitation knowledge to the larger CI/CD environment.

Navigate to http://machine_ip:3000, the Gitea platform AntarctiCrafts uses for version control and development. Log in using the credentials

guest:password123
Screenshot 2024-01-13 at 4 30 08 PM

When you have logged in successfully, you should see two repositories: gift-wrapper and gift-wrapper-pipeline. Navigate to

http://machine_ip:8080

The Jenkins platform AntarctiCrafts uses for building and automation. Log in using the credentials

admin:admin
Screenshot 2024-01-13 at 4 32 24 PM

Once you have logged in successfully, you should see a project: gift-wrapper-build.


Now on our local machine: open up the terminal

Clone this repo

Screenshot 2024-01-13 at 4 36 59 PM
git clone http://machine_ip:3000/McHoneyBell/gift-wrapper.git

These are the file in gift-wrapper repo:

Screenshot 2024-01-13 at 4 38 33 PM

We need to edit Makefile

after modification Makefile should look like this

Screenshot 2024-01-13 at 4 40 09 PM

After editing push the repo.

git add .
git commit -m "<message here>"
git push

QUESTIONS

  1. What Linux kernel version is the Jenkins node?

ANSWER

5.4.0-1029-aws
Screenshot 2024-01-13 at 4 47 55 PM
  1. What value is found from /var/lib/jenkins/secret.key?

ANSWER

90e748eafdd2af4746a5ef7941e63272f24f1e33a2882f614ebfa6742e772ba7

Perform the same procedure to obatain the secret key

edit Makefile

Screenshot 2024-01-13 at 4 54 32 PM

then push it..