Created
July 16, 2017 00:11
-
-
Save infosecn1nja/106ac517c2d7cdc3cb9ea448ba8070fb to your computer and use it in GitHub Desktop.
Drop binary executable using certutil on windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# drop_binary.sh | |
# ./drop_binary.sh /usr/share/windows-binaries/nc.exe nc.txt | |
# certutil -decode encoded.txt decoded.bin | |
echo "-----BEGIN CERTIFICATE-----" > $2 | |
cat $1 | base64 >> $2 | |
echo "-----END CERTIFICATE-----" >> $2 | |
sed -i 's/^/echo /g' $2 && sed -i 's/$/ >> encoded.txt/g' $2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment