Changes

Jump to navigation Jump to search
261 bytes added ,  14:18, 25 November 2016
Line 66: Line 66:  
=== Infecting ===
 
=== Infecting ===
   −
Infecting the victim with parasite blob needs some special treatment. First, the ctl should be configured with the blob information. Currently there's only one type of blobs, generated by <code>compel hgen</code>. To put this info into ctl one should call <code>compel_parasite_blob_desc(ctl)</code> to get a pointer on <code>struct parasite_blob_desc</code> and fill in the fields of this strucure
+
Infecting the victim with parasite blob needs some special treatment.
 +
 
 +
First, the ctl should be configured with the blob information. Currently there's only one type of blobs, generated by <code>compel hgen</code>. To put this info into ctl one should call <code>compel_parasite_blob_desc(ctl)</code> to get a pointer on <code>struct parasite_blob_desc</code> and fill in the fields of this strucure
    
* <code>.parasite_type</code> should be set to <code>COMPEL_BLOB_CHEADER</code>
 
* <code>.parasite_type</code> should be set to <code>COMPEL_BLOB_CHEADER</code>
Line 78: Line 80:  
* <code>.hdr.relocs</code> should be set to <code>parasite_relocs</code> argument (it's an array)
 
* <code>.hdr.relocs</code> should be set to <code>parasite_relocs</code> argument (it's an array)
 
* <code>.hdr.nr_relocs</code> should be set to the number of elements in this array (<code>sizeof(arr)/sizeof(arr[0])</code>)
 
* <code>.hdr.nr_relocs</code> should be set to the number of elements in this array (<code>sizeof(arr)/sizeof(arr[0])</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.
    
=== Arguments passing ===
 
=== Arguments passing ===

Navigation menu