1 |
4ae45b10
|
Ermal Luçi
|
# Ares - P2P filesharing - http://aresgalaxy.sf.net
|
2 |
|
|
# Pattern attributes: good veryfast fast undermatch
|
3 |
|
|
# Protocol groups: p2p open_source
|
4 |
|
|
# Wiki: http://www.protocolinfo.org/wiki/Ares
|
5 |
66f2dd0e
|
Ermal Lu?i
|
# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
|
6 |
4ae45b10
|
Ermal Luçi
|
|
7 |
|
|
# This pattern catches only client-server connect messages. This is
|
8 |
|
|
# sufficient for blocking, but not for shaping, since it doesn't catch
|
9 |
|
|
# the actual file transfers (see below).
|
10 |
|
|
|
11 |
|
|
# Original pattern by Brandon Enright <bmenrigh at the server known as ucsd.edu>
|
12 |
|
|
|
13 |
|
|
# This pattern has been tested with Ares 1.8.8.2998.
|
14 |
|
|
|
15 |
|
|
ares
|
16 |
|
|
# regular expression madness: "[]Z]" means ']' or 'Z'.
|
17 |
|
|
^\x03[]Z].?.?\x05$
|
18 |
|
|
|
19 |
|
|
# It appears that the general packet format is:
|
20 |
|
|
# - Two byte little endian integer giving the data length
|
21 |
|
|
# - One byte packet type
|
22 |
|
|
# - data
|
23 |
|
|
#
|
24 |
|
|
# Login packets (TCP) have the following format:
|
25 |
|
|
# - \x03\x00 (the length appears to always be 3)
|
26 |
|
|
# - \x5a - The login packet type.
|
27 |
|
|
# The source code suggests that for supernodes \x5d is used instead.
|
28 |
|
|
# - Three more bytes. I don't know the meaning of these, but for me they
|
29 |
|
|
# are always \x06\x06\x05 (in Ares 1.8.8.2998). From the comments in IPP2P,
|
30 |
|
|
# it seems that they are not always exactly that, but seem to always end in
|
31 |
|
|
# \x05.
|
32 |
|
|
#
|
33 |
|
|
# Search packets have the following format:
|
34 |
|
|
# - Two byte little endian integer giving the data length
|
35 |
|
|
# A single two letter word make this \x0a
|
36 |
|
|
# The biggest I could get it was \x4f
|
37 |
|
|
# - Packet type = \x09
|
38 |
|
|
# - One byte document type:
|
39 |
|
|
# - "all" = 00
|
40 |
|
|
# - "audio" = 01
|
41 |
|
|
# - "software" = 03
|
42 |
|
|
# - "video" = 05
|
43 |
|
|
# - "document" = 06
|
44 |
|
|
# - "image" = 07
|
45 |
|
|
# - "other" = 08
|
46 |
|
|
# - \x0f - I don't know what this means, but it is always this for me
|
47 |
|
|
# - Two bytes of unknown meaning that change
|
48 |
|
|
# - Some number search words:
|
49 |
|
|
# - \x14 - I don't know what this means, but it is always this for me
|
50 |
|
|
# - One byte length of the first search word
|
51 |
|
|
# Between 2 and \x14 in my tests with Ares 1.8.8.2998
|
52 |
|
|
# It ignores single letter words and truncates ones longer than \x14
|
53 |
|
|
# - Two bytes of unknown meaning that change
|
54 |
|
|
# - The search word (not null terminated)
|
55 |
|
|
# This was all investigated by searching for strings in "all". Searches
|
56 |
|
|
# can also be performed in "title" and "author". I'm not going to
|
57 |
|
|
# bother to research these because I new realize that searches are done
|
58 |
|
|
# on the same TCP connection as the login packets, so there is no need
|
59 |
|
|
# to match them separately.
|
60 |
|
|
#
|
61 |
|
|
# File transfers appear to be encrypted or at least obfuscated. (The
|
62 |
|
|
# files themselves, at least, are not transmitted in the clear.) I
|
63 |
|
|
# haven't found any patterns.
|