Book Image

Security with Go

By : John Daniel Leon
Book Image

Security with Go

By: John Daniel Leon

Overview of this book

Go is becoming more and more popular as a language for security experts. Its wide use in server and cloud environments, its speed and ease of use, and its evident capabilities for data analysis, have made it a prime choice for developers who need to think about security. Security with Go is the first Golang security book, and it is useful for both blue team and red team applications. With this book, you will learn how to write secure software, monitor your systems, secure your data, attack systems, and extract information. Defensive topics include cryptography, forensics, packet capturing, and building secure web applications. Offensive topics include brute force, port scanning, packet injection, web scraping, social engineering, and post exploitation techniques.
Table of Contents (15 chapters)

Capturing packets

The following program demonstrates the basics of capturing a packet. The device name is passed as a string. If you don't know the device name, use the previous example to get a list of the devices available on your machine. If you don't see the exact devices listed, you may need to elevate your privileges and run the program with sudo.

The promiscuous mode is an option you can enable to listen for packets that are not destined for your device. The promiscuous mode is particularly relevant with wireless devices because wireless network devices actually have the capability to pick up packets in the air that were intended for other recipients.

Wireless traffic is particularly vulnerable to sniffing because all the packets are broadcast through the air instead of through Ethernet, where physical access is required for the wire to intercept traffic. Providing...