Chimaera Posted November 10, 2015 Share Posted November 10, 2015 As the title says really, im getting loads of grief at work with AV's killing off scripts as soon as the usb is shoved in (techs forget to turn it off temporarily)So is there a way to compile it to .exe without using Autoit to compile?The reason for this is i hope using a different way will stop or reduce the detections.PS i've already had dozens of tries with AV manufacturers but they seem to operate on AutoIt is bad so they don't care.I don't want to stop using AutoIt just make the exe differently. Bear in mind im looking at this at a simple level a small program that i can compile with if possibleAdmittedly it may not be that simple If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Developers Jos Posted November 10, 2015 Developers Share Posted November 10, 2015 Start using a3x compiled scripts and use autoit3.exe to shell them.Jos Skysnake 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
guinness Posted November 10, 2015 Share Posted November 10, 2015 Just to re-iterate the point Jos is making, you don't need to re-distribute the whole AutoIt package e.g. includes, help file, examples etc... just AutoIt3.exe OR AutoIt3_x64.exe. The a3x compiled script is passed as a commandline argument to the executable. Skysnake 1 UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Chimaera Posted November 11, 2015 Author Share Posted November 11, 2015 (edited) Ok so im clear about thisI compile every problem script in the pack i use as .a3xthen paste Autoit3.exe into the main folder and call the script like thisAutoIt3exe /AutoIt3ExecuteScript mymainscript.a3x - (Copied from another answer by Jos) and that will open the script i want.Wont the AutoIt3exe get stamped by the AV as well?would i be as easy to add that to a cmd file and start it that way?2nd questionIn my GUI where i have things like thisShellExecute(@ScriptDir & "\Toolz\backup_transfer\backup_transfer.exe")I change all the links toShellExecute(@ScriptDir & "\Toolz\backup_transfer\backup_transfer.a3x")and they will still work because i started the main script with the main AutoIt3exe ? Edited November 11, 2015 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Trong Posted November 11, 2015 Share Posted November 11, 2015 (edited) Compile au3 file to file.a3x and Add file.a3x to AutoItStub.exe* RCDATA/SCRPIT by Reshack.exe*AutoItStub.exe is AutoIt Compiled EXE, user Reshack.exe delete resource RCDATA/SCRPIT Edited November 11, 2015 by Trong Regards, Link to comment Share on other sites More sharing options...
rcmaehl Posted November 12, 2015 Share Posted November 12, 2015 (edited) I use RESHack to delete all the AutoIt related stuff from my compiled programs. I reduces AV detections from ~5/42 to ~1/42 and sometimes 0/42. I have had to do this a lot lately while messing around with IRC functions creation since IRC + AutoIt had been used for malicious purposes in the past Edited November 12, 2015 by rcmaehl My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.My Projects WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF Link to comment Share on other sites More sharing options...
iamtheky Posted November 12, 2015 Share Posted November 12, 2015 (edited) can you post a small compiled program with all the 'autoiit related stuff' deleted. I'm interested in what you elected to remove. Edited November 12, 2015 by boththose ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
rcmaehl Posted November 12, 2015 Share Posted November 12, 2015 (edited) can you post a small compiled program with all the 'autoiit related stuff' deleted. I'm interested in what you elected to remove.Not on a Windows computer ATM. Mainly, any debug strings, additional icons other than the application icon I use, and the default tray menu to pause the script. Will post an example in around an hour and a half.Items below in BOLD are things I've only done once or twice and haven't thoroughly tested. In "Icon" delete 1, 2, 3, and anything else that doesn't match your app iconIf "Menu" only has 166 delete "Menu" entirely, else just remove 166Delete "String Table"In "Icon Group" delete 162, 164, and 169In "Version Info" learn the additional fields and add them in yourselfOPTIONALLY, Change 'BLOCK "080904B0"' to 'BLOCK "040904B0"' and 'VALUE "Translation", 0x0809 0x04B0' to 'VALUE "Translation", 0x0409 0x04B0' in "Version Info" then Delete 2057 to change your language from English UK to English USOPTIONALLY, Change the language of all other Resources in your file to "English_US" or 1033OPTIONALLY, In "Manifest", change which versions of Windows your program says it's supported on by adding/removing supportedOS IDs Edited November 17, 2015 by rcmaehl SupportedOS IDs My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.My Projects WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF Link to comment Share on other sites More sharing options...
Chimaera Posted November 12, 2015 Author Share Posted November 12, 2015 (edited) I have had to do this a lot lately while messing around with IRC functions creation since IRC + AutoIt had been used for malicious purposes in the pastI have a similar problem as all my stuff deals with areas the AV's protect, services, registry, special windows folders etc and that's why i always have this problem because of the work i do. Edited November 14, 2015 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Chimaera Posted November 14, 2015 Author Share Posted November 14, 2015 (edited) Ok ive managed to sort this now and this is how i did itI created a small autoit script like this#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=compile\chimaera_black.ico #AutoIt3Wrapper_Outfile=autoit_stub.exe #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****and compiled the file thendownloaded Resource Hacker http://www.angusj.com/resourcehacker/ (i grabbed the portable edition)put the stub into the resource hacker folder and opened resource hackerThen i opened the stub and double clicked the RCData section the select SCRIPT:0once its highlighted then right click and choose Replace ResourceThen select your previously prepared .a3x which you made from the script you want to addThen click ReplaceThen just save the exe and rename to what the file would have normally been called.And so far i have not had a single detection This may not be for everyone but if you are plagued with AV problems like i am mainly because i work with customer machines all day this may helpMany thanks to Trong for pointing me in the right direction Edited November 14, 2015 by Chimaera Skysnake 1 If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Developers Jos Posted November 14, 2015 Developers Share Posted November 14, 2015 mmm... trying to understand how the end result differs from a normal compile as I would guess that should be more or less the same result?Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Chimaera Posted November 14, 2015 Author Share Posted November 14, 2015 (edited) No idea ive just followed the suggestions, i dont understand why the AV kick off normally yet if i replace like above AV doesnt even stir when you add the pendrive or run the file?Normally the second the usb drive is inserted it starts and if i run one file that starts a sequence of others its forever jumping in and trying to stop it as the files that trigger it start.I have noticed over periods of AutoIt updates it does differ as to which AV is more aggressive to the exes but i dont know what the AV looks at. which may change as AutoIt is made.With this method ive not seen a single AV event yet... it may happen time will tell Edited November 14, 2015 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Skysnake Posted November 14, 2015 Share Posted November 14, 2015 This is great. I keep on running into similar dead processes and deleted EXEs. Will try this. Thanks for sharing Skysnake Why is the snake in the sky? Link to comment Share on other sites More sharing options...
rcmaehl Posted November 17, 2015 Share Posted November 17, 2015 Ok ive managed to sort this now and this is how i did itI created a small autoit script like this#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=compile\chimaera_black.ico #AutoIt3Wrapper_Outfile=autoit_stub.exe #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****and compiled the file thendownloaded Resource Hacker http://www.angusj.com/resourcehacker/ (i grabbed the portable edition)put the stub into the resource hacker folder and opened resource hackerThen i opened the stub and double clicked the RCData section the select SCRIPT:0once its highlighted then right click and choose Replace ResourceThen select your previously prepared .a3x which you made from the script you want to addThen click ReplaceThen just save the exe and rename to what the file would have normally been called.And so far i have not had a single detection This may not be for everyone but if you are plagued with AV problems like i am mainly because i work with customer machines all day this may helpMany thanks to Trong for pointing me in the right directionInteresting... and you've had no problems? Secondly, do you think that compiling a script with Reshack something similar to ResHack since its license prohibits unapproved distribution, and then switching out the script file in resources during/before run (FILES WITHIN FILES, how deep does this rabbit hole go!?) could be used to make de-compiling harder? Finally, included updated what I do in my old post. My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.My Projects WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now