logo

One-liners to Rule Them All

Conference:  Defcon 26

2018-08-01

Summary

The presentation covers a variety of bash one-liners that can be used to speed up hacking and data processing tasks. The speakers emphasize the importance of understanding the concepts behind each one-liner and how to apply various strategies to accomplish tasks efficiently.
  • Pipes and redirection are fundamental tools in bash
  • Variables and substitution can be useful in many cases
  • Standard tools and expansions are important to know
  • Examples are provided to illustrate the use of one-liners in various scenarios
The speakers provide an example of using awk to perform multiple steps in one command line, which can be more efficient than using separate commands. They also mention the usefulness of the 'up edit enter repeat' loop for quickly editing and repeating commands. Additionally, they highlight the explain shell tool as a helpful resource for understanding complex command lines.

Abstract

It began with the forging of the command line. And some things that should not have been forgotten, were lost. History became legend, legend became myth. Sometimes you just need to pull out the third column of a CSV file. Sometimes you just need to sort IP addresses. Sometimes you have to pull out IP addresses from the third column and sort them, but only if the first column is a particular string and for some reason the case is random. In this DEF CON 101 talk, we'll cover a ton of bash one-liners that we use to speed up our hacking. Along the way, we'll talk about the concepts behind each of them and how we apply various strategies to accomplish whatever weird data processing task comes up while testing exploits and attacking a network.

Materials:

Tags: