
!!! EXPERIMENTAL !!!

Software deployment using "templates" (instead of --cmd and --file). 
To use with '--cli-deploy --template <path/to/template/folder>'

================================================================================

Why this option ?
	
	Read below :)


What happen on the managed station when you run '--cli-deploy --cmd <...>' ?

        A McAfee package is copied on the managed station under:
        %ALLUSERSPROFILE%\Application data\mcafee\common framework\current\[MCAFEE_PACKAGE_NAME]\Install\0409\

        ePowner create a file called run.bat under this directory (which contains your cmd)

        The McAfee agent run it, then delete the whole content of the folder..


What happen on the managed station when you run '--cli-deploy --file evil.exe [--file-arg <...>]' ?

        Like '--cmd', a McAfee package is copied on the managed station under:
        %ALLUSERSPROFILE%\Application data\mcafee\common framework\current\[MCAFEE_PACKAGE_NAME]\Install\0409\

        ePowner add your evil file under this directory + run.bat which contains the following:
        start "" "%ALLUSERSPROFILE%\Application data\mcafee\common framework\current\[MCAFEE_PACKAGE_NAME]\Install\0409\evil.exe"

        ePowner use "start" command to execute evil.exe in background. Otherwise, the deployment task doesn't return until your file exits,
        which blocks further deployment tasks.

        The McAfee agent execute run.bat, then delete the whole content of the folder.
        Note that evil.exe will not be deleted if it is running (makes sense). This will
        actually be the case everytime you use '--file', excepting if your file fails to start (never tested).


Finaly, why this template option ?

        For many reasons. Here are some of them:

        1) You need to give additional files to '--file' (ex: EXE + some DLL)

        2) You need more than one line in '--cmd <cmd>', or just want to do some advanced stuffs.

        3) You want to move your files somewhere else before execution, to make them persistent (ex: system32 folder).

        So, with a template, you can do absolutly what you want on the managed stations.


How to use a template ?

        All you need to do, is copying your file(s) into a folder and manage 'run.bat' content.
        See examples from existing templates.

        Notes about 'run.bat' file:

                - It MUST exist ! Using ePowner, the McAfee agent running on the station will search for that file.

                - [MCAFEE_PACKAGE_NAME] pattern refers to the rogue package name (randomly generated by ePowner).
                  Do not change it ! It will be automatically updated by ePowner.
                  See 'template0_file/run.bat' as example.

        Then use '--cli-deploy --template <path/to/template/folder>'
        ePowner will then generate some additional files (metadata), build a valid package,
        push it on the repository, and then continue its job like with --cmd and --file.


Template examples:

        - see "custom0_cmd" and "custom0_file" folders which are the equivalent to '--cmd' and '--file' options respectively.

        - "custom1" : this template copy evil.exe and evil.dll into c:\, then execute c:\evil.exe


