secureSWF帮助文档英文版.docx
《secureSWF帮助文档英文版.docx》由会员分享,可在线阅读,更多相关《secureSWF帮助文档英文版.docx(39页珍藏版)》请在冰点文库上搜索。
![secureSWF帮助文档英文版.docx](https://file1.bingdoc.com/fileroot1/2023-5/7/f7f9cbfc-fe09-4220-b265-8b8046d05c42/f7f9cbfc-fe09-4220-b265-8b8046d05c421.gif)
secureSWF帮助文档英文版
窗体顶端
GettingStarted
WhilesecureSWFprovidesawidearrayofprotectionoptionsforFlashapplications,gettingstartedwithalevelofsecuritythatcouldwellbeallyouneedisasimple3-stepoperation.
SecureyourSWFs-Easyas1-2-3!
1.AddSWFfile(s)intoyourproject(ProjectFilestab)
Youcanaddmultiplefileswhichwillallbeprocessedwiththesamesettings.YoushouldaddallfilesthatinteractwitheachothersosecureSWFcandetectthereferencesandmakesuretheobfuscatedfileswillworkthesamewaytheydidbeforeobfuscation.TheStatisticspanelshowsyouinfoaboutthefileorfilesintheproject.
2.LookatProtectionPresetschoices
Thesearepre-definedsecuritylevelsthatmaybeenoughformanyneeds.Theyofferdifferentprotection-to-filesize-to-performanceratios.Youcanoptionallysetupcustomlevelsexactlysuitedtoyourneedsifpresetsarenotquitewhatyouwant.
3.SpecifyprefixorpostfixforoutputfileandProtect
Addaprefix(e.g.secure_)and/orpostfix(suffix)fortheprotectedoutputversionofyourSWFfilesothattheoriginalisnotoverwrittenwiththeprotectedversion.ThenclicktheProtectbutton.
THAT'SALLITTAKESTOGETSTARTEDPROTECTINGYOURSWFFILES!
||
OfcourseyouwillwanttoexplorethemanyprotectionoptionsavailableinsecureSWFtogetthemaximumbenefitsforyoursituation.Therestofthisguidewillintroduceyoutothemajorareasoftheproducttoexplorenext.
AttheconclusionofthisguideyoushouldbewellonyourwaytounderstandinghowtousesecureSWFtoachievethesecurityandperformancelevelsthatarerightforyourFlashapplications.
Backtothetop
GettingStartedwithsecureSWFProtectionSettings
WhileyoucangetaprettygoodlevelofprotectionforyourSWFfilesusingpresets,theseareonlythetipoftheicebergwhenitcomestoyouroptionsforsecuringyourFlashapps.ItwillofcoursetakesometimetomastereverythingsecureSWFhastooffer,butitshouldn'ttakeyoutoolongtogetacquaintedwiththemajorproductfeaturesandsettingsandarrivetothelevelofprotectionthat'sgoodforyourneeds.Let'slookbrieflyatthemainthingsyoushouldlookatwhendevisingasecurityschemeforyourapplications.
IdentifiersRenamingTab
RenamingofidentifiersinyourapplicationsourcecodeisoneofthemainwayssecureSWFprotectsyourappsfromreverseengineering.TheIdentifiersRenamingtabprovidesanumberofoptionsthatcontrolhowsecureSWFhandlesrenamingasitobfuscatesyoursourcecode.
MainOptions:
-EnableIdentifiersRenaming
ThisisatogglethatcontrolswhetherornotsecureSWFwillrenameidentifiersaspartoftheobfuscationprocess.Checkittoenablerenamingofidentifiers.
-Level
Thissettingcontrolshowrenaminghappens.
-AggressiveRenaming
Ifyoucheckit,identifiersarerenamedwithnon-printingcharacters,illegalnames,etc.Thisgenerallyresultsinsmallernames(reducingthebytecountinthefinalobfuscatedfile).Decompilerscan'tprintordisplayidentifiers.
-UseActionScriptKeywords
thiscauseskeywordsinsideActionScriptcodetobechangedtobeunintelligibleandunrecognizableaskeywords.
-AutomaticallyHandleWarnings
secureSWFwillhandlewarningsresultingfromrenamingofidentifiers.Turnoffthisoptionifyouwanttoseewarnings.
AdditionalRenamingOptions
Fairlyselfexplanatory.Mappingtableisjustatableoforiginalidentifiersmappedtorenamedidentifiers.ItcanHelpde-obfuscateerrormessagethatmightariseinyourFlashapplater.SeeHelpifyouneedtodelvedeeperintotheseoptions.
ExploringPackagesandClasses TheIdentifiersRenamingtabdisplaysatreeofthepackagesandclassesinyourapplication,anditshowswhichclasseswillhaveidentifiersrenamedwiththestandardrenamingdefaults.Whenyouselectanyclassontheleft,itsmembersaredisplayedontheright.
Basicallywhatyouwanttodohereislookthroughtheclasses,seewhichoneswillhaveidentifiersrenamedbythedefaultrenaming(thesearecheckedinthelisting),anddecidewhetheryouwanttohavemoreclassesprocessed,andsetoptionsforrenaming.Youcanasgetgranularasyouwantbyselectingindividualclassesforrenamingandmakingsettingsforeachselectedclass.
ProtectionOptionsTab
ThistabprovidesthesecondmajorsecurityfeaturesareaofsecureSWF.Itprovidesoptionsforcodetransformations,fileoptimization,domainlocking,andencryptionofembeddedstringliterals.
CodeTransformation
Codetransformationfoilsdecompilersbychangingcompiledcodesothatitcannolongerbereverseengineeredintosource.YoucansetanumberofoptionsincludingAdvancedoptionsforagreaterorlesserdegreeoftransformation.Detailedinformationabouteachoptioncanbefoundhere.
EncryptedDomainLocking
ThisfeatureenablesyoutospecifythedomainsonwhichtheprotectedSWFfile(s)canbehosted.Fileswillnotworkifhostedonanyotherdomain.Alsocanbeusedtopreventlocalexecutionoffline.
Optimization
Optimizesthecodeitselfandperformsvariousoperationstoreducefilesizeandoptimizeperformance.Detailedinformationabouteachoptioncanbefoundhere.
LiteralStringsEncryption
Encryptstheliteraldatathat'sinsidethecode-hard-codedpassphrasesorURLsforexample.Replacesliteralstringswithaspecialfunctioncallthatreturnsthedecryptedstring,whichisstoredinanencryptedform.
Backtothetop
ConfigurationsRulesTab
Whileprevioustabsenableyoutospecifyhowyourcodewillbeobfuscateddowntoasinglefunctionoridentifier,weknowthatpinpointingeverysingleonecouldbeaverytimeconsumingprocess.Becauseofthis,we'veaddedtheRulestab.
HereyoucanjusttellsecureSWFwhattodowithallthecodeinanentirepackage,orasingleclass.Justwriteinthepatternandcheckwhichoptionsyouwanttooverride.
Youcanusethis,forexample,toavoidobfuscatingcodemergedfromSWClibrariesprovidedbythird-parties.
Ruleswilloverrideallothersettings.
Backtothetop
----
Troubleshooting
AfterprotectingyourSWFfiles,wehighlyrecommendtotestthem.Iftheprotectedfilesarenotfunctioningproperly,thenoneormoreofsecureSWFprotectionoptionsrequiresfurthertuning.Pleasefollowthesesimplestepstofindoutwhatwentwrong.
1.Removeallfilesandstartover.
2.Afteraddingyourfilesagain,settheProtectionPresettoTesting.Thiswillturnoffalltheprocessingoptions.Processthefilesandtestthem.Ifthegeneratedfilesarestillnotworkingproperly,thenpleasecontactus.YouaremostlikelyfacingamajorissueinsecureSWFthatwereallywanttoknowaboutandtrytofixassoonaspossible.
3.EnableControlFlowObfuscationandsetitto100%intensity.Processthefiles.Ifeverythingworkswell,thenpleasemovetostep4.Ifthefilesarenotfunctioningproperlyafterenablingthisoption,thenhereiswhatyoucando:
∙ActionScript1and2basedprojects,leavethisoptiondisabledandtryStatement-levelRandomizationandDynamicCodeWrapping.TheyarejustaseffectiveasControlFlowObfuscation.
∙ActionScript3,theFlashPlayer(debuggerversion,available here)shouldthrowaverificationerrorsuchas"Stackunbalancedx!
=y"or"TypeAandTypeBcannotbereconciled"withacallstacktrace.PleasemovetotheCodeTransformationTroubleshooting section.
1.EnableIdentifiersRenamingandprocessthefilesagain.Ifthefilesarenotworking,pleasemovetothe IdentifiersRenamingTroubleshooting section.
2.Enableotheroptionsonebyoneuntilyougetthenonfunctionalfileandthenpleaseletusknowwhichoptionbrokeyourapplication.
Backtothetop
IdentifiersRenamingTroubleshooting
WhilesecureSWFtriestoautomaticallyexcludesidentifiersthatcauseproblemswhenrenamed,someidentifierswillstillslipawayandrequireyoutomanuallyexcludethem.
Firstofall,pleasesetidentifiersrenamingLeveltoNormalandmakesurethatAutomaticallyhandlewarningsandGeneratemappingtablearecheckedandallothercheckboxesareuncheckedasappearsbelow.
Processthefiles,iftheprotectedfilesarestillnotworkingproperlythenpleasefollowthefollowingsteps:
ActionScript1and2:
Youhavetotryoutdifferentsettingsmultipletimestofindoutwhichidentifieriscausingtheproblem.Youonlyhavetodothisonceforeveryprojectsinceyoucansavethesettingsandloadthemlaterwhenyouneedthemagain.
1.SettherenamingLeveltoSafeRenamingandseeifthathelps.Ifitdoesn't,continuefollowingthesteps.
2.IntheIdentifiersRenamingtab,right-clicktheSWFfileintheAllidentifierstreeandclickonDeselectAll.Thiswilldeselectalltheidentifiersinthefile.
3.Startselectingidentifiersgroupbygroup;rightundertheSWFfile,youwillusuallyfindthe"TimeLine"node(sometimesaSymbol,Package,orClass).Right-clickthefirstnodeundertheSWFfileandclickonRestoreDefaults(notSelectAll).Processthefileandtestit.Ifitworks,movetothenextnodeanddothesametoit.Ifitdoesn'twork,deselectthenode,skipit,andmovetothenextnode.
4.Nowyoushouldhaveaworkingprotectedfilewithmostofitsidentifiersrenamed.Youcanrenamemoreidentifiersifyouwanttoandtesttheprotectedfileaftereverychange.
ActionScript3:
YoucansettherenamingLeveltoSafeRenamingifyouwanttosavesometimeanddon'tmindthatsomeidentifierswillnotgetrenamed.WedonotrecommendthatsincemostidentifiersexcludedbySafeRenamingdonotcauseproblemswhenrenamed.
TheFlashplayer(debuggingversion)willthrowverificationerrorsforActio