From aca87360d31b75f6c956981e2d8e8b641bb73e7c Mon Sep 17 00:00:00 2001 From: dadevel Date: Wed, 21 Feb 2024 14:34:32 +0100 Subject: [PATCH] add sccmhunter --- .github/workflows/ci.yaml | 93 +++++++++++++++++++++++++++++++-------- sccmhunter/PKGBUILD | 30 +++++++++++++ 2 files changed, 105 insertions(+), 18 deletions(-) create mode 100644 sccmhunter/PKGBUILD diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index dad9ec9a..7ae4ca66 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -34,6 +34,7 @@ jobs: - package-certipy - package-certipy-bloodhound - package-coercer + - package-cvemap - package-dnsx - package-donpapi - package-evil-winrm @@ -41,6 +42,7 @@ jobs: - package-gmsadumper - package-gobuster - package-gowitness + - package-havoc - package-httpx - package-impacket - package-kerbrute @@ -67,6 +69,7 @@ jobs: - package-responder - package-roadtools - package-roadtools-hybrid + - package-sccmhunter - package-servicedetector - package-shuffledns - package-subfinder @@ -272,6 +275,24 @@ jobs: path: ./coercer/*.pkg.tar.zst retention-days: 1 if-no-files-found: error + package-cvemap: + runs-on: ubuntu-20.04 + needs: + - build-container + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Build package + run: ./build-package.sh cvemap + - name: Upload package + uses: actions/upload-artifact@v3 + with: + name: package-cvemap + path: ./cvemap/*.pkg.tar.zst + retention-days: 1 + if-no-files-found: error package-dnsx: runs-on: ubuntu-20.04 needs: @@ -398,6 +419,24 @@ jobs: path: ./gowitness/*.pkg.tar.zst retention-days: 1 if-no-files-found: error + package-havoc: + runs-on: ubuntu-20.04 + needs: + - build-container + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Build package + run: ./build-package.sh havoc + - name: Upload package + uses: actions/upload-artifact@v3 + with: + name: package-havoc + path: ./havoc/*.pkg.tar.zst + retention-days: 1 + if-no-files-found: error package-httpx: runs-on: ubuntu-20.04 needs: @@ -506,24 +545,24 @@ jobs: path: ./ldapnomnom/*.pkg.tar.zst retention-days: 1 if-no-files-found: error - #package-legba: - # runs-on: ubuntu-20.04 - # needs: - # - build-container - # steps: - # - name: Checkout - # uses: actions/checkout@v3 - # with: - # fetch-depth: 0 - # - name: Build package - # run: ./build-package.sh legba - # - name: Upload package - # uses: actions/upload-artifact@v3 - # with: - # name: package-legba - # path: ./legba/*.pkg.tar.zst - # retention-days: 1 - # if-no-files-found: error + package-legba: + runs-on: ubuntu-20.04 + needs: + - build-container + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Build package + run: ./build-package.sh legba + - name: Upload package + uses: actions/upload-artifact@v3 + with: + name: package-legba + path: ./legba/*.pkg.tar.zst + retention-days: 1 + if-no-files-found: error package-manspider: runs-on: ubuntu-20.04 needs: @@ -866,6 +905,24 @@ jobs: path: ./roadtools-hybrid/*.pkg.tar.zst retention-days: 1 if-no-files-found: error + package-sccmhunter: + runs-on: ubuntu-20.04 + needs: + - build-container + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Build package + run: ./build-package.sh sccmhunter + - name: Upload package + uses: actions/upload-artifact@v3 + with: + name: package-sccmhunter + path: ./sccmhunter/*.pkg.tar.zst + retention-days: 1 + if-no-files-found: error package-servicedetector: runs-on: ubuntu-20.04 needs: diff --git a/sccmhunter/PKGBUILD b/sccmhunter/PKGBUILD new file mode 100644 index 00000000..512ca6ea --- /dev/null +++ b/sccmhunter/PKGBUILD @@ -0,0 +1,30 @@ +pkgname=sccmhunter +pkgver=latest +pkgrel=1 +url="https://github.com//garrettfoster13/${pkgname}.git" +arch=(any) +license=(MIT) +depends=(python) +source=("git+${url}") +sha256sums=(SKIP) + +package() { + cd "${srcdir}/${pkgname}" + mkdir -p "${pkgdir}"/opt/archpkgs/bin "${pkgdir}/opt/archpkgs/${pkgname}" + python -m venv "${pkgdir}/opt/archpkgs/${pkgname}" + cp -r ./*.py ./lib/ "${pkgdir}/opt/archpkgs/${pkgname}/" + declare -x VIRTUAL_ENV="${pkgdir}/opt/archpkgs/${pkgname}" PYTHONPATH="${pkgdir}/opt/archpkgs/${pkgname}" PATH="${pkgdir}/opt/archpkgs/${pkgname}/bin:$PATH" + pip install -r ./requirements.txt + cat << EOF > "${pkgdir}/opt/archpkgs/bin/${pkgname}" +#!/bin/sh +set -eu +export VIRTUAL_ENV=/opt/archpkgs/${pkgname} PYTHONPATH=/opt/archpkgs/${pkgname} PATH="/opt/archpkgs/${pkgname}/bin:\$PATH" +exec python /opt/archpkgs/${pkgname}/${pkgname}.py "\$@" +EOF + chmod +x "${pkgdir}/opt/archpkgs/bin/${pkgname}" +} + +pkgver() { + cd "${srcdir}/${pkgname}" + echo "$(git rev-list --count HEAD).$(git rev-parse --short HEAD)" +}