Solving practical problems with AI – Part 2 – the most popular, and most commonly used passwords for malicious archives…

I remember that a few years ago, when I still used Twitter, I asked an open-ended question there: what are the most common passwords used for malware archives?

This may sound silly, but there are a looooooot of the ‘default’ ones out there. And while at that time I got a few good answers, most of them circulated around the usual suspects:

  • malware
  • virus
  • infected
  • inf3cted
  • etc.

and their variants.

Today, using AI, we can dig deeper.

Googling:

default malware sample passwords including infected virus malware "inf3cted"

adds a few possible candidates, but then we start asking more questions and we end up adding the following entries:

  • 1337
  • mysubsarethebest
  • history
  • pass
  • god
  • 123
  • 1234
  • 123456
  • 12345678
  • 123456789
  • 111111
  • qwerty
  • virussign
  • 8466
  • infected_pcap
  • infected666 + the last character before the zip extension
  • clean (this is for clean samples)
  • velvet
  • VelvetSweatshop (old, default password for Excel)
  • S1BinaryVault
  • p@ssword
  • shipped
  • invoice
  • doc

The most powerful bit here is not the list of all the possible passwords we can generate, but the list of prompts that got us here. I don’t include them in this post, because I want to emphasize that it was not really AI that did all the work, but… me.

String analysis for n00bs

I like to demo this little windows executable to everyone who thinks they are doing the reverse engineering bit right, by using available automated static and dynamic analysis tools, and trusting them blindly.

The sample is a PE32 that is 2560 bytes long. Running ‘strings’ over it produces these results:

!This program cannot be run in DOS mode.
Rich
.text
`.rdata
@.data
8/u
ExitProcess
GetCommandLineA
kernel32.dll
GetStdHandle
WriteFile
Hello World!

Running it from a CLI gives us the following text being printed out to the STDOUT:

Hello World!

One can say that both static and dynamic analysis give us the same output. Based on this info it’s kinda obvious to conclude that this small binary is a simple CLI program that prints out ‘Hello World!’ when executed.

Except, only code analysis can help us to determine that the program behaves differently if we pass a ‘/h’ argument to it.

In such case, the dynamic analysis will show that the following string is being printed out to the STDOUT:

Hello Baby!!

Static analysis was done right. Default dynamic analysis was done right. And code analysis was done right too. It’s just the automation that failed.

Just a reminder that we can’t blindly trust the automation, because it only sees the obvious. And command line arguments are not the only way to trigger execution of a different branch of code. It could be a guard rail of any sort: time of the day, locale of the OS, delayed payload, payload downloaded from a site that is not available atm, etc.

in the interest of full disclosure: I have not ‘analyzed’ this sample with any AI framework, so am still hopeful that at least some of them would see through this little mischief.