BeyondTrust
  • Products
    Privileged Password Management
    Discover, manage, audit, and monitor privileged accounts
    Password Safe DevOps Secrets Safe
    Endpoint Privilege Management
    Manage privileges on Windows, Mac, Linux, and Unix endpoints
    Windows and Mac Unix and Linux Active Directory Bridge
    Secure Remote Access
    Centrally manage and secure remote access for service desks and vendors
    Remote Support Privileged Remote Access
    Use Cases and Industries
    See All Products
  • Resources

    Universal Privilege Management

    Our innovative Universal Privilege Management approach secures every user, asset, and session across your entire enterprise.

    Watch Video

    Learn

    Case Studies
    Competitor Comparisons
    Datasheets
    Glossary
    Product Demos
    Whitepapers

    Attend

    Events
    Go Beyond
    Training
    Webinars

    Support

    Changelog
    Professional Services
    Technical Documentation
  • Blog
  • Partners
  • Contact
  • Support
  • Services
  • Training
  • Events
  • Company

Linux Security Hardening Lessons from an Office Space-Themed CTF

March 19, 2020

  • Blog
  • Archive

In my Linux Attack and Defense webinar series, I demonstrate attacks on Linux systems, then show how proactive security hardening could block the attacks. The immense value of proactive hardening is that it can eliminate security vulnerabilities that you don’t even know are present.

In this webinar, we attack the Breach2 “Capture the Flag” (CTF) virtual machine (VM), created by @mrb3n. The Breach CTF virtual machines are all themed on the classic cult movie, Office Space. You don’t need to remember the movie to enjoy the CTF and the webinar, but it’s a great bonus if you do.

The Breach2 CTF virtual machine is particularly fun and a bit unusual in that it exposes new target services to attack as you progress through an attack path. This helps each step build on the one previous to it.

The Breach 2 CTF VM also puts services, like its SSH server, on non-standard port numbers. The use of non-standard ports presents the potential to apply a particularly cool hardening measure. Think about it this way: what happens if an attacker can only figure out if you have an SSH server by attempting connections to many ports? If only attackers try connecting to that many different ports on a single system, then you’ve identified one of those useful anomalies that differentiates attacker behavior from legitimate user behavior.

You can configure a free tool, like OSSEC, to block any IP address that tries connections to more than, say, three different ports within a five-minute period. The tool can use expanding lockout durations, so the first attempt creates a short lockout, but the next creates a one-day lockout. It takes the attacker forever to get through anything close to the available 65,536 ports. This renders the port scan ineffective as an attack tool in the short term, while making attacks easier to identify and catch and respond to by IT and security teams.

While this wouldn’t be your only security measure to better protect the Breach 2 CTF VM, it’s a valuable measure within a broader defense-in-depth strategy. But, why isn’t it enough on its own? Well, information security is always a back-and-forth arms race. As an attacker, I can rent time on a botnet, which lets me coordinate around 22,000 hosts to each send probes to 3 ports on the target machine. All 22,000 IP addresses will be locked out, but not before I’ve been able to scan all 65,536 available ports to uncover that hidden SSH server.

Now that you know the counter-attack, would you skip the hardening steps? I know that I wouldn’t. Here’s why. The bulk of the total population of attackers, including fully-automated worms, aren’t willing or able to use a botnet. That leaves some small percentage that are able to do so. At that point, the probability is much lower that the attacker coming after me is in the “willing and capable” group. Without applying the security hardening measure described, the probability is much higher than my attacker will have what they need be successful in their cyber assault.

If you enjoy this kind of attack-and-defense back and forth, check out the webinar: Linux Attack and Defense - Office Space Style!

You can get the Breach2 virtual machine from VulnHub.com. I encourage you to download Breach2 and a Kali Linux virtual machine and then follow along with both the attack and defense in the webinar.

Photograph of Jay Beale

Jay Beale, co-founder, COO and CTO, InGuardians

Jay Beale has created several defensive security tools, including Bastille Linux/UNIX and the CIS Linux Scoring Tool, both of which were used widely throughout industry and government. He has served as an invited speaker at many industry and government conferences, a columnist for Information Security Magazine, SecurityPortal and SecurityFocus, and a contributor to nine books, including those in his Open Source Security Series and the “Stealing the Network” series. He has led training classes on Linux Hardening and other topics at Black Hat, CanSecWest, RSA, and IDG conferences, as well as in private corporate training. Jay is a co-founder, Chief Operating Officer and CTO of the information security consulting company InGuardians.

Stay Up To Date

Get the latest news, ideas, and tactics from BeyondTrust. You may unsubscribe at any time.

I agree to receive product related communications from BeyondTrust as detailed in the Privacy Policy, and I may manage my preferences or withdraw my consent at any time.

You May Also Be Interested In:

Whitepapers

Mapping BeyondTrust Solutions to the Identity, Credential, and Access Management (ICAM) Architecture

Whitepapers

Four Key Ways Governments Can Prepare for the Growing Ransomware Threat

Whitepapers

The Operational Technology (OT) Remote Access Challenge

BeyondTrust Logo
  • Facebook
  • Twitter
  • LinkedIn

Keep up with BeyondTrust

I agree to receive product related communications from BeyondTrust as detailed in the Privacy Policy, and I may manage my preferences or withdraw my consent at any time.

Customer Support
Contact Sales

Products

  • Endpoint Privilege Management
  • Password Management
  • Privileged Remote Access
  • DevOps Secrets Safe
  • Remote Support

Resources

  • Blog
  • Case Studies
  • Competitor Comparisons
  • Datasheets
  • Glossary
  • Videos
  • Webcasts
  • Whitepapers

About

  • Company
  • Careers
  • Contact
  • Events
  • Leadership Team
  • Partner Program
  • Press

Languages

  • English
  • German
  • French
  • Spanish
  • Korean
  • Portuguese
  • Japanese
  • Privacy
  • Security
  • Manage Cookies
  • WEEE Compliance

Copyright © 1999 — 2020 BeyondTrust Corporation. All rights reserved. Other trademarks identified on this page are owned by their respective owners. BeyondTrust Corporation is not a chartered bank or trust company, or depository institution. It is not authorized to accept deposits or trust accounts and is not licensed or regulated by any state or federal banking authority.