Changes

115 bytes added ,  20:55, 4 March 2017
make it a bit more structured
Line 1: Line 1:  
This article is a collection of ideas of how [[compel]] can be used.
 
This article is a collection of ideas of how [[compel]] can be used.
 +
 +
== Run a new thread ==
    
One thing parasite code can do is call <code>clone()</code> and create a thread having access to main process' VM, FDT, FS, etc. The new thread can then do the following things:
 
One thing parasite code can do is call <code>clone()</code> and create a thread having access to main process' VM, FDT, FS, etc. The new thread can then do the following things:
Line 6: Line 8:  
* Apply "logrotate" on the fly
 
* Apply "logrotate" on the fly
 
* Perform garbage collection
 
* Perform garbage collection
 +
** E.g. MADVISE_DONTNEED unneeded pages to reduce rss
 
* Catch SIGSEGV, do something with mappings and act upon "illegal" memory access
 
* Catch SIGSEGV, do something with mappings and act upon "illegal" memory access
 
** Remote swap for task
 
** Remote swap for task
 
** WSS detection
 
** WSS detection
 +
 +
== Do some work and unload ==
    
Another thing is to perform some activity on behalf of the victim and then just unload itself. With this, we can do:
 
Another thing is to perform some activity on behalf of the victim and then just unload itself. With this, we can do:
Line 32: Line 37:  
** Re-open all files to force daemonize
 
** Re-open all files to force daemonize
   −
[[Category: Compel]]
+
[[Category: Compel|Usage]]