Skip to content

Commit

Permalink
add Psw and Winver
Browse files Browse the repository at this point in the history
  • Loading branch information
c2biz committed May 26, 2022
1 parent cbc1041 commit 83f538c
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 19 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/autorelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,17 @@ jobs:
- name: Kerberoast
run: |
chmod +x ./make_bof.sh
./make_bof.sh c2tc-kerberoast
./make_bof.sh Kerberoast
- name: Winver
run: |
chmod +x ./make_bof.sh
./make_bof.sh Winver
- name: Psw
run: |
chmod +x ./make_bof.sh
./make_bof.sh Psw
- name: "Publish Release"
uses: "marvinpinto/action-automatic-releases@latest"
Expand Down
19 changes: 19 additions & 0 deletions BOF/Psw/extension.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "C2-Tool-Collection Psw BOF",
"version": "v0.0.0",
"command_name": "c2tc-psw",
"extension_author": "c2biz",
"original_author": "outflanknl",
"repo_url": "https://github.com/sliverarmory/C2-Tool-Collection",
"help": "Show Window titles from processes with active Windows",
"depends_on": "coff-loader",
"entrypoint": "go",
"files": [
{
"os": "windows",
"arch": "amd64",
"path": "Psw.o"
}
],
"arguments": []
}
19 changes: 19 additions & 0 deletions BOF/Winver/extension.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "C2-Tool-Collection Winver BOF",
"version": "v0.0.0",
"command_name": "c2tc-winver",
"extension_author": "c2biz",
"original_author": "outflanknl",
"repo_url": "https://github.com/sliverarmory/C2-Tool-Collection",
"help": "Display the version of Windows that is running, the build number and patch release (Update Build Revision)",
"depends_on": "coff-loader",
"entrypoint": "go",
"files": [
{
"os": "windows",
"arch": "amd64",
"path": "Winver.o"
}
],
"arguments": []
}
30 changes: 12 additions & 18 deletions make_bof.sh
Original file line number Diff line number Diff line change
@@ -1,41 +1,35 @@
#!/bin/bash

HOME=$(pwd)
BOF=$1

cd ./BOF/Kerberoast/SOURCE
echo "[+] Changing directory: ./BOF/$BOF/SOURCE"
cd ./BOF/$BOF/SOURCE
echo "[+] Compiling:"
make
cd .. # ./BOF/Kerberoast/
cd .. # ./BOF/$BOF/

echo "[+] Creating artifact:"
mkdir artifacts
mv *.o ./artifacts/
echo
pwd
ls -l
echo
VERSION=$(git describe --tags --abbrev=0)
cat extension.json | jq ".version |= \"$VERSION\"" > ./artifacts/extension.json
cd artifacts # ./BOF/Kerberoast/artifacts/
cd artifacts # ./BOF/$BOF/artifacts/
echo
pwd
ls -l
echo

echo "[+] Creating package:"
MANIFEST=$(cat extension.json | base64 -w 0)
COMMAND_NAME=$(cat extension.json | jq -r .command_name)
echo "[+] executing: tar -czvf $HOME/packages/$COMMAND_NAME.tar.gz ."
tar -czvf $HOME/packages/$COMMAND_NAME.tar.gz .
cd $HOME
cd $HOME/packages
echo
pwd
ls -l
ls -l ../
cd ./packages
echo
pwd
ls -l
echo "[+] Listing ~/"
ls -l ~/

echo "[+] Signing package:"
#bash -c "echo \"\" | ~/minisign -s ~/minisign.key -S -m ./$COMMAND_NAME.tar.gz -t \"$MANIFEST\" -x $COMMAND_NAME.minisig"
echo "[+] Listing /home/runner/"
ls -l /home/runner/
echo "[+] Signing package"
bash -c "echo \"\" | /home/runner/minisign -s /home/runner/minisign.key -S -m ./$COMMAND_NAME.tar.gz -t \"$MANIFEST\" -x $COMMAND_NAME.minisig"

0 comments on commit 83f538c

Please sign in to comment.