58 Information Security-Application of Community Discovery Algorithm in Black Product Identification

01

Introduction

In the current prosperous Internet world, various enterprises are faced with black and gray industry practitioners who are ready to prey at any time. Due to the invisibility and anonymity of the Internet, the popularization of technology, and the cross-regional nature of the Internet, online and offline black products are infiltrated and deeply integrated. The development of network black production from the traditional chain to the current ecological, intelligent and precise, resulting in the spread of black production behavior, the governance of the network ecology is facing unprecedented risks and challenges. Therefore, this paper uses the unsupervised community discovery algorithm to identify black and gray products. The experimental data shows that this method has the characteristics of high recognition accuracy and strong robustness, and provides a feasible technical solution for ensuring the security of 58 business.

02

Status Quo and Governance of Black Production 

1. The current situation of black production

Affected by the epidemic, the supply of basic resources in the entire black production market has been affected. At the same time, due to the continuous strengthening of national policies, the scale and activity of black production have declined. But this is only a short-term situation. When the environment is suitable, the black production will come in a larger scale and in more forms, so the black production will not stop at all times.

The main characteristics of black products are as follows:

  • Latent: The practitioners of black and gray production may keep a large number of accounts in captivity for a long time, and quickly attack at key activities or key times that need to be profitable to obtain the maximum benefits.

  • Group nature: A single black and gray production attack cannot obtain effective benefits, but black production generally uses the form of gang crime, and obtains a lot of benefits through crowd tactics, and each attack is like a locust crossing the border.

  • Predatory: The vast majority of black products do not create any value, and they all rely on plunder to earn profits, which not only causes economic losses to the enterprise platform, but also sometimes causes losses such as word-of-mouth and reputation.

  • Unrestricted: In essence, black production behavior is illegal. In order to achieve the purpose of profit, any means will be used. For example, for enterprises, they will conduct server attacks, swipe interfaces, etc.; for individuals, they will collect other people Fraudulent activities, etc. caused by the privacy of information.


2. Existing black product identification mode

In the current industry and academia, the discovery of black ash production behavior is mainly carried out from two aspects:

  1. 通过图像、文本、音视频等从内容层面上进行检测,发现内容违规则对内容进行删除或账号进行处罚。

  2. 通过账户的行为动作进行分析,对异常的访问浏览、点击发布等行为建模处理,对违规账号执行处理。

以上两种方式中,基于内容的检测可以对明显暴露的违规进行发现处理,而对于多样式的隐藏式黑产发现能力较弱,而基于账号的行为检测中,可以基于账号的角度来进行全局的分析。

在黑产的发展形势中,目前主要以下几种:1、通过以量取胜利用长尾效应,来进行微小收益的最大化;2、黑产资源的平台化,利用平台的基础资源,比如手机号、IP、设备信息、身份证、银行卡等信息来进行低成本的大规模行为。

基于以上几点,在账号的宏观角度下可以更加容易的区分出黑产的群体性行为,因此可以利用社区发现算法,来对黑产账号进行识别与发现。


03

整体架构设计

在整个系统架构中分为4个部分,分别为数据来源层、关系构建层、算法计算层、数据输出层、场景应用层。

数据来源层主要负责数据的收集与整理,利用用户的多媒体数据、基础数据、行为数据以及其他特征数据建立实时用户关系中心,通过kafka或者hive表向上传递相关数据。

关系构建层用于将关系中心的数据构建成算法所需的关系格式与内容,包含设备关系、资源关系、行为关系以及推理关系的构建

算法计算层主要应用spark计算引擎,通过对图进行构建以及子图抽取来执行社区发现算法或标签传播等算法。

在数据输出层中,主要将提交的任务结果进行存储。目前主要有三个存储位置,分别为hive表,用于离线查询或历史任务信息查询;当使用jar包调用时,会返回Dataframe至程序,供开发人员直接进行后续的数据处理与应用;同时也可以存储至Redis中,保证用户的在线实时查询要求。

最后是场景应用层,对社区发现的结果进行高效利用,目前主要用于黑产的团伙发现,提供风险召回功能,同时还用于用户审核和资源审核中,为审核人员提供相应的审核线索。


04

社区发现算法

1.Louvain算法原理
从直观上来理解,社区指的是网络中的一些密集群体,每个社区内部的节点连接相对紧密,而各个社区之间连接比较稀疏。目前社区发现的算法很多,比如infomap、GN、CPM等,本文将主要讲解基于模块度方法的Louvain算法。
louvain算法是基于模块度(Modularity)的社区发现算法,通过模块度来衡量一个社区的紧密程度。如果一个节点加入到某一个社区中会使得该社区的模块度有最大程度的增加,则该节点就应当属于该社区;如果加入到其他社区后没有使其增加,则留在自己当前社区中。
模块度公式:
模块度Q的物理意义:社区内节点的连边数与随机情况下的边数之差,定义函数如下:

在此公式中,只有节点i和节点j属于同一社区,公式才有意义,所以该公式是衡量某一社区内的紧密度。对于该公式的简化变形如下:

在louvain算法中不需要求每个社区具体的模块度,只需要比较社区中加入某个节点之后的模块度变化,所以需要求解,将节点i分配到某一社区中,社区的模块度变化为:


2.Louvain算法流程与优化

算法原始流程

1. 初始化,为每个节点分配不同的社区
2. 遍历节点,按模块度最大化准则归属社区
3. 合并同社区节点生成新的节点
4. 构造新图
5. 重复2-5,直到算法收敛稳定

在实际使用中发现,louvain算法会存在大社区合并小社区的现象,不符合实际业务的使用要求,为此我们对整个流程进行优化,在原流程3和4之间新增权重更新的步骤:

3.1 判断新图边权重是否小于一定比例
3.2 低权重边切断(低权置0)

整体流程如下图:


05

 黑产识别应用

该数据为58某业务线数据,利用用户相关事实资源数据进行关系构建,如电话、微信、qq、IP等信息,通过利用原始louvain算法对用户进行分群挖掘之后的可视化图像,从该图中可以看出大部分用户为正常无关联用户,中间深色部分为异常聚集用户。

对中心聚集部分进行放大,可以明显观察到聚集群体之间也存在着部分关联,由此可见几个较大的黑产团伙之间也存在着资源共用、行为相似的情况。

原始Louvain算法效果:

根据数据分析可知社群越大,该社群的用户风险比例越高。

优化Louvain算法效果:

红色数据为算法优化后相关效果。从图中可以看出,优化后的方式可以将大社区拆分,保留更多风险数据在群内,提高了群内用户的风险比例,从而对业务产生更大的价值。

下图为通过对某一团伙进行用户抽样的结果,可以看出抽样用户均属于恶意引流违规,对社区内所有用户审核后发现95%以上为黑产用户,从中可以得到该群体用户大部分为黑产用户的结论。

实际业务应用中,聚集群体通过自定义相关指标(社群大小、社群权重,群体资源比等)进行筛选,在黑产团伙识别中,平均识别准确率可达70%以上,黑产用户召回数量比原有策略提升30%以上,未暴露风险用户识别能力大幅度提升。


07

 展望与规划

根据实际中遇到的相关情况,分享2个未来的规划:

1、由于多数业务场景不同,不存在一个算法模型可以解决所有问题,所以将会在未来增加更多的算法模型进行融合结果处理;

2、黑产账户被处理之后通常会快速的申请其他新账户,会导致新账户与其他节点没有连边关系,为了保证可以及时捕捉到该账户,将会引入更多的行为类特征关系来处理冷启动问题。


参考文献:

【Fast unfolding of communities in large networks】 https://arxiv.org/abs/0803.0476

作者简介:

庄伟,58同城信息安全部高级算法开发工程师,2019年加入58同城,主要负责业务风控算法设计与开发等工作。


本文分享自微信公众号 - 58技术(architects_58)。
如有侵权,请联系 [email protected] 删除。
本文参与“OSC源创计划”,欢迎正在阅读的你也加入,一起分享。

{{o.name}}
{{m.name}}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324139117&siteId=291194637