Skip to content
0:00 / 0:00

#ansiescapesequences#loginjection#terminalemulators

DEF CON 31 - Weaponizing Plain Text ANSI Escape Sequences as a Forensic Nightmare - STÖK

DEFCONConference

419K subscribers • 61 videos on Hallway • Conference channel

YouTube
  • One of the most-watched uploads on DEF CON, a conference or university channel Hallway lists. Nobody has recommended it in the communities yet, so it ranks below community picks.
  • Presented by STÖK

Intermediate. Assumes working knowledge.

123K views3 years ago

SecuritySystems programmingExploits and vulnerabilitiesThe shell and command lineWeb and application security

STÖK explains how ANSI escape sequences can be used to inject malicious content and vandalize log files in modern terminal emulators.

Logs are a vital component for maintaining application reliability, performance, and security. They serve as a source of information for developers, security teams, and other stakeholders to understand what has happened or gone wrong within an application. However, logs can also be used to compromise the security of an application by injecting malicious content. In this presentation, we will explore how ANSI escape sequences can be used to inject, vandalize, and even weaponize log files of modern applications. We will revisit old terminal injection research and log tampering techniques from the 80-90s. Combine them with new features, to create chaos and mischief in the modern cloud cli’s, mobile, and feature-rich DevOps terminal emulators of today. We will then provide solutions on how to avoid passing on malicious escape sequences into our log files. By doing so, we can ensure that we can trust the data inside our logs, making it safe for operators to use shells to audit files. Enabling responders to quickly and accurately investigate incidents without wasting time cleaning, or having to gather additional data, while reconstructing events. Welcome to this "not so black and white," but rather quite colorful ANSI adventure, and learn how to cause, or prevent a forensic nightmare.

Why it's here

A top upload from a listed channel

DEF CON is on Hallway's list of conference and university channels, and this upload is one of its most-watched talks or lectures. Nobody has recommended it in the communities yet, so it ranks below community picks.

u/manystripesin r/C_Programming • Mentions

On “ELF Shenanigans - ANSI color in symbol names”

This is wonderful! There was a Defcon talk that went over some of the fun (or malicious) ways that terminal escape characters could be used as well, if you want some extra whimsical output.

u/der_pudelin r/C_Programming • Mentions

On “Any other characters than '\' one should focus on sanitizing in order to ensure safe printing to the terminal?”

>Can you even do anything bad by printing certain stuff? I'll just leave this here DEF CON 31 - Weaponizing Plain Text ANSI Escape Sequences