Resources

People often ask me "How did you learn how to hack?" The answer: by reading. This page is a collection of the blog posts and other articles that I have accumulated over the years of my journey. Enjoy!

ANSI Escape Injection Vulnerability in WinRAR- 1421

Siddharth DushanthaPosted 1 Year Ago
  • WinRAR is a Windows specific compression tool. It also has a terminal version as well. ANSI is the escapes sequences used in terminals to change the color, orientation and many other things about text.
  • If the ANSI escape sequences can be included into text printed out to the terminal then it can be weaponized to change the screen. When WINRAR outputs the data to the screen, a malicious file could rewrite the entire screen by adding the escape sequences to the comment of the file.
  • Because escape sequences can be used to rewrite the entire screen (like in VIM), the author of the post was able to use the comment of a file in WinRAR to rewrite everything. In particular, change the file name output to be something that's different than the original. This could be used to hide viruses or something like that.
  • Interesting bug with awesome context. Good write up!