2012-08-14 experimenting with live cyberattackers for ... · rootkit test rootkit test rootkit test...

28
Calhoun: The NPS Institutional Archive Faculty and Researcher Publications Faculty and Researcher Publications 2012-08-14 Experimenting with live Cyberattackers for Testing Deceptions Rowe, Neil C. Monterey, California: Naval Postgraduate School. http://hdl.handle.net/10945/38286

Upload: others

Post on 22-Jun-2020

14 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Calhoun: The NPS Institutional Archive

Faculty and Researcher Publications Faculty and Researcher Publications

2012-08-14

Experimenting with live Cyberattackers

for Testing Deceptions

Rowe, Neil C.

Monterey, California: Naval Postgraduate School.

http://hdl.handle.net/10945/38286

Page 2: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Experimenting with Live Cyberattackers

for Testing Deceptions

Neil C. Rowe U.S. Naval Postgraduate School

ncrowe at nps.edu August 14, 2012

Page 3: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Defensive deception in cyberspace

Deception is a classic tactic in warfare – can’t we use it against cyberattacks?

We can deceive as to who we are, what data and resources we have, and what we are executing.

Deception can be effective because it is unexpected: Most computers are very honest.

Deception can support either of two mutually exclusive goals: Get rid of attackers, or keep them logged in to exploit them (as in a honeypot).

Page 4: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Rowe's 32 “semantic cases” for deception

Space: location-at, location-from, location-to, location-through, direction, orientation

Time: time-at, time-from, time-to, time-through, frequency

Participant: agent, object, recipient, instrument, beneficiary, experiencer

Causality: cause, effect, purpose, contradiction

Quality: content, value, measure, order, material, manner, accompaniment

Essence: supertype, whole

Precondition: external, internal

Page 5: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Best cyberspace deceptions (in decreasing order, by our analysis)

Offense: Agent Accompaniment Frequency Object Supertype Experiencer Instrument Whole Content External precondition Measure

Defense: External precondition Effect Content Time-through Purpose Experiencer Value Cause Object Frequency Measure

Page 6: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Experimenting with cyberattackers Why can’t information security be an experimental

science? We can try defenses in real time against live

cyberattackers, not just theoretical attacks. Of course cyberattackers are varied, so we need to run

experiments a long time. But data storage is not a problem today.

Yes, we can use honeypots – but they do not need to be passive. They can interact and manipulate cyberattackers.

Experiment 1: Packet modification Experiment 2: Scripted responses to protocols Experiment 3: A fake Web site

Page 7: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Honeynet setup

Page 8: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Honeypot Snort alert counts clustered 3 ways

Page 9: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Experiment 1: Packet manipulations We used Snort Inline to systematically modify bits in

packets sent to a honeypot. We measured length of time and number of attacks in

different categories looking for a significant effect. There were significant differences, both increases and

decreases in measures. Control Exp. 1A Exp. 1B Exp. 1C Exp. 1D Exp. 1E FTP 0 0 0 68794 0 3735 ICMP Ping 155 162 198 239 194 186 MS-SQL 48 32 34 50 44 30 NETBIOS 76 19 15 96 22 173 POLICY 0 2 1 0 0 1 SHELL- CODE

74 57 33 38 65 148

WEB 0 0 0 1 35 0

Page 10: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Weaknesses of direct packet modification

This is low-level interaction with networking protocols (level 2 of the OSI/ISO hierarchy).

So figuring a good modification is difficult. Much trial and error is necessary. It’s like changing a character in a program hoping to improve it.

Our experiments were slow -- each took a week to get sufficient data. Using many machines simultaneously appears necessary.

The space of possible modifications to packets is huge. So even with a honeypot farm, it would take a long time to find good deceptions.

Page 11: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Experiment 2: Dynamically changing HoneyD

HoneyD is a open-source software for building low-interaction honeypots. (“Low-interaction” means simulating the first few steps of protocols, not their full functionality.)

We faked a variety of configurations to see how cyberattackers responded:

Configurations they responded to more than average would make good deceptions for enhancing honeypots and active scams on cyberattackers.

Configurations they responded to less than average would make good deceptions for scaring away cyberattackers.

Page 12: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Experiment 2 setup

Page 13: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Configuration changes per week

Week Experiment Week Experiment 1 Control: normal activity 9 Same as week 8 2 HoneyD with 32 addresses: too

aggressive and got turned off by IT department

10 Control: normal activity

3 HoneyD with five addresses 11 Control, also no virtual machine 4 Added simulated services 12 Back to week 9 configuration 5 Removed one unhelpful service 13 Added telnet and modified virtual

Windows configurations 6 Switch of IP addresses since one

was getting more attacks 14 Control

7 Same as week 6 15 Like week 13 but with Web server instead of telnet

8 Using only 4 best scripts

Page 14: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Data from Experiment 2

Week Honeyd running?

Number of packets

Number of alerts

Different alerts

ICMP alerts

TCP alerts

UDP alerts

1 No 438661 388 4 388 0 0 3 Yes 1191410 8589 24 8366 2185 5 4 Yes 1313693 259776 36 255744 4016 16 5 Yes 701771 2525 12 1940 584 1 6 Yes 906893 2823 17 2176 647 0 7 Yes 740769 6686 11 2990 3696 0 8 Yes 897552 3386 14 2144 1242 0 9 Yes 951556 2957 19 2651 306 0 10 No 618723 1325 13 757 568 0 11 No 541740 756 16 476 270 10 12 Yes 995235 2526 10 2270 256 0 13 Yes 807712 3711 15 3445 266 0 14 No 518659 488 5 488 0 0 15 Yes 1066743 4694 14 3082 1612 0

Page 15: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Percentage of alerts by machine

Week Host machines

Guest machines

Honeyd honeypots

Production hosts

3 72.7 16.8 6.1 4.4 4 4.3 1.5 1.6 92.7 5 9.8 38.9 41.1 10.2 6 12.4 56.4 21.9 9.3 7 4.2 48.6 42.4 4.8 8 7.3 30.9 50.2 11.6 9 10.2 11.0 62.8 16.0 12 10.6 26.7 53.5 9.2 13 8.4 40.8 43.0 7.8 15 4.6 49.9 40.0 5.7

We had 4 virtual machines, and got different kinds of traffic on each.

Page 16: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Ports and alerts

The most common ports attacked were in order: 445 (Microsoft Active Directory), 80 (HTML), 135 (Microsoft Endpoint Mapper), 139 (NETBIOS), 53 (DNS), and 22 (SSH).

The most common alerts were in order: NETBIOS, Shellcode NOOPs, remote desktop requests, and attempted heap corruption.

Page 17: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Experiment 3: A fake Web server

Attackers liked Web exploits, even when we did not have a Web server.

So we simulated a Web server by modifying HoneyD.

We tested different kinds of error messages to see which ones caused the most effect on attackers.

Attackers liked certain words and certain addresses. This suggests providing special responses to these.

Page 18: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Results from Experiment 3

Honeypot address Hits Configuration *.*.*.77 15,412 2003 Server with ftp and smtp service scripts *.*.*.70 9,900 Windows XP with no servicescript *.*.*.74 9,626 SQLserver with standard iis.sh script *.*.*.73 7,963 NT4 Web Server with iis.new.sh script *.*.*.79 7,668 Windows Xp with no service script

December January February Number of days running 12 21 9 Rate of all Honeyd log entries 3389 3913 5695 Rate of Snort alerts 176 208 1069 Rate of all Web log entries 16.1 74.1 30.9 Rate of GET commands 5.7 34.9 10.2 Rate of OPTIONS commands 8.9 35.9 18.7 Rate of HEAD commands 1.4 2.2 1.1

Page 19: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Favorite input strings and user names of attackers

These could be made names of pages and could also receive responses when entered other ways.

String Count yes 717 no 492 admin 98 test 61 info 41 david 18 michael 18 mike 15 richard 15 internet 12 newpass 12 mickey 12

User name

Count

test 98

info 76

admin 76

sales 46

web 36

contact 32

postmaster 32

office 24

spam 24

Web page requested

Count

//phpmyadmin 27

/ 8

//pma 6

//mysql 5

//admin 4

/w00tw00t.at.ISC. SANS.Dfind:)

2

//sql 2

//phpmanager 2

Page 20: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Attacker design of deceptive Web sites

1. Find in GETs what pages attackers are requesting, what email addresses they are trying, and what arguments they are supplying.

2. Give it to them: Make fake pages and fake responses for all the requests you saw.

3. Go back to 1.

This approach can be balanced with inclusion of legitimate Web pages from other sites.

Note attackers will probably want to PUT as well as GET, at which point you can either deny them, say you will PUT but don’t, or PUT a defanged copy.

Page 21: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

General defensive deception: Software wrappers Attacker

Operating system Applications software 1

Applications software 2

Wrapper

Component 1 Component 2 Wrapper

Component 3 Component 4

Decoy supervisor Intrusion-detection system

Decoying rules

Page 22: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Control wrappers with “deception control lists” Resource Action Decoy response C:\Program Files write Fake a correct write by providing

false directory info subsequently C:\Program Files\Adobe\ Acrobat5.0

write Behave normally

C:\Program Files read Give fake info if any specified, otherwise the real info

C:\Program Files execute Give one of 10 random error messages if a fake write done, else execute normally

C:\My Documents read, write, execute

Behave normally

Lineprinter lpt1 read, write

Give error message if file in "secrets"; delay 10 times normal if remote user; else print normally

Page 23: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Will deception hurt legitimate users?

Page 24: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Example ploy: Delete admin authorization + log out 5

39

25

install rootkit

close ftp

50

0.2

0.9

0.1

0.2

0.8

0.2

0.8

0.83

0.17 0.4

0.9

0

33

22 1 2 3 4

35

6

7 8

9

ping

ping research vulnerabilities

research vulnerabilities scan open port overflow

buffer become admin

become admin

login

ftp

24

25

download rootkit

download rootkit download secureport

download secureport

10

11

122

13

14 15 16 17 18 19

download secureport

close ftp

decompress rootkit

install secureport

install rootkit

logout

21 22 23 28 close ftp

decompress secureport

install secureport

test rootkit

test rootkit

test rootkit

test rootkit

test rootkit

26

close ftp

27

29

30

decompress secureport

decompress secureport

decompress rootkit decompress

rootkit

install rootkit

32

31

ftp

download secureport

download secureport

180

70

167

107

61

36

101 100 99

97

100 75

74 62

96

86 85

48 74

65

55

47 30 11

36 24 1 0

0.33

0.8

0.67 0.17

0.8 0.2

34

test rootkit

ftp

0.25 0.75

40 decompress secureport

close port

close port

0.83

20

55

51

0.1

0.9

0.1

0.6

106

102

103

104 105

open port

overflow buffer

become admin

close port

login

Page 25: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Compatibility (0-10) of action with generic excuse

Generic excuse /

Attacker action

Network down

Testing Bugs Comm. faulty

Policy change

Hacked Joker Deception

scan ports 10 5 5 10 10 5 8 10

connect at port 10 5 7 5 7 5 6 7

buffer overflow 0 10 10 10 7 5 2 10

file transfer from

another site

10 5 5 5 10 7 8 7

decompress file 0 7 5 0 5 5 5 5

move file 0 7 5 2 8 5 5 7

test operating system

2 10 10 2 7 10 8 10

Page 26: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Current research: Predicting future attacker actions

Most anticipatory defense uses a Bayesian model of the attacker.

A better model would reason by analogy: Given events A, f(A), g(A), predict f(g(A)).

We use a variant of this in the psychological theory of “conceptual blending”.

0.09 0.09

0.15

0.10

0.18

0.12

0.27

0.21

0.28 0.26

0.24 0.21

0.33

0.00

0.05

0.10

0.15

0.20

0.25

0.30

0.35

Comparison of Mean Prediction Accuracy when two atoms are swapped

Page 27: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Performance of analogical reasoning over time

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9 1

142

283

424

565

706

847

988

1129

12

70

1411

15

52

1693

18

34

1975

21

16

2257

23

98

2539

26

80

2821

29

62

3103

32

44

3385

35

26

3667

38

08

3949

40

90

4231

43

72

4513

46

54

4795

49

36

5077

52

18

5359

55

00

5641

57

82

5923

60

64

6205

63

46

Axi

s Titl

e

Prediction Accuracy applied on Snort alerts

Greedy

Previous

LUT

VAR

MSB

SBM

VOMM

SSB-SM

SSB

SSB-F

Reasoning by analogy outperformed several versions of Bayesian reasoning and other simple reasoning methods.

Page 28: 2012-08-14 Experimenting with live Cyberattackers for ... · rootkit test rootkit test rootkit test rootkit test rootkit 26 close ftp 27 . 29 30 . decompress decompress secureport

Conclusions

You can test deception tactics systematically against live cyberattackers.

However, it takes some resources. With one honeypot with four virtual machines, data came slowly.

Both attacker-encouragement and attacker-discouragement effects are valuable.

We only saw predominantly simpleminded attacks. However, our collection techniques are general and should catch any class of attack.