DIY Blue Teaming DIY Blue Teaming (Keeping attackers out, with duct - - PowerPoint PPT Presentation

diy blue teaming diy blue teaming
SMART_READER_LITE
LIVE PREVIEW

DIY Blue Teaming DIY Blue Teaming (Keeping attackers out, with duct - - PowerPoint PPT Presentation

DIY Blue Teaming DIY Blue Teaming (Keeping attackers out, with duct tape and chewing gum!) DIY Blue Teaming DIY Blue Teaming Ways to make malware not work Security by obscurity (because sucker punches work, even though nobody wants to admit


slide-1
SLIDE 1

DIY Blue Teaming DIY Blue Teaming

(Keeping attackers out, with duct tape and chewing gum!)

slide-2
SLIDE 2

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work Security by obscurity (because sucker punches work, even though nobody wants to admit it. "Hack Back" tricks - *TRY AT YOUR OWN RISK* Why buy the cow when you can have the milk for free?

slide-3
SLIDE 3

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

slide-4
SLIDE 4

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Usually the purpose of 0day is to execute

  • malware. If you stop that malware from

executing you essentially mitigate the 0day.

slide-5
SLIDE 5

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

0day (and it's often attached malware) tends to fail in the wild, like A LOT. When it does, it makes errors. If you can catch those errors in context, sometimes, you get to keep / analyse the malware AND THE 0DAY!

slide-6
SLIDE 6

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

tl;dr, make your environment unpredictable so that you spend less time threat hunting and more time seeing stuff actually being thrown at you! (aka: NOT GETTING PWNED)

slide-7
SLIDE 7

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods:

slide-8
SLIDE 8

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods:

slide-9
SLIDE 9

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Re order all the syscalls Re order all the syscalls

slide-10
SLIDE 10

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods:

slide-11
SLIDE 11

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: "Remove" your shell "Remove" your shell

slide-12
SLIDE 12

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: "Remove" your shell "Remove" your shell

Use unix noshell on every user and then point ssh to a binary that downloads a shell and runs it upon login

slide-13
SLIDE 13

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: "Remove" your shell "Remove" your shell

Actually remove bash from the box Use unix noshell on every user and then point ssh to a binary that downloads a shell and runs it upon login

slide-14
SLIDE 14

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Backdoor your own utilities... Backdoor your own utilities...

slide-15
SLIDE 15

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Backdoor your own utilities... Backdoor your own utilities... SSH "dupe" setup... SSH "dupe" setup...

https://github.com/stealth/sshttp SSH HTTPS

slide-16
SLIDE 16

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Backdoor your own utilities... Backdoor your own utilities... SSH "dupe" setup... SSH "dupe" setup...

https://github.com/stealth/sshttp Port 22 SSH HTTPS

slide-17
SLIDE 17

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Backdoor your own utilities... Backdoor your own utilities... SSH "dupe" setup... SSH "dupe" setup...

https://github.com/stealth/sshttp Port 22 Port 8443 Actual SSH Server SSH HTTPS

slide-18
SLIDE 18

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Backdoor your own utilities... Backdoor your own utilities... GCC shouldn't be on boxes in prod GCC shouldn't be on boxes in prod anyway... anyway...

slide-19
SLIDE 19

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Backdoor your own utilities... Backdoor your own utilities... GCC shouldn't be on boxes in prod GCC shouldn't be on boxes in prod anyway... anyway...

replace GCC with a binary that never actually outputs the file to disk but DOES run it through virus total and give you alerts

slide-20
SLIDE 20

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Backdoor your own utilities... Backdoor your own utilities... Tripwire apps that modify the Tripwire apps that modify the filesystem filesystem

slide-21
SLIDE 21

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Backdoor your own utilities... Backdoor your own utilities... Tripwire apps that modify the Tripwire apps that modify the filesystem filesystem

cp mv ln = If <arg1> == "core lib" { wtf_are_you_doing() }

slide-22
SLIDE 22

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Backdoor your own utilities... Backdoor your own utilities... Make uname "lie" Make uname "lie"

slide-23
SLIDE 23

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Backdoor your own utilities... Backdoor your own utilities... Modprobe Modprobe

slide-24
SLIDE 24

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Backdoor your own utilities... Backdoor your own utilities... Modprobe Modprobe

Check that module contains this supper sekret squirl token that is in all my modules

slide-25
SLIDE 25

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Backdoor your own utilities... Backdoor your own utilities... Modprobe Modprobe

"decrypt" binaries before loading

slide-26
SLIDE 26

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Backdoor your own utilities... Backdoor your own utilities... Modprobe Modprobe

Rename modprobe to something else and make modprobe send a security alert

slide-27
SLIDE 27

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Backdoor your own utilities... Backdoor your own utilities... Break all the things! Break all the things!

slide-28
SLIDE 28

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Backdoor your own utilities... Backdoor your own utilities... Break all the things! Break all the things!

... and then alias all the things in the user prefs of legit admins

slide-29
SLIDE 29

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Backdoor your own utilities... Backdoor your own utilities... One app to rule them all! One app to rule them all!

aka: "the initramfs trick"

slide-30
SLIDE 30

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods:

slide-31
SLIDE 31

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Get full crash dumps Get full crash dumps

https://support.microsoft.com/en-us/help/927069/how-to-generate-a- complete-crash-dump-file-or-a-kernel-crash-dump-file

slide-32
SLIDE 32

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Rename the Powershell exe (just like the bash trick but Rename the Powershell exe (just like the bash trick but for windows) for windows)

slide-33
SLIDE 33

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Over-the-shoulder transcription Over-the-shoulder transcription

https://blogs.msdn.microsoft.com/powershell/2015/06/09/powershell- the-blue-team/

slide-34
SLIDE 34

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Over-the-shoulder transcription Over-the-shoulder transcription

slide-35
SLIDE 35

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Over-the-shoulder transcription Over-the-shoulder transcription

slide-36
SLIDE 36

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Hook OpenProcess() to look for well targeted Hook OpenProcess() to look for well targeted applications applications

slide-37
SLIDE 37

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Hook OpenProcess() to look for well targeted Hook OpenProcess() to look for well targeted applications applications

Notepad Calc Explorer

slide-38
SLIDE 38

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Backdoor reg edit Backdoor reg edit

slide-39
SLIDE 39

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Backdoor reg edit Backdoor reg edit

Who’s using it and why? What is being edited? (key on specific reg keys like appinitdll, etc)

slide-40
SLIDE 40

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Auto pe-sive dll Auto pe-sive dll

slide-41
SLIDE 41

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Auto pe-sive dll Auto pe-sive dll

@hasherezade

slide-42
SLIDE 42

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Auto pe-sive dll Auto pe-sive dll

@hasherezade

slide-43
SLIDE 43

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods:

slide-44
SLIDE 44

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Fake SMB Fake SMB

slide-45
SLIDE 45

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods: Little Snitch / Micro Snitch (or lulu Little Snitch / Micro Snitch (or lulu if ya have to) if ya have to)

slide-46
SLIDE 46

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: Methods:

https://github.com/kai5263499/osx-security-awesome#hardening

slide-47
SLIDE 47

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Methods: ... misc Methods: ... misc

slide-48
SLIDE 48

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Open SMB share that nobody has a reason to access Open SMB share that nobody has a reason to access

(hint, Metasploit SMB link :))

slide-49
SLIDE 49

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

Canary users Canary users

slide-50
SLIDE 50

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

“Honey tokens” “Honey tokens”

slide-51
SLIDE 51

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

“Honey tokens” “Honey tokens”

Fake AWS tokens

slide-52
SLIDE 52

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

“Honey tokens” “Honey tokens”

Fake AWS tokens Fake github accounts with poisoned source and or credz

slide-53
SLIDE 53

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

“Honey tokens” “Honey tokens”

Fake AWS tokens Browser automated phishing "clickers" (bonus points for fake 2fa) Fake github accounts with poisoned source and or credz

slide-54
SLIDE 54

DIY Blue Teaming DIY Blue Teaming

Ways to make malware not work

“Honey tokens” “Honey tokens”

Fake AWS tokens Browser automated phishing "clickers" (bonus points for fake 2fa) Browser automated phishing "clickers" (bonus points for fake 2fa) Fake github accounts with poisoned source and or credz

slide-55
SLIDE 55

DIY Blue Teaming DIY Blue Teaming

Security by obscurity Security by obscurity

slide-56
SLIDE 56

DIY Blue Teaming DIY Blue Teaming

Security by obscurity Security by obscurity

Randomly generate "deny" messages in robots.txt Randomly generate "deny" messages in robots.txt

slide-57
SLIDE 57

DIY Blue Teaming DIY Blue Teaming

Security by obscurity Security by obscurity

Randomly generate "deny" messages in robots.txt Randomly generate "deny" messages in robots.txt

slide-58
SLIDE 58

DIY Blue Teaming DIY Blue Teaming

Security by obscurity Security by obscurity

TCP/redirect + stuff you actually use + mandatory time delay TCP/redirect + stuff you actually use + mandatory time delay = VERY frustrated attackers VERY frustrated attackers

slide-59
SLIDE 59

DIY Blue Teaming DIY Blue Teaming

Security by obscurity Security by obscurity

Make bad actors think you're hunting them! Make bad actors think you're hunting them!

slide-60
SLIDE 60

DIY Blue Teaming DIY Blue Teaming

Security by obscurity Security by obscurity

Make bad actors think you're hunting them! Make bad actors think you're hunting them!

Step 1: Go get some "Blacklists"

slide-61
SLIDE 61

DIY Blue Teaming DIY Blue Teaming

Security by obscurity Security by obscurity

Make bad actors think you're hunting them! Make bad actors think you're hunting them!

Step 2: Write some "software" that gathers information about a host....

slide-62
SLIDE 62

DIY Blue Teaming DIY Blue Teaming

Security by obscurity Security by obscurity

Make bad actors think you're hunting them! Make bad actors think you're hunting them!

Step 3: Build some honey hosts on 1 or 2 DMZs in your IP space that look like the systems you "found"

slide-63
SLIDE 63

DIY Blue Teaming DIY Blue Teaming

Security by obscurity Security by obscurity

Make bad actors think you're hunting them! Make bad actors think you're hunting them!

Step 4: Go back to the "bad person" forum and say "Hay! I found some more, add these blocks!"

slide-64
SLIDE 64

DIY Blue Teaming DIY Blue Teaming

Security by obscurity Security by obscurity

Make bad actors think you're hunting them! Make bad actors think you're hunting them!

  • 1. Register (fbi|cia|fsb|nsa).<yourOrgName>.com
  • 2. Skin it with a web based honey pot that looks

like a lawful interception portal

slide-65
SLIDE 65

DIY Blue Teaming DIY Blue Teaming

Security by obscurity Security by obscurity

Make bad actors think you're hunting them! Make bad actors think you're hunting them!

  • 1. Register (fbi|cia|fsb|nsa).<yourOrgName>.com
  • 2. Skin it with a web based honey pot that looks

like a lawful interception portal

slide-66
SLIDE 66

DIY Blue Teaming DIY Blue Teaming

"Hack – back" tricks "Hack – back" tricks

slide-67
SLIDE 67

DIY Blue Teaming DIY Blue Teaming

"Hack – back" tricks "Hack – back" tricks

PasswordBackup.autoexec.zip PasswordBackup.autoexec.zip

slide-68
SLIDE 68

DIY Blue Teaming DIY Blue Teaming

"Hack – back" tricks "Hack – back" tricks

BeEF hooks in "honey" web app accounts BeEF hooks in "honey" web app accounts

slide-69
SLIDE 69

DIY Blue Teaming DIY Blue Teaming

"Hack – back" tricks "Hack – back" tricks

Solicit shells in your own org... Solicit shells in your own org...

slide-70
SLIDE 70

DIY Blue Teaming DIY Blue Teaming

"Hack – back" tricks "Hack – back" tricks

Distribute disinformation about your org.. Distribute disinformation about your org..

slide-71
SLIDE 71

DIY Blue Teaming DIY Blue Teaming

Why buy the cow when you can have the Why buy the cow when you can have the milk for free? milk for free?

slide-72
SLIDE 72

DIY Blue Teaming DIY Blue Teaming

Why buy the cow when you can have the milk for free? Why buy the cow when you can have the milk for free?

VirtualBox + VirusTotal + https://github.com/elazarl/goproxy

  • DIY FireEye :)
slide-73
SLIDE 73

DIY Blue Teaming DIY Blue Teaming

Why buy the cow when you can have the milk for free? Why buy the cow when you can have the milk for free?

VirtualBox + VirusTotal + https://github.com/elazarl/goproxy

  • DIY FireEye :)
slide-74
SLIDE 74

DIY Blue Teaming DIY Blue Teaming

Why buy the cow when you can have the milk for free? Why buy the cow when you can have the milk for free?

ELK + (LVM * Dropbox) = FTW!!!

slide-75
SLIDE 75

DIY Blue Teaming DIY Blue Teaming

Why buy the cow when you can have the milk for free? Why buy the cow when you can have the milk for free?

https://www.reddit.com/r/Splunk/commen ts/2jwiso/10g_free_splunk_dev_license/

slide-76
SLIDE 76

DIY Blue Teaming DIY Blue Teaming

Why buy the cow when you can have the milk for free? Why buy the cow when you can have the milk for free?

Appscan is written in .NET .... :)

slide-77
SLIDE 77

DIY Blue Teaming DIY Blue Teaming

slide-78
SLIDE 78

DIY Blue Teaming DIY Blue Teaming