pyplugins.analysis.env module

class pyplugins.analysis.env.EnvTracker[source]

Bases: Plugin

Track environment variables that appear to be read and store them in missing_output if they aren’t in our env

addvar(cpu, match)[source]
mtd_addvar(cpu, match)[source]
on_getenv(cpu, s)[source]
on_strstr(cpu, s1, s2)[source]
uboot_addvar(cpu, match)[source]
static uboot_var_interesting(var)[source]
uninit()[source]
static var_interesting(var)[source]
class pyplugins.analysis.env.TargetCmp[source]

Bases: Plugin

Our 2nd pyplugin for environemnt tracking.

Here we examine config to see if any env variable is set to our magic value. If so, we’ll track values it’s comapred to using the C++ targetcmp plugin. We’ll also try to detect comparisons with library hooks, though those don’t have much success.

Most of the time this plugin doesn’t do anything since there’s no magic value in our env

static filter_env_var_values(target_key, values)[source]
on_string_compare(cpu, s)[source]

LD_PRELOAD based hooks for strcmp/strncmp the guest strcmp/strncmps s to our DYNVAL string

uninit()[source]