C3 - Sex A Chatbot To Chase Cyber Perverts
C3 - Sex A Chatbot To Chase Cyber Perverts
C3 - Sex A Chatbot To Chase Cyber Perverts
Computing, Intl Conf on Cloud and Big Data Computing, Intl Conf on Cyber Science and Technology Congress
51
approaches like: knowledge base schemes, generative and module consisting of two models: emotional classification
retrieval neural networks or question answering systems, and opinion classification models. The overall functioning
amongst others. Even if the use of chatbots to face sexual workflow of the proposal can be observed in Figure 2.
crimes is emerging, these are still an immature application
stage which requires more research to beat challenges like Suspect Chatbot
handling the particular behavior of a sexual crime suspect,
fetching a knowledge database applicable for child pornog- Post
Retrieval-based
raphy domain, generating trust with a suspect to achieve the model
exchange of illegal data and even using the conversation as
a digital evidence that can be used by LEAs. In the paper
at hand, we propose the use of a chatbot to face child abuse Rule No Generative
with a different approach that has not been considered before, match? model
i.e. the combined use of a retrieval-based and generative-based
Yes
models that allow to build specific domain conversations that
can also be spontaneous. The retrieval-based model allows us
Store & reply
to guide the conversation, while the generative-based model
allows us to handle situations where an unexpected post response
is received from the suspect. In essence, our chatbot C 3 - Response Analyze
Sex emulates an individual interested in the topic of child Profile
Emotion Classifier Indifferent
pornography. Additionally, our proposal has an important
Interested
component which is focused on the profiling of the suspect Opinion Classifier Pervert
using 6 different metrics which altogether contribute important
information to LEA in the hunting of perverts.
III. G OALS AND KEY COMPONENTS OF C 3 -S EX Fig. 2. C 3 -Sex overview depicting the workflow of posts & replies
For our proposal C 3 -Sex to achieve its overall target of Next we further describe each of the aforementioned key
chasing and spotting perverts by interacting with them in components of C 3 -Sex:
certain chat rooms, the corresponding Artificial Conversational 1) Retrieval-based model: It is a model where the expert-
Agent (ACE) should, in turn, enforce the following goals: ness knowledge is represented, saved and inferred from
1) Illegal content holders hunting: C 3 -Sex should exhibit a set of rules expressed using an Artificial Intelligence
the behavior of a human interested in acquiring child Markup Language (AIML). A response to a question is
pornography, in order to pinpoint suspects possessing selected according to the match of the input with one
illegal content (such as images or videos) and are willing rule. While this model guarantees an effective imple-
to share it with others. mentation even if its knowledge depends on the number
2) Illegal content bidder hunting: Our chatbot should also and richness of the rules, the response naturalness may
exhibit the behavior of a human interested in distributing be poor.
child pornography, so to identify suspects eager to obtain Next we show an example of an AIML rule within the
and consume this kind of illegal content, even if a context of child pornography:
payment is required. <aiml version="1.0">
3) Appropriateness: C 3 -Sex should be able as well to <category>
manage situations where the conversation evolves to- <pattern>* DO * WANNA * WITH ME
wards topics out of the main one for which the chatbot is </pattern>
intended, i.e., child pornography. This can be provoked <template>actually im looking
by suspects who intend to unveil the bot. An appropriate for some hot content, do you
response should be generated for a question within the have?</template>
same context where the conversation is flowing. </category>
4) Suspect profiling: Our solution should perform an ...
analysis of the conversation maintained between the </aiml>
chatbot and the suspect with the purpose of profiling the This model is the first one to be applied whenever a
latter and assigning him to some category (indifferent, post from the interlocutor of the chatbot arrives. In
interested and pervert). case such post matches with some of the rules of the
To fulfill these goals and achieve a functional conversational retrieval-based model (as we have seen above), then
model, our chatbot combines two main approaches, namely: the corresponding reply is provided. Yet, in case the
Knowledge-based systems (represented in the retrieval based post does not match any rule from the ones existing in
model) and Machine learning (represented in the genera- the knowledge base, then the generative-based response
tive models). Additionally, the proposal includes a sentiment model outputs a reply, as we will see next.
52
2) Generative model: It is a model trained by means of understanding, ii) Data acquisition, iii) Modeling and iv)
a Long Short Term Memory (LSTM) Neural Network Deployment. This data science life cycle supports each and
(NN) [18] using specific training datasets (as we will every activity developed and gives a high-level perspective
see later). The algorithm uses memory to maintain the of how data science must be structured to build a functional
learned patterns and when a question (post) comes from Artificial Conversational Entity.
the chat, the algorithm replies with the patters saved
in memory. Responses from a generative model may be A. Business understanding
more natural than the ones from a retrieval based model, Business understanding entails the definition of the data
but may contain grammatical failures or sometimes have context where the solution will be deployed and executed. In
no sense, we can see some examples in TABLE I. this regard, social media has a growing impact in our lives,
allowing people to get access to new interactive services such
Post Reply
as anonymous chats. Likewise, it has allowed to find out, in a
I need some good content I will make this one more!
I want weird porn material I don’t think so. Weird? relatively easy fashion, certain interests of its users, as well as
What are you doing now? I am chatting with you. to start some sort of interaction with them. And such sharing
I want to offer you something, Is it weird that I want to be the of personal information and accessibility to interactive services
however it is a little weird and case?
illegal
is what defines our data context. However, social media might
TABLE I
also bring concerns when such data and services are employed
E XAMPLE OF REPLIES FROM THE GENERATIVE MODEL OF C 3 -S EX by dishonest, beguiler and deceitful people, especially those
perverts interested in child pornography.
Actually, perverts are using social media platforms today
3) Emotional classification model: In order to assess the to communicate with each other, aiming at sharing their child
underlying emotions within a given conversation, this pornography material. Furthermore, some of them even chase
model makes use of a Support Vector Machine (SVM), innocent, naive and sometimes reckless children in the Inter-
trained with the Semantic Evaluation (SemEval) 2007 net, bamboozling them to obtain further child pornography
dataset [19] (one of the most traditional datasets for material from their defenceless victims.
emotion classification), as a classification and supervised In our solution, the chatbot C 3 -Sex simulates an undercover
learning paradigm, with a learning rate of 0.5. The agent from a Law Enforcement Agency aiming at preventing
SVM algorithm establishes the optimal hyperplanes in child pornography activities that can start in social media
a multidimensional space that distinctly separate the interactions. The goal of this agent is to chat with a suspect
six labeled emotions on the SemEval dataset. Suspects (determined by a previous investigation that tags such user as a
responses will be treated as new observations for the potential pervert) over a topic where he/she can express his/her
model, where each response is classified as one of the thoughts regarding some selected matters. Once a conversation
six SemEval emotions, namely: anger, disgust, fear, joy, has finished or a determined time has elapsed, the objective is
sadness and surprise. to perform an analysis to classify and profile the suspect.
4) Opinion classification model: In order to discern
whether a given post yields an opinion inclined towards B. Data acquisition
(or against) a specific topic, we have developed the Data acquisition refers to the collection of data from the
opinion classification model leveraging a Multinomial context in order to analyze and pre-process it, so these can be
Naive Bayes with a simple pre-processing (steamming, used later in the modeling phase. With regard to the generative
removing stopwords, etc.) and an alpha of 1. The dataset model, different data sets were reviewed and finally the natural
used [20] consists of 2000 samples of positive and neg- conversational data set PAPAYA3 was selected to further train
ative reviews of movies, restaurants and other products. the LSTM-NN model and validate the abstraction of text pat-
The representation of characteristics was based on a terns. PAPAYA dataset was chose due it groups conversations
document-term matrix taking into account the frequency around different topics (politics, religion, society), giving the
of words. After training with 90% of the samples, we bot versatility in situations where the suspect introduce in the
tested our model with the remaining 10%, achieving an conversarion no sexual-related topics.
80% of accuracy.
With regard to the knowledge base for the retrieval based
The opinion classification model is a good complement for model, several manual conversations with potential suspects
the emotional classification model, as the results from one of were carried out. Some of the conversations led to the identi-
them could be compared with the results from the other one fication of suspects that after an initial conversation requested
to guarantee consistency in the prediction of the suspect with a change in the communication channel to another social
regard to child pornography that is done by C 3 -Sex. media platform like Snapchap, Kik or Telegram where they
actually transferred illegal content to our chatbot. Based on
IV. DATA SCIENCE LIFECYCLE FOR C 3 -S EX
the previous conversations, multiple AIML rules were created
Our proposed chatbot follows a generic data science life
cycle encompassing the following phases [21]: i) Business 3 https://github.com/bshao001/ChatLearner
53
to give C 3 -Sex enough guidelines about the interaction with as friendship forming (to make a brief personal introduction
the suspects and how to deal with them. to the other peer of the communication), sexual relationship
As outlined above, in order to train the emotional classifi- forming (to express a specific interest in sexual-related topics),
cation model we employed the dataset (SemEval 2007) [19], sexual content offering, transaction (to request or offer illegal
consisting of news headlines from major newspapers (e.g., content), and risk assessment (to get confidence from the
The New York Times, CNN, BBC News), each of them suspect).
labeled through a manual annotation following a scheme of • Modeling: Based on ALICE and deleting some unnec-
six emotions: anger, disgust, fear, joy, sadness, and surprise. essary rules, our team interacted with some potential
In turn, the dataset used to train the opinion classification suspects, adding different rules in order to contribute to
model [20] contains sentences labelled as positive (1) or neg- each phase of the interaction.
ative (0). All data come from reviews of movies, restaurants • Testing: We have used incremental development to test
and other products. our model and improve the response given by the Chat-
bot. The number of rules increased with the progressive
C. Modeling
interaction with the suspects.
Our chatbot (see Figure 2) is based on four mod-
els: Retrieval-based, Generative, Emotional classification and D. Deployment
Opinion classification. C 3 -Sex is intended to be integrated in a real context through
The Artificial Conversational Entity is composed of both the development of a software component that emulates a user
generative and retrieval based models. An implementation that logs in an online chat platform, e.g., Omegle4 , selects
that uses only generative models could make mistakes in “sex” as a topic of interest, and starts a conversation with the
the coherence of the responses, but it may look flexible and peer randomly selected by the platform. After a short intro-
natural. On the other hand, an implementation including only duction, our chatbot subtly requests content related to child
retrieval models could generate coherent responses, but it pornography. Moreover, it also manages the situation where
could also have a limited domain knowledge. Therefore, a the suspect requests changing the communication platform,
smart combination of generative and retrieval based models e.g. towards Kik, Snapchat or Telegram. The communication
could be useful to output coherent and natural responses to will immediately end as soon as the suspect transfers at least
the suspect. one illegal content (image or video). In case the suspect does
In our proposal, the generative model was built with an not offer sexual content, the chatbot will deceitfully offer child
LSTM-NN, which is a recurrent neural network trained with pornography content, requesting a payment for it. In case the
the logs of those conversations and interactions made with a suspect accepts the deal, i.e., we are clearly facing with a
suspect. The LSTM-NN algorithm treats each instance of the pervert, the communication is also concluded abruptly. After
training data set as a Post-Reply message. This component is a conversation is ended up, C 3 -Sex will make the analysis
intended to generate a dynamic response based on the training of the conversations to profile the suspect and, in case it is
data set, which may include general responses given that the required, a LEA can be informed so to possibly prosecute the
knowledge contained in the training data set is general and identified criminal.
not specific for a domain.
The development of the generative-based model followed V. P ROFILING OF SUSPECTS
three stages: Once a conversation between our C 3 -Sex and a suspect is
• Pre-processing: This stage involves cleaning every post terminated, the whole log of such conversation is comprehen-
received from the suspect to remove extra blank spaces, sively analyzed in order to determine the affinity of the suspect
numbers, special characters and parsing the text to lower with regards to child pornography. To this end, the following
case. Additionally, a format change is applied given that metrics are utilized:
conversations in the training data set may be structured 1) Average response time (τ ∈ R+ ): It measures the
under an HTML format and a simpler format is required elapsed time between the generation of a reply by
to compose the data. the ACE and the next interaction from the suspect,
• Training: It was done using the natural conversational
considered as the response to the previous reply. The
data set PAPAYA and involved 60 epochs, 2 layers, 1024 purpose of τ is to quantify the interest of the suspect,
units, and an initial weight of 0.1, taking approximately assuming that when suspects have a high interest they
4 days to train. will usually respond within a short period of time.
• Testing: Different tests were performed over the ACE to
2) Child pornography matched rules (R ∈ N): It mea-
analyze the error generated in the training of the LSTM- sures the number of times that child pornography rules
NN, so to avoid both overfitting and underfitting. from the retrieval based model matched, allowing C 3 -
The retrieval model, in turn, contains all the rules that Sex to determine the affinity of the suspect with the
define how an interaction within a child pornography domain topics included in such rules. It is assumed that a
should be maintained. These rules are defined under an AIML
4 https://www.omegle.com
syntax and are included in some phase of the interaction, such
54
conversation with a big amount of child pornography which could vary from someone who is in total disagreement
rules matches, implies that the suspect has an affinity to someone who consumes and distributes content. Below
with some or various child pornography topics. we describe in further detail each of the considered suspect
3) Recognized emotions (E ∈ {0, 1}): The emotional profiles.
module identifies in each post from the suspect that 1) Indifferent: An indifferent suspect is recognized as an
fired a rule within the retrieval-based model an emo- interlocutor that disapproves or has no affinity with child
tion belonging to the scheme of six emotions (anger, pornography, reflected in no or few matched child pornography
disgust, fear, joy, sadness, and surprise) obtained from rules. Additionally, such a suspect usually has a high average
N emotional classification model. We define E =
the response time showing little interest in the topic. Finally, the
i=0 Ei
N , where N is the number of posts identified recognized emotions in the conversation with an indifferent
by our retrieval-based model from the rules fired, and suspect should indicate negative emotions, reflecting disagree-
Ei ∈ {0, 1} is the classification for the i-th post, where ment with the topic. This suspect profile would exhibit a
0 indicates that the post contains a negative emotion likelihood of being a pervert ϕ < 13 .
(anger, disgust, fear, sadness) and 1 a positive one (joy, 2) Interested: This case is considered to allow the iden-
surprise). tification of suspects that show certain interest about child
4) Opinion classification (O ∈ [0, 1]): The opinion module pornography, expressing enthusiasm in the topic, or even
classifies those posts from the suspect that fired a a tendency to become a potential consumer or one that
N within the retrieval-based model. We define O =
rule already is. This profile includes suspects that have some
i=0 Oi
N , where N is the number of posts identified knowledge about child pornography which can be determined
by our retrieval-based model from the rules fired, and by a medium number of matched child pornography rules.
Oi ∈ {0, 1} is the prediction for the i-th post, where 0 The average response time is medium in this case and the
indicates a negative post and 1 a positive one. conversation could pose an equal amount of posts with positive
With the aim of classifying the suspects into different and negative emotions. This suspect profile would exhibit a
categories (indifferent, interested, pervert) according to the likelihood 13 ϕ < 23 .
results obtained in the previous 4 metrics derived from the 3) Pervert: A pervert suspect would trigger a high number
interaction between a suspect and our chatbot, equation (1) is of child pornography rules and the average response time
defined (see Fig. 3). should be low. Regarding the recognized emotions, it is
expected that the conversations with a pervert contains a large
1 amount of posts with identified positive emotions. This suspect
ϕ= (1)
R·E·O profile would exhibit a likelihood of being a pervert of ϕ 23 .
1 + exp − + δ2
τ · δ1 These suspects are especially interesting for Law Enforcement
Agencies as the results can project the profile of a consumer
where ϕ ∈ [0, 1] represents the likelihood of being a
and distributor of illegal content, and there exists a high
pervert and δ1 , δ2 ∈ N are discretionary parameters to make
probability that they have actually committed a crime..
ϕ → 0 when R·E·O τ → 0. It is straightforward to check that
equation (1) fulfills the following conditions: VI. E XPERIMENTS
• R ∨ E ∨ O ∨ τ ⇔ ϕ → 1 Several experiments were conducted to validate the suitabil-
• R ∨ E ∨ O ∨ τ ⇔ ϕ → 0 ity of our chatbot C 3 -Sex in a real context, aiming to identify
the suspect profile (indifferent, interested or perverted) behind
Likelihood a conversation using for this purpose the metrics defined
in Section V. For the ease of reading, the settings of the
Pervert experiment are reported in Section VI-A, while a significant
analysis of the results is carried out in Section VI-B. In order
to validate our model, we only use a quantitative approach due
to the nature of the problem. K-fold validation could be used
Interested to ensure the quality of our results; however, there were very
few data to perform the partitions and it was difficult to get
more.
Indifferent ∙ ∙
X= + A. Settings
∙
The experiments were conducted by running an instance
of C 3 -Sex on a real context which emulates a user that
Fig. 3. Graphic representation of likelihood ϕ logs in the online chat platform Omegle, selects “sex” as
a topic of interest, and starts a conversation with the peer
Using the linear ranges defined by the heuristic value of ϕ, it randomly selected by Omegle. The interaction with Omegle
is possible to show the suspects tendency to a criminal profile, is done through a Chrome driver handled by functions of the
55
python library Selenium5 . As the conversation evolves, one of
the two previously developed models (generative or retrieval-
based model) is employed to answer each post of the suspect.
In case the suspect suggests using another communication
channel to make the exchange of content, C 3 -Sex will send
a Telegram username and will be able to listen posts through
the web version of Telegram. And if the suspect does not
offer sexual material, our chatbot will deceitfully offer child
pornography content. After a conversation is ended up, C 3 -
Sex will make the analysis of the conversations using the
previously developed models (emotional classification and
opinion classification model) and consequently will calculate
the 4 defined metrics. In order to train the generative model,
we have used the Tensor Flow library and for the calculus Fig. 5. Distribution of metrics for pervert chats
of the likelihood ϕ (equation 1), the discretionary parameters
δ1 = 0.05 and δ2 = 2.0 were selected.
recognized emotions and O for opinion classification had a
B. Results
similar distribution with an interquartile range IQR ≈ 0.17.
C 3 -Sex was executed for 15 hours, gathering a total of The results obtained from our metrics demonstrate the
320 chats. These chats were filtered to exclude the ones that suitability and efficiency of our the proposal, since the chatbot
lasted just a few seconds and therefore are not suitable to be is able to maintain long conversations without the suspect
analyzed. Chats with bots (e.g., bots publishing porn services) realizing its true nature thanks to the generative model.
were also excluded from the analysis. After this filtering, 35 Simultaneously, C 3 -Sex knowledge-based module builds a
chats remained, which were deeply reviewed and analyzed as friendly relationship, giving enough trust to the suspect, who
shown next. eventually will express his/her tastes, emotions, and opinions
regarding child pornography. Furthermore, the sentiment mod-
ule (emotional and opinion classifiers) allows us to create
several metrics, which are assigned to a heuristic function that
correctly dimensions the proposed profiles and guarantees the
identification of illegal consumers and distributors.
Likelihood
56
for the retrieval model, and the training of the generative model [10] Yuriy Gapanyuk et al. “The Hybrid Chatbot System
with a data set associated to a context of sexual conversations. Combining Q&A and Knowledge-base Approaches”.
Additionally, in the future we expect to address other types In: 7th International Conference on Analysis of Images,
of sexual crimes related to children, like grooming, sexual Social Networks and Texts. 2018, pp. 42–53.
exploitation, sexting, sextortion, sex scam or sex trafficking, [11] Iulian V Serban et al. “A deep reinforcement learning
among others. Some of these new types of sexual crimes would chatbot”. In: arXiv preprint arXiv:1709.02349 (2017).
require C 3 -Sex to be able to keep more complex conversations [12] Gábor Tatai et al. “The chatbot who loved me”. In:
for a longer time. International Conference on Autonomous Agents and
Multiagent Systems (AAMAS). 2003.
ACKNOWLEDGMENT
[13] Robert Plutchik. “The nature of emotions”. In: Ameri-
This work has been partially supported by the Colombian can scientist 89.4 (2001), pp. 344–350.
School of Engineering Julio Garavito (Colombia) through [14] Qiao Qian et al. “Assigning Personality/Profile to a
the project “Developing secure and resilient architectures for Chatting Machine for Coherent Conversation Genera-
Smart Sustainable Cities” approved by the Internal Research tion”. In: 27th International Joint Conference on Arti-
Opening 2018 and by the project “Strengthening Governance ficial Intelligence. 2018, pp. 4279–4285.
Capacity for Smart Sustainable Cities” (grant number 2018- [15] Bob Heller et al. “Freudbot: An investigation of chatbot
3538/001-001) co-funded by the Erasmus+ Programme of the technology in distance education”. In: EdMedia: World
European Union, as well as by a Ramón y Cajal research Conference on Educational Media and Technology.
contract (RYC-2015-18210) granted by the MINECO (Spain) 2005, pp. 3913–3918.
and co-funded by the European Social Fund. [16] Jennifer Hill, W Randolph Ford, and Ingrid G Farreras.
R EFERENCES “Real conversations with artificial intelligence: A com-
parison between human–human online conversations
[1] Al Rahman, Abdullah Al Mamun, and Alma Islam. and human–chatbot conversations”. In: Computers in
“Programming challenges of chatbot: Current and future Human Behavior 49 (2015), pp. 245–250.
prospective”. In: IEEE Region 10 Humanitarian Tech- [17] Hao Zhou et al. “Emotional chatting machine: Emo-
nology Conference (R10-HTC). Dec. 2017, pp. 75–78. tional conversation generation with internal and exter-
[2] Félix Gómez Mármol, Manuel Gil Pérez, and Gregorio nal memory”. In: Thirty-Second AAAI Conference on
Martı́nez Pérez. “I dont trust ICT: Research challenges Artificial Intelligence. 2018.
in cyber security”. In: IFIP International Conference on [18] Sepp Hochreiter and Jürgen Schmidhuber. “Long Short-
Trust Management. Springer. 2016, pp. 129–136. Term Memory”. In: Neural Computation 9.8 (1997),
[3] Stewart Kowalski, Katarina Pavlovska, and Mikael pp. 1735–1780.
Goldstein. “Two Case Studies in Using Chatbots for [19] Carlo Strapparava and Rada Mihalcea. “Semeval-
Security Training”. In: Information Assurance and Se- 2007 task 14: Affective text”. In: Proceedings of the
curity Education and Training. Ed. by Ronald C. Dodge Fourth International Workshop on Semantic Evaluations
and Lynn Futcher. 2013, pp. 265–272. (SemEval-2007). 2007, pp. 70–74.
[4] B. A. Sabbagh et al. “A prototype For HI2Ping informa- [20] Dimitrios Kotzias et al. “From group to individual
tion security culture and awareness training”. In: Inter- labels using deep features”. In: Proceedings of the 21th
national Conference on E-Learning and E-Technologies ACM SIGKDD International Conference on Knowledge
in Education (ICEEE). 2012, pp. 32–36. Discovery and Data Mining. ACM. 2015, pp. 597–606.
[5] Pan Juin Yang Jonathan, Chun Che Fung, and Kok Wai [21] Gary Ericson et al. Team Data Science Process Docu-
Wong. “Devious Chatbots - Interactive Malware with a mentation. Tech. rep. Microsoft Azure, 2017, p. 456.
Plot”. In: Progress in Robotics. 2009, pp. 110–118.
[6] Bobby Filar, Richard Seymour, and Matthew Park. “Ask
Me Anything: A Conversational Interface to Augment
Information Security Workers”. In: 13th Symposium on
Usable Privacy and Security, SOUPS. 2017.
[7] Simon Keizer and Harry Bunt. “Multidimensional Dia-
logue Management”. In: Proceedings of the 7th SIGdial
Workshop on Discourse and Dialogue. 2006, pp. 37–45.
[8] P. Zambrano et al. “BotHook: An option against Cy-
berpedophilia”. In: 2017 1st Cyber Security in Network-
ing Conference (CSNet). 2017, pp. 1–3.
[9] Kemal Veli Açar. “Webcam Child Prostitution: An
Exploration of Current and Futuristic Methods of Detec-
tion”. In: International Journal of Cyber Criminology
11.1 (2017), pp. 98–109.
57