Changes

Jump to navigation Jump to search
21 bytes added ,  09:55, 4 December 2014
no edit summary
Line 20: Line 20:  
Internally parasite code is represented as two blocks
 
Internally parasite code is represented as two blocks
   −
# a head written in assembly language
+
# a bootstrap written in assembly language
# a body written in C language
+
# a daemon written in C language
    
[[File:Parasite-structure.svg|thumb|upright=4|center]]
 
[[File:Parasite-structure.svg|thumb|upright=4|center]]
   −
==== Parasite head ====
+
==== Parasite bootstrap ====
   −
Parasite head lives in <code>parasite-head.S</code> file and simply prepares the own stack (nipping off a few bytes) and literally calls for body execution. Once main body execution is complete we simply call the cpu trap thus CRIU can intercept this moment and cure the victim restoring its original code contents.
+
Parasite bootstrap lives in <code>parasite-head.S</code> file and simply prepares the own stack (nipping off a few bytes) and literally calls for body execution. Once main body execution is complete we simply call the cpu trap thus CRIU can intercept this moment and cure the victim restoring its original code contents.
   −
==== Parasite body ====
+
==== Parasite daemon ====
   −
Parasite body lives in <code>pie/parasite.c</code> file and as file extension implies is written in pure C language. The entry point is <code>parasite_service</code>, which simply opens unix socket and reads the command to service.
+
Parasite daemon lives in <code>pie/parasite.c</code> file and as file extension implies is written in pure C language. The entry point is <code>parasite_service</code>, which simply opens unix socket and reads the command to service.
    
[[Category: Under the hood]]
 
[[Category: Under the hood]]

Navigation menu