Hacking The Hacker

65
Fighting back against the DirCrypt bully Nitay Artenstein Michael Shalyt HACKING THE HACKER

Transcript of Hacking The Hacker

Page 1: Hacking The Hacker

Fighting back against the DirCrypt bully

Nitay Artenstein

Michael Shalyt

HACKING THE HACKER

Page 2: Hacking The Hacker

BLACK HAT

“A ‘black hat’ hacker is a hacker who violates computer security for little reason beyond maliciousness or for personal gain“ - Wikipedia.

Page 3: Hacking The Hacker

WHITE HAT

“A ’white hat’ hacker breaks security for non-malicious reasons… The term "white hat" in Internet slang refers to an ethical hacker.” - Wikipedia.

Page 4: Hacking The Hacker

WHITE HAT

“A ’white hat’ hacker breaks security for non-malicious reasons… The term "white hat" in Internet slang refers to an ethical hacker.” - Wikipedia.

Page 5: Hacking The Hacker

THE GRANDMA

Page 6: Hacking The Hacker

THE GRANDDAUGHTER

Page 7: Hacking The Hacker

THE GRANDDAUGHTER

Page 8: Hacking The Hacker
Page 9: Hacking The Hacker
Page 10: Hacking The Hacker
Page 11: Hacking The Hacker
Page 12: Hacking The Hacker
Page 13: Hacking The Hacker
Page 14: Hacking The Hacker
Page 15: Hacking The Hacker

WHAT JUST HAPPENED?

Page 16: Hacking The Hacker

WHAT JUST HAPPENED?

Page 17: Hacking The Hacker

WHAT JUST HAPPENED?

Page 18: Hacking The Hacker

CRYPTERS IN THE WILD

Page 19: Hacking The Hacker

CRYPTERS IN THE WILD

Page 20: Hacking The Hacker

CRYPTERS IN THE WILD

Page 21: Hacking The Hacker

CRYPTERS IN THE WILD

Page 22: Hacking The Hacker

CRYPTERS IN THE WILD

Page 23: Hacking The Hacker

FOR EXAMPLE: DIRCRYPT

Page 24: Hacking The Hacker

ENCRYPTION DEMO

Page 25: Hacking The Hacker

CRYPTO 101

Page 26: Hacking The Hacker

CRYPTERS ARE WRONGER

Page 27: Hacking The Hacker

CRYPTERS ARE WRONGER

• “Innocence based” attacks.

Page 28: Hacking The Hacker

CRYPTERS ARE WRONGER

• “Innocence based” attacks.

• Scare tactics.

Page 29: Hacking The Hacker

CRYPTERS ARE WRONGER

• “Innocence based” attacks.

• Scare tactics.

• The victim pays the price, unlike banking trojans.

Page 30: Hacking The Hacker

CRYPTERS ARE WRONGER

• “Innocence based” attacks.

• Scare tactics.

• The victim pays the price, unlike banking trojans.

• Highschool bully – crypters will evolve and spread as long as victims pay the ransom instead of resisting.

Page 31: Hacking The Hacker

AND NOW FOR THE GOOD PART…

• It‘s hard to implement a secure cryptographic protocol

• Many malware writers are not exactly masters of secure coding

• What if we can hack the hackers and save Grandma?

Page 32: Hacking The Hacker

LOOKS LIKE A JOB FOR A REVERSER

Page 33: Hacking The Hacker

WHAT IS REVERSE ENGINEERING?

• The malware executable holds some of the secrets we need to uncover:

Page 34: Hacking The Hacker
Page 35: Hacking The Hacker

MALWARE RESEARCHER == DETECTIVE

• A malware binary is like a crime scene

• Through skill and experience, a reverse engineer develops a “nose for mystery”

• A bunch of tools help us rise above the bits and bytes, and make it easier to connect the dots

Page 36: Hacking The Hacker

THE GOAL: MOVE FROM THIS…

Page 37: Hacking The Hacker

TO THIS

Page 38: Hacking The Hacker

FROM PLAINTEXT TO CIPHER

Page 39: Hacking The Hacker
Page 40: Hacking The Hacker
Page 41: Hacking The Hacker
Page 42: Hacking The Hacker

IMAGINE YOU WERE A HACKER…

• Where would you hide the key?

• Your options: the registry, a hidden file, or only on the C&C server

• There is always a compromise

Page 43: Hacking The Hacker

A FEW SLEEPLESS NIGHTS LATER…

Page 44: Hacking The Hacker

SO NOW WE HAVE A HINT

Page 45: Hacking The Hacker

THE UNBEARABLE LIGHTNESS OF KEY REUSE

Page 46: Hacking The Hacker

ATTACKING KEY REUSE

Page 47: Hacking The Hacker

ATTACKING KEY REUSE

• Which files will always be on Windows?

Page 48: Hacking The Hacker

ATTACKING KEY REUSE

• Which files will always be on Windows?

• We need the largest file possible. Sample videos?

Page 49: Hacking The Hacker

ATTACKING KEY REUSE

• Which files will always be on Windows?

• We need the largest file possible. Sample videos?

• The max size decryptable will be the size of that file

Page 50: Hacking The Hacker

ATTACKING KEY REUSE

• Which files will always be on Windows?

• We need the largest file possible. Sample videos?

• The max size decryptable will be the size of that file

Page 51: Hacking The Hacker

READY TO SOLVE THE PUZZLE?

Page 52: Hacking The Hacker

THAT AWKWARD MOMENT

WriteToFile(hFile, SymmetricKey, 10);

Page 53: Hacking The Hacker
Page 54: Hacking The Hacker

DECRYPTION DEMO

Page 55: Hacking The Hacker

DECRYPTION… CHECK

Page 56: Hacking The Hacker

GRANDMA IS HAPPY AGAIN

Page 57: Hacking The Hacker
Page 58: Hacking The Hacker
Page 59: Hacking The Hacker
Page 60: Hacking The Hacker
Page 61: Hacking The Hacker
Page 62: Hacking The Hacker
Page 63: Hacking The Hacker
Page 64: Hacking The Hacker
Page 65: Hacking The Hacker