Measurement and Classification of Humans and Bots in Internet Chat

41
1 Measurement and Classification of Humans and Bots in Internet Chat By Steven Gianvecchio, Mengjun Xie, Zhenyu Wu, and Haining Wang College of William and Mary

description

Measurement and Classification of Humans and Bots in Internet Chat. By Steven Gianvecchio, Mengjun Xie, Zhenyu Wu, and Haining Wang College of William and Mary. Outline. Background Measurement Classification System Experimental Evaluation Conclusion. Outline. Background Measurement - PowerPoint PPT Presentation

Transcript of Measurement and Classification of Humans and Bots in Internet Chat

Page 1: Measurement and Classification of Humans and Bots in Internet Chat

11

Measurement and Classification of Humans and Bots in Internet Chat

By Steven Gianvecchio, Mengjun Xie, Zhenyu Wu, and Haining WangCollege of William and Mary

Page 2: Measurement and Classification of Humans and Bots in Internet Chat

2USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Outline Background Measurement Classification System Experimental Evaluation Conclusion

Page 3: Measurement and Classification of Humans and Bots in Internet Chat

3USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Outline Background Measurement Classification System Experimental Evaluation Conclusion

Page 4: Measurement and Classification of Humans and Bots in Internet Chat

4USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Bots Bots - programs that automate human

tasks web bots automate browsing the web chat bots automate online chat can be harmful and/or helpful

Page 5: Measurement and Classification of Humans and Bots in Internet Chat

5USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Chat Bots vs. BotNets BotNets – networks of compromised

machines some use chat systems (IRC) for C&C, others

use P2P, HTTP, etc. abuse various systems

Chat Bots – automated chat programs some are helpful, e.g., chat loggers can abuse chat systems and their users

Page 6: Measurement and Classification of Humans and Bots in Internet Chat

6USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

The Chat Bot Problem The Problem – chat bots abuse chat

services (e.g., AOL, Yahoo!, MSNMSN) send spam spread malicious software mount phishing attacks

Our focus is on the Yahoo! chat system

Page 7: Measurement and Classification of Humans and Bots in Internet Chat

7USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

A Typical ChatAlice12 entered the room.Alice12 entered the room.

Alice12: Hi room.Alice12 entered the room.

Alice12: Hi room.Bob34: hi alice

Alice12 entered the room.

Alice12: Hi room.Bob34: hi aliceSusie88: any guys want to let a cute girl move in with them! hehe

Alice12 entered the room.

Alice12: Hi room.Bob34: hi aliceSusie88: any guys want to let a cute girl move in with them! hehe

Alice12: What’s up?

Alice12 entered the room.

Alice12: Hi room.Bob34: hi aliceSusie88: any guys want to let a cute girl move in with them! hehe

Alice12: What’s up?Bob34: not much

Alice12 entered the room.

Alice12: Hi room.Bob34: hi aliceSusie88: any guys want to let a cute girl move in with them! hehe

Alice12: What’s up?Bob34: not muchSusie88: can you guys see me on my web-cam?? (its in my profile)

Page 8: Measurement and Classification of Humans and Bots in Internet Chat

8USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Yahoo! Chat Yahoo! chat is a large commercial chat

service over 3,000 chat rooms

AUTH,

CHAT,

IM, …

Page 9: Measurement and Classification of Humans and Bots in Internet Chat

9USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Yahoo! Chat Yahoo! chat system

client connects to a server servers relay messages to/from clients

Page 10: Measurement and Classification of Humans and Bots in Internet Chat

10USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Outline Background Measurement Classification System Experimental Evaluation Conclusion

Page 11: Measurement and Classification of Humans and Bots in Internet Chat

11USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Measurement August-November 2007 – we collect data August 2007 – Yahoo! adds CAPTCHA

must pass to join a chat room protocol update, prevents some 3rd party

clients from accessing chat October 2007 – bots are back

some bots return before 3rd party clients

Page 12: Measurement and Classification of Humans and Bots in Internet Chat

12USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Measurement September and October 2007

very few chat bots August and November 2007

many chat bots 1,440 hours of chat logs 147 chat logs 21 chat rooms

Page 13: Measurement and Classification of Humans and Bots in Internet Chat

13USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Measurement To create our dataset, we read and label

the chat users as human, bot, or ambiguous

In total, we recognized 14 different types of chat bots different triggering mechanisms different text generation techniques

Page 14: Measurement and Classification of Humans and Bots in Internet Chat

14USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Triggering Mechanisms Timer-Based

periodic timers, e.g., 40 seconds random timers, e.g., 45-125 seconds

Response-Based responds to other usersSam77: Bob12, you’re just full of questions, aren’t you?

Sam77: Bob12, lots of evidence for evolution can be found here http://

Page 15: Measurement and Classification of Humans and Bots in Internet Chat

15USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Text Generation Character Padding

Fiona88: anyone boredjn wanna chat?uklcss Synonym Phrases

Marjorie99: Hi Babes! Marjorie Here! Inspect My Site

Marjorie99: Mmmm Folks! Im Marjorie! View My Webpage

Odd Line or Word Spacing Message Replay

Page 16: Measurement and Classification of Humans and Bots in Internet Chat

16USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Types of Chat Bots Periodic Bots – sends messages based on

periodic timers Random Bots – sends messages based

on random timers Responder Bots – responds to messages

of other users Replay Bots – replays messages of other

users

Page 17: Measurement and Classification of Humans and Bots in Internet Chat

17USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Humans inter-message delay – evidence of heavy tail message size – well fit by Exponential

(λ=0.034)

Page 18: Measurement and Classification of Humans and Bots in Internet Chat

18USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Periodic Bots inter-message delay – several clusters with

high probabilities message size – messages built from

templates approximate a normal distribution

Page 19: Measurement and Classification of Humans and Bots in Internet Chat

19USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Random Bots inter-message delay – Equilikely distribution

at 40, 64, and 88; Uniform distribution 45-125 message size – messages selected from a

small database

Page 20: Measurement and Classification of Humans and Bots in Internet Chat

20USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Responder Bots inter-message delay – human-like timing message size – multiple templates of different

lengths

Page 21: Measurement and Classification of Humans and Bots in Internet Chat

21USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Replay Bots inter-message delay – cluster with high

probabilities (replay bots are periodic) message size – human-like size, well fit by

Exponential (λ=0.028)

Page 22: Measurement and Classification of Humans and Bots in Internet Chat

22USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Outline Background Measurement Classification System Experimental Evaluation Conclusion

Page 23: Measurement and Classification of Humans and Bots in Internet Chat

23USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Classification System Entropy Classifier

detects abnormal behavior based on message sizes and inter-message

delays accurate but slow

Machine Learning Classifier detects “learned” patterns based on message content fast but must be trained

Page 24: Measurement and Classification of Humans and Bots in Internet Chat

24USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat 24

Observation – chat bots are less complex than humans, and thus, lower in entropy exploits the low entropy of chat bots

Corrected Conditional Entropy Test (CCE) estimates higher-order entropy

Entropy Test (EN) estimates first-order entropy

Entropy Classifier

Page 25: Measurement and Classification of Humans and Bots in Internet Chat

25USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Machine Learning Classifier Observation - chat spam like email spam

is a text classification problem exploits message content of chat bots

CRM114 a powerful text classification system several built-in classifiers: HMM,

KNN/Hyperspace, OSB, SVM, Winnow, etc. we use OSB

Page 26: Measurement and Classification of Humans and Bots in Internet Chat

26USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Hybrid Classification System entropy classifier builds and maintains the bot

corpus machine learning classifier uses the bot and

human corpora

BOT CORPUS

CLASSIFY AS CHAT BOT

HUMAN CORPUS

CLASSIFY AS HUMAN

INPUT

ENTROPY CLASSIFIER

MACHINE LEARNING

CLASSIFIER

Page 27: Measurement and Classification of Humans and Bots in Internet Chat

27USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Outline Background Measurement Classification System Experimental Evaluation Conclusion

Page 28: Measurement and Classification of Humans and Bots in Internet Chat

28USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Experimental Evaluation Types of Chat Bots

Periodic Bots Random Bots Responder Bots Replay Bots

Classifiers entropy classifier – 100 messages machine learning classifier – 25 messages

Page 29: Measurement and Classification of Humans and Bots in Internet Chat

29USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Experimental Evaluation Classification Tests

Ent – entropy classifier SupML – fully-supervised ML classifier,

trained on AUG BOTS SupMLre – fully-supervised ML classifier,

retrained on NOV BOTS EntML – entropy-trained ML

Page 30: Measurement and Classification of Humans and Bots in Internet Chat

30USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

AUG BOTS NOV BOTS

periodic random respond periodic random replay human

test TP TP TP TP TP TP FPEN(imd) 121/121 68/68 1/30 51/51 109/109 40/40 7/1713CCE(imd) 121/121 49/68 4/30 51/51 109/109 40/40 11/1713EN(ms) 92/121 7/68 8/30 46/51 34/109 0/40 7/1713CCE(ms) 77/121 8/68 30/30 51/51 6/109 0/40 11/1713OVERALL 121/121 68/68 30/30 51/51 109/109 40/40 17/1713

Entropy Classifier EN – entropy CCE – corrected conditional entropy (imd) – inter-message delay (ms) – message size

Page 31: Measurement and Classification of Humans and Bots in Internet Chat

31USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

AUG BOTS NOV BOTS

periodic random respond periodic random replay human

test TP TP TP TP TP TP FPEN(imd) 121/121 68/68 1/30 51/51 109/109 40/40 7/1713CCE(imd) 121/121 49/68 4/30 51/51 109/109 40/40 11/1713EN(ms) 92/121 7/68 8/30 46/51 34/109 0/40 7/1713CCE(ms) 77/121 8/68 30/30 51/51 6/109 0/40 11/1713OVERALL 121/121 68/68 30/30 51/51 109/109 40/40 17/1713

EN(imd) and CCE(imd) problems against responder bots detect most other chat bots

Page 32: Measurement and Classification of Humans and Bots in Internet Chat

32USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

AUG BOTS NOV BOTS

periodic random respond periodic random replay human

test TP TP TP TP TP TP FPEN(imd) 121/121 68/68 1/30 51/51 109/109 40/40 7/1713CCE(imd) 121/121 49/68 4/30 51/51 109/109 40/40 11/1713EN(ms) 92/121 7/68 8/30 46/51 34/109 0/40 7/1713CCE(ms) 77/121 8/68 30/30 51/51 6/109 0/40 11/1713OVERALL 121/121 68/68 30/30 51/51 109/109 40/40 17/1713

EN(ms) and CCE(ms) problems against random and replay bots detect most other chat bots

Page 33: Measurement and Classification of Humans and Bots in Internet Chat

33USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

AUG BOTS NOV BOTS

periodic random respond periodic random replay human

test TP TP TP TP TP TP FPEN(imd) 121/121 68/68 1/30 51/51 109/109 40/40 7/1713CCE(imd) 121/121 49/68 4/30 51/51 109/109 40/40 11/1713EN(ms) 92/121 7/68 8/30 46/51 34/109 0/40 7/1713CCE(ms) 77/121 8/68 30/30 51/51 6/109 0/40 11/1713OVERALL 121/121 68/68 30/30 51/51 109/109 40/40 17/1713

OVERALL detects all chat bots false positive rate is ~0.01 100 messages

Page 34: Measurement and Classification of Humans and Bots in Internet Chat

34USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

AUG BOTS NOV BOTS

periodic random respond periodic random replay human

test TP TP TP TP TP TP FPEnt 121/121 68/68 30/30 51/51 109/109 40/40 17/1713SupML 121/121 68/68 30/30 14/51 104/109 1/40 0/1713SupMLre 121/121 68/68 30/30 51/51 109/109 40/40 0/1713EntML 121/121 68/68 30/30 51/51 109/109 40/40 1/1713

Entropy and Machine Learning Classifiers Ent – entropy classifier (from last slide) SupML – fully-supervised machine learning SupMLre – SupML retrained EntML – entropy-trained machine learning

Page 35: Measurement and Classification of Humans and Bots in Internet Chat

35USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

AUG BOTS NOV BOTS

periodic random respond periodic random replay human

Test TP TP TP TP TP TP FP Ent 121/121 68/68 30/30 51/51 109/109 40/40 17/1713SupML 121/121 68/68 30/30 14/51 104/109 1/40 0/1713SupMLre 121/121 68/68 30/30 51/51 109/109 40/40 0/1713EntML 121/121 68/68 30/30 51/51 109/109 40/40 1/1713

Ent OVERALL results from previous slide

Page 36: Measurement and Classification of Humans and Bots in Internet Chat

36USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

AUG BOTS NOV BOTS

periodic random respond periodic random replay human

test TP TP TP TP TP TP FPEnt 121/121 68/68 30/30 51/51 109/109 40/40 17/1713SupML 121/121 68/68 30/30 14/51 104/109 1/40 0/1713SupMLre 121/121 68/68 30/30 51/51 109/109 40/40 0/1713EntML 121/121 68/68 30/30 51/51 109/109 40/40 1/1713

SupML has problems against November bots needs to be retrained for new bots

SupMLre detects all bots

Page 37: Measurement and Classification of Humans and Bots in Internet Chat

37USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

AUG BOTS NOV BOTS

periodic random respond periodic random replay human

test TP TP TP TP TP TP FPEnt 121/121 68/68 30/30 51/51 109/109 40/40 17/1713SupML 121/121 68/68 30/30 14/51 104/109 1/40 0/1713SupMLre 121/121 68/68 30/30 51/51 109/109 40/40 0/1713EntML 121/121 68/68 30/30 51/51 109/109 40/40 1/1713

EntML false positive rate is ~0.0005

(Ent is ~0.01) 25 messages

Page 38: Measurement and Classification of Humans and Bots in Internet Chat

38USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Outline Background Measurement Classification System Experimental Evaluation Conclusion

Page 39: Measurement and Classification of Humans and Bots in Internet Chat

39USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Conclusion Measurements

overall, chat bots are less complex than humans

some chat bots more human-like Classification System

exploits benefits of both classifiers quickly classifies known chat bots accurately classifies unknown chat bots

Page 40: Measurement and Classification of Humans and Bots in Internet Chat

40USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Conclusion (cont.) Future Work

investigate more advanced chat bots explore applications of entropy on other forms

of bots (e.g., web bots) explore other applications of entropy (e.g.,

detecting covert timing channels)

Page 41: Measurement and Classification of Humans and Bots in Internet Chat

41USENIX Security 2008 Measurement and Classification of Humans and Bots in Internet Chat

Questions?

Thank You!