Vault7: CIA Hacking Tools Revealed
Navigation: » Latest version
tinc Protocol List
This is a complete list of TINC's meta-protocol commands. Handlers are defined in the protocol.c request_handlers array. The implementations are scattered in the protocol_* files.
('toc' missing)
Authentication
ID
Syntax: ID(0), STRING my_name, INT version
Send: Identify self to a foreign client.
Recv: Set allow_request to METAKEY and respond with a METAKEY command
METAKEY
Syntax: METAKEY(1), INT cipher, INT digest, INT mac_len, INT compression, STRING buffer
Send: Generates random session key, encrypts it w/ out's pub key, sends new key + all cipher info. All future comms will be done with this new key.
Recv: Initializes crypto w/ cipher info and, uses it's privkey to decrypt. Set's allow_request to CHALLENGE and sends a CHALLENGE command
CHALLENGE
Syntax: CHALLENGE(2), STRING buffer
Send: Fill c->hischallenge w/ random data and send it (note it will be encrypted because this comes after a METAKEY)
Recv: Write data to c->mychallenge, set allow_request to CHAL_REPLY, send a CHAL_REPLY command
CHAL_REPLY
Syntax: CHAL_REPLY(3), STRING buffer
Send: Hash c->mychallenge and send to other side
Recv: Check hash against hash of c->hischallenge. Set allow_request to ACKAcknowledge and send an ACKAcknowledge command.
ACK
Syntax: ACKAcknowledge(4), STRING my_port, INT estimated_weight, %x options
Send: Uses the difference between now() and the start of the connection as the weight.
Recv: Initialize node_t, create edge_t for this connection, send ADD_EDGE to everyone, update graph. Set allow_request to ALL
Misc
STATUS
Syntax: STATUS(5), INT status_num, STRING status_str
Send: Sends my status information
Recv: Log message.
ERROR
Syntax: ERROR(6), INT error_num, STRING error_str
Send: Sends an error message
Recv: Log message, end connection.
TERMREQ
Syntax: TERMREQ(7) (no arguments)
Send: Sends a request for the other side to terminate
Recv: Terminate the connection
PING
Syntax: PING(8) (no arguments)
Send: Set c->status.pinged to true, set c->last_ping_time to now
Recv: Send a PONG
PONG
Syntax: PONG(9) (no arguments)
Send: Nothing.
Recv: Set c->status.pinged to false, reset various timeouts because this is a known-good connection
PACKET
Syntax: PACKET(17), SHORT len, ... BYTE* raw_byte_data
Send: Send a vpn_packet_t over the meta-link'
Recv: Flag the length so that receive_meta() knows that a tcppacket follows immediately.
Subnet
ADD_SUBNET
Syntax: ADD_SUBNET(10), %x rand(), STRING owner, STRING name
Recv:
- Look up owner. If they don''t exist, create them
- If we already know this subnet, finish
- If we're the alleged owner but we don't know the subnet retaliate with a DEL_SUBNET and finish
- Update our routing
- Forward the ADD_SUBNET
DEL_SUBNET
Syntax: DEL_SUBNET(11), %x rand(), STRING owner, STRING name
Recv:
- If we don't know the owner, skip
- If we're the owner, retaliate with an ADD_SUBNET and finish
- Forward the DEL_SUBNET, if it seems like we should
- Update our routing
Edge
ADD_EDGE
DEL_EDGE
Key
KEY_CHANGED
REQ_KEY
ANS_KEY