Anti sybil package for BrightID
Project description
BrightID Anti-Sybil
This package provides a framework to evaluate the quality of different anti-sybil algorithms, by simulating different attacks to BrightID's social graph.
Comparing performance of different algorithms in detecting sybils in different attacks
Algorithms
-
SybilRank is a well-known sybil detection algorithm that is based on the assumption that sybils have limited social connections to real users. It relies on the observation that an early-terminated random walk starting from a non-Sybil node in a social network has a higher degree-normalized (divided by the degree) landing probability to land at a non-sybil node than a sybil node.
-
GroupSybilRank is an enhanced version of the SybilRank algorithm. In this algorithm, a graph is created in which the BrightID groups are nodes and edges are weighted based on affinity between groups. Then original SybilRank algorithm will be applied to this graph of groups and users get scores from the best group they belong to. This algorithm achieved best results so far in identifying sybils based on modeled attacks and is being used as official BrightID anti-sybil algorithm. up edges.
-
WeightedSybilRank is an enhanced version of the SybilRank algorithm that uses the number of common neighbors of the tow connected nodes as weight (trustworthy factor) of the edge.
Attacks
Lone Attacks
One attacker attempting to propagate score to the Sybils to verify them by connecting to other nodes and creating groups. We assumed that an attacker will have one account with a normal or above-average number of direct connections to honest users which they can use for interconnections to sybil accounts.
-
One attacker attempts to connect to some of the seed nodes and create some sybil nodes. implementation - graph
-
One attacker attempts to connect to some of the top-ranked honests and create some sybil nodes. implementation - graph
-
One attacker attempts to connect to some of the honests and create some sybil nodes. implementation - graph
-
One attacker attempts to connect to one of the top-ranked honests and create multiple (duplicate) groups of the sybils. implementation - graph
-
A seed node attempts to create some sybils nodes. implementation - graph
-
An honest node attempts to create some sybils nodes. implementation - graph
Collaborative Attacks
Multiple attackers attempting to propagate score to the Sybils to verify them by connecting to other nodes and creating groups. Attackers are able to connect to each other and each others’ sybil accounts in any way. We assumed that each attacker will have one account with a normal or above-average number of direct connections to honest users which they can use for interconnections to sybil accounts. All these attacks can be performed by one or more groups of attackers who collaborate together.
-
One or more groups of attackers attempt to connect to some of the seeds and create some sybil nodes. implementation - graph for single group - graph for multiple groups
-
One or more groups of attackers attempt to connect to some of the top-ranked honests and create some sybil nodes. implementation - graph for single group - graph for multiple groups
-
One or more groups of attackers attempt to connect to some honest and create some sybil nodes. implementation - graph for single group - graph for multiple groups
-
A group of attackers attempts to connect to some of the top-ranked honests and create multiple (duplicate) groups of the sybils. implementation - graph for signle group
-
One or more groups of seed nodes attempt to create some sybil nodes. implementation - graph for single group - graph for multiple groups
-
One or more groups of honest nodes attempt to create some sybil nodes. implementation - graph for single group - graph for multiple groups
Manual attack
This is a way to manually add new nodes/edges/groups to the BrightID graph and see how different algorithms rank those nodes. You can use MANUAL_ATTACK_OPTIONS
variable in the config.py file to define the manual attack. This example adds 3 sybil nodes, connect them to xGUyVQLYV80pajm8QP-9cfHC7xri49V58k02kqTAiUI
as attacker and add them to a new group. graph for this manual attack
MANUAL_ATTACK_OPTIONS = {
'top': True,
'connections': [
['xGUyVQLYV80pajm8QP-9cfHC7xri49V58k02kqTAiUI', 'sybil1'],
['xGUyVQLYV80pajm8QP-9cfHC7xri49V58k02kqTAiUI', 'sybil2'],
['xGUyVQLYV80pajm8QP-9cfHC7xri49V58k02kqTAiUI', 'sybil3'],
['sybil1', 'sybil2'],
['sybil1', 'sybil3'],
],
'groups': {
'new_group_1': [
'sybil1',
'sybil2',
'sybil3'
]
}
}
Install
$ git clone https://github.com/BrightID/BrightID-AntiSybil.git
$ cd BrightID-AntiSybil
$ pip3 install .
Running Tests
You can configure the algorithms and attacks you want to test by editing the config.py file in anti_sybil/tests/attacks/config.py
and then run the tests by
$ python3 anti_sybil/tests/attacks/run.py
The result will contain:
- An interactive graph (example) per algorithm/attack that visualize the graph and scores each sybil/attacker/honest node achieved
- A CSV file (example) that has a column per algorithm/attack and provide following information for each algorithm/attack
Results | GroupSybilRank one group group target attack |
---|---|
No. Successful Honests | 416 |
Successful Honests Percent | 78.1954887218045 |
Sybils scored >= % | 0.080091533180778 |
Avg Honest - Avg Sybil | 17.4819290581162 |
Max Seed | 100 |
Avg Seed | 59.6248484848485 |
Min Seed | 31.88 |
Max Honest | 100 |
Avg Honest | 29.3145290581162 |
Min Honest | 0 |
Max Attacker | 13.96 |
Avg Attacker | 13.96 |
Min Attacker | 13.96 |
Max Sybil | 13.96 |
Avg Sybil | 11.8326 |
Min Sybil | 5.87 |
Border | 14 |
- A chart to compare effectiveness of different anti-sybil algorithms to detect sybils in different attacks
Old Version
The old version of BrightID Anti-Sybil algorithms, tests and documents can be found here.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file anti_sybil-1.0.0.tar.gz
.
File metadata
- Download URL: anti_sybil-1.0.0.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a775756407c1287ca7b387f59fbeec297d19d21b2b98b38b69618d65cfb4cd65 |
|
MD5 | ebf0fc9bd7a19865efb107521be18664 |
|
BLAKE2b-256 | db0aca3b430b45d082cde0bde92ae83eea1aeed80afe26ea96a7fb2b1a74ad16 |
File details
Details for the file anti_sybil-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: anti_sybil-1.0.0-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ad5279224b6c9e9c5fa19b2bcad7fbe3fa52f972c5b40edc0b4ee8d4e011e84 |
|
MD5 | eca244112dc878fa4e41027b2b361cd3 |
|
BLAKE2b-256 | 5257750e29a6f3fcbcf1b37544ddb6f6b841b853b5ac9eb134c2fa7bcd2508af |