Detecting Linkedin Spammers and its Spam Nets

Spam is one of the main problems of the WWW.
Many studies exist about characterising and detecting several
types of Spam (mainly Web Spam, Email Spam, Forum/Blob
Spam and Social Networking Spam). Nevertheless, to the best of
our knowledge, there are no studies about the detection of Spam
in Linkedin. In this article, we propose a method for detecting
Spammers and Spam nets in the Linkedin social network. As
there are no public or private Linkedin datasets in the state of
the art, we have manually built a dataset of real Linkedin users,
classifying them as Spammers or legitimate users.
The proposed method for detecting Linkedin Spammers
consists of a set of new heuristics and their combinations using
a kNN classifier. Moreover, we proposed a method for detecting
Spam nets (fake companies) in Linkedin, based on the idea that
the profiles of these companies share content similarities. We have
found that the proposed methods were very effective. We achieved
an F-Measure of 0.971 and an AUC close to 1 in the detection
of Spammer profiles, and in the detection of Spam nets, we have
obtained an F-Measure of 1.


I. INTRODUCTION
Currently, the WWW is the biggest information repository ever built, and it is continuously growing.According to the study presented by Gulli and Signorini [1] in 2005, the Web consists of thousands of millions of pages.In 2008, according to Official Blog of Google 1 , the Web contained 1 trillion unique URLs.
Due to the huge size of the Web, search engines are essential tools in order to allow users to access relevant information for their needs.Search engines are complex systems that allow collecting, storing, managing, locating and accessing web resources ranked according to user preferences.A study by Jansen and Spink [2] established that approximately 80% of search engine users do not take into consideration those entries that are placed beyond the third result page.This fact, together with the great amount of money that the traffic of a web site can generate, has led to the appearance of persons and organizations that use unethical techniques to try to improve the ranking of their pages and web sites.Persons and organizations that use these methods are called spammers, and the set of techniques used by them, are called Spam techniques.
There are different types of Spam based on the target client: Web Spam [3] [4] or Email Spam [5].Web Spam contains several Spam types such as: Blog/Forum Spam, Review/Opinion Spam and Social Networking Spam.Blog/Forum Spam is the Spam created by posting automatically random comments or promoting commercial services to blogs, wikis, guestbooks.Review/Opinion Spam tries to mislead readers or 1 http://googleblog.blogspot.com.es/2008/07/we-knew-web-was-big.htmlautomated opinion mining and sentiment analysis systems by giving undeserving positive opinions to some target entities in order to promote them and/or by giving false negative opinions to some other entities in order to damage their reputations.Finally, Spam is also becoming a problem in social networks.There are existing studies in the literature about Spam in Video Social Networks [6] or Twitter [7] [8].There are several features of Social Networks that could make Spam even more attractive: • The target client is directly the final user.Web Spam is focused on content, so the Web Spammers try to improve the relevance of a web site by, for example, keyword stuffing.When the user conducts a search, it is likely that a Web Spam page will appear.However, it depends on the user clicking on this Web Spam page.Social Networks allow direct Spam, therefore the user will receive the Spam no matter what.
• It is focused on specific user profiles.In the case of Email Spam the content and the products of the email are generic because Spammers do not have information about target users.However, Social Networks (Facebook [9], Twitter [10] or Linkedin2 ) allow us to know a great amount of user data, so spammers use this data to aim each type of content or product at a specific audience.
• Social networks contain social network search tools to target a certain demographical segment of users.
This article focuses on Spam in the Linkedin social network.Linkedin is a social networking web site for people in professional occupations.It was founded in 2002 and in 2013, Linkedin had more than 200 million registered users in more than 200 countries.
Although some existing works have been performed to detect Spam in some well-known social networks, to the best of our knowledge this is the first one focused on the Linkedin social network and it presents a different approach to detect Spam in Social Networks.First, due to the lack of public or private Linkedin Spam datasets in the state of the art, we have generated one by means of a honeypot profile and searches of the Spam phrases.The process used to create the dataset is explained in Section V.
Second, we have created a method for detecting Linkedin Spammers.For that, we have analysed the Spammers profiles on Linkedin, and we have proposed a set of new heuristics to characterise them.Finally, we have studied the combination of these heuristics using different types of classifiers (Naïve Bayes [11], SVM [12], Decision Trees [13] and kNN [14]).www.ijacsa.thesai.orgThird, we present a method for detecting Spam Linkedin nets, that is, to detect sets of fake users created to send Spam messages to the real users connecting with them.This allows filtering those legitimate companies among fake companies, which creates a large amount of profiles for the unique purpose of generating Spam.The method is based on the similarity of their profiles and contacts.For that, the method uses distance functions (Levenshtein [15], Jaro-Winkler [16], Jaccard [17], etc.) which calculate the similarity value of each company.
After performing the experiments, we have determined that for the Spammers detection method the best classifier is kNN, and for the Spam nets detection method the best distance function is Levenshtein.
In short, these are the main contributions of this article: a) a detection method for Linkedin Spammers, b) a detection method for Spam nets and c) the first Linkedin Spam dataset.
The structure of this article is as follows.In Section II we comment on the works presented in the literature regarding the different types of Spam, and Spam techniques, as well as the ones that deal with the distinct detection methods.Section III shows the presence of Spam in social networks, specifically in Linkedin.Section IV explains the two proposed detection methods.In Section V the Linkedin Spam dataset we have created is explained.Section VI analyses the results obtained detecting Spammers profiles and Spam nets by applying the proposed methods.Finally, in sections VII and VIII we comment on our conclusions and the future works respectively.

II. RELATED WORK
Spam has existed since the Web appeared and it has been growing in importance with the expansion of the Web.Currently, Spam is present in various applications, such as email servers, blogs, search engines, videos, opinions, social networks, etc. Different approaches to Spam detection have appeared [18] [19], however, the best results have been obtained by the methods based on the machine learning approach.Below, we analyse some of the more important articles for the different types of Spam.
There are many articles about Web Spam.Henzinger et al. [4] discuss the importance of this phenomenon and the quality of the results that search engines offer.Gyöngyi and Garcia-Molina [3] propose a taxonomy of this type of Spam.Ntoulas et al. [20] highlight the importance of analysing the content to detect this type of Spam.
On the other hand, there are studies focused on the detection of Email Spam.Among them, we highlight the work performed by Ching-Tung et al. [21].This article presents a new approach for detecting Email Spam based on visual analysis, due to Spam emails embedding text messages in images to get around text-based anti-spam filters.They use three sets of features: a) embedded-text features (text embedded in the images), b) banner and graphic features (ratio of the number of banner images and ratio of the number of graphic images) and c) image location features.One of the first studies which focused on the detection of Email Spam based on machine learning, was that proposed by Sahami et al. [5].
Currently, Spam in social networks is booming, due to the wide use and the easy access to user data.There are several articles focused on this type of Spam.
Gao et al. [22] present an initial study to quantify and characterize Spam campaigns launched using accounts on online social networks.They analyze 3.5 million Facebook users, and propose a set of automated techniques to detect and characterize coordinated Spam campaigns.Grier et al. [23] present a characterization of Spam on Twitter.The authors indicate that 8% of 25 million URLs studied point to phishing, malware, and scams listed on popular blacklists.However their results indicate that blacklists are too slow at identifying new threats.In 2010, Wang presented an article [24], where he proposed a Spam detection prototype based on content and graph features.Another interesting articles focused on Twitter Spam, are the ones carried out by Yardi et al. [25] and Stringhini et al. [26], which study the behavior of Twitter Spammers finding that they exhibit different behavior (tweets, replying tweets, followers, and followees) from normal users (non-spammers).
With respect to the forum/blog Spam, it is necessary to highlight the study performed by Youngsang et al. [27].In this work, the authors study the importance of forum Spam, and the detection of these web pages by using several new heuristics and an SVM classifier.Another study presented by Mishne [28], describes an approach for detecting blog Spam by comparing the language models used in different posts.
In the literature there are other articles related to other types of Spam.An example is the article by Jindal and Liu [29], where they present a detailed analysis about the Spam in the context of product reviews.Mukherjee et al. [30] presented an article focusing on detecting fake reviews.The authors propose an effective technique to detect such groups, using the following features: ratio of group size, group size, support count, time window between fake reviews, etc. Lim et al. [31] presented another interesting study about this type of Spam.The authors propose a supervised method to discover review Spammers.To achieve that, they identify several characteristic behaviors of review spammers and model these behaviors to perform a ranking of the different reviewers.
Finally, we want to highlight an interesting article performed by Benevenuto et al. [6], where the authors propose a method for detecting Spam in video social networks.They use three sets of features: a) quality of the set of videos uploaded by the user, b) individual characteristics of user behavior and c) social relationships established between users via video response interactions.
In this Section, we have presented a wide set of articles related with the different types of Spam and detection methods.Among them are several focused on Social Networking Spam, however, to the best of our knowledge, this is the first study that analyses and detects Spam in Linkedin.Due to significant differences with other social networks, it is necessary to analyse in detail its characteristics and propose new heuristics to detect Spammers and their Spam nets.Some of its major differences are: it is a professional network, premium accounts allow access to detailed user data or users can be filtered (using search tools) to conduct Spam campaigns.Moreover, its interesting and different characteristics, from the Spammers point of view, make this study both useful and necessary.www.ijacsa.thesai.orgSpam is one of the most important challenges on the Web.Currently, due to the boom in social networks, the Spam generated in them is growing constantly.Probably, one of the main reasons for this growth is the large amount of users that they contain.In Table I we show the number of users for: Google+ 3 , Facebook 4 , Linkedin 5 and Twitter 6 .
There are several reasons why Spammers are using the social networks.These reasons can be divided into 3 topics: • Audience: • Huge audience (see Table I), this means big profits for spammers, even if only a small percent visit the page or buy the product.• It is very easy to create Spam, because social networks allow direct Spam, that is, the Spammer knows the name and data (job, contacts, skills, etc.) of each of its victims.That is the difference with Web Spam or Email Spam where the Spammer does not know these data about its victims, only the email and perhaps the name.
• Different options and tools to create Spam: • Fast distribution of Spam, due to user trust and their curiosity.The users trust anything that they see posted by one of their contacts.An example of this, is the use of popular hashtags in Twitter to lure users to their Spam sites.• This type of Spam allows the creation of fake relationship contacts, to make the user's profile appear more real on the social network.• Spammers can send messages to the users and include embedded links to pornographic or other product sites designed to sell something.• Internet social networks contain common fan pages or groups that allow people to send messages to a lot of users even if the Spam user does not have these users as contacts.
• Little investment.Unlike other types of Web Spam, which requires investing in domains, hosting, developers, etc., social network Spam only needs accounts in social networks such as Linkedin, Facebook or Twitter.
A. How much Spam is there in Linkedin?
One approach to determine the incidence of one problem or topic in society is to measure its impact in Google searches (or other important search engines).This method has already been used to study the presence of certain diseases in society [34].In our case, we have used two methods.First, we have measured the trends in the Google searches using Google Trends.Figure 1 shows the obtained results.It depicts the relative amount of searches by year according to the maximum value obtained in 2012 (100%).With the same tool, we have also analyzed the importance of Web Spam versus Linkedin Spam.The results shown in Figure 2, show that the importance of Web Spam (the most important type of Spam) is decreasing compared to the increase in Linkedin Spam.
On the other hand, we have used another approach: searching for the query in Google Linkein Spam.The number of results is higher than 53 million pages, which indicates the high presence and concern about social networking Spam.

B. Can existing Spam detection techniques be used on Linkedin?
Before analysing the existing Spam detection techniques we will explain the different types of Spam.There are different classifications for them, but, the classifications most relevant in the state of the art, performed by Gyongyi and Garcia-Molina [3], and Najork [35], suggest that the main types of Web Spam are: content spam, cloaking and redirection spam, click Spam and link spam.
• Content Spam, that is, a technique based on the modification of the content or the keywords of a web page with the purpose of simulating more relevance to search engines and attract more traffic.To detect this type of Spam the search engines use several algorithms and heuristics based on content analysis.However, there are a lot of Spam pages that avoid these detection algorithms.An example of these heuristics was presented by Ntoulas et al. [20].
• Cloaking and Redirection Spam, which consists in dynamically generating different content for certain clients (e.g.: browsers) but not for others (e.g.: crawling systems).There are several techniques to detect this type of Spam, among them we can highlight [36], [37] and [38].The latter approach, proposed by Wu and Davison [38], where the authors detect this Spam by analysing common words across three copies of a web page.
• Click Spam: this technique is based on running queries against search engines and clicking on certain pages in order to simulate a real interest from the user.Search engines use algorithms to analyze certain logs clicks and detect suspicious behaviours.
• Link Spam, which is the creation of Web Spam by means of the addition of links between pages with the purpose of raising their popularity.It is also possible to create "link farms", which are pages and sites interconnected among themselves with the same purpose.In order to detect Link Spam, the search engines analyse relationships and the graphs between web domains.In this way, they can detect domains with a number of inlinks and outlinks or web graphs suspected of being Spam.
Finally, there is another detection technique which is not focused on a unique type of Spam.It was proposed by Webb et al. [39] [40], and the authors analyse the HTTP headers and their common values in Spam pages, to detect Spam.
As we can see, the existing detection techniques cannot be applied to detect Liknedin Spam.Only the algorithms for detecting Content Spam could be used, however, the problem is that the existing heuristics to detect Spam in a typical web page, cannot be applied to web page profiles of Linkedin because their features are completely different.Due to existing detection techniques being impossible to apply, Linkedin has proposed its own particular detection techniques (see Section III-D).

C. How do Spammers create Linkedin Spam and what are the differences between it and other social networks?
The first step for a Spammer is to decide whether the Spamming attack will be a focused or general attack.In the case of it being a focused attack, the Spammer will search for specific users by means of the Linkedin tools.After that, the Spammer can create Spam by the following methods: • Messages: these are sent by any one of our contacts.
However, we often accept contacts because of having contacts in common, or because we think that the job, groups or skills of this user are appropriate for them to be our contact, and perhaps, it could be a job opportunity.
• Groups: that is, those notifications sent to the groups of each of the victims.These messages will be sent by email to the users of the group, and moreover, this post can be seen in the forum of the group.
• Updates: the Spammer makes updates to their profile to invite their contacts to visit their profile.
After we have analysed the operation of Linkedin Spam, we explain the differences in the creation Spam between Linkedin and other social networks.
• Linkedin allows the use of social networks search tools to target a certain demographical segment of the users.This allows the Spam to be made more specific, and therefore, it is likely that the victim will click on the Spam link.
• Linkedin is a social network which focuses on business, companies and professionals, which is very interesting from the point of view of the Spammers.In other words, the possible profit will be higher if the person that visits the Spam site is a businessman instead of a teenager from Facebook.Twitter, Facebook or email can be used for professional ends, however they do not contain the other advantages of Linkedin.
• Linkedin allows direct Spam, such as Twitter, Facebook or email, but in this case, the Spammer knows the name and data (job, contacts, skills, location, etc.) of each of their victims.So, the probability of success is higher in Linkedin than in Web or Email Spam.
• Due to Linkedin being defined as a professional social network, usually the data of its users are real, and the usage of it by them is usually a way to find a job or to find new professional contacts; this is not a game.For this reason, when a Linkedin user receives a message, email or update from Linkedin, they pay more attention to it than to notifications of other social networks.Again, the probability of Spam success is higher.
in a particular email, message or comment, which is more difficult.So, if we can detect a Spammer, we can also detect all their Spam messages (emails, comments and updates).

D. How does Linkedin detect its Spam?
Currently, Linkedin uses two techniques to detect Spam.On the one hand, when a user receives an invitation to become a contact of another user, he can indicate that this person is a Spammer.A Linkedin user has numerous methods of contacting a specific user (as a friend, as a coworker, as a classmate, etc.).Linkedin blocks a contact method to a user profile (Spammer), when it has received 5 requests rejecting said account by the same contact method indicating that it is Spam.Alternatively, the user can report the profile of the Spammer to the following e-mail address: abuse@linkedin.com.
However, from our opinion, these methods are not sufficient, due to two reasons.First, people are lazy, and because of that they will usually not accept this person but also will not usually notify that the user is a Spammer.For the same reason, only in a few cases, the user sends an email to report a Spammer.The second reason is because of the speed and ease with which criminal organizations and Spammers can create a lot of accounts, compared to the slow detection methods used by Linkedin.
In summary, as we have explained, the presence and concern of Spam in social networks is high.Due to this, together with the lack of articles about Linkedin Spam, existing methods for detecting Spam cannot be applied and the need for other methods to complement tools used by Linkedin, we propose a method for detecting Linkedin Spammers, and a method for identifying fake companies (Spam nets).

IV. DETECTION METHODS
We present two detection methods, one for detecting Spammers and another for detecting Spam nets, both in the Linkedin social network.In order to know and understand the behaviour of Linkedin Spammers and Spam nets, and also to test the proposed methods, we have manually built a dataset of Linkedin profiles, classifying them as spammers and legitimate users (see Section V).
The method for detecting Spammers (section IV-A) is based on a set of new heuristics together with the use of machine learning.The heuristics have been obtained by means of the manual and statistical analysis of the legitimate and Spam Linkedin profiles.So, we characterize a Linkedin profile, and then decide whether or not it is Spam.For the appropriate combination of these heuristics, we have tried different classification techniques (decision trees, techniques based on rules, neuronal networks and kNN).
To detect Spams nets in Linkedin (section IV-B), we have focused on the idea that we have observed during the manual analysis.The fake profiles of a fake company, usually share similarities that allow differentiation between legitimate companies and fake companies.

A. Method to detect Linkedin Spammers
We will discuss a set of heuristics that aim to characterize and detect Spam profiles in Linkedin.Some of the features we present below, have appeared because Linkedin is a professional social network, and their users are very careful with the details of their profiles.Linkedin users want to have an updated and complete profile.
The results obtained for each heuristic were tested on the dataset described in Section V.For each non binary feature, we include a figure showing a box and whisker diagram with the feature values, corresponding to Spam and Non-Spam pages.For binary features, we only present the percentage of use for each type of page.The features analysed are the following: • Number of words in profile: we have analysed this feature because during the manual labeling of the pages we have observed, that Spam pages usually contain less words than the legitimate Linkedin profiles.Figure 3a shows that the median number of words in Spam profiles is 454 words.In other words, the Spam profiles contain on average 559.3 words and the No-Spam profiles 741.8 words, 24.6% lower.
• Number of contacts: due to the automatic generation of Spam profiles, they present two clear behaviors: profiles with very few contacts or profiles with many contacts.On the other hand, the legitimate profiles follow a uniform distribution of contacts, without these extreme differences.We observe in Figure 3b that in Spam profiles the median is 1 and in the No-Spam profiles it is 81.Moreover, the difference between averages is very significant.Specifically, Spam profiles contain on average 204.8 contacts, while No-Spam profiles contain only 98.1.
• Name size: in this case, the deficiency of Spam profiles appears in the name of the person.Fake profiles usually contain shorter names and surnames than in legitimate profiles.This is because Linkedin users are very careful and want their data profile to be correct and updated.To achieve this, they use their complete name and do not tend to use short names or nicknames.
As we thought, the results indicate that legitimate profiles have longer names than fake profiles.Figure 3c shows that the median and average in Spam profiles is 10 and 9.09 letters and in No-Spam profiles is 18 and 17.41, respectively.
• Location size: we have observed that Spam profiles usually contain a simple and smaller location than in the legitimate profiles.Moreover, the location among the fake profiles of the fake companies are very similar.
In Figure 3d shows the median and average location size in Spam profiles to be 9 letters and 14.72, respectively.In the case of No-Spam profiles, the median is three times higher, than the Spam profiles, 28 letters, and the average is 24.64 letters.• Name written in lowercase: another big weakness of fake profiles, is that their name or surname, are often written in lowercase.Figure 4a indicates that more than 20% of the Spam profiles contain user names in lowercase, and in the legitimate profiles this value is almost 10 times smaller.
• Rhythmic name: a technique used to draw the users attention and build trust in the profile.Specifically, it was observed that often the Spam profiles contained people whose first and last names start with the same two or three letters.Figure 4b shows that the 5.12% of the No-Spam profiles contain a rhythmic name and lastname, but this figure raises up to more than five times, 27.90, in the Spam profiles.
• Profile with photo: we have noted two weaknesses in the fake Linkedin profiles regarding this issue.First, in a social network the users usually have photo, in the case of the Spam profile, they usually do not.And second, if a Spam profile contains a photo, this photo can usually be found by a search engine.In Figure 4c we observe that only 22.67% of the Spam profiles contain photo, and in the case of legitimate profiles this value is more than double, specifically 53.84%.
• Plagiarism in profiles: another weakness of automatically generated Spam profiles, is that their content is small, or, due to the difficulty in generating logical content, the Spammers take texts from the Internet.
We have used the Grammarly plagiarism checker 8 .This system finds unoriginal text by checking for plagiarism against a database of over 8 billion documents.
The Figure 4d shows that multiple Spam profiles have copied or automatically generated content.The differences among the results are very significant, specifically 3.45% in No-Spam profiles and 56.53% in Spam profiles.
As we have seen, Spam profiles tend to be simpler and contain less detail than legitimate profiles.Moreover, the results obtained for each type of profile (Spam and No-Spam) show significant differences between them.In multiples cases the results are 2, 3, 5 or even 10 times higher or smaller in Spam profiles than in legitimate profiles.These important differences allow the proposed heuristics to be used to characterize and detect Linkedin Spam.
The detection method proposed uses these heuristics together with machine learning techniques to identify Spammer profiles.The method is to not focus on a specific heuristic but to use all of them.In the case of failure of a particular heuristic, since the method uses all heuristics, the other heuristics will correct this error.For the appropriate combination of heuristics we have tried different machine learning techniques (decision trees, kNN, SVM and Naive-Bayes).Based on the obtained results (see Section VI), the method for combining the heuristics is kNN.

B. How to Detect Spam Nets?
We have studied a method for detecting fake companies, companies whose unique purpose is to create fake profiles to generate Spam.The proposed method identifies this type of Linkedin companies based on the similarity among the profiles that each company contains.
To measure the similarity between profiles, we have generated a text string that contains the different data of the profile separated by commas ",".A generic example of the text string generated with the Linkedin data profile and the results obtained with the proposed heuristics, is the following: The value of the user name, title of the profile, user location, number of contacts, skills and education are extracted directly from the profile of the user.However, the variables: NumberOfWords, NameSize, LocationSize, RhythmicName, Photo, LowercaseName and ProfilePlagarism are calculated previously, based on the analysis of the profile.Finally, the value of RhythmicName, Photo, LowercaseName and ProfilePlagarism are boolean.
As a preliminary step, we specify the following concepts to help us formally define our method: • Let be pi = P rof ile of the user i.
• Let be N p = N umber of prof iles of a company.
• Let be distance ij = Similarity between the prof iles i and j.
To obtain this value, we have studied different functions: • Levenshtein [15]: is the minimum number of edits needed to transform one string into the other (using insert, delete or replace operations).This distance is usually denoted as edit distance.• Jaro: is a similarity function which defines the transposition of two characters as the only permitted operation to edit.The characters can be a distance apart depending on the length of both text strings.• Jaro-Winkler [16]: is a variant of the Jaro metric, which assigns similarity scores higher to those words that share some prefix.• Jaccard [17]: it defines the similarity between two text strings A and B as the size of the intersection divided by the size of the union of the corresponding text strings.• Cos TF-IDF [41]: given two strings A and B, and, α 1 , α 2 ... α K and β 1 , β 2 ... β their tokens respectively, they can be seen as two vectors, V A and V B , with K and L components.So, the similarity between A and B, can be calculated as the cosine of the angle of these two vectors.• Monge Elkan [42]: given two strings A and B, and, α 1 , α 2 ... α K and β 1 , β 2 ... β L their tokens respectively.For each token α i there is a β j with maximum similarity.Then the Monge Elkan similarity between A and B, is the average maximum similarity between a couple (α i , β j ) • Let be S pi the similarity of a profile, pi, with the other profiles of his company.This value is calculated as the sum of the distances between the text string of the corresponding profile with the text strings of the rest of profiles, divided by the number of profiles, N p , minus 1.
We now can define the method we propose to obtain the value, S c , that summarises the similarity of a specific company.
S c is calculated as the average of the similarities of the profiles, S pi , of the staff of the company.
After we have obtained the value of similarity of a company, we have to decide if said company is fake or legitimate.In order to do that, we have calculated a threshold for each similarity function.These thresholds allow us to decide when a company contains very similar profiles, and this company will likely be fake, or conversely, the profiles are different enough to be a legitimate company.For that, we have created a training set that contains 4 fake and 4 legitimate companies with the highest number of profiles.In Table II we show the similarity results obtained in this training set.Among the results obtained, we have selected as thresholds those that have obtained the best results (precision, recall and F-Measure) in the training set.The thresholds selected were used to obtain the results (precision, recall and F-Measure) of the method in the full dataset.
Analysing the results we can see that there are differences about the similarity values obtained by each technique.Levenshtein and Cos TF-IDF have obtained the lower values of similarity, around 0.6 and 0.5 respectively.In the other hand, Jaccard obtains the highest results, close to 1. Jaro and Monge Eklan have obtained intermediate results, with values between 0.7 and 0.8.The results obtained by Jaro and Jaro-Winkler, as we expected, are different.This is because Jaro-Winkler scores words which share some prefix higher and we had observed that the string created contains prefixes that increase the similarity result.
If we study the results of the legitimate companies and the fake companies separately, we can observe that, as we thought, fake companies display more similarity between them than the normal companies.This fact can easily be seen in the results obtained by Levenshtein and Cos TF-IDF measures.
In Section VI-C we present the precision, recall and F-Measure applying the proposed method on the created dataset.

V. LINKEDIN SPAM DATASET
To the best of our knowledge, there is no public dataset of Linkedin profiles.The dataset we have built contains legitimate and Spam profiles.The creation of the dataset was carried out during 30 days, from October 30th to November 30th, 2012.
For the legitimate profiles we have used profiles of users in well known companies (Google, Microsoft, Oracle, Twitter, IBM, etc.).The gathering process of the legitimate profiles was made automatically by means of the Linkedin API 9 .We have used our Linkedin profiles to obtain user profiles of the legitimate companies.The process starts in the public profile of an employee of a legitimate company and continues by the contacts of this user who works in the same company.
On the other hand, we have identified a set of Spam users, based on the Spam messages that they send to other users, and the profiles obtained by searching for words that TABLE II: Similarity of the analysed fake and legitimate companies commonly appear in Spam comments in Google, such as "viagra", "growth hormone", "cialis", etc.The list of these words has been obtained by searching Spam words in the WordPress Codex 10 , the online manual for WordPress.After this, we created a fake profile on Linkedin, as a honeypot, and sent contact requests to the Spam profiles.All the contact requests were accepted, and usually the Spammers responded 1 or 2 days after the request.Once accepted, as we thought, we could detect new fake profiles among their contacts.The labeling and gathering process of each fake profile was made manually due to the need to check whether each profile was really a fake.
We want to clarify that to obtain legitimate profiles we have not associated the created fake profile with the reputed companies.Both legitimate profiles and fake profiles have not been published anywhere and they have been stored encrypted.
To know more details about the generated dataset, we explain its structure: • Its size is 1,4 GB.
To decide the size of the dataset, and the subsets (Spammers and legitimate users), we have had a problem because there are no studies about how much Spam there is in Linkedin.So, we have decided that the number of Spam profiles is similar to Spam contained in .comdomain [20].Moreover, we have used a percentage of Spam higher than .comdomain, because we want to increase the variability of the profiles in order to make the detection process more difficult.
• The profiles are divided among 150 companies, of which 50 are fake companies and 100 are legitimates.
• Among the fake companies are companies focused on different drugs like Viagra or Cialis, and on Chinese products.
• 80% of the legitimate companies are focused on technology and computer science area.
• Companies are mainly located in USA.
• The size of the legitimate companies is variable, ranging from companies with 500 employees to those with more than 20,000.
The provided data about the used dataset allows other researchers to test and compare our methods.It is likely that 10 http://codex.wordpress.org/SpamWords their dataset does not contain the same profiles as our dataset, however, in our opinion, they can create a dataset with the same structure and features, and therefore, the results should be very similar.

VI. EXPERIMENTAL RESULTS
In this Section, we discuss all the issues we found for both the execution and the assessment stages, and we show and analyse the results obtained.First, we show the results obtained when detecting Spammers in Linkedin using the proposed heuristics (see Section IV-A), and then, the results obtained to detect Spam groups or companies, analysing the similarity between the company user profiles.

A. Experimental Setup
To execute the different classifiers, we used WEKA [43], a tool for automatic learning and data mining, which includes different types of classifiers and different algorithms for each classifier.The techniques tested were: SVM, Naïve Bayes, Decision Trees and Nearest Neighbour.To obtain the results, we have used the default parameters in WEKA for each of the machine learning algorithms, specially the value k used in kNN has been 1.
To evaluate the classifier we used the "cross validation" technique [44], that consists in building k data subsets.In each iteration a new model is built and assessed, using one of the sets as a "test set" and the rest as "training set".We used 10 as the value for k ("ten-fold cross validation").
The dataset used to obtain the results was created by us, because there is no public dataset of Linkedin profiles.The method used to generate it and its characteristics were explained in Section V.

B. Results for Linkedin Spammers
This section discusses the results obtained applying the proposed method to discover Linkedin Spammers.Table III shows the precision, recall and F-Measure for each of the types of classifiers studied.The best results are obtained using Levenshtein and Cos TF-IDF.In these two cases the detection is perfect, with an F-Measure of 1.The results indicate that the method used by these two techniques to measure the similarity between profiles, is the most adequate for the text string generated by our method.
In the analysis of the results, we have detected two types of Spam profiles.On the one hand we have very simple Spam profiles and with little content, and, on the other hand, complex Spam profiles with too much content (in most of cases, automatically generated).To detect this second type all the proposed heuristics must be used because, otherwise, it could be skipped.
However, the fake companies only contain one of these two types of Spam profiles and always with very similar content.In short, the method proposed to detect Spam nets has achieved hopeful results, mainly due to two facts: a) the idea proposed is right, and the fake companies contain similar profiles and b) the Social Networking Spam is relatively new and its techniques are unsophisticated.In the future, it is likely that these techniques will improve.However, we have demonstrated that the proposed idea works perfectly, and can be used, in the future, as a base to be complemented with other new techniques.

VII. CONCLUSIONS
The presence of different types of Spam (Web Spam, Email Spam, Forum/Blog Spam and Social Networking Spam) on the Web is important and is constantly growing.There are many studies that analyse and present techniques for the detection of different types of Spam.However, to the best of our knowledge, there are no studies about Spam in Linkedin.
In this article, we present a method to detect Spammers and Spam nets in Linkedin social network.We have proposed a set of heuristics that characterize Linkedin Spam profiles and help to identify Linkedin Spammers.These heuristics were used as input to several classification algorithms (Naïve Bayes, SVM, Decision Trees, kNN).The best results are obtained by kNN and decision trees, with an F-Measure of 0.969 and 0.967, respectively, and an AUC close to 1.Moreover, we have proposed a method for detecting Spam nets in Linkedin.It is based on the idea that the profiles of fake companies share multiple similarities.The method calculates the similarity between different profiles of the companies, using several distance functions (Levenshtein, Jaro, Smith-Waterman, etc.).The values of similarity obtained are used as thresholds to detect fake companies (Spam nets) among the legitimate companies.Again, the results are also very hopeful.We have achieved an F-Measure of 1 using Levenshtein and Cos TF-IDF.
In short, the results obtained in the study show that, on the one hand, the heuristics proposed are adequate to detect Spammer profiles, and, on the other hand, the new method proposed to detect Spam nets (fake companies) in Linkedin performs very well.

VIII. FUTURE WORKS
Spam in Linkedin social network is a relatively new Spam type, so our intention is to follow its evolution over time.Due to the continuous changing of Spam techniques, we want to find new and better heuristics to detect this type of Spam.Furthermore, we plan to increase and improve our labeled dataset.Finally, we will test the proposed heuristics and the method for detecting Spam Linkedin nets, in other social networks.

Fig. 3 :
Fig. 3: Number of words (a), contacts (b), name size (c) and location size (d) in the Spam and No-spam profiles

Fig. 4 :
Fig. 4: Percentages of the names written in lowercase (a), percentage of rhythmic names (b), percentage of profiles with photo (c) and percentages of the plagiarism profiles (d) in the Spam and No-spam profiles

TABLE I :
Number of users, in millions, for the main social networks III.MOTIVATION

TABLE III :
Results of the proposed heuristics using different types of classifiers

TABLE IV :
Results to detect Spam Linkdin nets