+ All Categories
Home > Technology > What's the Worse That Can Happen - The Birth of a Worm

What's the Worse That Can Happen - The Birth of a Worm

Date post: 10-Jul-2015
Category:
Upload: spackl
View: 56 times
Download: 2 times
Share this document with a friend
Description:
When Old School becomes New School again. This talk tells the true story of how a single developer developed a self replicating worm to be used in a major exercise to help train tomorrows network defenders.
Popular Tags:
37
What’s the Worse That Can Happen? (the birth of a worm) Clint “spackl” LaFever [email protected]
Transcript
Page 1: What's the Worse That Can Happen - The Birth of a Worm

What’s the Worse That Can Happen?(the birth of a worm)

Clint “spackl” LaFever

[email protected]

Page 2: What's the Worse That Can Happen - The Birth of a Worm

2

This Talk

• Story time.– How a worm is born– Old School is New School again– This is a true story.

• Are you prepared?– Do you have procedures in place?– Are your defenders trained?

Page 3: What's the Worse That Can Happen - The Birth of a Worm

3

Who Am I?

• 19 years in programming field– 14 years writing Enterprise Database

Information Systems• 10 years War Gaming

– 5 years Information Assurance• Red Team tool development• On-site/Remote Penetration Testing• Close Access

• Wireless

Page 4: What's the Worse That Can Happen - The Birth of a Worm

4

Story Unfolds…

• Annual Exercises– Designed to Train Defenders.– Status Quo was Defenders ALWAYS Win.– Attacker’s Environment Never Same as

Attacker Would Really Use.• Hard to make all teams happy.

– Network Conditions Unrealistic.• They do their best and are getting better.

– Final Day: Scorched Earth.

Page 5: What's the Worse That Can Happen - The Birth of a Worm

5

The Spark

Cleaning and organizing files one day…

Page 6: What's the Worse That Can Happen - The Birth of a Worm

6

Wheels Turning…

Dawned on me, what if?...

Page 7: What's the Worse That Can Happen - The Birth of a Worm

7

Let’s consult with friends…

Brainstorms + alcohol always works, right?

Page 8: What's the Worse That Can Happen - The Birth of a Worm

8

Everybody agrees…

All agree, but nobody really knows what would happen…

Just know it will be bad.

Page 9: What's the Worse That Can Happen - The Birth of a Worm

9

Sling Code…

Let me see if I can make a quick prototype…

First bit of functional code…~3 hours.

Page 10: What's the Worse That Can Happen - The Birth of a Worm

10

First Test…

Where did you go?

Page 11: What's the Worse That Can Happen - The Birth of a Worm

11

Get Leadership Buy In…

Before coding more, let’s make sure I will be allowed to use it.

Page 12: What's the Worse That Can Happen - The Birth of a Worm

12

Coding Continued…

Now that it can change MAC’s, let’s make it spread.

Page 13: What's the Worse That Can Happen - The Birth of a Worm

More Code Slinging…

Worm status takes hold.

13Propagation code ~8 hours.

Page 14: What's the Worse That Can Happen - The Birth of a Worm

14

Coding Through Issues…

• Different flavors of Windows.

• Removing self after MAC change.

• Multiple attacks.

• Randomizing attack.

• Covering tracks.

• Domain vs Non-Domain.

~16 hrs more of coding

Page 15: What's the Worse That Can Happen - The Birth of a Worm

15

Name It…

• Ask my son what comes to mind with self replication.• Skynet it is.• Now how to make it more fun to defenders.• What do you know, there is an IT company named Cyberdyne.

• Let’s add to it. Change all MAC’s to 002206D1ED1E

Page 16: What's the Worse That Can Happen - The Birth of a Worm

16

Showing It Off…

Shiney.

Page 17: What's the Worse That Can Happen - The Birth of a Worm

17

Humm, what if…

Programmers are never happy with v1.0

Page 18: What's the Worse That Can Happen - The Birth of a Worm

18

Not good enough…

• Let’s reset all local passwords.– Making note to be nice to change them to all the same hard coded

password in case need to tell them how to get back in (or myself)

~1 hour of code.

Page 19: What's the Worse That Can Happen - The Birth of a Worm

19

I Want More…

• Fill all hard drives.– Actually not as clear cut as one would of thought.

~2 hours of code.

Page 20: What's the Worse That Can Happen - The Birth of a Worm

20

Let’s Get Evil…

• Kill Service Processes.– Find any process that has established or

listening connections.– KILL them, bwaa ha ha ha.

• After testing, make a list of processes not to kill to avoid BSOD.

~4 hours of code.

Page 21: What's the Worse That Can Happen - The Birth of a Worm

21

What was that? BSOD?...

• Let’s add BSOD option.– Actually FAR EASIER than expected.– Couple of lines of code.

• Adjusting logic flow to deal with system crash with other options.– This option negates ability to clean off machine and maintains persistent

infection at restart.– Doubt they will ever let me use this option.

~3 hours of code.

Page 22: What's the Worse That Can Happen - The Birth of a Worm

22

Let’s Lose Control…

• Literally.– Current version only attacked list supplied.– Add option to “migrate”.

• Attack all in the attack list AND any system that has an established connection with that system.

• No way they will let me use this option.

~3 hours of code.

Page 23: What's the Worse That Can Happen - The Birth of a Worm

23

Always room for more…

• Realized worm is nice way to just spread around network.– Instead of destruction, what if I really wanted

to get command and control?– Add Download and Execute option.

• I know not evil, but could be handy.

~1 hour of code.

Page 24: What's the Worse That Can Happen - The Birth of a Worm

Be Professional…

• Add help to “tool”

24

Page 25: What's the Worse That Can Happen - The Birth of a Worm

25

Leading Up to Judgment Day

• Testing and tweaking.– Various hours of code. – ~36 hours of coding to make a worm like this.

• Getting word out.– Demonstrating to leadership prior to exercise.– Telling all I could of its existence.

Page 26: What's the Worse That Can Happen - The Birth of a Worm

Exercise…

• Standard Exercise objectives– We attacked.– We owned.

• Obtained credentials.

• Spread the word– Getting word out of tool during exercise to fellow

attackers.

– Spoke with attacker leadership of capabilities.– Told them made for final day of “scorched earth”

26

Page 27: What's the Worse That Can Happen - The Birth of a Worm

It’s a go…

• Green Light– “Worm like DOS” added to objectives list for final day.– Happy and nervous. – Can it truly work on a “real” network.– Will defenders squash it quick?

• What what?– Moved up a day as backroom talks really got leadership

wondering.– DV’s were going to be present.– Attacker leadership wanted to show what is really possible.– Oh !@#$#. Will be über FAIL if doesn’t work now.

27

Page 28: What's the Worse That Can Happen - The Birth of a Worm

28

Judgment Day

• Saw Skynet on Objectives list for the day.

• Given go ahead to use ALL options.– Reiterated there is no kill switch.– Reiterated that “I” cannot stop it once loose.

• Given go ahead to use ALL options.– Sweeeeeet!

• From Advanced Persistent Threat (APT) foothold– Launched Skynet from Primary Domain Controller.

• Remember that “migrate” option?

Page 29: What's the Worse That Can Happen - The Birth of a Worm

29

What Have I Done?…

• Change MAC’s. Check.

• Reset Passwords. Check.• Kill Service Processes. Check.• Fill Hard Drives. Check.• Migrate to other networks. Check.

• BSOD systems….

Page 30: What's the Worse That Can Happen - The Birth of a Worm

30

Page 31: What's the Worse That Can Happen - The Birth of a Worm

Watching it spread…

• High fives and cheers all around.

• Room got filled with everybody wanting to see.

31

Page 32: What's the Worse That Can Happen - The Birth of a Worm

Eye to Eye

• Walking through defender area to work with data collectors.

• Hearing talks in hallways.• Leadership asking how would “I” stop it and

clean it up.• Smoke pit.

– Curses and handshakes

32

Page 33: What's the Worse That Can Happen - The Birth of a Worm

Mass Debrief…

• Defenders talk.

• Attackers talk.

• …Defenders talk again.33

Page 34: What's the Worse That Can Happen - The Birth of a Worm

What is learned? D+1

• Focus of defense and detection is based on hackers wanting to steal data for Intel or profit.

• Preparing for a destructive internal network attack difficult to practice and prepare for.

• TTPs for dealing with such an attack have been talked about but rarely ever tested.

34

Page 35: What's the Worse That Can Happen - The Birth of a Worm

What Did Defenders Think?

• We were lucky.– They embraced the learning objectives.

• Told “best” training they ever had from any exercise.

• Teams (both offensive and defensive) wanted to have me talk more with them.

• Repeatedly mentioned that this was “old school” that many have forgotten.

35

Page 36: What's the Worse That Can Happen - The Birth of a Worm

My Lesson?

Add a kill switch.

36

Page 37: What's the Worse That Can Happen - The Birth of a Worm

Questions

37


Recommended