Last active
February 19, 2021 03:29
-
-
Save kohyuk91/9edafe88c3601fe813f871ae662214ef to your computer and use it in GitHub Desktop.
Dealing with Maya Malicious Script Nodes
This file contains hidden or 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
// Sets the scriptJob ID for the exploit to an invalid value, so Maya never actually runs the malicious code. | |
global int $autoUpdateAttrEd_aoto_int; | |
$autoUpdateAttrEd_aoto_int = -1; |
This file contains hidden or 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
from maya import cmds , mel | |
import maya.OpenMaya | |
mel.eval("global int $autoUpdateAttrEd_aoto_int;$autoUpdateAttrEd_aoto_int = -1;") | |
def killMaliciousScriptNodes(clientData): | |
maliciousScriptNodes = cmds.ls(["vaccine_gene", "breed_gene", "MayaMelUIConfigurationFile"], typ="script") | |
for maliciousScriptNode in maliciousScriptNodes: | |
cmds.delete(maliciousScriptNode) | |
print("Deleted {}".format(maliciousScriptNode)) | |
maya.OpenMaya.MSceneMessage.addCallback(maya.OpenMaya.MSceneMessage.kAfterSceneReadAndRecordEdits, killMaliciousScriptNodes) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment