Changes

Jump to navigation Jump to search
68 bytes added ,  01:22, 2 February 2017
-p is now optional
Line 44: Line 44:  
Currently there is only one way to load the blob into victim task using libcompel.a, called ''c-header'' <ref>This is done for historical reasons, it was the most handy way to load [[parasite code]] by CRIU. In plans we have loading the .po ELF file itself</ref>. First you should make a header out of you .po file with the <code>hgen</code> action of compel tool:
 
Currently there is only one way to load the blob into victim task using libcompel.a, called ''c-header'' <ref>This is done for historical reasons, it was the most handy way to load [[parasite code]] by CRIU. In plans we have loading the .po ELF file itself</ref>. First you should make a header out of you .po file with the <code>hgen</code> action of compel tool:
   −
  compel hgen -f parasite.po -p parasite -o parasite.h
+
  compel hgen -f parasite.po -o parasite.h
    
Options meaning is the following:
 
Options meaning is the following:
 
* <code>-f</code> tells which binary to turn into header
 
* <code>-f</code> tells which binary to turn into header
 
* <code>-o</code> tells where to write the resulting header
 
* <code>-o</code> tells where to write the resulting header
* <code>-p</code> tells the prefix to use for generated names
      
Once <code>parasite.h</code> file is ready, it should be included into the infecting program source code to be compiled with it.
 
Once <code>parasite.h</code> file is ready, it should be included into the infecting program source code to be compiled with it.
Line 73: Line 72:  
with <code>ctl</code> as an argument. Here <code>''PREFIX''</code>
 
with <code>ctl</code> as an argument. Here <code>''PREFIX''</code>
 
is the same as the argument given to <code>-p</code> option
 
is the same as the argument given to <code>-p</code> option
to <code>compel hgen</code>.
+
to <code>compel hgen</code>, and if not given, it is derived
 +
from the input file name, dropping the path and the suffix
 +
(in the above example it's <code>parasite</code>).
    
Second, when infecting a parasite one should specify the amount of threads it will mess with (1, if only the thread leader will be accessed) and the maximum size of the memory area shared between infecting task and parasite used for arguments/result passing.
 
Second, when infecting a parasite one should specify the amount of threads it will mess with (1, if only the thread leader will be accessed) and the maximum size of the memory area shared between infecting task and parasite used for arguments/result passing.

Navigation menu