I Heart Stuxnet

57
I Stuxnet or: How I Learned to Stop Worrying and Love The Worm Gil Megidish [email protected]

description

or: How I Learned To Stop Worrying And Love The Worm Video: http://vimeo.com/17364186

Transcript of I Heart Stuxnet

Page 1: I Heart Stuxnet

I Stuxnet

or: How I Learned to Stop Worrying and Love The Worm

Gil [email protected]

Page 2: I Heart Stuxnet

DISCLAIMER

I, Gil Megidish, have had absolutely nothing to do with the virus/worm presented here, nor

do I know of its origins. Everything in this presentation is purely an analysis of

documents written by Wikipedia, Symantec, ESET and professional security advisors.

Page 3: I Heart Stuxnet

My First Anti-Virus

Page 4: I Heart Stuxnet

What is Stuxnet ?

• Most complicated computer-worm ever discovered.

• Targets industrial control systems such as in gas pipelines or power plants.

• An on-going work, dates back to Dec, 2008.

Page 5: I Heart Stuxnet

Source: http://www.securelist.com/en/blog/272/Myrtus_and_Guava_Episode_3

Page 6: I Heart Stuxnet

Bushehr Nuclear Power Plant

Page 7: I Heart Stuxnet

Agenda

Introduction to Computer ViriiStuxnet’s timelineInfection mechanismTargeted systemsWhodunit ?

Page 8: I Heart Stuxnet

Computer Virus

• A software that replicated itself onto other executable files.

Page 9: I Heart Stuxnet

Computer Worm

• A software that replicates itself onto other computers; usually via exploits.

Page 10: I Heart Stuxnet

Rootkit

• Enable continued access while actively hiding presence.

Page 11: I Heart Stuxnet

CVE-2010-0049

• Remote exploitation of a memory corruption vulnerability in WebKit; allows an attacker to execute arbitrary code on victim’s machine.

15 Dec 2009 Vendor notified15 Dec 2009 Vendor replied11 Mar 2010 Coordinated public disclosure

Page 12: I Heart Stuxnet

The List Never Ends

Backdoor

Worms

Viruses

Adware

Spyware

Trojan Horse

Rootkit

BotnetPhishing

XSS

Spoofing

Man in the Middle

D.o.S.

CSRF

Page 13: I Heart Stuxnet

“Building the worm cost at least $3 million and required a team of as many as 10 skilled programmers working about six months. “

Frank Rieger (GSMK)

Page 14: I Heart Stuxnet

Timeline• 2008.11 – Trojan.Zlob found to be using LNK vulnerability• 2009.04 – Hakin9 magazine publishers Printer Spooler vulnerability• • 2010.01 – Stuxnet variant found with Realtek certificate• 2010.03 – Stuxnet variant found using LNK vulnerability• • 2010.06 – VeriSign revokes Realtek’s certificate• 2010.06 – Stuxnet variant found with JMicron certificate• 2010.07 – Symantec monitors Stuxnet’s C&C traffic• 2010.07 – VeriSign revokes JMicron’s certificate• 2010.08 – Microsoft patches LNK vulnerability.• 2010.09 – Microsoft patches Printer Spooler vulnerability.

2009.06 – First variant of Stuxnet found

2010.05 – Stuxnet first detected, named RootkitTmphider

Page 15: I Heart Stuxnet

Timeline• 2008.11 – Trojan.Zlob found to be using LNK vulnerability• 2009.04 – Hakin9 magazine publishers Printer Spooler vulnerability• • 2010.01 – Stuxnet variant found with Realtek certificate• 2010.03 – Stuxnet variant found using LNK vulnerability• • 2010.06 – VeriSign revokes Realtek’s certificate• 2010.06 – Stuxnet variant found with JMicron certificate• 2010.07 – Symantec monitors Stuxnet’s C&C traffic• 2010.07 – VeriSign revokes JMicron’s certificate• 2010.08 – Microsoft patches LNK vulnerability.• 2010.09 – Microsoft patches Printer Spooler vulnerability.

2009.06 – First variant of Stuxnet found

2010.05 – Stuxnet first detected, named RootkitTmphider

Page 16: I Heart Stuxnet

Exploit #1: LNK VulnerabilityCVE-2010-2568

Affects Windows 2000, Windows XP, WindowsServer 2003, Windows Vista and Windows 7

Page 17: I Heart Stuxnet

Exploit #2: Print Spooler VulnerabilityMS10-061

Affects Windows XP and legacy Lexmark/Compaqprinters.

Page 18: I Heart Stuxnet

Exploit #3:Windows Server ServiceMS08-067

Affects unpatched operating systems, withKernel32.dll earlier than Oct 12, 2008.

Page 19: I Heart Stuxnet

Metasploit: point. click. root.

Page 20: I Heart Stuxnet

Rootkitting Windows

Page 21: I Heart Stuxnet
Page 22: I Heart Stuxnet
Page 23: I Heart Stuxnet

Source: www.eset.com/resources/white-papers/Stuxnet_Under_the_Microscope.pdf

Page 24: I Heart Stuxnet

Taiwanese Ninjas?

Page 25: I Heart Stuxnet

Two More Zero-Day Exploits

Page 26: I Heart Stuxnet

WinCCConnect : 2WSXcder… Yes!

Page 27: I Heart Stuxnet

Peer To Peer Upgrades

Get version number

Request payload

#version#

Current version

Infected A Infected B

Page 28: I Heart Stuxnet

Command and Control

todaysfutbol.commypremierfutbol.com

GET /

200 OK

GET index.php?data=[XOR%31]

200 OK: Executable codeInfected PC

Page 29: I Heart Stuxnet

whois mypremierfutbol.com

Page 30: I Heart Stuxnet
Page 31: I Heart Stuxnet

Siemens SIMATIC Step 7

Page 32: I Heart Stuxnet

Step 7 Editor

Developer Station

WinCC MS-SQL Database

PLC

Page 33: I Heart Stuxnet

Step7 Interception

s7otbxdx.dll

s7blk_reads7blk_write

s7_blk_findfirsts7_blk_delete

All communication done through s7otbxdx library

Developer StationPLC

Page 34: I Heart Stuxnet

Step7 Interception

s7otbxsx.dll

s7blk_reads7blk_write

s7_blk_findfirsts7_blk_delete

Man in the middle rootkit!

Developer StationPLC

s7otbxdx.dll

Page 35: I Heart Stuxnet

OB1 Main Organization Block

OB35 Watchdog Organization Block

Page 36: I Heart Stuxnet

What the hell does it do?

Page 37: I Heart Stuxnet

Vacon NX

Page 38: I Heart Stuxnet

Vacon NX

Page 39: I Heart Stuxnet

The End of Stuxnet ?

Page 40: I Heart Stuxnet

v

So, whodunit ?

Page 41: I Heart Stuxnet

The Americans ?

Page 42: I Heart Stuxnet

The Russians ?

Page 43: I Heart Stuxnet

The Israelis ?

Page 44: I Heart Stuxnet

19790509

Page 45: I Heart Stuxnet

b:\myrtus\src\objfre_w2k_x86\i386 \guava.pdb

Page 46: I Heart Stuxnet

Dan Hamizer

Page 47: I Heart Stuxnet
Page 48: I Heart Stuxnet

WE MAY NEVER KNOW

Page 49: I Heart Stuxnet

Symantec's Brian Tillett put a number on the size of the team that built the virus. He said that traces of more than

30 programmers have been found in source code.

The Atlantic

Page 50: I Heart Stuxnet

I Stuxnet

Page 51: I Heart Stuxnet

LESS OF THIS

Page 52: I Heart Stuxnet

AND MORE OF THIS

Page 53: I Heart Stuxnet

NONE OF THIS

Page 54: I Heart Stuxnet

AND LOTS OF THIS

Page 55: I Heart Stuxnet

THANK YOU

Page 56: I Heart Stuxnet

Links

• Symantec’s Stuxnet Dossier http://www.wired.com/images_blogs/threatlevel/2010/10/w32_stuxnet_dossier.pdf

• ESET: Stuxnet Under The Microscope http://www.eset.com/resources/white-papers/Stuxnet_Under_the_Microscope.pdf

• Siemens Step 7 Programmer’s Handbook http://www.plcdev.com/book/export/html/373

Page 57: I Heart Stuxnet

Gil [email protected]