Book Image

Cybersecurity Attacks – Red Team Strategies

By : Johann Rehberger
Book Image

Cybersecurity Attacks – Red Team Strategies

By: Johann Rehberger

Overview of this book

It's now more important than ever for organizations to be ready to detect and respond to security events and breaches. Preventive measures alone are not enough for dealing with adversaries. A well-rounded prevention, detection, and response program is required. This book will guide you through the stages of building a red team program, including strategies and homefield advantage opportunities to boost security. The book starts by guiding you through establishing, managing, and measuring a red team program, including effective ways for sharing results and findings to raise awareness. Gradually, you'll learn about progressive operations such as cryptocurrency mining, focused privacy testing, targeting telemetry, and even blue team tooling. Later, you'll discover knowledge graphs and how to build them, then become well-versed with basic to advanced techniques related to hunting for credentials, and learn to automate Microsoft Office and browsers to your advantage. Finally, you'll get to grips with protecting assets using decoys, auditing, and alerting with examples for major operating systems. By the end of this book, you'll have learned how to build, manage, and measure a red team program effectively and be well-versed with the fundamental operational techniques required to enhance your existing skills.
Table of Contents (17 chapters)
1
Section 1: Embracing the Red
6
Section 2: Tactics and Techniques

Loading CSV data into the graph database

In most cases, you should be able to gather data in CSV format. This is also possible for any Nmap or Nessus results that you might want to import. Luckily, Neo4j makes it extremely straightforward to load CSV data.

If you are dealing with Nmap, then there is a nifty tool to allow you to convert results to a CSV file, which you can then import into Neo4j.

Let's walk through this scenario. Let's say you scanned the network with something such as this:

$ sudo nmap -sS -Pn -A 192.168.0.1/24 -oA results

Notice the -oA option, which outputs a variety of formats. If you don't have pip, go install it, as we will use it to install the nmaptocsv Python script from https://pypi.org/project/nmaptocsv:

$ sudo apt install python-pip

Then install the conversion tool, nmaptocsv:

$ sudo pip install nmaptocsv
Collecting nmaptocsv
  Downloading https://files.pythonhosted.org/packages/0d/3d/c81189e3408f4d54de99e83a20624c98188fe9c94a9714a643311695f4fc...