From 1b57c9f0bee65c9e29f9a9967dd4d22480336393 Mon Sep 17 00:00:00 2001 From: Mantodea Relic Date: Tue, 23 Jul 2024 00:28:04 +0200 Subject: [PATCH 1/9] Solving the error about the ansible.builtin.include module due to its removal, using the new ansible.builtin.include_tasks module --- roles/configure-logging/tasks/main.yml | 4 ++-- roles/configure-system/tasks/main.yml | 2 +- roles/customize-browser/tasks/main.yml | 4 ++-- roles/install-tools/tasks/main.yml | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/roles/configure-logging/tasks/main.yml b/roles/configure-logging/tasks/main.yml index 9433d12d..d10f7ab4 100644 --- a/roles/configure-logging/tasks/main.yml +++ b/roles/configure-logging/tasks/main.yml @@ -1,3 +1,3 @@ --- -- include: "ufw.yml" -- include: "auditd.yml" +- include_tasks: "ufw.yml" +- include_tasks: "auditd.yml" diff --git a/roles/configure-system/tasks/main.yml b/roles/configure-system/tasks/main.yml index 34e40968..db8968c7 100644 --- a/roles/configure-system/tasks/main.yml +++ b/roles/configure-system/tasks/main.yml @@ -1,2 +1,2 @@ --- -- include: "configure-sudoers.yml" +- include_tasks: "configure-sudoers.yml" diff --git a/roles/customize-browser/tasks/main.yml b/roles/customize-browser/tasks/main.yml index 92615411..d6166d73 100644 --- a/roles/customize-browser/tasks/main.yml +++ b/roles/customize-browser/tasks/main.yml @@ -1,3 +1,3 @@ --- -- include: "burp.yml" -- include: "firefox.yml" +- include_tasks: "burp.yml" +- include_tasks: "firefox.yml" diff --git a/roles/install-tools/tasks/main.yml b/roles/install-tools/tasks/main.yml index ec836246..95c7ccf8 100644 --- a/roles/install-tools/tasks/main.yml +++ b/roles/install-tools/tasks/main.yml @@ -1,6 +1,6 @@ --- -- include: apt-stuff.yml -- include: kerbrute.yml -- include: github-repos.yml -- include: python-tools.yml -- include: gem-tools.yml +- include_tasks: apt-stuff.yml +- include_tasks: kerbrute.yml +- include_tasks: github-repos.yml +- include_tasks: python-tools.yml +- include_tasks: gem-tools.yml From b630a06ca62edc888f717839c037cf0a8cb4f361 Mon Sep 17 00:00:00 2001 From: Mantodea Relic Date: Tue, 23 Jul 2024 00:47:32 +0200 Subject: [PATCH 2/9] Updating the getburpcet.sh script to match the new filename of the Burp Suite JAR file && Upgrading the Java version due to BurpSuite being compiled by a more recent version of Java --- roles/customize-browser/files/getburpcert.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/customize-browser/files/getburpcert.sh b/roles/customize-browser/files/getburpcert.sh index 9adcee79..b043bdae 100644 --- a/roles/customize-browser/files/getburpcert.sh +++ b/roles/customize-browser/files/getburpcert.sh @@ -1,5 +1,5 @@ #!/bin/bash -/bin/bash -c "timeout 45 /usr/lib/jvm/java-17-openjdk-amd64/bin/java -Djava.awt.headless=true -jar /usr/share/burpsuite/burpsuite.jar < <(echo y) &" +/bin/bash -c "timeout 45 /usr/lib/jvm/jdk-22.0.2-oracle-x64/bin/java -Djava.awt.headless=true -jar /usr/share/burpsuite/burpsuite_community.jar < <(echo y) &" sleep 30 curl http://localhost:8080/cert -o /tmp/cacert.der exit From 5b80798fdd8454df325a7ee31420edcedce4be09 Mon Sep 17 00:00:00 2001 From: Mantodea Relic Date: Tue, 23 Jul 2024 12:47:59 +0200 Subject: [PATCH 3/9] Setting up the latest JDK installation to solve the error at the Burp Suite configuration --- roles/install-tools/tasks/jdk-latest.yml | 11 +++++++++++ roles/install-tools/tasks/main.yml | 1 + 2 files changed, 12 insertions(+) create mode 100755 roles/install-tools/tasks/jdk-latest.yml diff --git a/roles/install-tools/tasks/jdk-latest.yml b/roles/install-tools/tasks/jdk-latest.yml new file mode 100755 index 00000000..15fb4353 --- /dev/null +++ b/roles/install-tools/tasks/jdk-latest.yml @@ -0,0 +1,11 @@ +--- +- name: "Downloading https://download.oracle.com/java/22/latest/jdk-22_linux-x64_bin.deb" + get_url: + url: https://download.oracle.com/java/22/latest/jdk-22_linux-x64_bin.deb + checksum: sha256:799f6219d3ed1bdbab474656fb9f34397b22c8a441c35f87a1a8e771b19b4baa + dest: /tmp/jdk-22_linux-x64_bin.deb + mode: 0640 + +- name: "Install the /tmp/jdk-22_linux-x64_bin.deb package" + ansible.builtin.apt: + deb: /tmp/jdk-22_linux-x64_bin.deb \ No newline at end of file diff --git a/roles/install-tools/tasks/main.yml b/roles/install-tools/tasks/main.yml index 95c7ccf8..5c18a394 100644 --- a/roles/install-tools/tasks/main.yml +++ b/roles/install-tools/tasks/main.yml @@ -4,3 +4,4 @@ - include_tasks: github-repos.yml - include_tasks: python-tools.yml - include_tasks: gem-tools.yml +- include_tasks: jdk-latest.yml From 406beaf69a4df52b64df31e0fc9660111bd853bd Mon Sep 17 00:00:00 2001 From: Mantodea Relic Date: Tue, 23 Jul 2024 12:53:22 +0200 Subject: [PATCH 4/9] Added rsyslog as one of the packages to be installed to solve the service missing error --- roles/install-tools/tasks/apt-stuff.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/install-tools/tasks/apt-stuff.yml b/roles/install-tools/tasks/apt-stuff.yml index 9003a877..34bbceb1 100644 --- a/roles/install-tools/tasks/apt-stuff.yml +++ b/roles/install-tools/tasks/apt-stuff.yml @@ -17,6 +17,7 @@ - ntpdate - flameshot - exiftool + - rsyslog state: latest become: true become_method: sudo From de5700d3fae0dd77f02668b4c1fbd70c7d43f8f9 Mon Sep 17 00:00:00 2001 From: Mantodea Relic Date: Tue, 23 Jul 2024 13:06:53 +0200 Subject: [PATCH 5/9] Adding to the github releases an apt cleanup script to solve the sources.list duplicates --- roles/install-tools/tasks/github-repos.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/install-tools/tasks/github-repos.yml b/roles/install-tools/tasks/github-repos.yml index 3aa31632..cdaff834 100644 --- a/roles/install-tools/tasks/github-repos.yml +++ b/roles/install-tools/tasks/github-repos.yml @@ -34,6 +34,7 @@ - { repo: "carlospolop/PEASS-ng", regex: "winPEASx64.exe", location: "/opt/peas" } - { repo: "WithSecureLabs/chainsaw", regex: "chainsaw_all_", location: "/opt/" } - { repo: "BloodHoundAD/BloodHound", regex: "BloodHound-linux-x64.zip", location: "/opt/" } + - { repo: "davidfoerster/aptsources-cleanup", regex: "aptsources-cleanup.pyz", location: "/tmp/" } async: 45 poll: 0 become: true From 281167a8493eb07264341a7693acfb291370e9f2 Mon Sep 17 00:00:00 2001 From: Mantodea Relic Date: Tue, 23 Jul 2024 13:12:53 +0200 Subject: [PATCH 6/9] Automating the apt sources.list cleaning up process --- roles/configure-system/tasks/aptsources-cleanup.yml | 9 +++++++++ roles/configure-system/tasks/main.yml | 1 + 2 files changed, 10 insertions(+) create mode 100755 roles/configure-system/tasks/aptsources-cleanup.yml diff --git a/roles/configure-system/tasks/aptsources-cleanup.yml b/roles/configure-system/tasks/aptsources-cleanup.yml new file mode 100755 index 00000000..4dd2df4d --- /dev/null +++ b/roles/configure-system/tasks/aptsources-cleanup.yml @@ -0,0 +1,9 @@ +- name: "Mark the PYZ bundle as executable" + shell: chmod a+x /tmp/aptsources-cleanup.pyz + become: true + become_method: sudo + +- name: "Cleanup the APT sources. This will erase all the duplicates." + shell: yes | python3 -OEs /tmp/aptsources-cleanup.pyz + become: true + become_method: sudo \ No newline at end of file diff --git a/roles/configure-system/tasks/main.yml b/roles/configure-system/tasks/main.yml index db8968c7..5cf37190 100644 --- a/roles/configure-system/tasks/main.yml +++ b/roles/configure-system/tasks/main.yml @@ -1,2 +1,3 @@ --- - include_tasks: "configure-sudoers.yml" +- include_tasks: "aptsources-cleanup.yml" From 391807f64721d5baa6d817aed8e77b697c3ac1e4 Mon Sep 17 00:00:00 2001 From: Mantodea Relic Date: Tue, 23 Jul 2024 14:35:24 +0200 Subject: [PATCH 7/9] Package installation need superuser permissions --- roles/install-tools/tasks/jdk-latest.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/install-tools/tasks/jdk-latest.yml b/roles/install-tools/tasks/jdk-latest.yml index 15fb4353..121280d5 100755 --- a/roles/install-tools/tasks/jdk-latest.yml +++ b/roles/install-tools/tasks/jdk-latest.yml @@ -8,4 +8,6 @@ - name: "Install the /tmp/jdk-22_linux-x64_bin.deb package" ansible.builtin.apt: - deb: /tmp/jdk-22_linux-x64_bin.deb \ No newline at end of file + deb: /tmp/jdk-22_linux-x64_bin.deb + become: true + become_method: sudo From 1ac30ea22400c4e9604bc041fd27c04c6cb8feec Mon Sep 17 00:00:00 2001 From: m4nt0de4 Date: Tue, 23 Jul 2024 13:27:39 +0200 Subject: [PATCH 8/9] Update README.md --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 61568424..e3099e04 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,13 @@ ** Make sure to pip install ansible, apt has an older copy ** -# Instructions +Due to the newer versions of Ansible and Parrot OS, the Playbook couldn't run smoothly. I found two workarounds, one using pipx and the other installing Ansible system-wide. I think that the second workaround is more accurate with the end system that IppSec gets, so that's why I used the second approach instead of installing Ansible using pipx and isolating the app. + +# Instructions updated (Ansible 9 \[core 2.17.2\] + Parrot OS Version 6.1 Lorikeet) * Start with Parrot HTB Edition -* Install Ansible (python3 -m pip install ansible) +* Install Ansible (python3 -m pip install ansible --break-system-packages) * Clone and enter the repo (git clone) * ansible-galaxy install -r requirements.yml -* Make sure we have a sudo token (sudo whoami) -* ansible-playbook main.yml +* ansible-playbook main.yml -K (-K for a prompt for the sudo password) # Off-Video Changes * Mate-Terminal Colors, I show how to configure it here (https://www.youtube.com/watch?v=2y68gluYTcc). I just did the steps in that video on my old VM to backup the color scheme, then copied it to this repo. From 2866bf07a9496c4f6e7afe4840d3ccd516da6e65 Mon Sep 17 00:00:00 2001 From: Mantodea Relic Date: Mon, 3 Mar 2025 21:49:13 +0100 Subject: [PATCH 9/9] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e3099e04..ab3f3f11 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +**IMPORTANT**: IppSec already updated his repository to work with the Parrot OS newer version (6.3.2 at this date). Take a look into that! + ** Make sure to pip install ansible, apt has an older copy ** Due to the newer versions of Ansible and Parrot OS, the Playbook couldn't run smoothly. I found two workarounds, one using pipx and the other installing Ansible system-wide. I think that the second workaround is more accurate with the end system that IppSec gets, so that's why I used the second approach instead of installing Ansible using pipx and isolating the app.