How to create a virus with a CAD program?

Loading thread data ...

I guess you've never heard of MS Word macro viri? It doesn't have to be a direct executable file to be a virus. And considering Solidworks has VBA built in, it's entirely possible.

Reply to
Steve Mackay

SolidWorks has a very nice feature to make viruses (or virii...) It's the "Macro Features", which let programmers define custom features with some code that will be executed at each rebuild. If you look at the API Help under "Security Function", you'll see that there is a way to give some "security" attributes to a macro feature : swMacroFeatureSecurityCannotBeDeleted swMacroFeatureSecurityCannotBeSuppressed combined with Feature::SetUIState(swIsHiddenInFeatureMgr), you can make an invisible, unremovable feature... I made a macro-feature "virus" some time ago, but never released it for obvious reasons. In fact it needs an additional trick that I won't reveal. I called it "Schtroumpf", the french name of the "Smurfs" cartoon character because it colors parts in smurf-blue when rebuilt, and if the part is in an assembly, it copies the macro feature to random selected parts in the assembly. After 2-3 rebuilds, the whole assembly becomes blue. Then, any assembly using one of the blue parts will also become blue. Of course, the code of the macro feature could format your hard disk instead of just coloring parts....

However, till now you have to distribute the macro feature code separately from the SolidWork file (in a .swp or .dll file), which actually prevents the automatic spread of the virus. I guess it could be possible for the macro-feature code to also copy the file to the directory containing the infected SW files, with a hidden attribute, but that's not very efficient. Now I think of a different way : the new "Design Binder", which allows to embed any type of documents in the SW file itself! It currently has no API to access it directly, and macro features cannot (yet) refer to a macro embedded in the Design Binder, but I'm pretty sure there will be a way, one day. I was told the "WinFS" file system which was supposed to come with the "Longhorn" Windows will combine with Microsoft's "Structured Storage" (used in SW files) to allow paths like C:\Documents\part. sldprt\macro.swp to access "files within files". If that's true, it will be Microsoft's best present to hackers since the bright idea of auto-executable macros in Word and Excel documents... I'd like to mention that there are probably similar mechanisms in other CADs to implement custom, user features. I simply know the SW+Microsoft mix better... Philippe Guglielmetti disclaimer: this mail has nothing to do with my employer, of course...

Reply to
Philippe Guglielmetti

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.