Adversarial Tradecraft in Cybersecurity

Book description

Master cutting-edge techniques and countermeasures to protect your organization from live hackers. Learn how to harness cyber deception in your operations to gain an edge over the competition.

Key Features

  • Gain an advantage against live hackers in a competition or real computing environment
  • Understand advanced red team and blue team techniques with code examples
  • Learn to battle in short-term memory, whether remaining unseen (red teams) or monitoring an attacker's traffic (blue teams)

Book Description

Little has been written about what to do when live hackers are on your system and running amok. Even experienced hackers tend to choke up when they realize the network defender has caught them and is zoning in on their implants in real time. This book will provide tips and tricks all along the kill chain of an attack, showing where hackers can have the upper hand in a live conflict and how defenders can outsmart them in this adversarial game of computer cat and mouse.

This book contains two subsections in each chapter, specifically focusing on the offensive and defensive teams. It begins by introducing you to adversarial operations and principles of computer conflict where you will explore the core principles of deception, humanity, economy, and more about human-on-human conflicts. Additionally, you will understand everything from planning to setting up infrastructure and tooling that both sides should have in place.

Throughout this book, you will learn how to gain an advantage over opponents by disappearing from what they can detect. You will further understand how to blend in, uncover other actors’ motivations and means, and learn to tamper with them to hinder their ability to detect your presence. Finally, you will learn how to gain an advantage through advanced research and thoughtfully concluding an operation.

By the end of this book, you will have achieved a solid understanding of cyberattacks from both an attacker’s and a defender’s perspective.

What you will learn

  • Understand how to implement process injection and how to detect it
  • Turn the tables on the offense with active defense
  • Disappear on the defender’s system, by tampering with defensive sensors
  • Upskill in using deception with your backdoors and countermeasures including honeypots
  • Kick someone else from a computer you are on and gain the upper hand
  • Adopt a language agnostic approach to become familiar with techniques that can be applied to both the red and blue teams
  • Prepare yourself for real-time cybersecurity conflict by using some of the best techniques currently in the industry

Who this book is for

Pentesters to red teamers, security operations center analysts to incident responders, attackers, defenders, general hackers, advanced computer users, and security engineers will benefit from this book. Participants in purple teaming or adversarial simulations will also learn a lot from its practical examples of processes for gaining an advantage over the opposing team. Basic knowledge of Python, Go, Bash, PowerShell, system administration as well as knowledge of incident response in Linux and prior exposure to any kind of cybersecurity knowledge, penetration testing, and ethical hacking basics will help you follow along.

Table of contents

  1. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Get in touch
  2. Theory on Adversarial Operations and Principles of Computer Conflict
    1. Adversarial theory
      1. CIAAAN
      2. Game theory
    2. Principles of computer conflict
      1. Offense versus defense
      2. Principle of deception
      3. Principle of physical access
      4. Principle of humanity
      5. Principle of economy
      6. Principle of planning
      7. Principle of innovation
      8. Principle of time
    3. Summary
    4. References
  3. Preparing for Battle
    1. Essential considerations
      1. Communications
      2. Long-term planning
      3. Expertise
      4. Operational planning
    2. Defensive perspective
      1. Signal collection
      2. Data management
      3. Analysis tooling
      4. Defensive KPIs
    3. Offensive perspective
      1. Scanning and exploitation
      2. Payload development
      3. Auxiliary tooling
      4. Offensive KPIs
    4. Summary
    5. References
  4. Invisible is Best (Operating in Memory)
    1. Gaining the advantage
    2. Offensive perspective
      1. Process injection
      2. In-memory operations
    3. Defensive perspective
      1. Detecting process injection
      2. Preparing for attacker techniques
      3. The invisible defense
    4. Summary
    5. References
  5. Blending In
    1. Offensive perspective
      1. Persistence options
        1. LOLbins
        2. DLL search order hijacking
        3. Executable file infection
      2. Covert command and control channels
        1. ICMP C2
        2. DNS C2
        3. Domain fronting
      3. Combining offensive techniques
    2. Defensive perspective
      1. C2 detection
        1. ICMP C2 detection
        2. DNS C2 detection
      2. Persistence detection
        1. Detecting DLL search order hijacking
        2. Detecting backdoored executables
      3. Honey tricks
        1. Honey tokens
        2. Honeypots
    3. Summary
    4. References
  6. Active Manipulation
    1. Offensive perspective
      1. Clearing logs
      2. Hybrid approach
      3. Rootkits
    2. Defensive perspective
      1. Data integrity and verification
      2. Detecting rootkits
      3. Manipulating attackers
      4. Keeping attackers distracted
      5. Tricking attackers
    3. Summary
    4. References
  7. Real-Time Conflict
    1. Offensive perspective
      1. Situational awareness
        1. Understanding the system
        2. Clear the Bash history
        3. Abusing Docker
      2. Gleaning operational information
        1. Keylogging
        2. Screenshot spy
        3. Getting passwords
        4. Searching files for secrets
        5. Backdooring password utilities
      3. Pivoting
        1. SSH agent hijacking
        2. SSH ControlMaster hijacking
        3. RDP hijacking
        4. Hijacking other administrative controls
    2. Defensive perspective
      1. Exploring users, processes, and connections
        1. Root cause analysis
        2. Killing malicious processes
        3. Killing connections and banning IPs
        4. Network quarantine
      2. Rotating credentials
      3. Restricting permissions
        1. Chattr revisited
        2. chroot
        3. Using namespaces
        4. Controlling users
        5. Shut it down
      4. Hacking back
        1. Hunting attacker infrastructure
        2. Exploiting attacker tools
    3. Summary
    4. References
  8. The Research Advantage
    1. Gaming the game
    2. Offensive perspective
      1. The world of memory corruption
      2. Targeting research and prep
      3. Target exploitation
      4. Creative pivoting
    3. Defensive perspective
      1. Tool exploitation
      2. Threat modeling
      3. Operating system and application research
      4. Log and analyze your own data
      5. Attribution
    4. Summary
    5. References
  9. Clearing the Field
    1. Offensive perspective
      1. Exfiltration
        1. Protocol tunneling
        2. Steganography
        3. Anonymity networks
      2. Ending the operation
        1. Program security versus operational security
        2. Taking down infrastructure
        3. Rotating offensive tools
        4. Retiring and replacing techniques
    2. Defensive perspective
      1. Responding to an intrusion
        1. The big flip
      2. The remediation effort
        1. A post-mortem after the incident
      3. Forward looking
      4. Publish results
    3. Summary
    4. References
  10. Other Books You May Enjoy
  11. Index

Product information

  • Title: Adversarial Tradecraft in Cybersecurity
  • Author(s): Dan Borges
  • Release date: June 2021
  • Publisher(s): Packt Publishing
  • ISBN: 9781801076203